MultiPhase#

class MultiPhase(*args, **kwargs)[source]#

Creates a Phase object that represents a multiphase system consisting of a given list of Phases.

Parameters:
  • phases (list[Phase]) – A list containing the phase objects that make up the multiphase system

  • network (dict) – An OpenPNM Network object, which is a subclass of a dict

Notes

This class assumes that only a SINGLE phase exists in each pore/throat.

Attributes:
K
Np

Shortcut to retrieve the number of pores in the domain

Nt

Shortcut to retrieve the number of throats in the domain

Ps

Shortcut to retrieve the indices of all pores

Ts

Shortcut to retrieve the indices of all throats

name
network

Shortcut to retrieve a handle to the network object associated with the

params

This attribute stores ‘scalar’ data that can be used by pore-scale models.

phases
project
settings

Methods

add_model(propname, model[, domain, regen_mode])

Add a pore-scale model to the object, along with the desired arguments

add_model_collection(models[, domain, ...])

Add a collection of several models at once

add_phases(phases)

Adds supplied phases to MultiPhase object and sets occupancy to 0.

filter_by_label([pores, throats, labels, mode])

Returns which of the supplied pores (or throats) has the specified label(s)

get_conduit_data(propname)

Fetches an Nt-by-3 array of the requested property

interpolate_data(propname[, mode])

Generates an array of the requested pore/throat data by interpolating the neighboring throat/pore data.

labels([pores, throats, element, mode])

Returns a list of labels present on the object

num_pores([labels, mode])

Returns the number of pores of the specified labels

num_throats([labels, mode])

Return the number of throats of the specified labels

pores([labels, mode, asmask])

Returns pore indicies where given labels exist, according to the logic specified by the mode argument.

props([element])

Retrieves a list of keys that contain numerical data (i.e. "properties").

regenerate_models([propnames, exclude])

Regenerate models associated with the Multiphase object

run_model(propname[, domain])

Runs the requested model and places the result into the correct locations

set_binary_partition_coef(phases, model, ...)

Sets binary partition coefficient as defined by the interface concentration ratio of phase 1 to phase 2.

set_label(label[, pores, throats, mode])

Creates or updates a label array

set_occupancy(phase, *[, pores, throats, values])

Specifies occupancy of a phase in each pore or throat.

throats([labels, mode, asmask])

Returns throat locations where given labels exist, according to the logic specified by the mode argument.

to_indices(mask)

Converts a boolean mask to pore or throat indices

to_mask([pores, throats])

Generates a boolean mask with True values in the given locations