https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SalineMoltenSaltFluidPropertiesTest.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
12
13#ifdef SALINE_ENABLED
18{
19 EXPECT_EQ(_fp->fluidName(), "LiF-NaF-KF");
20}
21
26{
27 const Real tol = REL_TOL_SAVED_VALUE;
28 const Real very_large_tol = 1e-5;
29 const std::vector<Real> pressures = {1e5, 1e6, 5e6};
30 const std::vector<Real> temperatures = {800, 1000, 1200};
31
32 // Solutions : obtained from running the property object itself
33 // Verified visually against the reference
34 const std::vector<Real> rho_refs = {2079.8, 1955, 1830.2};
35 const std::vector<Real> h_refs = {116487.252639201, 503071.221504012, 932163.345918835};
36 const std::vector<Real> k_refs = {0.69, 0.95, 1.21};
37 const std::vector<Real> cp_refs = {1826.64945544902, 2039.19023319908, 2251.73101094914};
38 const std::vector<Real> mu_refs = {0.00664316439747037, 0.00230674718872007, 0.00141416472507015};
39
40 for (auto i : make_range(pressures.size()))
41 {
42 // Obtain variable sets
43 const Real p = pressures[i];
44 const Real T = temperatures[i];
45 const Real h = _fp->h_from_p_T(p, T);
46
47 // Density
48 REL_TEST(_fp->rho_from_p_T(p, T), rho_refs[i], tol);
49
50 // Specific enthalpy
51 REL_TEST(_fp->h_from_p_T(p, T), h_refs[i], tol);
52
53 // Specific energy
54 REL_TEST(_fp->e_from_p_T(p, T), h_refs[i] - pressures[i] / rho_refs[i], tol);
55
56 // Temperature
57 // Does not seem very accurate
58 REL_TEST(_fp->T_from_p_h(p, h), T, very_large_tol);
59
60 // Thermal conductivity (function of T only)
61 REL_TEST(_fp->k_from_p_T(p, T), k_refs[i], tol);
62
63 // Isobaric specific heat
64 REL_TEST(_fp->cp_from_p_T(p, T), cp_refs[i], tol);
65
66 // Dynamic viscosity
67 REL_TEST(_fp->mu_from_p_T(p, T), mu_refs[i], tol);
68 }
69}
70
76{
77 const Real tol = REL_TOL_DERIVATIVE;
78
79 const Real p = 30.0e6;
80 const Real T = 300.0;
81
82 DERIV_TEST(_fp->rho_from_p_T, p, T, tol);
83 DERIV_TEST(_fp->h_from_p_T, p, T, tol);
84 DERIV_TEST(_fp->e_from_p_T, p, T, tol);
85 DERIV_TEST(_fp->cp_from_p_T, p, T, tol);
86 DERIV_TEST(_fp->mu_from_p_T, p, T, 100 * tol);
87 DERIV_TEST(_fp->k_from_p_T, p, T, tol);
88}
89#endif
const double tol
const Real p
const double T
TEST_F(SalineMoltenSaltFluidPropertiesTest, fluidName)
Test that the fluid name is correctly returned.