www.mooseframework.org
NaClFluidProperties.C
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 #include "NaClFluidProperties.h"
11 
12 registerMooseObject("FluidPropertiesApp", NaClFluidProperties);
13 
16 {
18  params.addClassDescription("Fluid properties for NaCl");
19  return params;
20 }
21 
23  : SinglePhaseFluidProperties(parameters),
24  _Mnacl(58.443e-3),
25  _p_critical(1.82e7),
26  _T_critical(3841.15),
27  _rho_critical(108.43),
28  _p_triple(50.0),
29  _T_triple(1073.85)
30 {
31 }
32 
34 
35 std::string
37 {
38  return "nacl";
39 }
40 
41 Real
43 {
44  return _Mnacl;
45 }
46 
47 Real
49 {
50  return _p_critical;
51 }
52 
53 Real
55 {
56  return _T_critical;
57 }
58 
59 Real
61 {
62  return _rho_critical;
63 }
64 
65 Real
67 {
68  return _p_triple;
69 }
70 
71 Real
73 {
74  return _T_triple;
75 }
76 
77 Real
79 {
80  // Correlation needs pressure in bar
81  Real pbar = pressure * 1.0e-5;
82  // Correlation requires temperature in Celcius
83  Real Tc = temperature - _T_c2k;
84 
85  // Halite density at 0 Pa
86  Real density_P0 = 2.17043e3 - 2.4599e-1 * Tc - 9.5797e-5 * Tc * Tc;
87 
88  // Halite density as a function of pressure
89  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
90 
91  return density_P0 + l * pbar;
92 }
93 
94 void
96  Real pressure, Real temperature, Real & rho, Real & drho_dp, Real & drho_dT) const
97 {
98  rho = this->rho_from_p_T(pressure, temperature);
99 
100  // Correlation needs pressure in bar
101  Real pbar = pressure * 1.0e-5;
102  // Correlation requires temperature in Celcius
103  Real Tc = temperature - _T_c2k;
104 
105  // Halite density at 0 Pa
106  Real ddensity_P0_dT = -2.4599e-1 - 1.91594e-4 * Tc;
107 
108  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
109  Real dl_dT = 2.715e-3 * std::exp(Tc / 733.4) / 733.4;
110 
111  drho_dp = l * 1.0e-5;
112  drho_dT = ddensity_P0_dT + dl_dT * pbar;
113 }
114 
115 Real
117 {
119 }
120 
121 void
123  Real pressure, Real temperature, Real & e, Real & de_dp, Real & de_dT) const
124 {
125  Real h, dh_dp, dh_dT;
126  h_from_p_T(pressure, temperature, h, dh_dp, dh_dT);
127  Real rho, drho_dp, drho_dT;
128  rho_from_p_T(pressure, temperature, rho, drho_dp, drho_dT);
129 
130  e = h - pressure / rho;
131  de_dp = dh_dp + pressure * drho_dp / rho / rho - 1.0 / rho;
132  de_dT = dh_dT + pressure * drho_dT / rho / rho;
133 }
134 
135 Real
137 {
138  // Correlation needs pressure in bar
139  Real pbar = pressure * 10.0e-5;
140  // Correlation requires temperature in Celcius
141  Real Tc = temperature - _T_c2k;
142  // Triple point temperature of NaCl (in C)
143  Real Tt = _T_triple - _T_c2k;
144  // Coefficients used in the correlation
145  Real r3 = -1.7099e-3 - 3.82734e-6 * Tc - 8.65455e-9 * Tc * Tc;
146  Real r4 = 5.29063e-8 - 9.63084e-11 * Tc + 6.50745e-13 * Tc * Tc;
147 
148  // Halite isobaric heat capapcity
149  return 1148.81 + 0.551548 * (Tc - Tt) + 2.64309e-4 * (Tc - Tt) * (Tc - Tt) + r3 * pbar +
150  r4 * pbar * pbar;
151 }
152 
153 Real
155 {
157 }
158 
159 Real
160 NaClFluidProperties::k_from_p_T(Real /*pressure*/, Real temperature) const
161 {
162  // Correlation requires temperature in Celcius
163  Real Tc = temperature - _T_c2k;
164 
165  return 6.82793 - 3.16584e-2 * Tc + 1.03451e-4 * Tc * Tc - 1.48207e-7 * Tc * Tc * Tc;
166 }
167 
168 void
170  Real /*pressure*/, Real temperature, Real & k, Real & dk_dp, Real & dk_dT) const
171 {
172  // Correlation requires temperature in Celcius
173  Real Tc = temperature - _T_c2k;
174 
175  k = 6.82793 - 3.16584e-2 * Tc + 1.03451e-4 * Tc * Tc - 1.48207e-7 * Tc * Tc * Tc;
176  dk_dp = 0.0;
177  dk_dT = -3.16584e-2 + 2.06902e-4 * Tc - 4.44621e-7 * Tc * Tc;
178 }
179 
180 Real
182 {
183  // Correlation needs pressure in bar
184  Real pbar = pressure * 1.0e-5;
185  // Correlation requires temperature in Celcius
186  Real Tc = temperature - _T_c2k;
187  // Triple point temperature of water (in C)
188  Real Tt = 273.16 - _T_c2k;
189  // Triple point presure of water (in bar)
190  Real pt = 611.657 * 1.0e-5;
191 
192  // Note: the enthalpy of halite is 0 at the triple point of water
193  return 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
194  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
195 }
196 
197 void
199  Real pressure, Real temperature, Real & h, Real & dh_dp, Real & dh_dT) const
200 {
201  // Correlation needs pressure in bar
202  Real pbar = pressure * 1.0e-5;
203  // Correlation requires temperature in Celcius
204  Real Tc = temperature - _T_c2k;
205  // Triple point temperature of water (in C)
206  Real Tt = 273.16 - _T_c2k;
207  // Triple point presure of water (in bar)
208  Real pt = 611.657 * 1.0e-5;
209 
210  // Note: the enthalpy of halite is 0 at the triple point of water
211  h = 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
212  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
213 
214  dh_dp = 44.14 * 1.0e-5;
215  dh_dT = 8.7664e2 + 2.0 * 6.4139e-2 * Tc + 3.0 * 8.8101e-5 * Tc * Tc;
216 }
virtual Real triplePointTemperature() const override
Triple point temperature.
virtual Real triplePointPressure() const override
Triple point pressure.
virtual Real criticalTemperature() const override
Critical temperature.
static InputParameters validParams()
const Real _T_triple
Triple point temperature (K)
virtual Real cp_from_p_T(Real pressure, Real temperature) const override
const Real _rho_critical
Critical density (kg/m^3)
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
virtual std::string fluidName() const override
registerMooseObject("FluidPropertiesApp", NaClFluidProperties)
static const std::string temperature
Definition: NS.h:57
virtual Real e_from_p_T(Real pressure, Real temperature) const override
virtual Real cv_from_p_T(Real pressure, Real temperature) const override
virtual Real k_from_p_T(Real pressure, Real temperature) const override
Common class for single phase fluid properties.
e e e e s T T T T T rho v v T h
const Real _p_triple
Triple point pressure (Pa)
virtual Real criticalDensity() const override
Critical density.
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
virtual Real criticalPressure() const override
Critical pressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
NaCl fluid properties as a function of pressure (Pa) and temperature (K).
void addClassDescription(const std::string &doc_string)
virtual Real h_from_p_T(Real pressure, Real temperature) const override
NaClFluidProperties(const InputParameters &parameters)
static InputParameters validParams()
const Real _Mnacl
NaCl molar mass (kg/mol)
const Real _T_c2k
Conversion of temperature from Celsius to Kelvin.
static const std::string k
Definition: NS.h:124
virtual Real molarMass() const override
Fluid name.