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