https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NaClFluidPropertiesTest.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
16TEST_F(NaClFluidPropertiesTest, criticalProperties)
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}
22
26TEST_F(NaClFluidPropertiesTest, triplePointProperties)
27{
28 ABS_TEST(_fp->triplePointPressure(), 50.0, REL_TOL_SAVED_VALUE);
29 ABS_TEST(_fp->triplePointTemperature(), 1073.85, REL_TOL_SAVED_VALUE);
30}
31
35TEST_F(NaClFluidPropertiesTest, fluidName) { EXPECT_EQ(_fp->fluidName(), "nacl"); }
36
41{
42 ABS_TEST(_fp->molarMass(), 58.443e-3, REL_TOL_SAVED_VALUE);
43}
44
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}
91
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}
109
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
TEST_F(NaClFluidPropertiesTest, criticalProperties)
Verify that critical properties are correctly returned.