www.mooseframework.org
MethaneFluidProperties.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<MethaneFluidProperties>();
19 
20 #pragma GCC diagnostic push
21 #pragma GCC diagnostic ignored "-Woverloaded-virtual"
22 
38 {
39 public:
40  MethaneFluidProperties(const InputParameters & parameters);
41  virtual ~MethaneFluidProperties();
42 
43  virtual std::string fluidName() const override;
44 
45  virtual Real molarMass() const override;
46 
47  virtual Real mu_from_p_T(Real pressure, Real temperature) const override;
48 
49  virtual void mu_from_p_T(
50  Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const override;
51 
52  virtual Real k_from_p_T(Real pressure, Real temperature) const override;
53 
54  virtual void
55  k_from_p_T(Real pressure, Real temperature, Real & k, Real & dk_dp, Real & dk_dT) const override;
56 
57  virtual std::vector<Real> henryCoefficients() const override;
58 
59  virtual Real criticalPressure() const override;
60 
61  virtual Real criticalTemperature() const override;
62 
63  virtual Real criticalDensity() const override;
64 
65  virtual Real triplePointPressure() const override;
66 
67  virtual Real triplePointTemperature() const override;
68 
69  virtual Real vaporPressure(Real temperature) const override;
70 
71  virtual void vaporPressure(Real temperature, Real & psat, Real & dpsat_dT) const override;
72 
83  Real saturatedLiquidDensity(Real temperature) const;
84 
95  Real saturatedVaporDensity(Real temperature) const;
96 
97 protected:
98  virtual Real alpha(Real delta, Real tau) const override;
99 
100  virtual Real dalpha_ddelta(Real delta, Real tau) const override;
101 
102  virtual Real dalpha_dtau(Real delta, Real tau) const override;
103 
104  virtual Real d2alpha_ddelta2(Real delta, Real tau) const override;
105 
106  virtual Real d2alpha_dtau2(Real delta, Real tau) const override;
107 
108  virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override;
109 
111  const Real _Mch4;
113  const Real _p_critical;
115  const Real _T_critical;
117  const Real _rho_critical;
119  const Real _p_triple;
121  const Real _T_triple;
122 
124  const std::array<Real, 5> _a0{{0.008449, 4.6942, 3.4865, 1.6572, 1.4115}};
125  const std::array<Real, 5> _b0{{3.4004324, 10.26951575, 20.43932747, 29.93744884, 79.13351945}};
126 
128  const std::array<Real, 13> _N1{{0.4367901028e-1,
129  0.6709236199,
130  -0.1765577859e1,
131  0.8582330241,
132  -0.1206513052e1,
133  0.512046722,
134  -0.4000010791e-3,
135  -0.1247842423e-1,
136  0.3100269701e-1,
137  0.1754748522e-2,
138  -0.3171921605e-5,
139  -0.224034684e-5,
140  0.2947056156e-6}};
141  const std::array<Real, 13> _t1{
142  {-0.5, 0.5, 1.0, 0.5, 1.0, 1.5, 4.5, 0.0, 1.0, 3.0, 1.0, 3.0, 3.0}};
143  const std::array<unsigned int, 13> _d1{{1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 8, 9, 10}};
144 
145  const std::array<Real, 23> _N2{
146  {0.1830487909, 0.1511883679, -0.4289363877, 0.6894002446e-1, -0.1408313996e-1,
147  -0.306305483e-1, -0.2969906708e-1, -0.1932040831e-1, -0.1105739959, 0.9952548995e-1,
148  0.8548437825e-2, -0.6150555662e-1, -0.4291792423e-1, -0.181320729e-1, 0.344590476e-1,
149  -0.238591945e-2, -0.1159094939e-1, 0.6641693602e-1, -0.237154959e-1, -0.3961624905e-1,
150  -0.1387292044e-1, 0.3389489599e-1, -0.2927378753e-2}};
151  const std::array<Real, 23> _t2{{0.0, 1.0, 2.0, 0.0, 0.0, 2.0, 2.0, 5.0,
152  5.0, 5.0, 2.0, 4.0, 12.0, 8.0, 10.0, 10.0,
153  10.0, 14.0, 12.0, 18.0, 22.0, 18.0, 14.0}};
154  const std::array<unsigned int, 23> _c2{
155  {1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4}};
156  const std::array<unsigned int, 23> _d2{
157  {1, 1, 1, 2, 4, 5, 6, 1, 2, 3, 4, 4, 3, 5, 5, 8, 2, 3, 4, 4, 4, 5, 6}};
158 
159  const std::array<Real, 4> _N3{
160  {0.9324799946e-4, -0.6287171518e1, 0.1271069467e2, -0.6423953466e1}};
161  const std::array<Real, 4> _t3{{2.0, 0.0, 1.0, 2.0}};
162  const std::array<int, 4> _d3{{2, 0, 0, 0}};
163  const std::array<Real, 4> _alpha3{{20.0, 40.0, 40.0, 40.0}};
164  const std::array<Real, 4> _beta3{{200.0, 250.0, 250.0, 250.0}};
165  const std::array<Real, 4> _gamma3{{1.07, 1.11, 1.11, 1.11}};
166  const std::array<Real, 4> _D3{{1.0, 1.0, 1.0, 1.0}};
167 
169  const std::array<Real, 6> _a{
170  {2.968267e-1, 3.711201e-2, 1.218298e-5, -7.02426e-8, 7.543269e-11, -2.7237166e-14}};
172  const std::array<Real, 7> _b{{-1.3401499e-2,
173  3.663076e-4,
174  -1.82248608e-6,
175  5.93987998e-9,
176  -9.1405505e-12,
177  6.7896889e-15,
178  -1.95048736e-18}};
179 };
180 
181 #pragma GCC diagnostic pop
MethaneFluidProperties::_beta3
const std::array< Real, 4 > _beta3
Definition: MethaneFluidProperties.h:164
MethaneFluidProperties::k_from_p_T
virtual Real k_from_p_T(Real pressure, Real temperature) const override
Definition: MethaneFluidProperties.C:110
MethaneFluidProperties::_d2
const std::array< unsigned int, 23 > _d2
Definition: MethaneFluidProperties.h:156
MethaneFluidProperties::_N3
const std::array< Real, 4 > _N3
Definition: MethaneFluidProperties.h:159
MethaneFluidProperties
Methane (CH4) fluid properties as a function of pressure (Pa) and temperature (K).
Definition: MethaneFluidProperties.h:37
MethaneFluidProperties::_p_critical
const Real _p_critical
Critical pressure (Pa)
Definition: MethaneFluidProperties.h:113
MethaneFluidProperties::_alpha3
const std::array< Real, 4 > _alpha3
Definition: MethaneFluidProperties.h:163
MethaneFluidProperties::_d3
const std::array< int, 4 > _d3
Definition: MethaneFluidProperties.h:162
MethaneFluidProperties::_a
const std::array< Real, 6 > _a
Coefficients for viscosity.
Definition: MethaneFluidProperties.h:169
MethaneFluidProperties::fluidName
virtual std::string fluidName() const override
Definition: MethaneFluidProperties.C:39
MethaneFluidProperties::henryCoefficients
virtual std::vector< Real > henryCoefficients() const override
Henry's law coefficients for dissolution in water.
Definition: MethaneFluidProperties.C:169
MethaneFluidProperties::criticalDensity
virtual Real criticalDensity() const override
Critical density.
Definition: MethaneFluidProperties.C:63
MethaneFluidProperties::~MethaneFluidProperties
virtual ~MethaneFluidProperties()
Definition: MethaneFluidProperties.C:36
MethaneFluidProperties::_T_critical
const Real _T_critical
Critical temperature (K)
Definition: MethaneFluidProperties.h:115
MethaneFluidProperties::criticalPressure
virtual Real criticalPressure() const override
Critical pressure.
Definition: MethaneFluidProperties.C:51
MethaneFluidProperties::_T_triple
const Real _T_triple
Triple point temperature (K)
Definition: MethaneFluidProperties.h:121
MethaneFluidProperties::saturatedVaporDensity
Real saturatedVaporDensity(Real temperature) const
Saturated vapor density of CH4 Valid for temperatures between the triple point temperature and critic...
Definition: MethaneFluidProperties.C:191
MethaneFluidProperties::_c2
const std::array< unsigned int, 23 > _c2
Definition: MethaneFluidProperties.h:154
MethaneFluidProperties::_d1
const std::array< unsigned int, 13 > _d1
Definition: MethaneFluidProperties.h:143
MethaneFluidProperties::_p_triple
const Real _p_triple
Triple point pressure (Pa)
Definition: MethaneFluidProperties.h:119
MethaneFluidProperties::triplePointTemperature
virtual Real triplePointTemperature() const override
Triple point temperature.
Definition: MethaneFluidProperties.C:75
MethaneFluidProperties::_rho_critical
const Real _rho_critical
Critical density (kg/m^3)
Definition: MethaneFluidProperties.h:117
MethaneFluidProperties::_a0
const std::array< Real, 5 > _a0
Coefficients for ideal gas component of the Helmholtz free energy.
Definition: MethaneFluidProperties.h:124
MethaneFluidProperties::alpha
virtual Real alpha(Real delta, Real tau) const override
Helmholtz free energy.
Definition: MethaneFluidProperties.C:209
MethaneFluidProperties::triplePointPressure
virtual Real triplePointPressure() const override
Triple point pressure.
Definition: MethaneFluidProperties.C:69
MethaneFluidProperties::_t3
const std::array< Real, 4 > _t3
Definition: MethaneFluidProperties.h:161
MethaneFluidProperties::vaporPressure
virtual Real vaporPressure(Real temperature) const override
Vapor pressure.
Definition: MethaneFluidProperties.C:147
MethaneFluidProperties::criticalTemperature
virtual Real criticalTemperature() const override
Critical temperature.
Definition: MethaneFluidProperties.C:57
MethaneFluidProperties::d2alpha_ddeltatau
virtual Real d2alpha_ddeltatau(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta and tau.
Definition: MethaneFluidProperties.C:361
MethaneFluidProperties::_N2
const std::array< Real, 23 > _N2
Definition: MethaneFluidProperties.h:145
MethaneFluidProperties::dalpha_dtau
virtual Real dalpha_dtau(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt tau.
Definition: MethaneFluidProperties.C:264
validParams< MethaneFluidProperties >
InputParameters validParams< MethaneFluidProperties >()
Definition: MethaneFluidProperties.C:18
MethaneFluidProperties::_N1
const std::array< Real, 13 > _N1
Coefficients for residual component of the Helmholtz free energy.
Definition: MethaneFluidProperties.h:128
HelmholtzFluidProperties
Base class equation of state for fluids that use a Helmholtz free energy alpha(delta,...
Definition: HelmholtzFluidProperties.h:34
MethaneFluidProperties::saturatedLiquidDensity
Real saturatedLiquidDensity(Real temperature) const
Saturated liquid density of CH4 Valid for temperatures between the triple point temperature and criti...
Definition: MethaneFluidProperties.C:175
MethaneFluidProperties::mu_from_p_T
virtual Real mu_from_p_T(Real pressure, Real temperature) const override
Definition: MethaneFluidProperties.C:81
MethaneFluidProperties::molarMass
virtual Real molarMass() const override
Fluid name.
Definition: MethaneFluidProperties.C:45
MethaneFluidProperties::MethaneFluidProperties
MethaneFluidProperties(const InputParameters &parameters)
Definition: MethaneFluidProperties.C:25
NS::temperature
const std::string temperature
Definition: NS.h:26
MethaneFluidProperties::dalpha_ddelta
virtual Real dalpha_ddelta(Real delta, Real tau) const override
Derivative of Helmholtz free energy wrt delta.
Definition: MethaneFluidProperties.C:237
MethaneFluidProperties::_t1
const std::array< Real, 13 > _t1
Definition: MethaneFluidProperties.h:141
MethaneFluidProperties::_b0
const std::array< Real, 5 > _b0
Definition: MethaneFluidProperties.h:125
MethaneFluidProperties::_D3
const std::array< Real, 4 > _D3
Definition: MethaneFluidProperties.h:166
MethaneFluidProperties::_b
const std::array< Real, 7 > _b
Coefficients for thermal conductivity.
Definition: MethaneFluidProperties.h:172
MethaneFluidProperties::d2alpha_ddelta2
virtual Real d2alpha_ddelta2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt delta.
Definition: MethaneFluidProperties.C:293
MethaneFluidProperties::_Mch4
const Real _Mch4
Methane molar mass (kg/mol)
Definition: MethaneFluidProperties.h:111
HelmholtzFluidProperties.h
MethaneFluidProperties::_gamma3
const std::array< Real, 4 > _gamma3
Definition: MethaneFluidProperties.h:165
MethaneFluidProperties::_t2
const std::array< Real, 23 > _t2
Definition: MethaneFluidProperties.h:151
MethaneFluidProperties::d2alpha_dtau2
virtual Real d2alpha_dtau2(Real delta, Real tau) const override
Second derivative of Helmholtz free energy wrt tau.
Definition: MethaneFluidProperties.C:327
NS::pressure
const std::string pressure
Definition: NS.h:25