3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
h2o.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_H2O_HH
25#define DUMUX_H2O_HH
26
27#include <cmath>
28#include <cassert>
29
32
33#include "iapws/common.hh"
34#include "iapws/region1.hh"
35#include "iapws/region2.hh"
36#include "iapws/region4.hh"
37
41
42namespace Dumux {
43namespace Components {
44
55template <class Scalar>
56class H2O
57: public Components::Base<Scalar, H2O<Scalar> >
58, public Components::Liquid<Scalar, H2O<Scalar> >
59, public Components::Gas<Scalar, H2O<Scalar> >
60{
61
66
67 // specific gas constant of water
68 static constexpr Scalar Rs = Common::Rs;
69
70public:
74 static std::string name()
75 { return "H2O"; }
76
80 static constexpr Scalar molarMass()
81 { return Common::molarMass; }
82
86 static constexpr Scalar acentricFactor()
87 { return Common::acentricFactor; }
88
92 static constexpr Scalar criticalTemperature()
94
98 static constexpr Scalar criticalPressure()
99 { return Common::criticalPressure; }
100
104 static constexpr Scalar criticalMolarVolume()
106
110 static constexpr Scalar tripleTemperature()
111 { return Common::tripleTemperature; }
112
116 static constexpr Scalar triplePressure()
117 { return Common::triplePressure; }
118
131 {
132 using std::min;
133 using std::max;
134 T = min(T, criticalTemperature());
135 T = max(T,tripleTemperature());
136
138 }
139
152 {
153 using std::min;
154 using std::max;
157
159 }
160
174 {
176
177 // regularization
178 if (pressure < triplePressure() - 100) {
179 // We assume an ideal gas for low pressures to avoid the
180 // 0/0 for the gas enthalpy at very low pressures. The
181 // enthalpy of an ideal gas does not exhibit any
182 // dependence on pressure, so we can just return the
183 // specific enthalpy at the point of regularization, i.e.
184 // the triple pressure - 100Pa
185 return enthalpyRegion2_(temperature, triplePressure() - 100);
186 }
188 if (pressure > pv) {
189 // the pressure is too high, in this case we use the slope
190 // of the enthalpy at the vapor pressure to regularize
191 Scalar dh_dp =
192 Rs*temperature*
194 Region2::dPi_dp(pv)*
196
197 return
198 enthalpyRegion2_(temperature, pv) +
199 (pressure - pv)*dh_dp;
200 }
201
202 return enthalpyRegion2_(temperature, pressure);
203 }
204
218 {
220
221 // regularization
223 if (pressure < pv) {
224 // the pressure is too low, in this case we use the slope
225 // of the enthalpy at the vapor pressure to regularize
226 Scalar dh_dp =
227 Rs * temperature*
229 Region1::dPi_dp(pv)*
231
232 return
233 enthalpyRegion1_(temperature, pv) +
234 (pressure - pv)*dh_dp;
235 }
236
237 return enthalpyRegion1_(temperature, pressure);
238 }
239
253 {
255
256 // regularization
257 if (pressure < triplePressure() - 100) {
258 return heatCap_p_Region2_(temperature, triplePressure() - 100);
259 }
261 if (pressure > pv) {
262 // the pressure is too high, in this case we use the heat
263 // cap at the vapor pressure to regularize
264 return heatCap_p_Region2_(temperature, pv);
265 }
266 return heatCap_p_Region2_(temperature, pressure);
267 }
268
282 {
284
285 // regularization
287 if (pressure < pv) {
288 // the pressure is too low, in this case we use the heat cap at the vapor pressure to regularize
289 return heatCap_p_Region1_(temperature, pv);
290 }
291
292 return heatCap_p_Region1_(temperature, pressure);
293 }
294
308 {
310
311 // regularization
313 if (pressure < pv) {
314 // the pressure is too low, in this case we use the slope
315 // of the internal energy at the vapor pressure to
316 // regularize
317
318 /*
319 // calculate the partial derivative of the internal energy
320 // to the pressure at the vapor pressure.
321 Scalar tau = Region1::tau(temperature);
322 Scalar dGamma_dPi = Region1::dGamma_dPi(temperature, pv);
323 Scalar ddGamma_dTaudPi = Region1::ddGamma_dTaudPi(temperature, pv);
324 Scalar ddGamma_ddPi = Region1::ddGamma_ddPi(temperature, pv);
325 Scalar pi = Region1::pi(pv);
326 Scalar dPi_dp = Region1::dPi_dp(pv);
327 Scalar du_dp =
328 Rs*temperature*
329 (tau*dPi_dp*ddGamma_dTaudPi + dPi_dp*dPi_dp*dGamma_dPi + pi*dPi_dp*ddGamma_ddPi);
330 */
331
332 // use a straight line for extrapolation. use forward
333 // differences to calculate the partial derivative to the
334 // pressure at the vapor pressure
335 static const Scalar eps = 1e-7;
336 Scalar uv = internalEnergyRegion1_(temperature, pv);
337 Scalar uvPEps = internalEnergyRegion1_(temperature, pv + eps);
338 Scalar du_dp = (uvPEps - uv)/eps;
339 return uv + du_dp*(pressure - pv);
340 }
341
342 return internalEnergyRegion1_(temperature, pressure);
343 }
344
357 {
359
360 // regularization
361 if (pressure < triplePressure() - 100) {
362 // We assume an ideal gas for low pressures to avoid the
363 // 0/0 for the internal energy of gas at very low
364 // pressures. The enthalpy of an ideal gas does not
365 // exhibit any dependence on pressure, so we can just
366 // return the specific enthalpy at the point of
367 // regularization, i.e. the triple pressure - 100Pa, and
368 // subtract the work required to change the volume for an
369 // ideal gas.
370 return
371 enthalpyRegion2_(temperature, triplePressure() - 100)
372 -
373 Rs*temperature; // = p*v for an ideal gas!
374 }
376 if (pressure > pv) {
377 // the pressure is too high, in this case we use the slope
378 // of the internal energy at the vapor pressure to
379 // regularize
380
381 /*
382 // calculate the partial derivative of the internal energy
383 // to the pressure at the vapor pressure.
384 Scalar tau = Region2::tau(temperature);
385 Scalar dGamma_dPi = Region2::dGamma_dPi(temperature, pv);
386 Scalar ddGamma_dTaudPi = Region2::ddGamma_dTaudPi(temperature, pv);
387 Scalar ddGamma_ddPi = Region2::ddGamma_ddPi(temperature, pv);
388 Scalar pi = Region2::pi(pv);
389 Scalar dPi_dp = Region2::dPi_dp(pv);
390 Scalar du_dp =
391 Rs*temperature*
392 (tau*dPi_dp*ddGamma_dTaudPi + dPi_dp*dPi_dp*dGamma_dPi + pi*dPi_dp*ddGamma_ddPi);
393
394 // use a straight line for extrapolation
395 Scalar uv = internalEnergyRegion2_(temperature, pv);
396 return uv + du_dp*(pressure - pv);
397 */
398
399 // use a straight line for extrapolation. use backward
400 // differences to calculate the partial derivative to the
401 // pressure at the vapor pressure
402 static const Scalar eps = 1e-7;
403 Scalar uv = internalEnergyRegion2_(temperature, pv);
404 Scalar uvMEps = internalEnergyRegion2_(temperature, pv - eps);
405 Scalar du_dp = (uv - uvMEps)/eps;
406 return uv + du_dp*(pressure - pv);
407 }
408
409 return internalEnergyRegion2_(temperature, pressure);
410 }
411
425 {
426 Region1::checkValidityRange(temperature, pressure, "Heat capacity for a constant volume");
427
428 // regularization
430 if (pressure < pv) {
431 // the pressure is too low, in this case we use the heat cap at the vapor pressure to regularize
432
433 return heatCap_v_Region1_(temperature, pv);
434 }
435
436 return heatCap_v_Region1_(temperature, pressure);
437 }
438
452 {
453 Region2::checkValidityRange(temperature, pressure, "Heat capacity for a constant volume");
454
455 // regularization
456 if (pressure < triplePressure() - 100) {
457 return
458 heatCap_v_Region2_(temperature, triplePressure() - 100);
459 }
461 if (pressure > pv) {
462 return heatCap_v_Region2_(temperature, pv);
463 }
464
465 return heatCap_v_Region2_(temperature, pressure);
466 }
467
471 static constexpr bool gasIsCompressible()
472 { return true; }
473
477 static constexpr bool liquidIsCompressible()
478 { return true; }
479
493 {
495
496 // regularization
497 if (pressure < triplePressure() - 100) {
498 // We assume an ideal gas for low pressures to avoid the
499 // 0/0 for the internal energy and enthalpy.
500 Scalar rho0IAPWS = 1.0/volumeRegion2_(temperature,
501 triplePressure() - 100);
504 triplePressure() - 100);
505 return
506 rho0IAPWS/rho0Id *
509 pressure);
510 }
512 if (pressure > pv) {
513 // the pressure is too high, in this case we use the slope
514 // of the density energy at the vapor pressure to
515 // regularize
516
517 // calculate the partial derivative of the specific volume
518 // to the pressure at the vapor pressure.
519 const Scalar eps = pv*1e-8;
520 Scalar v0 = volumeRegion2_(temperature, pv);
521 Scalar v1 = volumeRegion2_(temperature, pv + eps);
522 Scalar dv_dp = (v1 - v0)/eps;
523 /*
524 Scalar pi = Region2::pi(pv);
525 Scalar dp_dPi = Region2::dp_dPi(pv);
526 Scalar dGamma_dPi = Region2::dGamma_dPi(temperature, pv);
527 Scalar ddGamma_ddPi = Region2::ddGamma_ddPi(temperature, pv);
528
529 Scalar RT = Rs*temperature;
530 Scalar dv_dp =
531 RT/(dp_dPi*pv)
532 *
533 (dGamma_dPi + pi*ddGamma_ddPi - v0*dp_dPi/RT);
534 */
535
536 // calculate the partial derivative of the density to the
537 // pressure at vapor pressure
538 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
539
540 // use a straight line for extrapolation
541 return 1.0/v0 + (pressure - pv)*drho_dp;
542 }
543
544 return 1.0/volumeRegion2_(temperature, pressure);
545 }
546
556
560 static constexpr bool gasIsIdeal()
561 { return false; }
562
576 {
577 // We use the newton method for this. For the initial value we
578 // assume steam to be an ideal gas
580 Scalar eps = pressure*1e-7;
581
582 Scalar deltaP = pressure*2;
583 using std::abs;
584 for (int i = 0; i < 5 && abs(pressure*1e-9) < abs(deltaP); ++i)
585 {
587
588 Scalar df_dp;
589 df_dp = gasDensity(temperature, pressure + eps);
590 df_dp -= gasDensity(temperature, pressure - eps);
591 df_dp /= 2*eps;
592
593 deltaP = - f/df_dp;
594
595 pressure += deltaP;
596 }
597
598 return pressure;
599 }
600
614 {
616
617 // regularization
619 if (pressure < pv) {
620 // the pressure is too low, in this case we use the slope
621 // of the density at the vapor pressure to regularize
622
623 // calculate the partial derivative of the specific volume
624 // to the pressure at the vapor pressure.
625 const Scalar eps = pv*1e-8;
626 Scalar v0 = volumeRegion1_(temperature, pv);
627 Scalar v1 = volumeRegion1_(temperature, pv + eps);
628 Scalar dv_dp = (v1 - v0)/eps;
629
630 /*
631 Scalar v0 = volumeRegion1_(temperature, pv);
632 Scalar pi = Region1::pi(pv);
633 Scalar dp_dPi = Region1::dp_dPi(pv);
634 Scalar dGamma_dPi = Region1::dGamma_dPi(temperature, pv);
635 Scalar ddGamma_ddPi = Region1::ddGamma_ddPi(temperature, pv);
636
637 Scalar RT = Rs*temperature;
638 Scalar dv_dp =
639 RT/(dp_dPi*pv)
640 *
641 (dGamma_dPi + pi*ddGamma_ddPi - v0*dp_dPi/RT);
642 */
643
644 // calculate the partial derivative of the density to the
645 // pressure at vapor pressure
646 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
647
648 // use a straight line for extrapolation
649 return 1.0/v0 + (pressure - pv)*drho_dp;
650 }
651
652 return 1/volumeRegion1_(temperature, pressure);
653 }
654
664
679 {
680 // We use the newton method for this. For the initial value we
681 // assume the pressure to be 10% higher than the vapor
682 // pressure
684 Scalar eps = pressure*1e-7;
685
686 Scalar deltaP = pressure*2;
687
688 using std::abs;
689 for (int i = 0; i < 5 && abs(pressure*1e-9) < abs(deltaP); ++i) {
691
692 Scalar df_dp;
693 df_dp = liquidDensity(temperature, pressure + eps);
694 df_dp -= liquidDensity(temperature, pressure - eps);
695 df_dp /= 2*eps;
696
697 deltaP = - f/df_dp;
698
699 pressure += deltaP;
700 }
701
702 return pressure;
703 }
704
721 {
723
725 return Common::viscosity(temperature, rho);
726 }
727
728
740 {
742
744 return Common::viscosity(temperature, rho);
745 }
746
763 {
764 // Thermal conductivity of water is empirically fit.
765 // Evaluating that fitting-function outside the area of validity does not make sense.
766 if ( !( (pressure <= 400e6 && (273.15 <= temperature) && (temperature <= 398.15))
767 || (pressure <= 200e6 && (398.15 < temperature) && (temperature <= 523.15))
768 || (pressure <= 150e6 && (523.15 < temperature) && (temperature <= 673.15))
769 || (pressure <= 100e6 && (673.15 < temperature) && (temperature <= 1073.15)) ))
770 {
771 DUNE_THROW(NumericalProblem,
772 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
773 "(T=" << temperature << ", p=" << pressure << ")");
774 }
775
778 }
779
796 {
797 // Thermal conductivity of water is empirically fit.
798 // Evaluating that fitting-function outside the area of validity does not make sense.
799 if ( !( (pressure <= 400e6 && (273.15 <= temperature) && (temperature <= 398.15))
800 || (pressure <= 200e6 && (398.15 < temperature) && (temperature <= 523.15))
801 || (pressure <= 150e6 && (523.15 < temperature) && (temperature <= 673.15))
802 || (pressure <= 100e6 && (673.15 < temperature) && (temperature <= 1073.15)) ))
803 {
804 DUNE_THROW(NumericalProblem,
805 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
806 "(T=" << temperature << ", p=" << pressure << ")");
807 }
808
811 }
812
813private:
814 // the unregularized specific enthalpy for liquid water
815 static constexpr Scalar enthalpyRegion1_(Scalar temperature, Scalar pressure)
816 {
817 return
820 Rs*temperature;
821 }
822
823 // the unregularized specific isobaric heat capacity
824 static constexpr Scalar heatCap_p_Region1_(Scalar temperature, Scalar pressure)
825 {
826 return
829 Rs;
830 }
831
832 // the unregularized specific isochoric heat capacity
833 static Scalar heatCap_v_Region1_(Scalar temperature, Scalar pressure)
834 {
838
839 return
840 - tau * tau *
842 diff;
843 }
844
845 // the unregularized specific internal energy for liquid water
846 static constexpr Scalar internalEnergyRegion1_(Scalar temperature, Scalar pressure)
847 {
848 return
849 Rs * temperature *
852 }
853
854 // the unregularized specific volume for liquid water
855 static constexpr Scalar volumeRegion1_(Scalar temperature, Scalar pressure)
856 {
857 return
860 Rs * temperature / pressure;
861 }
862
863 // the unregularized specific enthalpy for steam
864 static constexpr Scalar enthalpyRegion2_(Scalar temperature, Scalar pressure)
865 {
866 return
869 Rs*temperature;
870 }
871
872 // the unregularized specific internal energy for steam
873 static constexpr Scalar internalEnergyRegion2_(Scalar temperature, Scalar pressure)
874 {
875 return
876 Rs * temperature *
879 }
880
881 // the unregularized specific isobaric heat capacity
882 static constexpr Scalar heatCap_p_Region2_(Scalar temperature, Scalar pressure)
883 {
884 return
887 Rs;
888 }
889
890 // the unregularized specific isochoric heat capacity
891 static Scalar heatCap_v_Region2_(Scalar temperature, Scalar pressure)
892 {
896 Scalar diff = num * num / (1 - pi * pi * Region2::ddGamma_ddPi(temperature, pressure));
897 return
898 - tau * tau *
900 - diff;
901 }
902
903 // the unregularized specific volume for steam
904 static constexpr Scalar volumeRegion2_(Scalar temperature, Scalar pressure)
905 {
906 return
909 Rs * temperature / pressure;
910 }
911};
912
913template <class Scalar>
914struct IsAqueous<H2O<Scalar>> : public std::true_type {};
915
916} // end namespace Components
917
918namespace FluidSystems::Detail {
919// viscosity according to Reid, R.C.
920template <class Scalar>
922{
923 constexpr Scalar tc = 647.3;
924 using std::max;
925 const Scalar tr = max(temperature/tc, 1e-8);
926
927 const Scalar fp0 = 1.0 + 0.221*(0.96 + 0.1*(tr - 0.7));
928 constexpr Scalar xi = 3.334e-3;
929 using std::pow;
930 using std::exp;
931 const Scalar eta_xi = (0.807*pow(tr, 0.618) - 0.357*exp((-0.449)*tr)
932 + 0.34*exp((-4.058)*tr) + 0.018)*fp0;
933
934 return 1.0e-7*eta_xi/xi;
935}
936
937// viscosity according to Nagel, T. et al.
938template <class Scalar>
940{
941 constexpr Scalar a1 = -4.4189440e-6;
942 constexpr Scalar a2 = 4.6876380e-8;
943 constexpr Scalar a3 = -5.3894310e-12;
944 constexpr Scalar a4 = 3.2028560e-16;
945 constexpr Scalar a5 = 4.9191790e-22;
946
947 return a1 + a2*temperature + a3*temperature*temperature
950}
951} // end FluidSystems::Detail
952namespace FluidSystems {
976template <class Scalar>
978{
979 if (temperature < 480.0)
981
982 else if (temperature > 500.0)
984
985 else // interpolate
986 {
987 const Scalar op = (500.0 - temperature)/20.0;
988
991 }
992}
993} // end namespace FluidSystems
994} // end namespace Dumux
995
996#endif
Some exceptions thrown in DuMux
Implements the equations for region 1 of the IAPWS '97 formulation. See:
Implements the equations for region 2 of the IAPWS '97 formulation. See:
Implements relations common for all regions of the IAPWS '97 formulation. See:
Implements the equations for region 4 of the IAPWS '97 formulation.
Interface for components that have a gas state.
Interface for components that have a liquid state.
Relations valid for an ideal gas.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Scalar h2oGasViscosityInMixture(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam in a gas mixture.
Definition: h2o.hh:977
Scalar viscosityNagel_(Scalar temperature)
Definition: h2o.hh:939
Scalar viscosityReid_(Scalar temperature)
Definition: h2o.hh:921
Exception thrown if a fixable numerical problem occurs.
Definition: exceptions.hh:39
IsAqueous struct.
Definition: components/base.hh:47
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:59
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:63
Interface for components that have a gas state.
Definition: gas.hh:41
Material properties of pure water .
Definition: h2o.hh:60
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure water.
Definition: h2o.hh:739
static Scalar vaporTemperature(Scalar pressure)
The vapor temperature in of pure water at a given pressure.
Definition: h2o.hh:151
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in at a given density and temperature.
Definition: h2o.hh:678
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of water (IAPWS) .
Definition: h2o.hh:762
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid water .
Definition: h2o.hh:306
static Scalar gasHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of steam and water vapor .
Definition: h2o.hh:451
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: h2o.hh:560
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam.
Definition: h2o.hh:720
static const Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of liquid water .
Definition: h2o.hh:280
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid water .
Definition: h2o.hh:216
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure water in at a given pressure and temperature.
Definition: h2o.hh:613
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of water steam .
Definition: h2o.hh:172
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of steam in at a given pressure and temperature.
Definition: h2o.hh:492
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of water in at a given pressure and temperature.
Definition: h2o.hh:662
static constexpr Scalar acentricFactor()
The acentric factor of water.
Definition: h2o.hh:86
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure water at a given temperature.
Definition: h2o.hh:130
static constexpr Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: h2o.hh:92
static Scalar gasThermalConductivity(const Scalar temperature, const Scalar pressure)
Thermal conductivity of steam (IAPWS) .
Definition: h2o.hh:795
static constexpr Scalar triplePressure()
Returns the pressure at water's triple point.
Definition: h2o.hh:116
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of steam and water vapor .
Definition: h2o.hh:356
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of water steam .
Definition: h2o.hh:251
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: h2o.hh:471
static const Scalar liquidHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of liquid water .
Definition: h2o.hh:423
static std::string name()
A human readable name for the water.
Definition: h2o.hh:74
static constexpr Scalar molarMass()
The molar mass in of water.
Definition: h2o.hh:80
static constexpr Scalar criticalPressure()
Returns the critical pressure of water.
Definition: h2o.hh:98
static constexpr Scalar criticalMolarVolume()
Returns the molar volume of water at the critical point.
Definition: h2o.hh:104
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: h2o.hh:477
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: h2o.hh:575
static constexpr Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition: h2o.hh:110
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of steam in at a given pressure and temperature.
Definition: h2o.hh:554
Implements relations which are common for all regions of the IAPWS '97 formulation.
Definition: common.hh:57
static constexpr Scalar criticalMolarVolume
Critical molar volume of water .
Definition: common.hh:72
static constexpr Scalar Rs
Specific gas constant of water .
Definition: common.hh:63
static constexpr Scalar triplePressure
Triple pressure of water .
Definition: common.hh:84
static constexpr Scalar molarMass
The molar mass of water .
Definition: common.hh:60
static Scalar viscosity(Scalar temperature, Scalar rho)
The dynamic viscosity of pure water.
Definition: common.hh:100
static constexpr Scalar acentricFactor
The acentric factor of water .
Definition: common.hh:75
static constexpr Scalar criticalTemperature
Critical temperature of water .
Definition: common.hh:66
static constexpr Scalar tripleTemperature
Triple temperature of water .
Definition: common.hh:81
static constexpr Scalar criticalPressure
Critical pressure of water .
Definition: common.hh:69
static Scalar thermalConductivityIAPWS(const Scalar T, const Scalar rho)
Thermal conductivity water (IAPWS) .
Definition: common.hh:161
Implements the equations for region 1 of the IAPWS '97 formulation.
Definition: region1.hh:50
static Scalar dGamma_dPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 (i....
Definition: region1.hh:182
static Scalar ddGamma_ddPi(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 1 ...
Definition: region1.hh:241
static constexpr Scalar dPi_dp(Scalar pressure)
Returns the derivative of the reduced pressure to the pressure for IAPWS region 1 in .
Definition: region1.hh:107
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature for IAPWS region 1.
Definition: region1.hh:81
static void checkValidityRange(Scalar temperature, Scalar pressure, const std::string &propertyName="This property")
Returns true if IAPWS region 1 applies for a (temperature in , pressure in ) pair.
Definition: region1.hh:60
static Scalar dGamma_dTau(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 1 (i....
Definition: region1.hh:154
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure for IAPWS region 1.
Definition: region1.hh:98
static Scalar ddGamma_ddTau(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region...
Definition: region1.hh:270
static Scalar ddGamma_dTaudPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp...
Definition: region1.hh:211
Implements the equations for region 2 of the IAPWS '97 formulation.
Definition: region2.hh:52
static Scalar ddGamma_ddTau(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region...
Definition: region2.hh:300
static Scalar dGamma_dTau(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 2 (i....
Definition: region2.hh:165
static Scalar ddGamma_dTaudPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp...
Definition: region2.hh:234
static Scalar ddGamma_ddPi(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 ...
Definition: region2.hh:267
static void checkValidityRange(Scalar temperature, Scalar pressure, const std::string &propertyName="This property")
Returns true if IAPWS region 2 applies for a (temperature, pressure) pair.
Definition: region2.hh:62
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure (dimensionless) for IAPWS region 2.
Definition: region2.hh:100
static constexpr Scalar dPi_dp(Scalar pressure)
Returns the derivative of the reduced pressure to the pressure for IAPWS region 2 in .
Definition: region2.hh:109
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature (dimensionless) for IAPWS region 2.
Definition: region2.hh:83
static Scalar dGamma_dPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 (i....
Definition: region2.hh:202
Implements the equations for region 4 of the IAPWS '97 formulation.
Definition: region4.hh:53
static Scalar saturationPressure(Scalar temperature)
Returns the saturation pressure in of pure water at a given temperature.
Definition: region4.hh:64
static Scalar vaporTemperature(Scalar pressure)
Returns the saturation temperature in of pure water at a given pressure.
Definition: region4.hh:95
Interface for components that have a liquid state.
Definition: liquid.hh:41
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:60
static constexpr Scalar density(Scalar avgMolarMass, Scalar temperature, Scalar pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: idealgas.hh:49
Base class for all components Components provide the thermodynamic relations for the liquid,...