version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_H2O_HH
13#define DUMUX_H2O_HH
14
15#include <cmath>
16#include <cassert>
17
21
22#include "iapws/common.hh"
23#include "iapws/region1.hh"
24#include "iapws/region2.hh"
25#include "iapws/region4.hh"
26
30
31namespace Dumux {
32namespace Components {
33
44template <class Scalar>
45class H2O
46: public Components::Base<Scalar, H2O<Scalar> >
47, public Components::Liquid<Scalar, H2O<Scalar> >
48, public Components::Gas<Scalar, H2O<Scalar> >
49{
50
55
56 // specific gas constant of water
57 static constexpr Scalar Rs = Common::Rs;
58
59public:
63 static std::string name()
64 { return "H2O"; }
65
69 static constexpr Scalar molarMass()
70 { return Common::molarMass; }
71
75 static constexpr Scalar acentricFactor()
76 { return Common::acentricFactor; }
77
81 static constexpr Scalar criticalTemperature()
83
87 static constexpr Scalar criticalPressure()
88 { return Common::criticalPressure; }
89
93 static constexpr Scalar criticalMolarVolume()
95
99 static constexpr Scalar tripleTemperature()
100 { return Common::tripleTemperature; }
101
105 static constexpr Scalar triplePressure()
106 { return Common::triplePressure; }
107
120 {
121 using std::min;
122 using std::max;
123 T = min(T, criticalTemperature());
124 T = max(T,tripleTemperature());
125
127 }
128
141 {
142 using std::min;
143 using std::max;
146
148 }
149
163 {
165
166 // regularization
167 if (pressure < triplePressure() - 100) {
168 // We assume an ideal gas for low pressures to avoid the
169 // 0/0 for the gas enthalpy at very low pressures. The
170 // enthalpy of an ideal gas does not exhibit any
171 // dependence on pressure, so we can just return the
172 // specific enthalpy at the point of regularization, i.e.
173 // the triple pressure - 100Pa
174 return enthalpyRegion2_(temperature, triplePressure() - 100);
175 }
177 if (pressure > pv) {
178 // the pressure is too high, in this case we use the slope
179 // of the enthalpy at the vapor pressure to regularize
180 Scalar dh_dp =
181 Rs*temperature*
183 Region2::dPi_dp(pv)*
185
186 return
187 enthalpyRegion2_(temperature, pv) +
188 (pressure - pv)*dh_dp;
189 }
190
191 return enthalpyRegion2_(temperature, pressure);
192 }
193
207 {
209
210 // regularization
212 if (pressure < pv) {
213 // the pressure is too low, in this case we use the slope
214 // of the enthalpy at the vapor pressure to regularize
215 Scalar dh_dp =
216 Rs * temperature*
218 Region1::dPi_dp(pv)*
220
221 return
222 enthalpyRegion1_(temperature, pv) +
223 (pressure - pv)*dh_dp;
224 }
225
226 return enthalpyRegion1_(temperature, pressure);
227 }
228
242 {
244
245 // regularization
246 if (pressure < triplePressure() - 100) {
247 return heatCap_p_Region2_(temperature, triplePressure() - 100);
248 }
250 if (pressure > pv) {
251 // the pressure is too high, in this case we use the heat
252 // cap at the vapor pressure to regularize
253 return heatCap_p_Region2_(temperature, pv);
254 }
255 return heatCap_p_Region2_(temperature, pressure);
256 }
257
271 {
273
274 // regularization
276 if (pressure < pv) {
277 // the pressure is too low, in this case we use the heat cap at the vapor pressure to regularize
278 return heatCap_p_Region1_(temperature, pv);
279 }
280
281 return heatCap_p_Region1_(temperature, pressure);
282 }
283
297 {
299
300 // regularization
302 if (pressure < pv) {
303 // the pressure is too low, in this case we use the slope
304 // of the internal energy at the vapor pressure to
305 // regularize
306
307 /*
308 // calculate the partial derivative of the internal energy
309 // to the pressure at the vapor pressure.
310 Scalar tau = Region1::tau(temperature);
311 Scalar dGamma_dPi = Region1::dGamma_dPi(temperature, pv);
312 Scalar ddGamma_dTaudPi = Region1::ddGamma_dTaudPi(temperature, pv);
313 Scalar ddGamma_ddPi = Region1::ddGamma_ddPi(temperature, pv);
314 Scalar pi = Region1::pi(pv);
315 Scalar dPi_dp = Region1::dPi_dp(pv);
316 Scalar du_dp =
317 Rs*temperature*
318 (tau*dPi_dp*ddGamma_dTaudPi + dPi_dp*dPi_dp*dGamma_dPi + pi*dPi_dp*ddGamma_ddPi);
319 */
320
321 // use a straight line for extrapolation. use forward
322 // differences to calculate the partial derivative to the
323 // pressure at the vapor pressure
324 static const Scalar eps = 1e-7;
325 Scalar uv = internalEnergyRegion1_(temperature, pv);
326 Scalar uvPEps = internalEnergyRegion1_(temperature, pv + eps);
327 Scalar du_dp = (uvPEps - uv)/eps;
328 return uv + du_dp*(pressure - pv);
329 }
330
331 return internalEnergyRegion1_(temperature, pressure);
332 }
333
346 {
348
349 // regularization
350 if (pressure < triplePressure() - 100) {
351 // We assume an ideal gas for low pressures to avoid the
352 // 0/0 for the internal energy of gas at very low
353 // pressures. The enthalpy of an ideal gas does not
354 // exhibit any dependence on pressure, so we can just
355 // return the specific enthalpy at the point of
356 // regularization, i.e. the triple pressure - 100Pa, and
357 // subtract the work required to change the volume for an
358 // ideal gas.
359 return
360 enthalpyRegion2_(temperature, triplePressure() - 100)
361 -
362 Rs*temperature; // = p*v for an ideal gas!
363 }
365 if (pressure > pv) {
366 // the pressure is too high, in this case we use the slope
367 // of the internal energy at the vapor pressure to
368 // regularize
369
370 /*
371 // calculate the partial derivative of the internal energy
372 // to the pressure at the vapor pressure.
373 Scalar tau = Region2::tau(temperature);
374 Scalar dGamma_dPi = Region2::dGamma_dPi(temperature, pv);
375 Scalar ddGamma_dTaudPi = Region2::ddGamma_dTaudPi(temperature, pv);
376 Scalar ddGamma_ddPi = Region2::ddGamma_ddPi(temperature, pv);
377 Scalar pi = Region2::pi(pv);
378 Scalar dPi_dp = Region2::dPi_dp(pv);
379 Scalar du_dp =
380 Rs*temperature*
381 (tau*dPi_dp*ddGamma_dTaudPi + dPi_dp*dPi_dp*dGamma_dPi + pi*dPi_dp*ddGamma_ddPi);
382
383 // use a straight line for extrapolation
384 Scalar uv = internalEnergyRegion2_(temperature, pv);
385 return uv + du_dp*(pressure - pv);
386 */
387
388 // use a straight line for extrapolation. use backward
389 // differences to calculate the partial derivative to the
390 // pressure at the vapor pressure
391 static const Scalar eps = 1e-7;
392 Scalar uv = internalEnergyRegion2_(temperature, pv);
393 Scalar uvMEps = internalEnergyRegion2_(temperature, pv - eps);
394 Scalar du_dp = (uv - uvMEps)/eps;
395 return uv + du_dp*(pressure - pv);
396 }
397
398 return internalEnergyRegion2_(temperature, pressure);
399 }
400
414 {
415 Region1::checkValidityRange(temperature, pressure, "Heat capacity for a constant volume");
416
417 // regularization
419 if (pressure < pv) {
420 // the pressure is too low, in this case we use the heat cap at the vapor pressure to regularize
421
422 return heatCap_v_Region1_(temperature, pv);
423 }
424
425 return heatCap_v_Region1_(temperature, pressure);
426 }
427
441 {
442 Region2::checkValidityRange(temperature, pressure, "Heat capacity for a constant volume");
443
444 // regularization
445 if (pressure < triplePressure() - 100) {
446 return
447 heatCap_v_Region2_(temperature, triplePressure() - 100);
448 }
450 if (pressure > pv) {
451 return heatCap_v_Region2_(temperature, pv);
452 }
453
454 return heatCap_v_Region2_(temperature, pressure);
455 }
456
460 static constexpr bool gasIsCompressible()
461 { return true; }
462
466 static constexpr bool liquidIsCompressible()
467 { return true; }
468
482 {
484
485 // regularization
486 if (pressure < triplePressure() - 100) {
487 // We assume an ideal gas for low pressures to avoid the
488 // 0/0 for the internal energy and enthalpy.
489 Scalar rho0IAPWS = 1.0/volumeRegion2_(temperature,
490 triplePressure() - 100);
493 triplePressure() - 100);
494 return
495 rho0IAPWS/rho0Id *
498 pressure);
499 }
501 if (pressure > pv) {
502 // the pressure is too high, in this case we use the slope
503 // of the density energy at the vapor pressure to
504 // regularize
505
506 // calculate the partial derivative of the specific volume
507 // to the pressure at the vapor pressure.
508 const Scalar eps = pv*1e-8;
509 Scalar v0 = volumeRegion2_(temperature, pv);
510 Scalar v1 = volumeRegion2_(temperature, pv + eps);
511 Scalar dv_dp = (v1 - v0)/eps;
512 /*
513 Scalar pi = Region2::pi(pv);
514 Scalar dp_dPi = Region2::dp_dPi(pv);
515 Scalar dGamma_dPi = Region2::dGamma_dPi(temperature, pv);
516 Scalar ddGamma_ddPi = Region2::ddGamma_ddPi(temperature, pv);
517
518 Scalar RT = Rs*temperature;
519 Scalar dv_dp =
520 RT/(dp_dPi*pv)
521 *
522 (dGamma_dPi + pi*ddGamma_ddPi - v0*dp_dPi/RT);
523 */
524
525 // calculate the partial derivative of the density to the
526 // pressure at vapor pressure
527 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
528
529 // use a straight line for extrapolation
530 return 1.0/v0 + (pressure - pv)*drho_dp;
531 }
532
533 return 1.0/volumeRegion2_(temperature, pressure);
534 }
535
545
549 static constexpr bool gasIsIdeal()
550 { return false; }
551
565 {
566 // We use the newton method for this. For the initial value we
567 // assume steam to be an ideal gas
569 Scalar eps = pressure*1e-7;
570
571 Scalar deltaP = pressure*2;
572 using std::abs;
573 for (int i = 0; i < 5 && abs(pressure*1e-9) < abs(deltaP); ++i)
574 {
576
577 Scalar df_dp;
578 df_dp = gasDensity(temperature, pressure + eps);
579 df_dp -= gasDensity(temperature, pressure - eps);
580 df_dp /= 2*eps;
581
582 deltaP = - f/df_dp;
583
584 pressure += deltaP;
585 }
586
587 return pressure;
588 }
589
603 {
605
606 // regularization
608 if (pressure < pv) {
609 // the pressure is too low, in this case we use the slope
610 // of the density at the vapor pressure to regularize
611
612 // calculate the partial derivative of the specific volume
613 // to the pressure at the vapor pressure.
614 const Scalar eps = pv*1e-8;
615 Scalar v0 = volumeRegion1_(temperature, pv);
616 Scalar v1 = volumeRegion1_(temperature, pv + eps);
617 Scalar dv_dp = (v1 - v0)/eps;
618
619 /*
620 Scalar v0 = volumeRegion1_(temperature, pv);
621 Scalar pi = Region1::pi(pv);
622 Scalar dp_dPi = Region1::dp_dPi(pv);
623 Scalar dGamma_dPi = Region1::dGamma_dPi(temperature, pv);
624 Scalar ddGamma_ddPi = Region1::ddGamma_ddPi(temperature, pv);
625
626 Scalar RT = Rs*temperature;
627 Scalar dv_dp =
628 RT/(dp_dPi*pv)
629 *
630 (dGamma_dPi + pi*ddGamma_ddPi - v0*dp_dPi/RT);
631 */
632
633 // calculate the partial derivative of the density to the
634 // pressure at vapor pressure
635 Scalar drho_dp = - 1/(v0*v0)*dv_dp;
636
637 // use a straight line for extrapolation
638 return 1.0/v0 + (pressure - pv)*drho_dp;
639 }
640
641 return 1/volumeRegion1_(temperature, pressure);
642 }
643
653
668 {
669 // We use Brent's method for this, with a pressure range including the surroundings of the
670 // vapor pressure line
671 Scalar minPressure = vaporPressure(temperature)/1.11;
672 Scalar maxPressure = 100e6;
673 const auto residualFunction = [&] (const Scalar pressure) {
675 };
676 try
677 {
678 return findScalarRootBrent(minPressure, maxPressure, residualFunction);
679 }
680 catch (const NumericalProblem& e)
681 {
682 DUNE_THROW(NumericalProblem,
683 "searched for pressure(T=" << temperature << ",rho=" << density
684 <<") in [" << minPressure << ", " << maxPressure << "]: "
685 << e.what());
686 }
687 }
688
705 {
707
709 return Common::viscosity(temperature, rho);
710 }
711
712
724 {
726
728 return Common::viscosity(temperature, rho);
729 }
730
747 {
748 // Thermal conductivity of water is empirically fit.
749 // Evaluating that fitting-function outside the area of validity does not make sense.
750 if ( !( (pressure <= 400e6 && (273.15 <= temperature) && (temperature <= 398.15))
751 || (pressure <= 200e6 && (398.15 < temperature) && (temperature <= 523.15))
752 || (pressure <= 150e6 && (523.15 < temperature) && (temperature <= 673.15))
753 || (pressure <= 100e6 && (673.15 < temperature) && (temperature <= 1073.15)) ))
754 {
755 DUNE_THROW(NumericalProblem,
756 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
757 "(T=" << temperature << ", p=" << pressure << ")");
758 }
759
762 }
763
780 {
781 // Thermal conductivity of water is empirically fit.
782 // Evaluating that fitting-function outside the area of validity does not make sense.
783 if ( !( (pressure <= 400e6 && (273.15 <= temperature) && (temperature <= 398.15))
784 || (pressure <= 200e6 && (398.15 < temperature) && (temperature <= 523.15))
785 || (pressure <= 150e6 && (523.15 < temperature) && (temperature <= 673.15))
786 || (pressure <= 100e6 && (673.15 < temperature) && (temperature <= 1073.15)) ))
787 {
788 DUNE_THROW(NumericalProblem,
789 "Evaluating the IAPWS fit function for thermal conductivity outside range of applicability."
790 "(T=" << temperature << ", p=" << pressure << ")");
791 }
792
795 }
796
797private:
798 // the unregularized specific enthalpy for liquid water
799 static constexpr Scalar enthalpyRegion1_(Scalar temperature, Scalar pressure)
800 {
801 return
804 Rs*temperature;
805 }
806
807 // the unregularized specific isobaric heat capacity
808 static constexpr Scalar heatCap_p_Region1_(Scalar temperature, Scalar pressure)
809 {
810 return
813 Rs;
814 }
815
816 // the unregularized specific isochoric heat capacity
817 static Scalar heatCap_v_Region1_(Scalar temperature, Scalar pressure)
818 {
822
823 return
824 - tau * tau *
826 diff;
827 }
828
829 // the unregularized specific internal energy for liquid water
830 static constexpr Scalar internalEnergyRegion1_(Scalar temperature, Scalar pressure)
831 {
832 return
833 Rs * temperature *
836 }
837
838 // the unregularized specific volume for liquid water
839 static constexpr Scalar volumeRegion1_(Scalar temperature, Scalar pressure)
840 {
841 return
844 Rs * temperature / pressure;
845 }
846
847 // the unregularized specific enthalpy for steam
848 static constexpr Scalar enthalpyRegion2_(Scalar temperature, Scalar pressure)
849 {
850 return
853 Rs*temperature;
854 }
855
856 // the unregularized specific internal energy for steam
857 static constexpr Scalar internalEnergyRegion2_(Scalar temperature, Scalar pressure)
858 {
859 return
860 Rs * temperature *
863 }
864
865 // the unregularized specific isobaric heat capacity
866 static constexpr Scalar heatCap_p_Region2_(Scalar temperature, Scalar pressure)
867 {
868 return
871 Rs;
872 }
873
874 // the unregularized specific isochoric heat capacity
875 static Scalar heatCap_v_Region2_(Scalar temperature, Scalar pressure)
876 {
880 Scalar diff = num * num / (1 - pi * pi * Region2::ddGamma_ddPi(temperature, pressure));
881 return
882 - tau * tau *
884 - diff;
885 }
886
887 // the unregularized specific volume for steam
888 static constexpr Scalar volumeRegion2_(Scalar temperature, Scalar pressure)
889 {
890 return
893 Rs * temperature / pressure;
894 }
895};
896
897template <class Scalar>
898struct IsAqueous<H2O<Scalar>> : public std::true_type {};
899
900} // end namespace Components
901
902namespace FluidSystems::Detail {
903// viscosity according to Reid, R.C.
904template <class Scalar>
906{
907 constexpr Scalar tc = 647.3;
908 using std::max;
909 const Scalar tr = max(temperature/tc, 1e-8);
910
911 const Scalar fp0 = 1.0 + 0.221*(0.96 + 0.1*(tr - 0.7));
912 constexpr Scalar xi = 3.334e-3;
913 using std::pow;
914 using std::exp;
915 const Scalar eta_xi = (0.807*pow(tr, 0.618) - 0.357*exp((-0.449)*tr)
916 + 0.34*exp((-4.058)*tr) + 0.018)*fp0;
917
918 return 1.0e-7*eta_xi/xi;
919}
920
921// viscosity according to Nagel, T. et al.
922template <class Scalar>
924{
925 constexpr Scalar a1 = -4.4189440e-6;
926 constexpr Scalar a2 = 4.6876380e-8;
927 constexpr Scalar a3 = -5.3894310e-12;
928 constexpr Scalar a4 = 3.2028560e-16;
929 constexpr Scalar a5 = 4.9191790e-22;
930
931 return a1 + a2*temperature + a3*temperature*temperature
934}
935} // end FluidSystems::Detail
936namespace FluidSystems {
960template <class Scalar>
962{
963 if (temperature < 480.0)
965
966 else if (temperature > 500.0)
968
969 else // interpolate
970 {
971 const Scalar op = (500.0 - temperature)/20.0;
972
975 }
976}
977} // end namespace FluidSystems
978} // end namespace Dumux
979
980#endif
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:47
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:51
Interface for components that have a gas state.
Definition: gas.hh:29
Material properties of pure water .
Definition: h2o.hh:49
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure water.
Definition: h2o.hh:723
static Scalar vaporTemperature(Scalar pressure)
The vapor temperature in of pure water at a given pressure.
Definition: h2o.hh:140
static Scalar liquidPressure(Scalar temperature, Scalar density)
The pressure of liquid water in at a given density and temperature.
Definition: h2o.hh:667
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of water (IAPWS) .
Definition: h2o.hh:746
static const Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of liquid water .
Definition: h2o.hh:295
static Scalar gasHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of steam and water vapor .
Definition: h2o.hh:440
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: h2o.hh:549
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam.
Definition: h2o.hh:704
static const Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of liquid water .
Definition: h2o.hh:269
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of liquid water .
Definition: h2o.hh:205
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure water in at a given pressure and temperature.
Definition: h2o.hh:602
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of water steam .
Definition: h2o.hh:161
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of steam in at a given pressure and temperature.
Definition: h2o.hh:481
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of water in at a given pressure and temperature.
Definition: h2o.hh:651
static constexpr Scalar acentricFactor()
The acentric factor of water.
Definition: h2o.hh:75
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure water at a given temperature.
Definition: h2o.hh:119
static constexpr Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: h2o.hh:81
static Scalar gasThermalConductivity(const Scalar temperature, const Scalar pressure)
Thermal conductivity of steam (IAPWS) .
Definition: h2o.hh:779
static constexpr Scalar triplePressure()
Returns the pressure at water's triple point.
Definition: h2o.hh:105
static Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of steam and water vapor .
Definition: h2o.hh:345
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of water steam .
Definition: h2o.hh:240
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: h2o.hh:460
static const Scalar liquidHeatCapacityConstVolume(Scalar temperature, Scalar pressure)
Specific isochoric heat capacity of liquid water .
Definition: h2o.hh:412
static std::string name()
A human readable name for the water.
Definition: h2o.hh:63
static constexpr Scalar molarMass()
The molar mass in of water.
Definition: h2o.hh:69
static constexpr Scalar criticalPressure()
Returns the critical pressure of water.
Definition: h2o.hh:87
static constexpr Scalar criticalMolarVolume()
Returns the molar volume of water at the critical point.
Definition: h2o.hh:93
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: h2o.hh:466
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of steam in at a given density and temperature.
Definition: h2o.hh:564
static constexpr Scalar tripleTemperature()
Returns the temperature at water's triple point.
Definition: h2o.hh:99
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of steam in at a given pressure and temperature.
Definition: h2o.hh:543
Interface for components that have a liquid state.
Definition: liquid.hh:29
Implements relations which are common for all regions of the IAPWS '97 formulation.
Definition: common.hh:45
static constexpr Scalar criticalMolarVolume
Critical molar volume of water .
Definition: common.hh:60
static constexpr Scalar Rs
Specific gas constant of water .
Definition: common.hh:51
static constexpr Scalar triplePressure
Triple pressure of water .
Definition: common.hh:72
static constexpr Scalar molarMass
The molar mass of water .
Definition: common.hh:48
static Scalar viscosity(Scalar temperature, Scalar rho)
The dynamic viscosity of pure water.
Definition: common.hh:88
static constexpr Scalar acentricFactor
The acentric factor of water .
Definition: common.hh:63
static constexpr Scalar criticalTemperature
Critical temperature of water .
Definition: common.hh:54
static constexpr Scalar tripleTemperature
Triple temperature of water .
Definition: common.hh:69
static constexpr Scalar criticalPressure
Critical pressure of water .
Definition: common.hh:57
static Scalar thermalConductivityIAPWS(const Scalar T, const Scalar rho)
Thermal conductivity water (IAPWS) .
Definition: common.hh:149
Implements the equations for region 1 of the IAPWS '97 formulation.
Definition: region1.hh:38
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:170
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:229
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:95
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature for IAPWS region 1.
Definition: region1.hh:69
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:48
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:142
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure for IAPWS region 1.
Definition: region1.hh:86
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:258
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:199
Implements the equations for region 2 of the IAPWS '97 formulation.
Definition: region2.hh:40
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:288
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:153
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:222
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:255
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:50
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure (dimensionless) for IAPWS region 2.
Definition: region2.hh:88
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:97
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature (dimensionless) for IAPWS region 2.
Definition: region2.hh:71
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:190
Implements the equations for region 4 of the IAPWS '97 formulation.
Definition: region4.hh:41
static Scalar saturationPressure(Scalar temperature)
Returns the saturation pressure in of pure water at a given temperature.
Definition: region4.hh:52
static Scalar vaporTemperature(Scalar pressure)
Returns the saturation temperature in of pure water at a given pressure.
Definition: region4.hh:83
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:48
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:37
Exception thrown if a fixable numerical problem occurs.
Definition: exceptions.hh:27
Implements relations common for all regions of the IAPWS '97 formulation. See:
Base class for all components Components provide the thermodynamic relations for the liquid,...
Some exceptions thrown in DuMux
Root finding algorithms for scalar functions.
Interface for components that have a gas state.
Scalar findScalarRootBrent(Scalar a, Scalar b, const ResFunc &residual, const Scalar tol=1e-13, const int maxIter=200)
Brent's root finding algorithm for scalar functions.
Definition: findscalarroot.hh:99
Relations valid for an ideal gas.
Interface for components that have a liquid state.
Scalar viscosityNagel_(Scalar temperature)
Definition: h2o.hh:923
Scalar viscosityReid_(Scalar temperature)
Definition: h2o.hh:905
Scalar h2oGasViscosityInMixture(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam in a gas mixture.
Definition: h2o.hh:961
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
Definition: adapt.hh:17
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 the equations for region 4 of the IAPWS '97 formulation.
IsAqueous struct.
Definition: components/base.hh:35