porespy.simulations.imbibition_fft#

porespy.simulations.imbibition_fft(im, inlets=None, outlets=None, residual=None, dt=None, steps=None, smooth=True)#

Performs a distance transform based imbibition simulation using fft-based convolution for both the erosion and dilation steps

Parameters:
  • im (ndarray) – The boolean image of the void space on which to perform the simulation

  • inlets (ndarray (optional)) – A boolean array with True values indicating the inlet locations for the invading (wetting) fluid. If not provided then access limitations will not be applied, meaning that the invading fluid can appear anywhere within the domain.

  • outlets (ndarray (optional)) – A boolean array with True values indicating the outlet locations through which defending (non-wetting) phase would exit the domain. If not provided then trapping of the non-wetting phase is ignored.

  • dt (ndarray, optional) – The distance transform of the void space. This is optional, but providing it if it is already available save some time. Also, it can be converted to integer type or round to fewer decimal places to reduce the number of unique sphere sizes to insert if steps=None.

  • steps (scalar or array_like) – Controls which sphere sizes to invade. If an int then this many steps between 1 and the maximum size are used. A tuple is treated as the start and stop of the integer values. A list or ndarray is used directly. If None (default) then each unique value in the distance transform is used.

  • smooth (boolean) – If True (default) then the spheres are drawn without any single voxel protrusions on the faces.

Returns:

results – An object with the following attributes:

Attribute

Description

im_seq

The sequence map indicating the sequence or step number at which each voxels was first invaded.

im_size

The size map indicating the size of the sphere being drawn when each voxel was first invaded.

Return type:

Dataclass-like object