seq_to_satn#

seq_to_satn(seq, im=None, mode='drainage')[source]#

Converts an image of invasion sequence values to non-wetting phase saturation values.

Parameters:
  • seq (ndarray) – The image containing invasion sequence values in each voxel. Solid should be indicated as 0’s and uninvaded voxels as -1.

  • im (ndarray, optional) – A binary image of the porous media, with True indicating the void space and False indicating the solid phase. If not given then it is assumed that the solid is identified as seq == 0.

  • mode (str) –

    Controls how the sequences are converted to saturations. The options are:

    mode

    Description

    ’drainage’

    The saturation is assumed to increase with increasing sequence

    ’imbibition’

    The saturation is assumed to decrease with increasing sequence

Returns:

satn – An ndarray the same shape as seq but with sequence values replaced by the fraction of void space invaded at the sequence number, accounting for the specified mode. Solid voxels and uninvaded voxels are represented by 0 and -1, respectively.

Return type:

ndarray

Notes

If any -1 values are present in seq the maximum saturation will be less than 1.0 since this means that not all wetting phase was displaced.

Examples

Click here to view online example.