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

Go to the source code of this file.

Functions

 TEST_F (SodiumSaturationFluidPropertiesTest, fluidName)
 Test that the fluid name is correctly returned. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, molarMass)
 Test that the molar mass is correctly returned. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, thermalConductivity)
 Test that the thermal conductivity and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, viscosity)
 Test that the viscosity and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, isobaricSpecificHeat)
 Test that the isobaric specific heat and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, isochoricSpecificHeat)
 Test that the isochoric specific heat and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, density)
 Test that the density and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, specificInternalEnergy)
 Test that the specific internal energy and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, specificEnthalpy)
 Test that the specific enthalpy and its derivatives are correctly computed. More...
 
 TEST_F (SodiumSaturationFluidPropertiesTest, PTFromVE)
 Test that the pressure can be computed from the specific volume & energy. More...
 

Function Documentation

◆ TEST_F() [1/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
fluidName   
)

Test that the fluid name is correctly returned.

Definition at line 16 of file SodiumSaturationFluidPropertiesTest.C.

16 { EXPECT_EQ(_fp->fluidName(), "sodium_sat"); }

◆ TEST_F() [2/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
molarMass   
)

Test that the molar mass is correctly returned.

Definition at line 21 of file SodiumSaturationFluidPropertiesTest.C.

22 {
23  ABS_TEST(_fp->molarMass(), 22.989769E-3, REL_TOL_SAVED_VALUE);
24 }

◆ TEST_F() [3/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
thermalConductivity   
)

Test that the thermal conductivity and its derivatives are correctly computed.

Definition at line 30 of file SodiumSaturationFluidPropertiesTest.C.

