https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FlibeFluidPropertiesTest.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(FlibeFluidPropertiesTest, fluidName) { EXPECT_EQ(_fp->fluidName(), "flibe"); }
17
22{
23 ABS_TEST(_fp->molarMass(), 99.037703E-3, REL_TOL_SAVED_VALUE);
24}
25
30TEST_F(FlibeFluidPropertiesTest, thermalConductivity)
31{
32 const Real T = 800.0;
33 const Real p = 2.0 * 101325;
34 const Real e = _fp->e_from_p_T(p, T);
35 const Real v = 1. / _fp->rho_from_p_T(p, T);
36 const Real k = 1.030000000000000027e+00;
37
38 REL_TEST(_fp->k_from_v_e(v, e), k, REL_TOL_SAVED_VALUE);
39 REL_TEST(_fp->k_from_p_T(p, T), k, REL_TOL_SAVED_VALUE);
40 DERIV_TEST(_fp->k_from_p_T, p, T, REL_TOL_DERIVATIVE);
41}
42
47{
48 const Real T = 800.0;
49 const Real p = 2.0 * 101325;
50 const Real e = _fp->e_from_p_T(p, T);
51 const Real v = 1. / _fp->rho_from_p_T(p, T);
52 const Real mu = 1.267440888533459542e-02;
53
54 REL_TEST(_fp->mu_from_v_e(v, e), mu, REL_TOL_SAVED_VALUE);
55 REL_TEST(_fp->mu_from_p_T(p, T), mu, REL_TOL_SAVED_VALUE);
56 DERIV_TEST(_fp->mu_from_p_T, p, T, REL_TOL_DERIVATIVE);
57}
58
62TEST_F(FlibeFluidPropertiesTest, isobaricSpecificHeat)
63{
64 const Real T = 800.0;
65 const Real p = 2.0 * 101325;
66 const Real e = _fp->e_from_p_T(p, T);
67 const Real v = 1. / _fp->rho_from_p_T(p, T);
68 const Real cp = 2416.;
69
70 REL_TEST(_fp->cp_from_v_e(v, e), cp, REL_TOL_SAVED_VALUE);
71 REL_TEST(_fp->cp_from_p_T(p, T), cp, REL_TOL_SAVED_VALUE);
72 DERIV_TEST(_fp->cp_from_p_T, p, T, REL_TOL_DERIVATIVE);
73 DERIV_TEST(_fp->cp_from_v_e, v, e, REL_TOL_DERIVATIVE);
74}
75
79TEST_F(FlibeFluidPropertiesTest, isochoricSpecificHeat)
80{
81 const Real T = 800.0;
82 const Real p = 2.0 * 101325;
83 const Real e = _fp->e_from_p_T(p, T);
84 const Real v = 1. / _fp->rho_from_p_T(p, T);
85
86 REL_TEST(_fp->cv_from_v_e(v, e), 1.0219369260016974e+03, REL_TOL_SAVED_VALUE);
87 DERIV_TEST(_fp->cv_from_v_e, v, e, REL_TOL_DERIVATIVE);
88 DERIV_TEST(_fp->cv_from_p_T, p, T, 5 * REL_TOL_DERIVATIVE);
89}
90
95{
96 const Real T = 800.0;
97 const Real p = 2.0 * 101325;
98
99 ABS_TEST(_fp->rho_from_p_T(p, T), 2.0222975535430000e+03, REL_TOL_SAVED_VALUE);
100 DERIV_TEST(_fp->rho_from_p_T, p, T, REL_TOL_DERIVATIVE);
101}
102
106TEST_F(FlibeFluidPropertiesTest, specificInternalEnergy)
107{
108 const Real T = 800.0;
109 const Real p = 2.0 * 101325;
110 const Real e = 1.9326997921944547e+06;
111
112 ABS_TEST(_fp->e_from_p_T(p, T), e, REL_TOL_SAVED_VALUE);
113 DERIV_TEST(_fp->e_from_p_T, p, T, REL_TOL_DERIVATIVE);
114
115 ABS_TEST(_fp->e_from_p_rho(p, _fp->rho_from_p_T(p, T)), e, REL_TOL_SAVED_VALUE);
116}
117
122{
123 const Real T = 800.0;
124 const Real p = 2.0 * 101325;
125 const Real e = _fp->e_from_p_T(p, T);
126 const Real v = 1. / _fp->rho_from_p_T(p, T);
127
128 // A slightly larger tolerance is required for the pressure because the
129 // compressibility is so small we are polluted by a little numerical error.
130 REL_TEST(_fp->p_from_v_e(v, e), p, 2e-11);
131 DERIV_TEST(_fp->p_from_v_e, v, e, REL_TOL_DERIVATIVE);
132}
133
138{
139 const Real T = 800.0;
140 const Real p = 2.0 * 101325;
141 const Real e = _fp->e_from_p_T(p, T);
142 const Real h = _fp->h_from_p_T(p, T);
143 const Real v = 1. / _fp->rho_from_p_T(p, T);
144
145 REL_TEST(_fp->T_from_v_e(v, e), T, REL_TOL_SAVED_VALUE);
146 DERIV_TEST(_fp->T_from_v_e, v, e, REL_TOL_DERIVATIVE);
147
148 REL_TEST(_fp->T_from_p_rho(p, 1. / v), T, REL_TOL_SAVED_VALUE);
149 REL_TEST(_fp->T_from_p_h(p, h), T, REL_TOL_SAVED_VALUE);
150}
151
156{
157 const Real T = 800.0;
158 const Real p = 2.0 * 101325;
159
160 ABS_TEST(_fp->h_from_p_T(p, T), 1.932800000000000000e+06, REL_TOL_SAVED_VALUE);
161 DERIV_TEST(_fp->h_from_p_T, p, T, REL_TOL_DERIVATIVE);
162}
TEST_F(FlibeFluidPropertiesTest, fluidName)
Test that the fluid name is correctly returned.
const double mu
const Real p
const double T
const double v