x#
- StandardLiquidMixture.x(compname=None, x=None)#
Helper method for getting and setting mole fractions of a component
- Parameters:
compname (str, optional) – The name of the component, i.e.
obj.name
. Ifx
is not provided this will return the mole fraction of the requested component. Ifx
is provided this will set the mole fraction of the specified component tox
.x (scalar or ndarray, optional) – The mole fraction of the given species in the mixture. If not provided this method works as a getter and will return the mole fraction of the requested component. If
compname
is not provided then the mole fractions of all components will be returned as a dictionary with the components names as keys.
Notes
This method is equivalent to
mixture['pore.mole_fraction.<compname>'] = x