- class Species(*args, **kwargs)[source]#
A special Phase object that represents a single species in a mixture
This class provides a
mixtureattribute which allows one to lookup which mixture the species is associated with.
network (GenericNetwork) – The network to which this phase object will be attached.
species (str, optional) – If provided, this is used to lookup tabulated constants from the
chemicalspackage, which attempts to find a match. For instance, ‘water’, ‘Water’, and ‘H2O’ all work. The contants are stored in
species.params['molecular_weight']. They can also be accessed using
species['param.molecular_weight']using some behind the scenes python magic.
name (str, optional) – The name of the phase. This is useful to keep track of the objects throughout the simulation. The name must be unique to the project. If no name is given, one is generated.
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, ...])
collectionof several models at once
filter_by_label([pores, throats, labels, mode])
Returns which of the supplied pores (or throats) has the specified label(s)
Fetches an Nt-by-3 array of the requested property
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
Returns the number of pores of the specified labels
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
Retrieves a list of keys that contain numerical data (i.e.
Runs all the models stored in the object's
Runs the requested model and places the result into the correct locations
set_label(label[, pores, throats, mode])
Creates or updates a label array
throats([labels, mode, asmask])
Returns throat locations where given labels exist, according to the logic specified by the
Converts a boolean mask to pore or throat indices
Generates a boolean mask with True values in the given locations