www.mooseframework.org
NaClFluidProperties.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "NaClFluidProperties.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<SinglePhaseFluidPropertiesPT>();
15  params.addClassDescription("Fluid properties for NaCl");
16  return params;
17 }
18 
19 NaClFluidProperties::NaClFluidProperties(const InputParameters & parameters)
20  : SinglePhaseFluidPropertiesPT(parameters),
21  _Mnacl(58.443e-3),
22  _p_critical(1.82e7),
23  _T_critical(3841.15),
24  _rho_critical(108.43),
25  _p_triple(50.0),
26  _T_triple(1073.85)
27 {
28 }
29 
31 
32 std::string
34 {
35  return "nacl";
36 }
37 
38 Real
40 {
41  return _Mnacl;
42 }
43 
44 Real
46 {
47  return _p_critical;
48 }
49 
50 Real
52 {
53  return _T_critical;
54 }
55 
56 Real
58 {
59  return _rho_critical;
60 }
61 
62 Real
64 {
65  // Correlation needs pressure in bar
66  Real pbar = pressure * 1.0e-5;
67  // Correlation requires temperature in Celcius
68  Real Tc = temperature - _T_c2k;
69 
70  // Halite density at 0 Pa
71  Real density_P0 = 2.17043e3 - 2.4599e-1 * Tc - 9.5797e-5 * Tc * Tc;
72 
73  // Halite density as a function of pressure
74  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
75 
76  return density_P0 + l * pbar;
77 }
78 
79 void
81  Real pressure, Real temperature, Real & rho, Real & drho_dp, Real & drho_dT) const
82 {
83  rho = this->rho(pressure, temperature);
84 
85  // Correlation needs pressure in bar
86  Real pbar = pressure * 1.0e-5;
87  // Correlation requires temperature in Celcius
88  Real Tc = temperature - _T_c2k;
89 
90  // Halite density at 0 Pa
91  Real ddensity_P0_dT = -2.4599e-1 - 1.91594e-4 * Tc;
92 
93  Real l = 5.727e-3 + 2.715e-3 * std::exp(Tc / 733.4);
94  Real dl_dT = 2.715e-3 * std::exp(Tc / 733.4) / 733.4;
95 
96  drho_dp = l * 1.0e-5;
97  drho_dT = ddensity_P0_dT + dl_dT * pbar;
98 }
99 
100 Real
102 {
103  return h(pressure, temperature) - pressure / rho(pressure, temperature);
104 }
105 
106 void
108  Real pressure, Real temperature, Real & e, Real & de_dp, Real & de_dT) const
109 {
110  Real h, dh_dp, dh_dT;
111  h_dpT(pressure, temperature, h, dh_dp, dh_dT);
112  Real rho, drho_dp, drho_dT;
113  rho_dpT(pressure, temperature, rho, drho_dp, drho_dT);
114 
115  e = h - pressure / rho;
116  de_dp = dh_dp + pressure * drho_dp / rho / rho - 1.0 / rho;
117  de_dT = dh_dT + pressure * drho_dT / rho / rho;
118 }
119 
120 void
122  Real temperature,
123  Real & rho,
124  Real & drho_dp,
125  Real & drho_dT,
126  Real & e,
127  Real & de_dp,
128  Real & de_dT) const
129 {
130  rho_dpT(pressure, temperature, rho, drho_dp, drho_dT);
131  e_dpT(pressure, temperature, e, de_dp, de_dT);
132 }
133 
134 Real NaClFluidProperties::c(Real /*pressure*/, Real /*temperature*/) const
135 {
136  mooseError(name(), ": c() is not implemented");
137 }
138 
139 Real
141 {
142  // Correlation needs pressure in bar
143  Real pbar = pressure * 10.0e-5;
144  // Correlation requires temperature in Celcius
145  Real Tc = temperature - _T_c2k;
146  // Triple point temperature of NaCl (in C)
147  Real Tt = _T_triple - _T_c2k;
148  // Coefficients used in the correlation
149  Real r3 = -1.7099e-3 - 3.82734e-6 * Tc - 8.65455e-9 * Tc * Tc;
150  Real r4 = 5.29063e-8 - 9.63084e-11 * Tc + 6.50745e-13 * Tc * Tc;
151 
152  // Halite isobaric heat capapcity
153  return 1148.81 + 0.551548 * (Tc - Tt) + 2.64309e-4 * (Tc - Tt) * (Tc - Tt) + r3 * pbar +
154  r4 * pbar * pbar;
155 }
156 
157 Real
159 {
160  return e(pressure, temperature) / temperature;
161 }
162 
163 Real NaClFluidProperties::mu(Real /*pressure*/, Real /*temperature*/) const
164 {
165  mooseError(name(), ": mu() is not implemented.");
166 }
167 
168 void
169 NaClFluidProperties::mu_dpT(Real /*pressure*/,
170  Real /*temperature*/,
171  Real & /*mu*/,
172  Real & /*dmu_dp*/,
173  Real & /*dmu_dT*/) const
174 {
175  mooseError(name(), ": mu_dpT() is not implemented.");
176 }
177 
178 Real NaClFluidProperties::mu_from_rho_T(Real /*density*/, Real /*temperature*/) const
179 {
180  mooseError(name(), ": mu is not implemented");
181 }
182 
183 void
185  Real /*temperature*/,
186  Real /*ddensity_dT*/,
187  Real & /*mu*/,
188  Real & /*dmu_drho*/,
189  Real & /*dmu_dT*/) const
190 {
191  mooseError(name(), ": mu_drhoT() is not implemented");
192 }
193 
194 Real NaClFluidProperties::k(Real /*pressure*/, Real /*temperature*/) const
195 {
196  mooseError(name(), ": k() is not implemented");
197 }
198 
199 void
201  Real /*pressure*/, Real /*temperature*/, Real & /*k*/, Real & /*dk_dp*/, Real & /*dk_dT*/) const
202 {
203  mooseError(name(), ": k_dpT() is not implemented");
204 }
205 
206 Real
207 NaClFluidProperties::k_from_rho_T(Real /*density*/, Real temperature) const
208 {
209  // Correlation requires temperature in Celcius
210  Real Tc = temperature - _T_c2k;
211 
212  return 6.82793 - 3.16584e-2 * Tc + 1.03451e-4 * Tc * Tc - 1.48207e-7 * Tc * Tc * Tc;
213 }
214 
215 Real NaClFluidProperties::s(Real /*pressure*/, Real /*temperature*/) const
216 {
217  mooseError(name(), ": s() is not implemented");
218 }
219 
220 Real
222 {
223  // Correlation needs pressure in bar
224  Real pbar = pressure * 1.0e-5;
225  // Correlation requires temperature in Celcius
226  Real Tc = temperature - _T_c2k;
227  // Triple point temperature of water (in C)
228  Real Tt = 273.16 - _T_c2k;
229  // Triple point presure of water (in bar)
230  Real pt = 611.657 * 1.0e-5;
231 
232  // Note: the enthalpy of halite is 0 at the triple point of water
233  return 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
234  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
235 }
236 
237 void
239  Real pressure, Real temperature, Real & h, Real & dh_dp, Real & dh_dT) const
240 {
241  // Correlation needs pressure in bar
242  Real pbar = pressure * 1.0e-5;
243  // Correlation requires temperature in Celcius
244  Real Tc = temperature - _T_c2k;
245  // Triple point temperature of water (in C)
246  Real Tt = 273.16 - _T_c2k;
247  // Triple point presure of water (in bar)
248  Real pt = 611.657 * 1.0e-5;
249 
250  // Note: the enthalpy of halite is 0 at the triple point of water
251  h = 8.7664e2 * (Tc - Tt) + 6.4139e-2 * (Tc * Tc - Tt * Tt) +
252  8.8101e-5 * (Tc * Tc * Tc - Tt * Tt * Tt) + 44.14 * (pbar - pt);
253 
254  dh_dp = 44.14 * 1.0e-5;
255  dh_dT = 8.7664e2 + 2.0 * 6.4139e-2 * Tc + 3.0 * 8.8101e-5 * Tc * Tc;
256 }
257 
258 Real NaClFluidProperties::beta(Real /*pressure*/, Real /*temperature*/) const
259 {
260  mooseError(name(), ": beta() is not implemented");
261 }
262 
263 Real NaClFluidProperties::henryConstant(Real /*temperature*/) const
264 {
265  mooseError(name(), ": henryConstant() is not defined");
266 }
267 
268 void
270  Real & /* Kh */,
271  Real & /* dKh_dT */) const
272 {
273  mooseError(name(), ": henryConstant_dT() is not defined");
274 }
virtual Real criticalTemperature() const
NaCl critical temperature From Anderko and Pitzer, Equation of state for pure sodium chloride...
virtual std::string fluidName() const override
Fluid name.
virtual void rho_e_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT, Real &e, Real &de_dp, Real &de_dT) const override
Density and internal energy and their derivatives wrt pressure and temperature.
InputParameters validParams< NaClFluidProperties >()
virtual Real mu(Real pressure, Real temperature) const override
virtual Real cv(Real pressure, Real temperature) const override
Isochoric specific heat.
virtual Real k(Real pressure, Real temperature) const override
Thermal conductivity.
const Real _T_triple
Triple point temperature (K)
virtual void k_dpT(Real pressure, Real temperature, Real &k, Real &dk_dp, Real &dk_dT) const override
Thermal conductivity and its derivatives wrt pressure and temperature.
const Real _rho_critical
Critical density (kg/m^3)
virtual void rho_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
Density and its derivatives wrt pressure and temperature.
virtual Real henryConstant(Real temperature) const override
Henry&#39;s law constant for dissolution in water.
virtual Real c(Real pressure, Real temperature) const override
Speed of sound.
const std::string temperature
Definition: NS.h:25
virtual Real rho(Real pressure, Real temperature) const override
Density.
virtual Real beta(Real pressure, Real temperature) const override
Thermal expansion coefficient.
virtual Real criticalDensity() const
NaCl critical density From Anderko and Pitzer, Equation of state for pure sodium chloride, Fluid Phase Equil., 79 (1992)
Common class for single phase fluid properties using a pressure and temperature formulation.
virtual Real molarMass() const override
Molar mass.
virtual void e_dpT(Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const override
Internal energy and its derivatives wrt pressure and temperature.
InputParameters validParams< SinglePhaseFluidPropertiesPT >()
virtual Real e(Real pressure, Real temperature) const override
Internal energy.
virtual void mu_dpT(Real pressure, Real temperature, Real &mu, Real &dmu_dp, Real &dmu_dT) const override
const Real _T_c2k
Conversion of temperature from Celcius to Kelvin.
virtual Real h(Real pressure, Real temperature) const override
Specific enthalpy.
virtual Real cp(Real pressure, Real temperature) const override
Isobaric specific heat capacity.
virtual void henryConstant_dT(Real temperature, Real &Kh, Real &dKh_dT) const override
Henry&#39;s law constant for dissolution in water and derivative wrt temperature.
virtual void h_dpT(Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
Enthalpy and its derivatives wrt pressure and temperature.
virtual Real mu_from_rho_T(Real density, Real temperature) const override
virtual void mu_drhoT_from_rho_T(Real density, Real temperature, Real ddensity_dT, Real &mu, Real &dmu_drho, Real &dmu_dT) const override
Dynamic viscosity and its derivatives wrt density and temperature.
const Real _T_critical
Critical temperature (K)
const Real _p_critical
Critical pressure (Pa)
const std::string pressure
Definition: NS.h:24
virtual Real k_from_rho_T(Real density, Real temperature) const override
Thermal conductivity as a function of density and temperature.
virtual Real s(Real pressure, Real temperature) const override
Specific entropy.
NaClFluidProperties(const InputParameters &parameters)
const Real _Mnacl
NaCl molar mass (kg/mol)
virtual Real criticalPressure() const
NaCl critical pressure From Anderko and Pitzer, Equation of state for pure sodium chloride...