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, cv)
 Verify calculation of the derivatives of halite properties by comparing with finite differences.
 
 TEST_F (NaClFluidPropertiesTest, derivatives)
 
 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/8]

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 136 of file NaClFluidPropertiesTest.C.

137{
138 const Real tol = REL_TOL_SAVED_VALUE;
139 const Real p = 1.0e6;
140 const Real T = 300.0;
141
142 // Single property methods
143 Real rho, drho_dp, drho_dT;
144 _fp->rho_from_p_T(p, T, rho, drho_dp, drho_dT);
145 Real e, de_dp, de_dT;
146 _fp->e_from_p_T(p, T, e, de_dp, de_dT);
147
148 // Combined property methods
149 Real rho2, drho2_dp, drho2_dT, e2, de2_dp, de2_dT;
150 _fp->rho_e_from_p_T(p, T, rho2, drho2_dp, drho2_dT, e2, de2_dp, de2_dT);
151 ABS_TEST(rho, rho2, tol);
152 ABS_TEST(drho_dp, drho2_dp, tol);
153 ABS_TEST(drho_dT, drho2_dT, tol);
154 ABS_TEST(e, e2, tol);
155 ABS_TEST(de_dp, de2_dp, tol);
156 ABS_TEST(de_dT, de2_dT, tol);
157}
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/8]

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/8]

TEST_F ( NaClFluidPropertiesTest  ,
cv   
)

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

Verify the isochoric heat capacity against cv = cp - T alpha^2 / (rho kappa_T). With the thermal expansion (1.4e-4 1/K) and bulk modulus (21 GPa) of the halite density correlation at 300 C, the difference is about 120 J/kg/K, or 13% of cp.

Definition at line 101 of file NaClFluidPropertiesTest.C.

102{
103 const Real p = 30.0e6;
104 const Real T = 573.15;
105
106 Real rho, drho_dp, drho_dT;
107 _fp->rho_from_p_T(p, T, rho, drho_dp, drho_dT);
108 const Real alpha = -drho_dT / rho;
109 const Real kappa_T = drho_dp / rho;
110 const Real cp = _fp->cp_from_p_T(p, T);
111 const Real cv = _fp->cv_from_p_T(p, T);
112
113 REL_TEST(cv, cp - T * alpha * alpha / (rho * kappa_T), REL_TOL_CONSISTENCY);
114 EXPECT_LT(cv, cp);
115 EXPECT_GT(cv, 0.8 * cp);
116}

◆ TEST_F() [4/8]

TEST_F ( NaClFluidPropertiesTest  ,
derivatives   
)

Definition at line 118 of file NaClFluidPropertiesTest.C.

119{
120 const Real tol = REL_TOL_DERIVATIVE;
121
122 const Real p = 30.0e6;
123 const Real T = 300.0;
124
125 DERIV_TEST(_fp->rho_from_p_T, p, T, tol);
126 DERIV_TEST(_fp->e_from_p_T, p, T, tol);
127 DERIV_TEST(_fp->h_from_p_T, p, T, tol);
128 DERIV_TEST(_fp->k_from_p_T, p, T, tol);
129 DERIV_TEST(_fp->cp_from_p_T, p, T, tol)
130}

◆ TEST_F() [5/8]

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() [6/8]

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() [7/8]

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() [8/8]

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}