imbibition¶
- imbibition(im, pc=None, dt=None, inlets=None, outlets=None, residual=None, steps=25, min_size=0, conn='min')[source]¶
Performs an imbibition simulation using image-based sphere insertion
- Parameters:
im (ndarray) – The image of the porous materials with void indicated by
True
pc (ndarray) – An array containing precomputed capillary pressure values in each voxel. This can include gravity effects or not. This can be generated by
capillary_transform
. If not provided then 2/dt is used.dt (ndarray (optional)) – The distance transform of
im
. If not provided it will be calculated, so supplying it saves time.inlets (ndarray) – An image the same shape as
im
withTrue
values indicating the wetting fluid inlet(s). IfNone
then the wetting film is able to appear anywhere within the domain.residual (ndarray, optional) – A boolean mask the same shape as
im
withTrue
values indicating to locations of residual wetting phase.steps (int or array_like (default = 25)) – The range of pressures to apply. If an integer is given then steps will be created between the lowest and highest pressures in
pc
. If a list is given, each value in the list is used directly in order.min_size (int) – Any clusters of trapped voxels smaller than this size will be set to not trapped. This argument is only used if outlets is given. This is useful to prevent small voxels along edges of the void space from being set to trapped. These can appear to be trapped due to the jagged nature of the digital image. The default is 0, meaning this adjustment is not applied, but a value of 3 or 4 is recommended to activate this adjustment.
conn (str) – Can be either ‘min’ or ‘max’ and controls the shape of the structuring element used to determine voxel connectivity. The default is ‘min’ which imposes the strictest criteria, so that voxels must share a face to be considered connected.
- Returns:
results – A dataclass-like object with the following attributes:
———– —————————————————————- Attribute Description ———– —————————————————————- im_pc An ndarray with each voxel indicating the step number at
which it was first invaded by wetting phase.
- im_seq A numpy array with each voxel value indicating the sequence
at which it was invaded by the wetting phase. Values of -1 indicate that it was not invaded, either because it was trapped, inaccessbile, or sufficient pressure was not reached.
- im_snwp A numpy array with each voxel value indicating the global
non-wetting phase saturation at the point it was invaded.
- im_trapped A numpy array with
True
values indicating trapped voxels if outlets was provided, otherwise will be None.
pc 1D array of capillary pressure values that were applied snwp 1D array of non-wetting phase saturations for each applied
value of capillary pressure (
pc
).———– —————————————————————-
- Return type:
Result Object
Notes
The simulation proceeds as though the non-wetting phase pressure is very high and is slowly lowered. Then imbibition occurs into the smallest accessible regions at each step. Closed or inaccessible pores are assumed to be filled with wetting phase.
Examples