diff --git a/dumux/material/components/h2o.hh b/dumux/material/components/h2o.hh index 70e9db38a6ff5c713c431d7cb6dababa3c0d3f64..372a10bbd1e550701029e40a6297c52b401e0752 100644 --- a/dumux/material/components/h2o.hh +++ b/dumux/material/components/h2o.hh @@ -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$. diff --git a/dumux/material/components/iapws/region4.hh b/dumux/material/components/iapws/region4.hh index 9464e41f6a1612d01635b69965c2f983347d58ac..7b3ddce31514ec46bc142622234b5040469d868e 100644 --- a/dumux/material/components/iapws/region4.hh +++ b/dumux/material/components/iapws/region4.hh @@ -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