31 {
32  const Real T = 800.0;
33  const Real p = 101325;
34 
35  // Fink and Leibowitz (1979) list conductivity as 66.8 at 800 K, so the fit agrees well
36  REL_TEST(_fp->k_from_p_T(p, T), 66.9752096, REL_TOL_SAVED_VALUE);
37  DERIV_TEST(_fp->k_from_p_T, p, T, REL_TOL_DERIVATIVE);
38 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [4/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
viscosity   
)

Test that the viscosity and its derivatives are correctly computed.

Definition at line 43 of file SodiumSaturationFluidPropertiesTest.C.

44 {
45  const Real T = 800.0;
46  const Real p = 101325;
47 
48  // Fink and Leibowitz (1979) list viscosity as 0.000229 at 800 K, so the fit agrees well
49  REL_TEST(_fp->mu_from_p_T(p, T), 0.00022907910937500003, REL_TOL_SAVED_VALUE);
50  DERIV_TEST(_fp->mu_from_p_T, p, T, REL_TOL_DERIVATIVE);
51 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [5/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
isobaricSpecificHeat   
)

Test that the isobaric specific heat and its derivatives are correctly computed.

Definition at line 56 of file SodiumSaturationFluidPropertiesTest.C.

57 {
58  const Real T1 = 400.0;
59  const Real T2 = 800.0;
60  const Real p = 101325;
61 
62  // Fink and Leibowitz (1979) show Cp = 1373.6 at 400 K, so the fit agrees well
63  REL_TEST(_fp->cp_from_p_T(p, T1), 1383.985792, REL_TOL_SAVED_VALUE);
64  DERIV_TEST(_fp->cp_from_p_T, p, T1, REL_TOL_DERIVATIVE);
65 
66  // Fink and Leibowitz (1979) show Cp = 1263.6 at 800 K, so the fit agrees well
67  REL_TEST(_fp->cp_from_p_T(p, T2), 1260.719872, REL_TOL_SAVED_VALUE);
68  DERIV_TEST(_fp->cp_from_p_T, p, T2, REL_TOL_DERIVATIVE);
69 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [6/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
isochoricSpecificHeat   
)

Test that the isochoric specific heat and its derivatives are correctly computed.

Definition at line 74 of file SodiumSaturationFluidPropertiesTest.C.

75 {
76  const Real T1 = 400.0;
77  const Real T2 = 800.0;
78  const Real p = 101325;
79 
80  // Fink and Leibowitz (1979) show Cv = 1230.1 at 400 K, so the fit agrees well
81  REL_TEST(_fp->cv_from_p_T(p, T1), 1222.9660159999999, REL_TOL_SAVED_VALUE);
82  DERIV_TEST(_fp->cv_from_p_T, p, T1, REL_TOL_DERIVATIVE);
83 
84  // Fink and Leibowitz (1979) show Cv = 982.611 at 800 K, so the fit agrees well
85  REL_TEST(_fp->cv_from_p_T(p, T2), 986.2385279999999, REL_TOL_SAVED_VALUE);
86  DERIV_TEST(_fp->cv_from_p_T, p, T2, REL_TOL_DERIVATIVE);
87 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [7/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
density   
)

Test that the density and its derivatives are correctly computed.

Definition at line 92 of file SodiumSaturationFluidPropertiesTest.C.

93 {
94  const Real Tm = 370.98;
95  const Real T = 800.0;
96  const Real Tb = 1156.5;
97  const Real p = 101325;
98 
99  // Fink and Leibowitz (1979) list density at 370.98 K is 927.3, so the fit agrees well
100  ABS_TEST(_fp->rho_from_p_T(p, Tm), 923.3571594322216, REL_TOL_SAVED_VALUE);
101  DERIV_TEST(_fp->rho_from_p_T, p, Tm, REL_TOL_DERIVATIVE);
102  ABS_TEST(_fp->v_from_p_T(p, Tm), 0.001083004544649772, REL_TOL_SAVED_VALUE);
103  DERIV_TEST(_fp->v_from_p_T, p, Tm, REL_TOL_DERIVATIVE);
104 
105  // Fink and Leibowitz (1979) list density at 800 K is 825.6, so the fit agrees well
106  ABS_TEST(_fp->rho_from_p_T(p, T), 826.04056, REL_TOL_SAVED_VALUE);
107  DERIV_TEST(_fp->rho_from_p_T, p, T, REL_TOL_DERIVATIVE);
108  ABS_TEST(_fp->v_from_p_T(p, T), 0.0012105943078630425, REL_TOL_SAVED_VALUE);
109  DERIV_TEST(_fp->v_from_p_T, p, T, REL_TOL_DERIVATIVE);
110 
111  // Fink and Leibowitz (1979) list density at 1156.5 K is 739.4, so the fit agrees well
112  ABS_TEST(_fp->rho_from_p_T(p, Tb), 742.0807106065, REL_TOL_SAVED_VALUE);
113  DERIV_TEST(_fp->rho_from_p_T, p, Tb, REL_TOL_DERIVATIVE);
114  ABS_TEST(_fp->v_from_p_T(p, Tb), 0.0013475623145933863, REL_TOL_SAVED_VALUE);
115  DERIV_TEST(_fp->v_from_p_T, p, Tb, REL_TOL_DERIVATIVE);
116 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [8/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
specificInternalEnergy   
)

Test that the specific internal energy and its derivatives are correctly computed.

Definition at line 121 of file SodiumSaturationFluidPropertiesTest.C.

122 {
123  const Real T = 800.0;
124  const Real p = 101325;
125 
126  ABS_TEST(_fp->e_from_p_T(p, T),
127  _fp->h_from_p_T(p, T) - p * _fp->v_from_p_T(p, T),
128  REL_TOL_SAVED_VALUE);
129  DERIV_TEST(_fp->e_from_p_T, p, T, REL_TOL_DERIVATIVE);
130 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [9/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
specificEnthalpy   
)

Test that the specific enthalpy and its derivatives are correctly computed.

Definition at line 135 of file SodiumSaturationFluidPropertiesTest.C.

136 {
137  const Real T = 800.0;
138  const Real p = 101325;
139 
140  // Fink and Leibowitz (1979) compute enthalpy at 800 K as 768602, so the fit agrees well
141  ABS_TEST(_fp->h_from_p_T(p, T), 767034.6715200001, REL_TOL_SAVED_VALUE);
142  DERIV_TEST(_fp->h_from_p_T, p, T, REL_TOL_DERIVATIVE);
143 
144  // Fink and Leibowitz (1979) compute enthalpy at 1156.5 K as 1218803, so the fit agrees well
145  const Real T2 = 1156.5;
146  ABS_TEST(_fp->h_from_p_T(p, T2), 1218897.6776327428, REL_TOL_SAVED_VALUE);
147  DERIV_TEST(_fp->h_from_p_T, p, T2, REL_TOL_DERIVATIVE);
148 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [10/10]

TEST_F ( SodiumSaturationFluidPropertiesTest  ,
PTFromVE   
)

Test that the pressure can be computed from the specific volume & energy.

Definition at line 153 of file SodiumSaturationFluidPropertiesTest.C.

154 {
155  // Starting pressure and temperature
156  const Real T = 800.0;
157  const Real p = 101325;
158 
159  // Obtain specific volume and specific energy
160  const Real v = _fp->v_from_p_T(p, T);
161  const Real e = _fp->e_from_p_T(p, T);
162 
163  // Verify that the conversion back succeeds
164  ABS_TEST(_fp->T_from_v_e(v, e), T, TOLERANCE);
165  ABS_TEST(_fp->p_from_v_e(v, e), p, 1e-6);
166 }
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
Definition: NS.h:84