https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Functions
NaClFluidPropertiesTest.C File Reference

Go to the source code of this file.

Functions

 TEST_F (NaClFluidPropertiesTest, criticalProperties)
 Verify that critical properties are correctly returned.
 
 TEST_F (NaClFluidPropertiesTest, triplePointProperties)
 Verify that triple point properties are correctly returned.
 
 TEST_F (NaClFluidPropertiesTest, fluidName)
 Test that the fluid name is correctly returned.
 
 TEST_F (NaClFluidPropertiesTest, molarMass)
 Test that the molar mass is correctly returned.
 
 TEST_F (NaClFluidPropertiesTest, halite)
 Verify calculation of the NACL properties the solid halite phase.
 
 TEST_F (NaClFluidPropertiesTest, derivatives)
 Verify calculation of the derivatives of halite properties by comparing with finite differences.
 
 TEST_F (NaClFluidPropertiesTest, combined)
 Verify that the methods that return multiple properties in one call return identical values as the individual methods.
 

Function Documentation

◆ TEST_F() [1/7]

TEST_F ( NaClFluidPropertiesTest  ,
combined   
)

Verify that the methods that return multiple properties in one call return identical values as the individual methods.

Definition at line 114 of file NaClFluidPropertiesTest.C.

115{
116 const Real tol = REL_TOL_SAVED_VALUE;
117 const Real p = 1.0e6;
118 const Real T = 300.0;
119
120 // Single property methods
121 Real rho, drho_dp, drho_dT;
122 _fp->rho_from_p_T(p, T, rho, drho_dp, drho_dT);
123 Real e, de_dp, de_dT;
124 _fp->e_from_p_T(p, T, e, de_dp, de_dT);
125
126 // Combined property methods
127 Real rho2, drho2_dp, drho2_dT, e2, de2_dp, de2_dT;
128 _fp->rho_e_from_p_T(p, T, rho2, drho2_dp, drho2_dT, e2, de2_dp, de2_dT);
129 ABS_TEST(rho, rho2, tol);
130 ABS_TEST(drho_dp, drho2_dp, tol);
131 ABS_TEST(drho_dT, drho2_dT, tol);
132 ABS_TEST(e, e2, tol);
133 ABS_TEST(de_dp, de2_dp, tol);
134 ABS_TEST(de_dT, de2_dT, tol);
135}
const double tol
const Real p
const double rho
const double T
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ TEST_F() [2/7]

TEST_F ( NaClFluidPropertiesTest  ,
criticalProperties   
)

Verify that critical properties are correctly returned.

Definition at line 16 of file NaClFluidPropertiesTest.C.

17{
18 ABS_TEST(_fp->criticalPressure(), 1.82e7, REL_TOL_SAVED_VALUE);
19 ABS_TEST(_fp->criticalTemperature(), 3841.15, REL_TOL_SAVED_VALUE);
20 ABS_TEST(_fp->criticalDensity(), 108.43, REL_TOL_SAVED_VALUE);
21}

◆ TEST_F() [3/7]

TEST_F ( NaClFluidPropertiesTest  ,
derivatives   
)

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

Definition at line 96 of file NaClFluidPropertiesTest.C.

97{
98 const Real tol = REL_TOL_DERIVATIVE;
99
100 const Real p = 30.0e6;
101 const Real T = 300.0;
102
103 DERIV_TEST(_fp->rho_from_p_T, p, T, tol);
104 DERIV_TEST(_fp->e_from_p_T, p, T, tol);
105 DERIV_TEST(_fp->h_from_p_T, p, T, tol);
106 DERIV_TEST(_fp->k_from_p_T, p, T, tol);
107 DERIV_TEST(_fp->cp_from_p_T, p, T, tol)
108}

◆ TEST_F() [4/7]

TEST_F ( NaClFluidPropertiesTest  ,
fluidName   
)

Test that the fluid name is correctly returned.

Definition at line 35 of file NaClFluidPropertiesTest.C.

35{ EXPECT_EQ(_fp->fluidName(), "nacl"); }

◆ TEST_F() [5/7]

TEST_F ( NaClFluidPropertiesTest  ,
halite   
)

Verify calculation of the NACL properties the solid halite phase.

Density data from Brown, "The NaCl pressure standard", J. Appl. Phys., 86 (1999).

Values for cp and enthalpy are difficult to compare against. Instead, the values provided by the BrineFluidProperties UserObject were compared against simple correlations, eg. from NIST sodium chloride data.

Values for thermal conductivity from Urqhart and Bauer, Experimental determination of single-crystal halite thermal conductivity, diffusivity and specific heat from -75 C to 300 C, Int. J. Rock Mech. and Mining Sci., 78 (2015)

Definition at line 58 of file NaClFluidPropertiesTest.C.

59{
60 // Density and cp
61 Real p0, p1, p2, T0, T1, T2;
62
63 const Real tol = REL_TOL_EXTERNAL_VALUE;
64
65 p0 = 30.0e6;
66 p1 = 60.0e6;
67 p2 = 80.0e6;
68 T0 = 300.0;
69 T1 = 500.0;
70 T2 = 700.0;
71
72 REL_TEST(_fp->rho_from_p_T(p0, T0), 2167.88, tol);
73 REL_TEST(_fp->rho_from_p_T(p1, T1), 2116.0, tol);
74 REL_TEST(_fp->rho_from_p_T(p2, T2), 2056.8, tol);
75 REL_TEST(_fp->cp_from_p_T(p0, T0), 0.865e3, 40.0 * tol);
76 REL_TEST(_fp->cp_from_p_T(p1, T1), 0.922e3, 40.0 * tol);
77 REL_TEST(_fp->cp_from_p_T(p2, T2), 0.979e3, 40.0 * tol);
78
79 // Test enthalpy at the triple point pressure of water
80 Real pt = 611.657;
81
82 ABS_TEST(_fp->h_from_p_T(pt, 273.16), 0.0, tol);
83 REL_TEST(_fp->h_from_p_T(pt, 573.15), 271.13e3, tol);
84 REL_TEST(_fp->h_from_p_T(pt, 673.15), 366.55e3, tol);
85
86 // Thermal conductivity (function of T only)
87 REL_TEST(_fp->k_from_p_T(p0, 323.15), 5.488, 10.0 * tol);
88 REL_TEST(_fp->k_from_p_T(p0, 423.15), 3.911, 10.0 * tol);
89 REL_TEST(_fp->k_from_p_T(p0, 523.15), 3.024, 20.0 * tol);
90}

◆ TEST_F() [6/7]

TEST_F ( NaClFluidPropertiesTest  ,
molarMass   
)

Test that the molar mass is correctly returned.

Definition at line 40 of file NaClFluidPropertiesTest.C.

41{
42 ABS_TEST(_fp->molarMass(), 58.443e-3, REL_TOL_SAVED_VALUE);
43}

◆ TEST_F() [7/7]

TEST_F ( NaClFluidPropertiesTest  ,
triplePointProperties   
)

Verify that triple point properties are correctly returned.

Definition at line 26 of file NaClFluidPropertiesTest.C.

27{
28 ABS_TEST(_fp->triplePointPressure(), 50.0, REL_TOL_SAVED_VALUE);
29 ABS_TEST(_fp->triplePointTemperature(), 1073.85, REL_TOL_SAVED_VALUE);
30}