pc_to_satn

pc_to_satn(pc, im, mode='drainage')[source]

Converts an image of capillary entry pressures to saturation values

Parameters:
  • 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 +inf and residual phase by -inf. Solid vs void phase is defined by im which is mandatory.

  • im (ndarray) – A Numpy array with True values indicating the void space

  • mode (str) –

    Controls how the pressures are converted to sequence. The options are:

    mode

    Description

    ’drainage’

    The pressures are assumed to have been filled from smallest to largest.

    ’imbibition’

    The pressures are assumed to have been filled from largest to smallest

Returns:

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:

ndarray

Notes

If any +inf values are present the maximum saturation will be less than 1.0 since not all wetting phase was displaced.

Examples

Click here to view online example.