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