- pc_to_satn(pc, im, mode='drainage')#
Converts an image of capillary entry pressures to saturation values
pc (ndarray) – A Numpy array with the value in each voxel indicating the capillary pressure at which it was invaded. In order to accommodate the possibility of both positive and negative capillary pressure values, uninvaded voxels should be indicated by
+infand residual phase by
-inf. Solid vs void phase is defined by
imwhich is mandatory.
im (ndarray) – A Numpy array with
Truevalues indicating the void space
mode (str) –
Controls how the pressures are converted to sequence. The options are:
The pressures are assumed to have been filled from smallest to largest.
The pressures are assumed to have been filled from largest to smallest
satn – A Numpy array the same shape as pc, with each voxel value indicating the global saturation at which it was invaded, according to the specified mode. Voxels with -inf are treated as though they were invaded at the start of the simulation so are given a sequence number of 1 for both mode drainage and imbibition.
- Return type:
+infvalues are present the maximum saturation will be less than 1.0 since not all wetting phase was displaced.
Click here to view online example.