mass_to_molar#

mass_to_molar(phase, MW='param.molecular_weight', rho='pore.density')[source]#

Calculates the molar density from the molecular weight and mass density

Parameters:
  • phase (OpenPNM Phase object) – The phase object to which this model is associated (i.e. attached). This controls the length of the calculated array(s), and also provides access to other necessary properties.

  • MW (str (dict key) or numeric) – Name of the dictionary key on phase containing the ndarray of molecular weight values, in units of [g/mol]. If a numerical value is passed (i.e. a scalar or ndarray) it gets used directly.

  • rho (str (dict key) or numeric) – Name of the dictionary key on phase containing the ndarray of mass density values, in units of [kg/m^3]. If a numerical value is passed (i.e. a scalar or ndarray) it gets used directly.

Returns:

value – A numpy ndrray containing molar density values [mol/m3]

Return type:

ndarray