porespy.metrics.rev_porosity#

porespy.metrics.rev_porosity(im, n=1000, slices=None)#

Calculates the porosity for a many subdomains of diffrent sizes, suitable for an REV plot

Parameters:
  • im (ndarray) – A boolean image of the porous material with True indicating the phase of interest

  • n (int, default = 1000) – The number of random blocks to analyze. If slices are provided this is ignored.

  • slices (list) – A list of slice objects into the image which define the subdomains. If not provided then n random blocks are used.

Returns:

result – A custom object with the following data added as named attributes:

Attribute

Description

volume

The total volume of each cubic subdomain tested

porosity

The porosity of each subdomain tested

These attributes can be conveniently plotted by passing the Results object to matplotlib’s plot function using the notation: plt.plot(\*result, 'b.'). The resulting plot is similar to the sketch given by Bachmat and Bear [1]

Return type:

Results object

References

Examples

Click here to view online example.