interpolate_data#

GasByName.interpolate_data(propname, mode='mean')#

Determines a pore (or throat) property as the average of its neighboring throats (or pores)

Parameters
  • propname (str) – The dictionary key to the values to be interpolated.

  • mode (str) –

    The method used for interpolation. The default value is ‘mean’ Options are:

    mode

    meaning

    ’mean’

    returns the pore (or throat) property as the average of its neighboring throats (or pores)

    ’min’

    returns the pore (or throat) property as the minimum of its neighboring throats (or pores)

    ’max’

    returns the pore (or throat) property as the maximum of its neighboring throats (or pores)

Returns

vals – An array containing interpolated pore (or throat) data

Return type

ndarray

Examples

>>> import openpnm as op
>>> pn = op.network.Cubic(shape=[3, 1, 1])
>>> pn['pore.value'] = [1, 2, 3]
>>> pn.interpolate_data('pore.value')
array([1.5, 2.5])