www.mooseframework.org
HydrogenFluidProperties.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 #include <array>
14 
16 
17 template <>
18 InputParameters validParams<HydrogenFluidProperties>();
19 
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
22 
43 {
44 public:
45  HydrogenFluidProperties(const InputParameters & parameters);
46 
47  virtual std::string fluidName() const override;
48 
49  virtual Real molarMass() const override;
50 
51  virtual Real mu_from_rho_T(Real density, Real temperature) const override;
52 
53  void mu_from_rho_T(Real density,
54  Real temperature,
55  Real ddensity_dT,
56  Real & mu,
57  Real & dmu_drho,
58  Real & dmu_dT) const;
59 
60  virtual Real mu_from_p_T(Real pressure, Real temperature) const override;
61 
62  virtual void mu_from_p_T(
63  Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;
64 
65  virtual void
66  rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;
67 
68  virtual void rho_mu_from_p_T(Real pressure,
69  Real temperature,
70  Real & rho,
71  Real & drho_dp,
72  Real & drho_dT,
73  Real & mu,
74  Real & dmu_dp,
75  Real & dmu_dT) const override;
76 
77  virtual Real k_from_rho_T(Real density, Real temperature) const override;
78 
79  virtual Real k_from_p_T(Real pressure, Real temperature) const override;
80 
81  virtual void
82  k_from_p_T(Real pressure, Real temperature, Real & k, Real & dk_dp, Real & dk_dT) const override;
83 
84  virtual std::vector<Real> henryCoefficients() const override;
85 
86  virtual Real criticalPressure() const override;
87 
88  virtual Real criticalTemperature() const override;
89 
90  virtual Real criticalDensity() const override;
91 
92  virtual Real triplePointPressure() const override;
93 
94  virtual Real triplePointTemperature() const override;
95 
96  virtual Real vaporPressure(Real temperature) const override;
97 
98  virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;
99 
100 protected:
109  virtual Real alpha(Real delta, Real tau) const override;
110 
118  virtual Real dalpha_ddelta(Real delta, Real tau) const override;
119 
127  virtual Real dalpha_dtau(Real delta, Real tau) const override;
128 
136  virtual Real d2alpha_ddelta2(Real delta, Real tau) const override;
137 
145  virtual Real d2alpha_dtau2(Real delta, Real tau) const override;
146 
154  virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override;
155 
157  const Real _Mh2;
159  const Real _p_critical;
161  const Real _T_critical;
165  const Real _rho_critical;
167  const Real _p_triple;
169  const Real _T_triple;
170 
172  const std::array<Real, 5> _a{{1.616, -0.4117, -0.792, 0.758, 1.217}};
173  const std::array<Real, 5> _b{
174  {-16.0205159149, -22.6580178006, -60.0090511389, -74.9434303817, -206.9392065168}};
176  const std::array<Real, 7> _N1{{-6.93643, 0.01, 2.1101, 4.52059, 0.732564, -1.34086, 0.130985}};
177  const std::array<Real, 7> _t1{{0.6844, 1.0, 0.989, 0.489, 0.803, 1.1444, 1.409}};
178  const std::array<unsigned int, 7> _d1{{1, 4, 1, 1, 2, 2, 3}};
179 
180  const std::array<Real, 2> _N2{{-0.777414, 0.351944}};
181  const std::array<Real, 2> _t2{{1.754, 1.311}};
182  const std::array<unsigned int, 2> _d2{{1, 3}};
183 
184  const std::array<Real, 5> _N3{{-0.0211716, 0.0226312, 0.032187, -0.0231752, 0.0557346}};
185  const std::array<Real, 5> _t3{{4.187, 5.646, 0.791, 7.249, 2.986}};
186  const std::array<unsigned int, 5> _d3{{2, 1, 3, 1, 1}};
187  const std::array<Real, 5> _phi3{{-1.685, -0.489, -0.103, -2.506, -1.607}};
188  const std::array<Real, 5> _beta3{{-0.171, -0.2245, -0.1304, -0.2785, -0.3967}};
189  const std::array<Real, 5> _gamma3{{0.7164, 1.3444, 1.4517, 0.7204, 1.5445}};
190  const std::array<Real, 5> _D3{{1.506, 0.156, 1.736, 0.67, 1.662}};
191 
193  const std::array<Real, 5> _amu{{2.09630e-1, -4.55274e-1, 1.423602e-1, -3.35325e-2, 2.76981e-3}};
194  const std::array<Real, 7> _bmu{{-0.187, 2.4871, 3.7151, -11.0972, 9.0965, -3.8292, 0.5166}};
195  const std::array<Real, 6> _cmu{
196  {6.43449673, 4.56334068e-2, 2.32797868e-1, 9.5832612e-1, 1.27941189e-1, 3.63576595e-1}};
197 
199  const std::array<Real, 7> _a1k{
200  {-3.40976e-1, 4.5882, -1.4508, 3.26394e-1, 3.16939e-3, 1.90592e-4, -1.139e-6}};
201  const std::array<Real, 4> _a2k{{1.38497e2, -2.21878e1, 4.57151, 1.0}};
202  const std::array<Real, 5> _b1k{{3.63081e-2, -2.07629e-2, 3.1481e-2, -1.43097e-2, 1.7498e-3}};
203  const std::array<Real, 5> _b2k{{1.8337e-3, -8.86716e-3, 1.5826e-2, -1.06283e-2, 2.80673e-3}};
204 };
205 
206 #pragma GCC diagnostic pop
207 
HydrogenFluidProperties::_t1
const std::array< Real, 7 > _t1
Definition: HydrogenFluidProperties.h:177
HydrogenFluidProperties::criticalTemperature
virtual Real criticalTemperature() const override
Critical temperature.
Definition: HydrogenFluidProperties.C:57
HydrogenFluidProperties::_d3
const std::array< unsigned int, 5 > _d3
Definition: HydrogenFluidProperties.h:186
HydrogenFluidProperties
Hydrogen (H2) fluid properties as a function of pressure (Pa) and temperature (K).
Definition: HydrogenFluidProperties.h:42
HydrogenFluidProperties::_N2
const std::array< Real, 2 > _N2
Definition: HydrogenFluidProperties.h:180
HydrogenFluidProperties::k_from_p_T
virtual Real k_from_p_T(Real pressure, Real temperature) const override
Definition: HydrogenFluidProperties.C:250
HydrogenFluidProperties::d2alpha_dtau2
virtual Real d2alpha_dtau2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt tau.
Definition: HydrogenFluidProperties.C:412
HydrogenFluidProperties::_a2k
const std::array< Real, 4 > _a2k
Definition: HydrogenFluidProperties.h:201
HydrogenFluidProperties::_beta3
const std::array< Real, 5 > _beta3
Definition: HydrogenFluidProperties.h:188
HydrogenFluidProperties::mu_from_rho_T
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Definition: HydrogenFluidProperties.C:81
HydrogenFluidProperties::_bmu
const std::array< Real, 7 > _bmu
Definition: HydrogenFluidProperties.h:194
HydrogenFluidProperties::_N3
const std::array< Real, 5 > _N3
Definition: HydrogenFluidProperties.h:184
HydrogenFluidProperties::mu_from_p_T
virtual Real mu_from_p_T(Real pressure, Real temperature) const override
Definition: HydrogenFluidProperties.C:173
HydrogenFluidProperties::henryCoefficients
virtual std::vector< Real > henryCoefficients() const override
Henry's law coefficients for dissolution in water.
Definition: HydrogenFluidProperties.C:272
HydrogenFluidProperties::_b2k
const std::array< Real, 5 > _b2k
Definition: HydrogenFluidProperties.h:203
HydrogenFluidProperties::dalpha_ddelta
virtual Real dalpha_ddelta(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt delta.
Definition: HydrogenFluidProperties.C:327
HydrogenFluidProperties::_b
const std::array< Real, 5 > _b
Definition: HydrogenFluidProperties.h:173
HydrogenFluidProperties::triplePointPressure
virtual Real triplePointPressure() const override
Triple point pressure.
Definition: HydrogenFluidProperties.C:69
HydrogenFluidProperties::_d2
const std::array< unsigned int, 2 > _d2
Definition: HydrogenFluidProperties.h:182
HydrogenFluidProperties::_phi3
const std::array< Real, 5 > _phi3
Definition: HydrogenFluidProperties.h:187
HydrogenFluidProperties::HydrogenFluidProperties
HydrogenFluidProperties(const InputParameters &parameters)
Definition: HydrogenFluidProperties.C:26
HydrogenFluidProperties::_rho_molar_critical
const Real _rho_molar_critical
Critical molar density (mol/l)
Definition: HydrogenFluidProperties.h:163
HydrogenFluidProperties::triplePointTemperature
virtual Real triplePointTemperature() const override
Triple point temperature.
Definition: HydrogenFluidProperties.C:75
HydrogenFluidProperties::_gamma3
const std::array< Real, 5 > _gamma3
Definition: HydrogenFluidProperties.h:189
HydrogenFluidProperties::_D3
const std::array< Real, 5 > _D3
Definition: HydrogenFluidProperties.h:190
HydrogenFluidProperties::fluidName
virtual std::string fluidName() const override
Definition: HydrogenFluidProperties.C:39
HydrogenFluidProperties::_rho_critical
const Real _rho_critical
Critical density (kg/m^3)
Definition: HydrogenFluidProperties.h:165
HydrogenFluidProperties::_amu
const std::array< Real, 5 > _amu
Coefficients for viscosity.
Definition: HydrogenFluidProperties.h:193
HydrogenFluidProperties::criticalDensity
virtual Real criticalDensity() const override
Critical density.
Definition: HydrogenFluidProperties.C:63
HydrogenFluidProperties::d2alpha_ddeltatau
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta and tau.
Definition: HydrogenFluidProperties.C:448
HydrogenFluidProperties::_T_critical
const Real _T_critical
Critical temperature (K)
Definition: HydrogenFluidProperties.h:161
NS::density
const std::string density
Definition: NS.h:16
HydrogenFluidProperties::_b1k
const std::array< Real, 5 > _b1k
Definition: HydrogenFluidProperties.h:202
HydrogenFluidProperties::_a1k
const std::array< Real, 7 > _a1k
Coefficients for thermal conductivity.
Definition: HydrogenFluidProperties.h:199
HydrogenFluidProperties::molarMass
virtual Real molarMass() const override
Fluid name.
Definition: HydrogenFluidProperties.C:45
HydrogenFluidProperties::_a
const std::array< Real, 5 > _a
Coefficients for ideal gas component of the Helmholtz free energy.
Definition: HydrogenFluidProperties.h:172
SinglePhaseFluidProperties::rho
e e e e p h T rho
Definition: SinglePhaseFluidProperties.h:169
HydrogenFluidProperties::_p_triple
const Real _p_triple
Triple point pressure (Pa)
Definition: HydrogenFluidProperties.h:167
HelmholtzFluidProperties
Base class equation of state for fluids that use a Helmholtz free energy alpha(delta,...
Definition: HelmholtzFluidProperties.h:34
HydrogenFluidProperties::_Mh2
const Real _Mh2
Hydrogen molar mass (kg/mol)
Definition: HydrogenFluidProperties.h:157
HydrogenFluidProperties::k_from_rho_T
virtual Real k_from_rho_T(Real density, Real temperature) const override
Definition: HydrogenFluidProperties.C:219
NS::temperature
const std::string temperature
Definition: NS.h:26
HydrogenFluidProperties::alpha
virtual Real alpha(Real delta, Real tau) const override
Helmholtz free energy for H2 From Leachman et al (reference above)
Definition: HydrogenFluidProperties.C:300
HydrogenFluidProperties::vaporPressure
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.
Definition: HydrogenFluidProperties.C:278
validParams< HydrogenFluidProperties >
InputParameters validParams< HydrogenFluidProperties >()
Definition: HydrogenFluidProperties.C:19
HydrogenFluidProperties::criticalPressure
virtual Real criticalPressure() const override
Critical pressure.
Definition: HydrogenFluidProperties.C:51
HydrogenFluidProperties::_t2
const std::array< Real, 2 > _t2
Definition: HydrogenFluidProperties.h:181
HydrogenFluidProperties::_p_critical
const Real _p_critical
Critical pressure (Pa)
Definition: HydrogenFluidProperties.h:159
HydrogenFluidProperties::d2alpha_ddelta2
virtual Real d2alpha_ddelta2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta.
Definition: HydrogenFluidProperties.C:382
HydrogenFluidProperties::_N1
const std::array< Real, 7 > _N1
Coefficients for residual component of the Helmholtz free energy.
Definition: HydrogenFluidProperties.h:176
HelmholtzFluidProperties.h
HydrogenFluidProperties::_cmu
const std::array< Real, 6 > _cmu
Definition: HydrogenFluidProperties.h:195
HydrogenFluidProperties::_d1
const std::array< unsigned int, 7 > _d1
Definition: HydrogenFluidProperties.h:178
HydrogenFluidProperties::dalpha_dtau
virtual Real dalpha_dtau(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt tau.
Definition: HydrogenFluidProperties.C:353
NS::pressure
const std::string pressure
Definition: NS.h:25
HydrogenFluidProperties::_t3
const std::array< Real, 5 > _t3
Definition: HydrogenFluidProperties.h:185
HydrogenFluidProperties::rho_mu_from_p_T
virtual void rho_mu_from_p_T(Real pressure, Real temperature, Real &rho, Real &mu) const override
Combined methods.
Definition: HydrogenFluidProperties.C:193
HydrogenFluidProperties::_T_triple
const Real _T_triple
Triple point temperature (K)
Definition: HydrogenFluidProperties.h:169