Skip to content
Snippets Groups Projects
Commit 74d62818 authored by Benjamin Faigle's avatar Benjamin Faigle
Browse files

implemented inverse function of vapor pressure to get the temperature at vapor pressure.

Verified as 0.1Mpa: 372.755918611338; 1Mpa: 453.035632391467; 10Mpa: 584.149487998528; reviewed Phil

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8863 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 7c6cce7f
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,27 @@ public:
return Region4::saturationPressure(T);
}
/*!
* \brief The vapor temperature in \f$\mathrm{[Ka]}\f$ of pure water
* at a given pressure.
*
*\param pressure pressure in \f$\mathrm{[Pa]}\f$
*
* See:
*
* IAPWS: "Revised Release on the IAPWS Industrial Formulation
* 1997 for the Thermodynamic Properties of Water and Steam",
* http://www.iapws.org/relguide/IF97-Rev.pdf
*/
static Scalar vaporTemperature(Scalar pressure)
{
if (pressure > criticalPressure())
pressure = criticalPressure();
if (pressure < triplePressure())
pressure = triplePressure();
return Region4::vaporTemperature(pressure);
}
/*!
* \brief Specific enthalpy of water steam \f$\mathrm{[J/kg]}\f$.
......
......@@ -89,6 +89,35 @@ public:
return 1e6*tmp;
}
/*!
* \brief Returns the saturation temperature in \f$\mathrm{[K]}\f$ of pure water at a given
* pressure.
*
*\param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*
* The saturation pressure is often also called vapor pressure.
*/
static Scalar vaporTemperature(Scalar pressure)
{
static const Scalar n[10] = {
0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
-0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,
0.65017534844798e3
};
Scalar beta = pow((pressure/1e6 /*from Pa to MPa*/), (1./4.));
Scalar beta2 = pow(beta, 2.);
Scalar E = beta2 + n[2] * beta + n[5];
Scalar F = n[0]*beta2 + n[3]*beta + n[6];
Scalar G = n[1]*beta2 + n[4]*beta + n[7];
Scalar D = ( 2.*G)/(-F -std::sqrt(pow(F,2.) - 4.*E*G));
Scalar temperature = (n[9] + D - std::sqrt(pow(n[9]+D , 2.) - 4.* (n[8] + n[9]*D)) ) * 0.5;
return temperature;
}
};
} // end namepace IAPWS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment