https://mooseframework.inl.gov
LeadLithiumFluidProperties.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 
12 registerMooseObject("FluidPropertiesApp", LeadLithiumFluidProperties);
13 
16 {
18  params.addClassDescription("Fluid properties for Lead Lithium eutectic (83% Pb, 17% Li)");
19  return params;
20 }
21 
23  : SinglePhaseFluidProperties(parameters)
24 {
25 }
26 
27 std::string
29 {
30  return "LeadLithium";
31 }
32 
33 Real
35 {
36  // Approximate molar mass for 83% Pb (207.2 g/mol) and 17% Li (6.94 g/mol) by atomic fraction
37  return 1.73e-1; // in kg/mol
38 }
39 
40 Real
42 {
43  if (T < _T_mo || T > 880)
44  flagInvalidSolution("Temperature out of bounds for the PbLi density computation");
45  return 10520.35 - 1.19051 * T;
46 }
47 
48 void
50  Real p, Real T, Real & rho, Real & drho_dp, Real & drho_dT) const
51 {
52  rho = rho_from_p_T(p, T);
53  drho_dp = 0;
54  drho_dT = -1.19051;
55 }
56 
57 void
59  const ADReal & p, const ADReal & T, ADReal & rho, ADReal & drho_dp, ADReal & drho_dT) const
60 {
61  rho = SinglePhaseFluidProperties::rho_from_p_T(p, T);
62  drho_dp = 0;
63  drho_dT = -1.19051;
64 }
65 
66 Real
68 {
69  return 1.0 / rho_from_p_T(p, T);
70 }
71 
72 void
73 LeadLithiumFluidProperties::v_from_p_T(Real p, Real T, Real & v, Real & dv_dp, Real & dv_dT) const
74 {
75  v = v_from_p_T(p, T);
76  dv_dp = 0;
77  dv_dT = 1.19051 / Utility::pow<2>(10520.35 - 1.19051 * T);
78 }
79 
80 Real
82 {
83  Real T = (10520.35 - 1.0 / v) / 1.19051;
84  // This is computed from rho(T), thus shares the same validity range
85  if (T < _T_mo || T > 880)
86  flagInvalidSolution("Specific volume out of bounds for the PbLi temperature computation");
87  return T;
88 }
89 
90 void
91 LeadLithiumFluidProperties::T_from_v_e(Real v, Real e, Real & T, Real & dT_dv, Real & dT_de) const
92 {
93  T = T_from_v_e(v, e);
94  dT_de = 0;
95  dT_dv = 1.0 / (1.19051 * v * v);
96 }
97 
98 Real
100 {
101  return Utility::pow<2>(c_from_p_T(0, T)) * rho_from_p_T(0, T);
102 }
103 
104 Real
105 LeadLithiumFluidProperties::c_from_p_T(Real /*p*/, Real T) const
106 {
107  return 1876 - 0.306 * T;
108 }
109 
110 Real
112 {
113  Real T = T_from_v_e(v, e);
114  return 1876 - 0.306 * T;
115 }
116 
117 ADReal
119 {
120  ADReal T = SinglePhaseFluidProperties::T_from_v_e(v, e);
121  return 1876 - 0.306 * T;
122 }
123 
124 Real
126 {
127  Real h = h_from_v_e(v, e);
128  return (h - e) / v;
129 }
130 
131 void
132 LeadLithiumFluidProperties::p_from_v_e(Real v, Real e, Real & p, Real & dp_dv, Real & dp_de) const
133 {
134  p = p_from_v_e(v, e);
135  Real h, dh_dv, dh_de;
136  h_from_v_e(v, e, h, dh_dv, dh_de);
137  dp_dv = (v * dh_dv - h + e) / (v * v);
138  dp_de = (dh_de - 1) / v;
139 }
140 
141 Real
143 {
144  Real T = T_from_v_e(v, e);
145  if (T < _T_mo || T > 800)
146  flagInvalidSolution("Temperature out of bounds for the PbLi specific heat computation");
147  return 195.0 - 9.116e-3 * T;
148 }
149 
150 void
152  Real v, Real e, Real & cp, Real & dcp_dv, Real & dcp_de) const
153 {
154  Real T, dT_dv, dT_de;
155  T_from_v_e(v, e, T, dT_dv, dT_de);
156  cp = cp_from_v_e(v, e);
157  const Real dcp_dT = -9.116e-3;
158  dcp_dv = dcp_dT * dT_dv;
159  dcp_de = dcp_dT * dT_de;
160 }
161 
162 Real
164 {
165  Real rho, drho_dT, drho_dp;
166  rho_from_p_T(p, T, rho, drho_dp, drho_dT);
167  Real alpha = -drho_dT / rho;
168  Real bulk_modulus = bulk_modulus_from_p_T(p, T);
169  Real cp = cp_from_p_T(p, T);
170  return cp / (1.0 + alpha * alpha * bulk_modulus * T / (rho * cp));
171 }
172 
173 void
175  Real p, Real T, Real & cv, Real & dcv_dp, Real & dcv_dT) const
176 {
177  cv = cv_from_p_T(p, T);
178  // A full analytical derivative is complex; here we assume minimal pressure dependence.
179  dcv_dp = 0;
180  const Real dT = 1e-6;
181  Real cv_plus = cv_from_p_T(p, T + dT);
182  dcv_dT = (cv_plus - cv) / dT;
183 }
184 
185 Real
187 {
188  Real p = p_from_v_e(v, e);
189  Real T = T_from_v_e(v, e);
190  return cv_from_p_T(p, T);
191 }
192 
193 void
195  Real v, Real e, Real & cv, Real & dcv_dv, Real & dcv_de) const
196 {
197  Real p, dp_dv, dp_de;
198  p_from_v_e(v, e, p, dp_dv, dp_de);
199  Real T, dT_dv, dT_de;
200  T_from_v_e(v, e, T, dT_dv, dT_de);
201  Real dcv_dp, dcv_dT;
202  cv_from_p_T(p, T, cv, dcv_dp, dcv_dT);
203  dcv_dv = dcv_dp * dp_dv + dcv_dT * dT_dv;
204  dcv_de = dcv_dp * dp_de + dcv_dT * dT_de;
205 }
206 
207 Real
209 {
210  Real T = T_from_v_e(v, e);
211  if (T < _T_mo || T > 625)
212  flagInvalidSolution("Temperature out of bounds for the PbLi viscosity computation");
213  return 1.87e-4 * std::exp(11640.0 / (FluidProperties::_R * T));
214 }
215 
216 void
218  Real v, Real e, Real & mu, Real & dmu_dv, Real & dmu_de) const
219 {
220  Real T, dT_dv, dT_de;
221  T_from_v_e(v, e, T, dT_dv, dT_de);
222  mu = mu_from_v_e(v, e);
223  Real factor = -11640.0 / (FluidProperties::_R * T * T);
224  dmu_dv = factor * mu * dT_dv;
225  dmu_de = factor * mu * dT_de;
226 }
227 
228 Real
230 {
231  Real T = T_from_v_e(v, e);
232  if (T < _T_mo || T > 873)
233  flagInvalidSolution("Temperature out of bounds for the PbLi dynamic viscosity computation");
234  return 14.51 + 1.9631e-2 * T;
235 }
236 
237 void
238 LeadLithiumFluidProperties::k_from_v_e(Real v, Real e, Real & k, Real & dk_dv, Real & dk_de) const
239 {
240  Real T, dT_dv, dT_de;
241  T_from_v_e(v, e, T, dT_dv, dT_de);
242  k = k_from_v_e(v, e);
243  dk_dv = 0.019631 * dT_dv;
244  dk_de = 0.019631 * dT_de;
245 }
246 
247 Real
248 LeadLithiumFluidProperties::h_from_p_T(Real /*p*/, Real T) const
249 {
250  if (T < _T_mo || T > 800)
251  flagInvalidSolution("Temperature out of bounds for the PbLi enthalpy computation");
252  return 195.0 * (T - _T_mo) - 0.5 * 9.116e-3 * (T * T - _T_mo * _T_mo);
253 }
254 
255 void
256 LeadLithiumFluidProperties::h_from_p_T(Real p, Real T, Real & h, Real & dh_dp, Real & dh_dT) const
257 {
258  h = h_from_p_T(p, T);
259  dh_dp = 0;
260  dh_dT = cp_from_p_T(p, T);
261 }
262 
263 Real
265 {
266  Real T = T_from_v_e(v, e);
267  return h_from_p_T(0, T);
268 }
269 
270 void
271 LeadLithiumFluidProperties::h_from_v_e(Real v, Real e, Real & h, Real & dh_dv, Real & dh_de) const
272 {
273  Real T, dT_dv, dT_de;
274  T_from_v_e(v, e, T, dT_dv, dT_de);
275  h = h_from_v_e(v, e);
276  Real cp = cp_from_v_e(v, e);
277  dh_dv = cp * dT_dv;
278  dh_de = cp * dT_de;
279 }
280 
281 Real
283 {
284  Real v = v_from_p_T(p, T);
285  Real h = h_from_p_T(p, T);
286  return h - p * v;
287 }
288 
289 void
290 LeadLithiumFluidProperties::e_from_p_T(Real p, Real T, Real & e, Real & de_dp, Real & de_dT) const
291 {
292  Real dh_dp, dv_dp, dh_dT, dv_dT, v, h;
293  h_from_p_T(p, T, h, dh_dp, dh_dT);
294  v_from_p_T(p, T, v, dv_dp, dv_dT);
295  e = e_from_p_T(p, T);
296  de_dp = dh_dp - v - dv_dp * p;
297  de_dT = dh_dT - dv_dT * p;
298 }
299 
300 Real
302 {
303  return e_from_p_T(p, T_from_p_rho(p, rho));
304 }
305 
306 void
308  Real p, Real rho, Real & e, Real & de_dp, Real & de_drho) const
309 {
310  Real T, dT_dp, dT_drho;
311  T_from_p_rho(p, rho, T, dT_dp, dT_drho);
312  Real de_dp_T, de_dT;
313  e_from_p_T(p, T, e, de_dp_T, de_dT);
314  de_dp = de_dp_T + de_dT * dT_dp;
315  de_drho = de_dT * dT_drho;
316 }
317 
318 Real
319 LeadLithiumFluidProperties::T_from_p_rho(Real /*p*/, Real rho) const
320 {
321  Real T = (10520.35 - rho) / 1.19051;
322  if (T < _T_mo || T > 880)
323  flagInvalidSolution("Temperature out of bounds for the PbLi density computation");
324  return T;
325 }
326 
327 void
329  Real p, Real rho, Real & T, Real & dT_dp, Real & dT_drho) const
330 {
331  T = T_from_p_rho(p, rho);
332  dT_dp = 0;
333  dT_drho = -1.0 / 1.19051;
334 }
335 
336 Real
337 LeadLithiumFluidProperties::T_from_p_h(Real /*p*/, Real h) const
338 {
339  // h = 195.0 * (T - _T_mo) - 0.5 * 9.116e-3 * (T * T - _T_mo * _T_mo);
340  //
341  const auto a = -0.5 * 9.116e-3;
342  const auto b = 195.;
343  const auto c = 0.5 * 9.116e-3 * _T_mo * _T_mo - h - 195. * _T_mo;
344  const auto T = (-b + std::sqrt(b * b - 4 * a * c)) / (2 * a);
345  return T;
346 }
347 
348 void
349 LeadLithiumFluidProperties::T_from_p_h(Real p, Real h, Real & T, Real & dT_dp, Real & dT_dh) const
350 {
351  T = T_from_p_h(p, h);
352  dT_dp = 0;
353  Real h1, dh_dp, dh_dT;
354  h_from_p_T(p, T, h1, dh_dp, dh_dT);
355  dT_dh = 1.0 / dh_dT;
356 }
357 
358 Real
360 {
361  if (T < _T_mo || T > 800)
362  flagInvalidSolution("Temperature out of bounds for the PbLi specific heat computation");
363  return 195.0 - 9.116e-3 * T;
364 }
365 
366 void
368  Real p, Real T, Real & cp, Real & dcp_dp, Real & dcp_dT) const
369 {
370  cp = cp_from_p_T(p, T);
371  dcp_dp = 0;
372  dcp_dT = -9.116e-3;
373 }
374 
375 Real
377 {
378  if (T < _T_mo || T > 625)
379  flagInvalidSolution("Temperature out of bounds for the PbLi viscosity computation");
380  return 1.87e-4 * std::exp(11640.0 / (FluidProperties::_R * T));
381 }
382 
383 void
385  Real p, Real T, Real & mu, Real & dmu_dp, Real & dmu_dT) const
386 {
387  mu = mu_from_p_T(p, T);
388  dmu_dp = 0;
389  dmu_dT = -11640.0 / (FluidProperties::_R * T * T) * mu;
390 }
391 
392 Real
393 LeadLithiumFluidProperties::k_from_p_T(Real /*p*/, Real T) const
394 {
395  if (T < _T_mo || T > 873)
396  flagInvalidSolution("Temperature out of bounds for the PbLi dynamic viscosity computation");
397  return 14.51 + 1.9631e-2 * T;
398 }
399 
400 void
401 LeadLithiumFluidProperties::k_from_p_T(Real p, Real T, Real & k, Real & dk_dp, Real & dk_dT) const
402 {
403  k = k_from_p_T(p, T);
404  dk_dp = 0;
405  dk_dT = 0.019631;
406 }
Real cp_from_v_e(Real v, Real e) const override
Real e_from_p_rho(Real p, Real rho) const override
Real bulk_modulus_from_p_T(Real p, Real T) const
Isentropic bulk modulus from pressure and temperature.
static const std::string cv
Definition: NS.h:122
static InputParameters validParams()
Real k_from_p_T(Real p, Real T) const override
LeadLithiumFluidProperties(const InputParameters &parameters)
Real T_from_p_h(Real p, Real h) const override
Real T_from_v_e(Real v, Real e) const override
Real k_from_v_e(Real v, Real e) const override
Real p_from_v_e(Real v, Real e) const override
static const Real _R
Universal gas constant (J/mol/K)
registerMooseObject("FluidPropertiesApp", LeadLithiumFluidProperties)
DualNumber< Real, DNDerivativeType, true > ADReal
Real molarMass() const override
Molar mass [kg/mol].
Real T_from_p_rho(Real p, Real rho) const
Temperature from pressure and density.
Real cp_from_p_T(Real p, Real T) const override
Real h_from_p_T(Real p, Real T) const override
Real mu_from_v_e(Real v, Real e) const override
static const std::string cp
Definition: NS.h:121
e e e e s T T T T T rho v v T e h
Real c_from_v_e(Real v, Real e) const override
Real h_from_v_e(Real v, Real e) const override
static const std::string mu
Definition: NS.h:123
Common class for single phase fluid properties.
Real e_from_p_T(Real p, Real T) const override
Fluid properties for 83Pb17Li (LeadLithium)
static constexpr Real _T_mo
Melting temperature (K) of 83Pb17Li.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
Definition: NS.h:84
Real mu_from_p_T(Real p, Real T) const override
static const std::string alpha
Definition: NS.h:134
Real rho_from_p_T(Real p, Real T) const override
void addClassDescription(const std::string &doc_string)
Real cv_from_v_e(Real v, Real e) const override
virtual std::string fluidName() const override
Fluid name.
Real c_from_p_T(Real p, Real T) const override
static const std::string k
Definition: NS.h:130
static InputParameters validParams()
Real cv_from_p_T(Real p, Real T) const override
Real v_from_p_T(Real p, Real T) const override