19 params.addParam<UserObjectName>(
"water_fp",
20 "The name of the FluidProperties UserObject for water");
21 params.addClassDescription(
"Fluid properties for brine");
34 const std::string water_name =
name() +
":water";
36 const std::string class_name =
"Water97FluidProperties";
37 InputParameters params = _app.getFactory().getValidParams(class_name);
39 _fe_problem.addUserObject(class_name, water_name, params);
43 if (parameters.isParamSetByUser(
"water_fp"))
46 _water_fp = &getUserObject<SinglePhaseFluidProperties>(
"water_fp");
50 paramError(
"water_fp",
"A water FluidProperties UserObject must be supplied");
59 const std::string nacl_name =
name() +
":nacl";
61 const std::string class_name =
"NaClFluidProperties";
62 InputParameters params = _app.getFactory().getValidParams(class_name);
64 _fe_problem.addUserObject(class_name, nacl_name, params);
87 mooseError(
"BrineFluidProperties::getComponent has been provided an incorrect component");
100 return 1.0 / (xnacl /
_Mnacl + (1.0 - xnacl) /
_Mh2o);
106 return 1.0 / (xnacl /
_Mnacl + (1.0 - xnacl) /
_Mh2o);
134 const FPDualReal n11 = -54.2958 - 45.7623 * std::exp(-9.44785e-4 * pbar);
135 const FPDualReal n21 = -2.6142 - 2.39092e-4 * pbar;
136 const FPDualReal n22 = 0.0356828 + 4.37235e-6 * pbar + 2.0566e-9 * pbar2;
137 const FPDualReal n1x1 = 330.47 + 0.942876 * std::sqrt(pbar) + 0.0817193 * pbar -
138 2.47556e-8 * pbar2 + 3.45052e-10 * pbar3;
139 const FPDualReal n2x1 = -0.0370751 + 0.00237723 * std::sqrt(pbar) + 5.42049e-5 * pbar +
140 5.84709e-9 * pbar2 - 5.99373e-13 * pbar3;
142 const FPDualReal n20 = 1.0 - n21 * std::sqrt(n22);
143 const FPDualReal n23 = n2x1 - n20 - n21 * std::sqrt(1.0 + n22);
147 const FPDualReal n1 = n1x1 + n11 * (1.0 - Xnacl) + n12 * (1.0 - Xnacl) * (1.0 - Xnacl);
148 const FPDualReal n2 = n20 + n21 * std::sqrt(Xnacl + n22) + n23 * Xnacl;
156 Real rho, drho_dp, drho_dT;
160 water_density.derivatives() =
pressure.derivatives() * drho_dp + Tv.derivatives() * drho_dT;
181 return ad_rho.value();
191 Real & drho_dx)
const
195 Moose::derivInsert(
p.derivatives(), 0, 1.0);
197 Moose::derivInsert(
T.derivatives(), 1, 1.0);
199 Moose::derivInsert(x.derivatives(), 2, 1.0);
204 rho = ad_rho.value();
205 drho_dp = ad_rho.derivatives()[0];
206 drho_dT = ad_rho.derivatives()[1];
207 drho_dx = ad_rho.derivatives()[2];
215 const Real mol2 = mol * mol;
216 const Real mol3 = mol2 * mol;
221 const Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
222 0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
226 return a * water_viscosity;
239 Real muw, dmuw_dp, dmuw_dT;
244 Real dmol_dx = 1.0 / ((1.0 - xnacl) * (1.0 - xnacl) *
_Mnacl);
245 Real mol2 = mol * mol;
246 Real mol3 = mol2 * mol;
251 Real a = 1.0 + 0.0816 * mol + 0.0122 * mol2 + 0.128e-3 * mol3 +
252 0.629e-3 * Tc * (1.0 - std::exp(-0.7 * mol));
254 (0.0816 + 0.0244 * mol + 3.84e-4 * mol2 + 4.403e-4 * Tc * std::exp(-0.7 * mol)) * dmol_dx;
255 Real da_dT = 0.629e-3 * (1.0 - std::exp(-0.7 * mol));
258 dmu_dp = a * dmuw_dp;
259 dmu_dx = da_dx * muw;
260 dmu_dT = da_dT * muw + a * dmuw_dT;
268 FPDualReal q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
277 q11 = -32.1724 + 0.0621255 * pbar;
278 q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
279 q22 = 0.0612567 + 1.88082e-5 * pbar;
281 q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
282 q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
287 q20 = 1.0 - q21 * std::sqrt(q22);
288 q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
290 q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
291 q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
301 Real h, dh_dp, dh_dT;
305 enthalpy.derivatives() =
pressure.derivatives() * dh_dp + Th.derivatives() * dh_dT;
336 Moose::derivInsert(
p.derivatives(), 0, 1.0);
338 Moose::derivInsert(
T.derivatives(), 1, 1.0);
340 Moose::derivInsert(x.derivatives(), 2, 1.0);
346 dh_dp = ad_h.derivatives()[0];
347 dh_dT = ad_h.derivatives()[1];
348 dh_dx = ad_h.derivatives()[2];
354 Real q1, q2, q10, q11, q12, q20, q21, q22, q23, q1x1, q2x1, Th;
358 Real pbar2 = pbar * pbar;
363 q11 = -32.1724 + 0.0621255 * pbar;
364 q21 = -1.69513 - 4.52781e-4 * pbar - 6.04279e-8 * pbar2;
365 q22 = 0.0612567 + 1.88082e-5 * pbar;
367 q1x1 = 47.9048 - 9.36994e-3 * pbar + 6.51059e-6 * pbar2;
368 q2x1 = 0.241022 + 3.45087e-5 * pbar - 4.28356e-9 * pbar2;
373 q20 = 1.0 - q21 * std::sqrt(q22);
374 q23 = q2x1 - q20 - q21 * std::sqrt(1.0 + q22);
376 q1 = q10 + q11 * (1.0 - Xnacl) + q12 * (1.0 - Xnacl) * (1.0 - Xnacl);
377 q2 = q20 + q21 * std::sqrt(Xnacl + q22) + q23 * Xnacl;
419 Moose::derivInsert(
p.derivatives(), 0, 1.0);
421 Moose::derivInsert(
T.derivatives(), 1, 1.0);
423 Moose::derivInsert(x.derivatives(), 2, 1.0);
429 de_dp = ad_e.derivatives()[0];
430 de_dT = ad_e.derivatives()[1];
431 de_dx = ad_e.derivatives()[2];
444 Real lambda = 1.0 - (2.3434e-3 - 7.924e-6 * Tc + 3.924e-8 * Tc * Tc) * S +
445 (1.06e-5 - 2.0e-8 * Tc - 1.2e-10 * Tc * Tc) * S * S;
447 return lambda * lambdaw;
455 Real mol2 = mol * mol;
456 Real mol3 = mol2 * mol;
458 Real a = 1.0 + 5.93582e-6 * mol - 5.19386e-5 * mol2 + 1.23156e-5 * mol3;
459 Real b = 1.1542e-6 * mol + 1.41254e-7 * mol2 - 1.92476e-8 * mol3 - 1.70717e-9 * mol * mol3 +
460 1.0539e-10 * mol2 * mol3;
476 return (26.18 + 7.2e-3 * Tc + 1.06e-4 * Tc * Tc) / 100.0;
482 return xnacl / ((1.0 - xnacl) *
_Mnacl);
491 return xnacl * Mbrine /
_Mnacl;
500 return xnacl * Mbrine /
_Mnacl;
511 const std::vector<Real> & coeffs,
520 const std::vector<Real> & coeffs)
const
526 henry.derivatives() =
temperature.derivatives() * dKh_dT;