https://mooseframework.inl.gov
PBSodiumFluidProperties.C
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 
11 
13 
14 // Use the array to initialize the const static vector
15 const Real sodium_T[] = {
16  388.15, 398.15, 408.15, 418.15, 428.15, 438.15, 448.15, 458.15, 468.15, 478.15,
17  488.15, 498.15, 508.15, 518.15, 528.15, 538.15, 548.15, 558.15, 568.15, 578.15,
18  588.15, 598.15, 608.15, 618.15, 628.15, 638.15, 648.15, 658.15, 668.15, 678.15,
19  688.15, 698.15, 708.15, 718.15, 728.15, 738.15, 748.15, 758.15, 768.15, 778.15,
20  788.15, 798.15, 808.15, 818.15, 828.15, 838.15, 848.15, 858.15, 868.15, 878.15,
21  888.15, 898.15, 908.15, 918.15, 928.15, 938.15, 948.15, 958.15, 968.15, 978.15,
22  988.15, 998.15, 1008.15, 1018.15, 1028.15, 1038.15, 1048.15, 1058.15, 1068.15, 1078.15,
23  1088.15, 1098.15, 1108.15, 1118.15, 1128.15, 1138.15, 1148.15};
24 // sodium temperature vector corresponding to _e_vec enthalpy vector
25 const std::vector<Real>
27  sodium_T + sizeof(sodium_T) / sizeof(sodium_T[0]));
28 
29 const Real sodium_e[] = {
30  492755, 505884, 518995, 532089, 545166, 558227, 571270,
31  584298, 597309, 610305, 623286, 636252, 649203, 662139,
32  675061, 687970, 700865, 713747, 726616, 739472, 752316,
33  765148, 777969, 790778, 803576, 816363, 829140, 841907,
34  854665, 867413, 880151, 892882, 905603, 918317, 931023,
35  943721, 956412, 969097, 981775, 994447, 1.00711e+06, 1.01977e+06,
36  1.03243e+06, 1.04508e+06, 1.05773e+06, 1.07037e+06, 1.08301e+06, 1.09565e+06, 1.10828e+06,
37  1.12091e+06, 1.13354e+06, 1.14617e+06, 1.15879e+06, 1.17142e+06, 1.18404e+06, 1.19667e+06,
38  1.20929e+06, 1.22191e+06, 1.23454e+06, 1.24717e+06, 1.25979e+06, 1.27243e+06, 1.28506e+06,
39  1.29769e+06, 1.31033e+06, 1.32298e+06, 1.33562e+06, 1.34828e+06, 1.36093e+06, 1.3736e+06,
40  1.38626e+06, 1.39894e+06, 1.41162e+06, 1.42431e+06, 1.43701e+06, 1.44971e+06, 1.46243e+06};
41 // sodium enthalpy vector corresponding to _temperature_vec temperature vector
42 const std::vector<Real>
44 
47 {
49  params.addParam<Real>("p_0", 1.e5, "Reference pressure");
50  params.addClassDescription(
51  "Class that provides the methods that realize the equations of state for Liquid Sodium");
52  return params;
53 }
54 
56  : SinglePhaseFluidProperties(parameters), _p_0(getParam<Real>("p_0"))
57 {
58  _H0 = cp_from_p_T(_p_0, _T0) * _T0;
63 }
64 
65 Real
66 PBSodiumFluidProperties::rho_from_p_T(Real /*pressure*/, Real temperature) const
67 {
68  Real A12 = 1.00423e3;
69  Real A13 = -0.21390;
70  Real A14 = -1.1046e-5;
71  return (A12 + A13 * temperature + A14 * temperature * temperature);
72 }
73 
74 void
76  Real pressure, Real temperature, Real & rho, Real & drho_dp, Real & drho_dT) const
77 {
79  drho_dp = 0;
80  Real A13 = -0.21390;
81  Real A14 = -1.1046e-5;
82  drho_dT = (A13 + 2.0 * A14 * temperature);
83 }
84 
85 Real
86 PBSodiumFluidProperties::h_from_p_T(Real /*pressure*/, Real temperature) const
87 {
88  if (temperature > _Tmax + 1.e-3)
89  return _H_Tmax + _Cp_Tmax * (temperature - _Tmax);
90  else if (temperature < _Tmin - 1.e-3)
91  return _H_Tmin + _Cp_Tmin * (temperature - _Tmin);
92  else
94 }
95 
96 Real
98 {
99  Real A42 = 2.5156e-6;
100  Real A43 = 0.79919;
101  Real A44 = -6.9716e2;
102  Real A45 = 3.3140e5;
103  Real A46 = -7.0502e7;
104  Real A47 = 5.4920e9;
105  Real dt = 2503.3 - temperature;
106  return (A42 + A43 / dt + A44 / dt / dt + A45 / (dt * dt * dt) + A46 / (dt * dt * dt * dt) +
107  A47 / (dt * dt * dt * dt * dt));
108 }
109 
110 Real
112 {
113  // Consistent with SAM model cv is assumed to be equal to cp
114  // cv is currentl not being used in subchannel algorithm.
116 }
117 
118 Real
119 PBSodiumFluidProperties::cp_from_p_T(Real /*pressure*/, Real temperature) const
120 {
121  if (temperature < 388.15)
122  {
123  temperature = 388.15;
124  _console << "Warning - minimum temperature in cp caluclation bounded to 388.15 K \n";
125  }
126  if (temperature > 1148.15)
127  {
128  temperature = 1148.15;
129  _console << "Warning - maximum temperature bounded in cp calculation to 1148.15 \n";
130  }
132  Real A28 = 7.3898e5;
133  Real A29 = 3.154e5;
134  Real A30 = 1.1340e3;
135  Real A31 = -2.2153e-1;
136  Real A32 = 1.1156e-4;
137  Real dt = 2503.3 - temperature;
138  return (A28 / dt / dt + A29 / dt + A30 + A31 * dt + A32 * dt * dt);
139 }
140 
141 void
143  Real pressure, Real temperature, Real & cp, Real & dcp_dp, Real & dcp_dT) const
144 {
146  dcp_dp = 0;
147  Real A28 = 7.3898e5;
148  Real A29 = 3.154e5;
149  Real A31 = -2.2153e-1;
150  Real A32 = 1.1156e-4;
151  Real dt = 2503.3 - temperature;
152  if (temperature < _Tmax && temperature > _Tmin)
153  dcp_dT = (2 * A28 / dt / dt / dt + A29 / dt / dt - A31 - 2 * A32 * dt);
154  else
155  dcp_dT = 0.;
156 }
157 
158 Real
159 PBSodiumFluidProperties::mu_from_p_T(Real /*pressure*/, Real temperature) const
160 {
161  Real A52 = 3.6522e-5;
162  Real A53 = 0.16626;
163  Real A54 = -4.56877e1;
164  Real A55 = 2.8733e4;
165  return (A52 + A53 / temperature + A54 / temperature / temperature +
166  A55 / (temperature * temperature * temperature));
167 }
168 
169 Real
171 {
172  Real A52 = 3.6522e-5;
173  Real A53 = 0.16626;
174  Real A54 = -4.56877e1;
175  Real A55 = 2.8733e4;
176  return (A52 + A53 / temperature + A54 / temperature / temperature +
177  A55 / (temperature * temperature * temperature));
178 }
179 
180 Real
181 PBSodiumFluidProperties::k_from_p_T(Real /*pressure*/, Real temperature) const
182 {
183  if (temperature < 388.15)
184  {
185  temperature = 388.15;
186  _console << "Warning - minimum temperature in thermal conductivity caluclation bounded to "
187  "388.15 K \n";
188  }
189  if (temperature > 1148.15)
190  {
191  temperature = 1148.15;
192  _console << "Warning - maximum temperature bounded in thermal conductivity calculation to "
193  "1148.15 \n";
194  }
195  Real A48 = 1.1045e2;
196  Real A49 = -6.5112e-2;
197  Real A50 = 1.5430e-5;
198  Real A51 = -2.4617e-9;
199  return (A48 + A49 * temperature + A50 * temperature * temperature +
201 }
202 
203 Real
205 {
206  Real A28 = 7.3898e5;
207  Real A29 = 3.154e5;
208  Real A30 = 1.1340e3;
209  Real A31 = -2.2153e-1;
210  Real A32 = 1.1156e-4;
211  Real dt = 2503.3 - temperature;
212 
213  return -(-A28 / dt + A29 * std::log(dt) + A30 * dt + 0.5 * A31 * dt * dt +
214  1.0 / 3 * A32 * dt * dt * dt);
215 }
216 
217 Real
219 {
220  if (temperature > _Tmax)
221  return _Tmax;
222  else if (temperature < _Tmin)
223  return _Tmin;
224  else
225  return temperature;
226 }
227 
228 Real
229 PBSodiumFluidProperties::T_from_p_h(Real /*pressure*/, Real enthalpy) const
230 {
231  // the algorithm were made fully compliant with the enthalpy correlations above.
232  // Consistent with the approach in SAM, it ignores that sodium boiling.
233  // This part will be revisited in future.
234  Real temperature = 0;
235  if (enthalpy > _H_Tmax)
236  {
237  temperature = (enthalpy - _H_Tmax) / _Cp_Tmax + _Tmax;
238  }
239  else if (enthalpy < _H_Tmin)
240  {
241  temperature = (enthalpy - _H_Tmin) / _Cp_Tmin + _Tmin;
242  }
243  else
244  {
245  for (unsigned int i = 0; i < _e_vec.size() - 1; i++)
246  {
247  if (enthalpy > _e_vec[i] && enthalpy <= _e_vec[i + 1])
248  {
249  temperature = _temperature_vec[i] + (enthalpy - _e_vec[i]) / (_e_vec[i + 1] - _e_vec[i]) *
250  (_temperature_vec[i + 1] - _temperature_vec[i]);
251  break;
252  }
253  }
254  }
255  return temperature;
256 }
virtual Real rho_from_p_T(Real pressure, Real temperature) const override
const Real sodium_e[]
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
Class that implements the equations of state for single phase liquid sodium.
static const std::vector< Real > _temperature_vec
virtual Real beta_from_p_T(Real pressure, Real temperature) const override
static const std::string temperature
Definition: NS.h:59
virtual Real cv_from_p_T(Real pressure, Real temperature) const override
static constexpr Real _Tmax
max temperature
static constexpr Real _Tmin
min temperature
virtual Real cp_from_p_T(Real pressure, Real temperature) const override
static const std::string cp
Definition: NS.h:121
static constexpr Real _T0
reference temperature
Common class for single phase fluid properties.
registerMooseObject("SubChannelApp", PBSodiumFluidProperties)
Real temperature_correction(Real &temperature) const
const Real & _p_0
reference pressure
PBSodiumFluidProperties(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real sodium_T[]
Real F_enthalpy(Real temperature) const
static const std::string pressure
Definition: NS.h:56
void addClassDescription(const std::string &doc_string)
virtual Real h_from_p_T(Real pressure, Real temperature) const override
virtual Real k_from_p_T(Real pressure, Real temperature) const override
const ConsoleStream _console
virtual Real T_from_p_h(Real pressure, Real enthalpy) const override
Real _H0
reference enthalpy
static InputParameters validParams()
static const std::vector< Real > _e_vec
virtual Real mu_from_rho_T(Real rho, Real temperature) const override
virtual Real mu_from_p_T(Real pressure, Real temperature) const override