www.mooseframework.org
NitrogenFluidProperties.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<NitrogenFluidProperties>();
19 
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
22 
39 {
40 public:
41  NitrogenFluidProperties(const InputParameters & parameters);
42 
43  virtual std::string fluidName() const override;
44 
45  virtual Real molarMass() const override;
46 
47  virtual Real mu_from_rho_T(Real density, Real temperature) const override;
48 
49  void mu_from_rho_T(Real density,
50  Real temperature,
51  Real ddensity_dT,
52  Real & mu,
53  Real & dmu_drho,
54  Real & dmu_dT) const;
55 
56  virtual Real mu_from_p_T(Real pressure, Real temperature) const override;
57 
58  virtual void mu_from_p_T(
59  Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;
60 
61  virtual void
62  rho_mu_from_p_T(Real pressure, Real temperature, Real & rho, Real & mu) const override;
63 
64  virtual void rho_mu_from_p_T(Real pressure,
65  Real temperature,
66  Real & rho,
67  Real & drho_dp,
68  Real & drho_dT,
69  Real & mu,
70  Real & dmu_dp,
71  Real & dmu_dT) const override;
72 
73  virtual Real k_from_rho_T(Real density, Real temperature) const override;
74 
75  virtual Real k_from_p_T(Real pressure, Real temperature) const override;
76 
77  virtual void
78  k_from_p_T(Real pressure, Real temperature, Real & k, Real & dk_dp, Real & dk_dT) const override;
79 
80  virtual std::vector<Real> henryCoefficients() const override;
81 
82  virtual Real criticalPressure() const override;
83 
84  virtual Real criticalTemperature() const override;
85 
86  virtual Real criticalDensity() const override;
87 
88  virtual Real triplePointPressure() const override;
89 
90  virtual Real triplePointTemperature() const override;
91 
92  virtual Real vaporPressure(Real temperature) const override;
93 
94  virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;
95 
106  Real saturatedLiquidDensity(Real temperature) const;
107 
118  Real saturatedVaporDensity(Real temperature) const;
119 
120 protected:
121  virtual Real alpha(Real delta, Real tau) const override;
122 
123  virtual Real dalpha_ddelta(Real delta, Real tau) const override;
124 
125  virtual Real dalpha_dtau(Real delta, Real tau) const override;
126 
127  virtual Real d2alpha_ddelta2(Real delta, Real tau) const override;
128 
129  virtual Real d2alpha_dtau2(Real delta, Real tau) const override;
130 
131  virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override;
132 
134  const Real _Mn2;
136  const Real _p_critical;
138  const Real _T_critical;
142  const Real _rho_critical;
144  const Real _p_triple;
146  const Real _T_triple;
147 
149  const std::array<Real, 8> _a{{2.5,
150  -12.76952708,
151  -0.00784163,
152  -1.934819e-4,
153  -1.247742e-5,
154  6.678326e-8,
155  1.012941,
156  26.65788}};
158  const std::array<Real, 6> _N1{{0.924803575275,
159  -0.492448489428,
160  0.661883336938,
161  -0.192902649201e1,
162  -0.622469309629e-1,
163  0.349943957581}};
164  const std::array<unsigned int, 6> _i1{{1, 1, 2, 2, 3, 3}};
165  const std::array<Real, 6> _j1{{0.25, 0.875, 0.5, 0.875, 0.375, 0.75}};
166 
167  const std::array<Real, 26> _N2{
168  {0.564857472498, -0.161720005987e1, -0.481395031883, 0.421150636384,
169  -0.161962230825e-1, 0.172100994165, 0.735448924933e-2, 0.168077305479e-1,
170  -0.107626664179e-2, -0.137318088513e-1, 0.635466899859e-3, 0.304432279419e-2,
171  -0.435762336045e-1, -0.723174889316e-1, 0.389644315272e-1, -0.21220136391e-1,
172  0.4808822981509e-2, -0.551990017984e-4, -0.462016716479e-1, -0.300311716011e-2,
173  0.368825891208e-1, -0.25585684622e-2, 0.896915264558e-2, -0.44151337035e-2,
174  0.133722924858e-2, 0.264832491957e-3}};
175  const std::array<unsigned int, 26> _i2{
176  {1, 1, 1, 3, 3, 4, 6, 6, 7, 7, 8, 8, 1, 2, 3, 4, 5, 8, 4, 5, 5, 8, 3, 5, 6, 9}};
177  const std::array<Real, 26> _j2{{0.5, 0.75, 2.0, 1.25, 3.5, 1.0, 0.5, 3.0, 0.0,
178  2.75, 0.75, 2.5, 4.0, 6.0, 6.0, 3.0, 3.0, 6.0,
179  16.0, 11.0, 15.0, 12.0, 12.0, 7.0, 4.0, 16.0}};
180  const std::array<unsigned int, 26> _l2{
181  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}};
182 
183  const std::array<Real, 4> _N3{
184  {0.196688194015e2, -0.20911560073e2, 0.167788306989e-1, 0.262767566274e4}};
185  const std::array<unsigned int, 4> _i3{{1, 1, 3, 2}};
186  const std::array<unsigned int, 4> _j3{{0, 1, 2, 3}};
187  const std::array<unsigned int, 4> _l3{{2, 2, 2, 2}};
188  const std::array<Real, 4> _phi3{{20.0, 20.0, 15.0, 25.0}};
189  const std::array<Real, 4> _beta3{{325.0, 325.0, 300.0, 275.0}};
190  const std::array<Real, 4> _gamma3{{1.16, 1.16, 1.13, 1.25}};
191 
193  const std::array<Real, 5> _bmu{{0.431, -0.4623, 0.08406, 0.005341, -0.00331}};
194  const std::array<Real, 5> _Nmu{{10.72, 0.03989, 0.001208, -7.402, 4.62}};
195  const std::array<Real, 5> _tmu{{0.1, 0.25, 3.2, 0.9, 0.3}};
196  const std::array<Real, 5> _dmu{{2, 10, 12, 2, 1}};
197  const std::array<Real, 5> _lmu{{0, 1, 1, 2, 3}};
198  const std::array<Real, 5> _gammamu{{0.0, 1.0, 1.0, 1.0, 1.0}};
199 
201  const std::array<Real, 6> _Nk{{8.862, 31.11, -73.13, 20.03, -0.7096, 0.2672}};
202  const std::array<Real, 6> _tk{{0.0, 0.03, 0.2, 0.8, 0.6, 1.9}};
203  const std::array<unsigned int, 6> _dk{{1, 2, 3, 4, 8, 10}};
204  const std::array<unsigned int, 6> _lk{{0, 0, 1, 2, 2, 2}};
205  const std::array<Real, 6> _gammak{{0.0, 0.0, 1.0, 1.0, 1.0}};
206 };
207 
208 #pragma GCC diagnostic pop
209 
NitrogenFluidProperties::_gamma3
const std::array< Real, 4 > _gamma3
Definition: NitrogenFluidProperties.h:190
NitrogenFluidProperties::_N2
const std::array< Real, 26 > _N2
Definition: NitrogenFluidProperties.h:167
NitrogenFluidProperties::mu_from_p_T
virtual Real mu_from_p_T(Real pressure, Real temperature) const override
Definition: NitrogenFluidProperties.C:153
NitrogenFluidProperties::henryCoefficients
virtual std::vector< Real > henryCoefficients() const override
Henry's law coefficients for dissolution in water.
Definition: NitrogenFluidProperties.C:242
NitrogenFluidProperties::d2alpha_ddelta2
virtual Real d2alpha_ddelta2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta.
Definition: NitrogenFluidProperties.C:387
NitrogenFluidProperties::_j1
const std::array< Real, 6 > _j1
Definition: NitrogenFluidProperties.h:165
NitrogenFluidProperties::_dmu
const std::array< Real, 5 > _dmu
Definition: NitrogenFluidProperties.h:196
NitrogenFluidProperties::_lmu
const std::array< Real, 5 > _lmu
Definition: NitrogenFluidProperties.h:197
NitrogenFluidProperties::molarMass
virtual Real molarMass() const override
Fluid name.
Definition: NitrogenFluidProperties.C:45
NitrogenFluidProperties::criticalDensity
virtual Real criticalDensity() const override
Critical density.
Definition: NitrogenFluidProperties.C:63
NitrogenFluidProperties::dalpha_dtau
virtual Real dalpha_dtau(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt tau.
Definition: NitrogenFluidProperties.C:359
NitrogenFluidProperties::criticalTemperature
virtual Real criticalTemperature() const override
Critical temperature.
Definition: NitrogenFluidProperties.C:57
NitrogenFluidProperties::_l3
const std::array< unsigned int, 4 > _l3
Definition: NitrogenFluidProperties.h:187
NitrogenFluidProperties::criticalPressure
virtual Real criticalPressure() const override
Critical pressure.
Definition: NitrogenFluidProperties.C:51
NitrogenFluidProperties::saturatedLiquidDensity
Real saturatedLiquidDensity(Real temperature) const
Saturated liquid density of N2 Valid for temperatures between the triple point temperature and critic...
Definition: NitrogenFluidProperties.C:271
NitrogenFluidProperties::_N1
const std::array< Real, 6 > _N1
Coefficients for residual component of the Helmholtz free energy.
Definition: NitrogenFluidProperties.h:158
NitrogenFluidProperties::_i1
const std::array< unsigned int, 6 > _i1
Definition: NitrogenFluidProperties.h:164
NitrogenFluidProperties::d2alpha_dtau2
virtual Real d2alpha_dtau2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt tau.
Definition: NitrogenFluidProperties.C:418
NitrogenFluidProperties::_T_triple
const Real _T_triple
Triple point temperature (K)
Definition: NitrogenFluidProperties.h:146
NitrogenFluidProperties::_p_triple
const Real _p_triple
Triple point pressure (Pa)
Definition: NitrogenFluidProperties.h:144
NitrogenFluidProperties::vaporPressure
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.
Definition: NitrogenFluidProperties.C:248
NitrogenFluidProperties::_Nmu
const std::array< Real, 5 > _Nmu
Definition: NitrogenFluidProperties.h:194
NitrogenFluidProperties::_beta3
const std::array< Real, 4 > _beta3
Definition: NitrogenFluidProperties.h:189
NitrogenFluidProperties::_bmu
const std::array< Real, 5 > _bmu
Coefficients for viscosity.
Definition: NitrogenFluidProperties.h:193
NitrogenFluidProperties::d2alpha_ddeltatau
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta and tau.
Definition: NitrogenFluidProperties.C:449
NS::density
const std::string density
Definition: NS.h:16
NitrogenFluidProperties::_Nk
const std::array< Real, 6 > _Nk
Coefficients for thermal conductivity.
Definition: NitrogenFluidProperties.h:201
validParams< NitrogenFluidProperties >
InputParameters validParams< NitrogenFluidProperties >()
Definition: NitrogenFluidProperties.C:19
NitrogenFluidProperties::k_from_p_T
virtual Real k_from_p_T(Real pressure, Real temperature) const override
Definition: NitrogenFluidProperties.C:220
NitrogenFluidProperties
Nitrogen (N2) fluid properties as a function of pressure (Pa) and temperature (K).
Definition: NitrogenFluidProperties.h:38
NitrogenFluidProperties::_lk
const std::array< unsigned int, 6 > _lk
Definition: NitrogenFluidProperties.h:204
NitrogenFluidProperties::_phi3
const std::array< Real, 4 > _phi3
Definition: NitrogenFluidProperties.h:188
NitrogenFluidProperties::_rho_molar_critical
const Real _rho_molar_critical
Critical molar density (mol/l)
Definition: NitrogenFluidProperties.h:140
SinglePhaseFluidProperties::rho
e e e e p h T rho
Definition: SinglePhaseFluidProperties.h:169
NitrogenFluidProperties::_tk
const std::array< Real, 6 > _tk
Definition: NitrogenFluidProperties.h:202
NitrogenFluidProperties::_rho_critical
const Real _rho_critical
Critical density (kg/m^3)
Definition: NitrogenFluidProperties.h:142
NitrogenFluidProperties::_p_critical
const Real _p_critical
Critical pressure (Pa)
Definition: NitrogenFluidProperties.h:136
NitrogenFluidProperties::triplePointTemperature
virtual Real triplePointTemperature() const override
Triple point temperature.
Definition: NitrogenFluidProperties.C:75
HelmholtzFluidProperties
Base class equation of state for fluids that use a Helmholtz free energy alpha(delta,...
Definition: HelmholtzFluidProperties.h:34
NitrogenFluidProperties::mu_from_rho_T
virtual Real mu_from_rho_T(Real density, Real temperature) const override
Definition: NitrogenFluidProperties.C:81
NitrogenFluidProperties::_dk
const std::array< unsigned int, 6 > _dk
Definition: NitrogenFluidProperties.h:203
NitrogenFluidProperties::triplePointPressure
virtual Real triplePointPressure() const override
Triple point pressure.
Definition: NitrogenFluidProperties.C:69
NitrogenFluidProperties::_a
const std::array< Real, 8 > _a
Coefficients for ideal gas component of the Helmholtz free energy.
Definition: NitrogenFluidProperties.h:149
NitrogenFluidProperties::alpha
virtual Real alpha(Real delta, Real tau) const override
Helmholtz free energy.
Definition: NitrogenFluidProperties.C:305
NitrogenFluidProperties::NitrogenFluidProperties
NitrogenFluidProperties(const InputParameters &parameters)
Definition: NitrogenFluidProperties.C:26
NS::temperature
const std::string temperature
Definition: NS.h:26
NitrogenFluidProperties::dalpha_ddelta
virtual Real dalpha_ddelta(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt delta.
Definition: NitrogenFluidProperties.C:332
NitrogenFluidProperties::_tmu
const std::array< Real, 5 > _tmu
Definition: NitrogenFluidProperties.h:195
NitrogenFluidProperties::_Mn2
const Real _Mn2
Nitrogen molar mass (kg/mol)
Definition: NitrogenFluidProperties.h:134
NitrogenFluidProperties::_gammamu
const std::array< Real, 5 > _gammamu
Definition: NitrogenFluidProperties.h:198
NitrogenFluidProperties::_j2
const std::array< Real, 26 > _j2
Definition: NitrogenFluidProperties.h:177
NitrogenFluidProperties::_i2
const std::array< unsigned int, 26 > _i2
Definition: NitrogenFluidProperties.h:175
NitrogenFluidProperties::_N3
const std::array< Real, 4 > _N3
Definition: NitrogenFluidProperties.h:183
NitrogenFluidProperties::k_from_rho_T
virtual Real k_from_rho_T(Real density, Real temperature) const override
Definition: NitrogenFluidProperties.C:199
NitrogenFluidProperties::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: NitrogenFluidProperties.C:173
HelmholtzFluidProperties.h
NitrogenFluidProperties::_j3
const std::array< unsigned int, 4 > _j3
Definition: NitrogenFluidProperties.h:186
NitrogenFluidProperties::fluidName
virtual std::string fluidName() const override
Definition: NitrogenFluidProperties.C:39
NitrogenFluidProperties::_gammak
const std::array< Real, 6 > _gammak
Definition: NitrogenFluidProperties.h:205
NitrogenFluidProperties::_i3
const std::array< unsigned int, 4 > _i3
Definition: NitrogenFluidProperties.h:185
NitrogenFluidProperties::_l2
const std::array< unsigned int, 26 > _l2
Definition: NitrogenFluidProperties.h:180
NitrogenFluidProperties::saturatedVaporDensity
Real saturatedVaporDensity(Real temperature) const
Saturated vapor density of N2 Valid for temperatures between the triple point temperature and critica...
Definition: NitrogenFluidProperties.C:287
NS::pressure
const std::string pressure
Definition: NS.h:25
NitrogenFluidProperties::_T_critical
const Real _T_critical
Critical temperature (K)
Definition: NitrogenFluidProperties.h:138