Line data Source code
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 :
10 : #include "SodiumSaturationFluidProperties.h"
11 :
12 : registerMooseObject("FluidPropertiesApp", SodiumSaturationFluidProperties);
13 :
14 : InputParameters
15 20 : SodiumSaturationFluidProperties::validParams()
16 : {
17 20 : InputParameters params = SinglePhaseFluidProperties::validParams();
18 20 : params.addClassDescription("Fluid properties for liquid sodium at saturation conditions");
19 20 : return params;
20 0 : }
21 :
22 10 : SodiumSaturationFluidProperties::SodiumSaturationFluidProperties(const InputParameters & parameters)
23 10 : : SinglePhaseFluidProperties(parameters)
24 : {
25 10 : }
26 :
27 : std::string
28 1 : SodiumSaturationFluidProperties::fluidName() const
29 : {
30 1 : return "sodium_sat";
31 : }
32 :
33 : Real
34 1 : SodiumSaturationFluidProperties::molarMass() const
35 : {
36 1 : return 22.989769E-3;
37 : }
38 :
39 : Real
40 53 : SodiumSaturationFluidProperties::rho_from_p_T(Real /* pressure */, Real temperature) const
41 : {
42 53 : return 1.00423e3 - 0.21390 * temperature - 1.1046e-5 * temperature * temperature;
43 : }
44 :
45 : void
46 3 : SodiumSaturationFluidProperties::rho_from_p_T(
47 : Real pressure, Real temperature, Real & rho, Real & drho_dp, Real & drho_dT) const
48 : {
49 3 : rho = rho_from_p_T(pressure, temperature);
50 3 : drho_dp = 0.0;
51 3 : drho_dT = -0.21390 - 1.1046e-5 * 2 * temperature;
52 3 : }
53 :
54 : void
55 0 : SodiumSaturationFluidProperties::rho_from_p_T(const ADReal & pressure,
56 : const ADReal & temperature,
57 : ADReal & rho,
58 : ADReal & drho_dp,
59 : ADReal & drho_dT) const
60 : {
61 0 : rho = SinglePhaseFluidProperties::rho_from_p_T(pressure, temperature);
62 0 : drho_dp = 0.0;
63 0 : drho_dT = -0.21390 - 1.1046e-5 * 2 * temperature;
64 0 : }
65 :
66 : Real
67 32 : SodiumSaturationFluidProperties::v_from_p_T(Real pressure, Real temperature) const
68 : {
69 32 : return 1.0 / rho_from_p_T(pressure, temperature);
70 : }
71 :
72 : void
73 4 : SodiumSaturationFluidProperties::v_from_p_T(
74 : Real pressure, Real temperature, Real & v, Real & dv_dp, Real & dv_dT) const
75 : {
76 4 : v = v_from_p_T(pressure, temperature);
77 4 : dv_dp = 0.0;
78 :
79 4 : Real drho_dT = -0.21390 - 1.1046e-5 * 2 * temperature;
80 4 : dv_dT = -v * v * drho_dT;
81 4 : }
82 :
83 : Real
84 1 : SodiumSaturationFluidProperties::p_from_v_e(Real v, Real e) const
85 : {
86 1 : Real temperature = T_from_v_e(v, e);
87 : // h does not depend on pressure
88 1 : return (h_from_p_T(1e5, temperature) - e) / v;
89 : }
90 :
91 : Real
92 2 : SodiumSaturationFluidProperties::T_from_v_e(Real v, Real /* e */) const
93 : {
94 : // From inversion of second order polynomial form of rho(T)
95 : mooseAssert(0.2139 * 0.2139 + 4 * 1.1046e5 * (1.00423e3 - 1 / v) > 0,
96 : "Specific volume out of bounds");
97 2 : return (0.2139 - std::sqrt(0.2139 * 0.2139 + 4 * 1.1046e-5 * (1.00423e3 - 1 / v))) /
98 2 : (2 * -1.1046e-5);
99 : }
100 :
101 : Real
102 24 : SodiumSaturationFluidProperties::h_from_p_T(Real /*pressure*/, Real temperature) const
103 : {
104 24 : Real t2 = temperature * temperature;
105 24 : return 3.7782E-10 * t2 * t2 * temperature / 5 - 1.7191E-6 * t2 * t2 / 4.0 +
106 24 : 3.0921E-3 * t2 * temperature / 3.0 - 2.4560 * t2 / 2.0 + 1972.0 * temperature - 401088.7;
107 : }
108 :
109 : void
110 2 : SodiumSaturationFluidProperties::h_from_p_T(
111 : Real pressure, Real temperature, Real & h, Real & dh_dp, Real & dh_dT) const
112 : {
113 2 : h = h_from_p_T(pressure, temperature);
114 2 : dh_dp = 0.0;
115 2 : dh_dT = cp_from_p_T(pressure, temperature);
116 2 : }
117 :
118 : Real
119 8 : SodiumSaturationFluidProperties::e_from_p_T(Real pressure, Real temperature) const
120 : {
121 : // definition of h = e + p * v
122 8 : Real v = v_from_p_T(pressure, temperature);
123 8 : Real h = h_from_p_T(pressure, temperature);
124 8 : return h - pressure * v;
125 : }
126 :
127 : void
128 1 : SodiumSaturationFluidProperties::e_from_p_T(
129 : Real pressure, Real temperature, Real & e, Real & de_dp, Real & de_dT) const
130 : {
131 1 : e = e_from_p_T(pressure, temperature);
132 :
133 : Real v, dv_dp, dv_dT;
134 1 : v_from_p_T(pressure, temperature, v, dv_dp, dv_dT);
135 :
136 : // definition of e = h - p * v, with dh/dp = 0
137 1 : de_dp = -pressure * dv_dp - v;
138 :
139 : // definition of e = h - p * v
140 1 : Real cp = cp_from_p_T(pressure, temperature);
141 1 : de_dT = cp - pressure * dv_dT;
142 1 : }
143 :
144 : Real
145 17 : SodiumSaturationFluidProperties::cp_from_p_T(Real /*pressure*/, Real temperature) const
146 : {
147 17 : Real t2 = temperature * temperature;
148 17 : return 3.7782E-10 * t2 * t2 - 1.7191E-6 * t2 * temperature + 3.0921E-3 * t2 -
149 17 : 2.4560 * temperature + 1972.0;
150 : }
151 :
152 : void
153 2 : SodiumSaturationFluidProperties::cp_from_p_T(
154 : Real pressure, Real temperature, Real & cp, Real & dcp_dp, Real & dcp_dT) const
155 : {
156 2 : cp = cp_from_p_T(pressure, temperature);
157 2 : dcp_dp = 0.0;
158 :
159 2 : Real t2 = temperature * temperature;
160 2 : dcp_dT =
161 2 : 4 * 3.7782E-10 * t2 * temperature - 3 * 1.7191E-6 * t2 + 2 * 3.0921e-3 * temperature - 2.456;
162 2 : }
163 :
164 : Real
165 14 : SodiumSaturationFluidProperties::cv_from_p_T(Real /* pressure */, Real temperature) const
166 : {
167 14 : Real t2 = temperature * temperature;
168 14 : return 1.0369E-8 * temperature * t2 + 3.7164E-4 * t2 - 1.0494 * temperature + 1582.6;
169 : }
170 :
171 : void
172 2 : SodiumSaturationFluidProperties::cv_from_p_T(
173 : Real pressure, Real temperature, Real & cv, Real & dcv_dp, Real & dcv_dT) const
174 : {
175 2 : cv = cv_from_p_T(pressure, temperature);
176 2 : dcv_dp = 0.0;
177 2 : dcv_dT = 3 * 1.0369e-8 * temperature * temperature + 2 * 3.7164e-4 * temperature - 1.0494;
178 2 : }
179 :
180 : Real
181 7 : SodiumSaturationFluidProperties::mu_from_p_T(Real /*pressure*/, Real temperature) const
182 : {
183 7 : return 3.6522E-5 + 0.16626 / temperature - 4.56877e1 / (temperature * temperature) +
184 7 : 2.8733E4 / (temperature * temperature * temperature);
185 : }
186 :
187 : void
188 1 : SodiumSaturationFluidProperties::mu_from_p_T(
189 : Real pressure, Real temperature, Real & mu, Real & dmu_dp, Real & dmu_dT) const
190 : {
191 1 : mu = this->mu_from_p_T(pressure, temperature);
192 1 : dmu_dp = 0.0;
193 :
194 1 : Real t2 = temperature * temperature;
195 1 : dmu_dT = 0.16626 * -1 / t2 - 4.56877E1 * -2 / (temperature * t2) + 2.8733E4 * -3 / (t2 * t2);
196 1 : }
197 :
198 : Real
199 7 : SodiumSaturationFluidProperties::k_from_p_T(Real /*pressure*/, Real temperature) const
200 : {
201 7 : return 1.1045e2 - 6.5112e-2 * temperature + 1.5430e-5 * temperature * temperature -
202 7 : 2.4617e-9 * temperature * temperature * temperature;
203 : }
204 :
205 : void
206 1 : SodiumSaturationFluidProperties::k_from_p_T(
207 : Real pressure, Real temperature, Real & k, Real & dk_dp, Real & dk_dT) const
208 : {
209 1 : k = this->k_from_p_T(pressure, temperature);
210 1 : dk_dp = 0.0;
211 1 : dk_dT = -6.5112e-2 + 2 * 1.5430e-5 * temperature - 3 * 2.4617e-9 * temperature * temperature;
212 1 : }
|