mix_and_match#

mix_and_match(phase, prop, phases, occupancy)[source]#

Return the given property by looking it up from a list of given phases based on occupancy.

Parameters:
  • phase (OpenPNM Phase object) – The phase object to which this model is associated (i.e. attached). This controls the length of the calculated array(s), and also provides access to other necessary properties.

  • prop (str) – The dictionary key to the array containing the pore/throat property to be used in the calculation.

  • phases (list) – List of Phases over which the given prop is to be averaged out.

  • occupancy (str) – The dictionary key to the array containing the occupancy associated with each of the given phases.

Returns:

weighted_average – Weighted average of the given prop averaged over phases.

Return type:

ndarray