https://mooseframework.inl.gov
Functions
SalineMoltenSaltFluidPropertiesTest.C File Reference

Go to the source code of this file.

Functions

 TEST_F (SalineMoltenSaltFluidPropertiesTest, fluidName)
 Test that the fluid name is correctly returned. More...
 
 TEST_F (SalineMoltenSaltFluidPropertiesTest, properties)
 Verify calculation of the Saline fluid properties. More...
 
 TEST_F (SalineMoltenSaltFluidPropertiesTest, derivatives)
 Verify calculation of the derivatives of Saline properties by comparing with finite differences. More...
 

Function Documentation

◆ TEST_F() [1/3]

TEST_F ( SalineMoltenSaltFluidPropertiesTest  ,
fluidName   
)

Test that the fluid name is correctly returned.

Definition at line 17 of file SalineMoltenSaltFluidPropertiesTest.C.

18 {
19  EXPECT_EQ(_fp->fluidName(), "LiF-NaF-KF");
20 }

◆ TEST_F() [2/3]

TEST_F ( SalineMoltenSaltFluidPropertiesTest  ,
properties   
)

Verify calculation of the Saline fluid properties.

Definition at line 25 of file SalineMoltenSaltFluidPropertiesTest.C.

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 }
const double tol
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)

◆ TEST_F() [3/3]

TEST_F ( SalineMoltenSaltFluidPropertiesTest  ,
derivatives   
)

Verify calculation of the derivatives of Saline properties by comparing with finite differences.

Definition at line 75 of file SalineMoltenSaltFluidPropertiesTest.C.

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 }
const double tol
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real