Added missing conversion function

This commit is contained in:
Svenn Tveit
2022-03-02 18:06:04 +01:00
parent f5d02c8049
commit fa12917a6c

View File

@@ -382,6 +382,20 @@ private:
return XoG*M_Brine / (M_H2*(1 - XoG) + XoG*M_Brine);
}
/*!
* \brief Convert a gas mole fraction in the oil phase the corresponding mass fraction.
*
* \param xoG mole fraction [-]
*/
template <class LhsEval>
LhsEval convertxoGToXoG(const LhsEval& xoG) const
{
Scalar M_H2 = H2::molarMass();
Scalar M_Brine = Brine::molarMass();
return xoG*M_H2 / (xoG*(M_H2 - M_Brine) + M_Brine);
}
/*!
* \brief Convert the mass fraction of the gas component in the oil phase to the corresponding gas dissolution
* factor.