GasMixture#

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

Wrapper class for creating a gas mixture.

This class has a helper method y which allows for setting and getting of compositions.

Attributes:
Np
Nt
Ps
Ts
components
info
name
network
params
project
settings

Methods

add_comp(component[, mole_fraction])

Helper method to add a component

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

check_mixture_health()

Checks the state of health of the mixture

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

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

get_comp_vals(propname)

Get a dictionary of the requested values from each component in the mixture

get_conduit_data(propname)

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

get_mix_vals(propname[, mode, power])

Get the mole fraction weighted value of a given property for the mixture

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.

regenerate_models(**kwargs)

Runs all the models stored in the object's models attribute

remove_comp(component)

Helper method to remove a component from the mixture

run_model(propname[, domain])

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 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

y([compname, y])

Helper method for getting and setting mole fractions of a component