y#

StandardGasMixture.y(compname=None, y=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. If y is not provided this will return the mole fraction of the requested component. If y is provided this will set the mole fraction of the specified component to y.

  • y (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 also 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>'] = y