81 _d(getFunctor<Real>(
"characteristic_length")),
83 _pressure_is_dynamic(getParam<bool>(
"solving_for_dynamic_pressure")),
84 _reference_pressure_point(getParam<Point>(
"reference_pressure_point")),
85 _reference_pressure_value(getParam<Real>(
"reference_pressure")),
86 _gravity_vec(getParam<Point>(
"gravity")),
91 _force_define_density(getParam<bool>(
"force_define_density")),
93 _mu_rampdown(getFunction(
"mu_rampdown")),
94 _neglect_derivatives_of_density_time_derivative(
95 getParam<bool>(
"neglect_derivatives_of_density_time_derivative")),
97 _density_name(getParam<MooseFunctorName>(
"density_name")),
98 _dynamic_viscosity_name(getParam<MooseFunctorName>(
"dynamic_viscosity_name")),
99 _specific_heat_name(getParam<MooseFunctorName>(
"specific_heat_name")),
100 _thermal_conductivity_name(getParam<MooseFunctorName>(
"thermal_conductivity_name"))
106 "'reference_pressure_point' and 'reference_pressure' should not be set unless "
107 "solving for the dynamic pressure");
122 addFunctorProperty<GenericReal<is_ad>>(
127 addFunctorProperty<GenericReal<is_ad>>(
132 const auto & cp = addFunctorProperty<GenericReal<is_ad>>(
137 const auto &
mu = addFunctorProperty<GenericReal<is_ad>>(
142 const auto & k = addFunctorProperty<GenericReal<is_ad>>(
152 addFunctorProperty<GenericReal<is_ad>>(
156 Real
rho, drho_dp, drho_dT;
167 addFunctorProperty<GenericReal<is_ad>>(
177 addFunctorProperty<GenericReal<is_ad>>(
181 Real dcp_dp, dcp_dT, dummy;
184 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
193 const auto & drho_dp = addFunctorProperty<Real>(
195 [
this](
const auto & r,
const auto & t) -> Real
197 Real drho_dp, drho_dT, dummy;
201 _fluid.rho_from_p_T(raw_pressure, raw_T_fluid, dummy, drho_dp, drho_dT);
205 const auto & drho_dT = addFunctorProperty<Real>(
207 [
this](
const auto & r,
const auto & t) -> Real
209 Real drho_dp, drho_dT, dummy;
213 _fluid.rho_from_p_T(raw_pressure, raw_T_fluid, dummy, drho_dp, drho_dT);
217 const auto & dcp_dp = addFunctorProperty<Real>(
219 [
this](
const auto & r,
const auto & t) -> Real
221 Real dcp_dp, dcp_dT, dummy;
225 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
229 const auto & dcp_dT = addFunctorProperty<Real>(
231 [
this](
const auto & r,
const auto & t) -> Real
233 Real dcp_dp, dcp_dT, dummy;
237 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
241 const auto & dmu_dp = addFunctorProperty<Real>(
243 [
this](
const auto & r,
const auto & t) -> Real
245 Real dmu_dp, dmu_dT, dummy;
249 _fluid.mu_from_p_T(raw_pressure, raw_T_fluid, dummy, dmu_dp, dmu_dT);
253 const auto & dmu_dT = addFunctorProperty<Real>(
255 [
this](
const auto & r,
const auto & t) -> Real
257 Real dmu_dp, dmu_dT, dummy;
261 _fluid.mu_from_p_T(raw_pressure, raw_T_fluid, dummy, dmu_dp, dmu_dT);
265 const auto & dk_dp = addFunctorProperty<Real>(
267 [
this](
const auto & r,
const auto & t) -> Real
269 Real dk_dp, dk_dT, dummy;
273 _fluid.k_from_p_T(raw_pressure, raw_T_fluid, dummy, dk_dp, dk_dT);
277 const auto & dk_dT = addFunctorProperty<Real>(
279 [
this](
const auto & r,
const auto & t) -> Real
281 Real dk_dp, dk_dT, dummy;
285 _fluid.k_from_p_T(raw_pressure, raw_T_fluid, dummy, dk_dp, dk_dT);
293 addFunctorProperty<GenericReal<is_ad>>(
297 static constexpr Real small_number = 1e-8;
303 addFunctorProperty<Real>(
305 [&
mu, &cp, &k, &dmu_dp, &dcp_dp, &dk_dp](
const auto & r,
const auto & t) -> Real
315 addFunctorProperty<Real>(
317 [&
mu, &cp, &k, &dmu_dT, &dcp_dT, &dk_dT](
const auto & r,
const auto & t) -> Real
333 const auto &
Re = addFunctorProperty<GenericReal<is_ad>>(
337 static constexpr Real small_number = 1e-8;
341 _rho(r, t),
_eps(r, t) *
_speed(r, t),
_d(r, t), max(
mu(r, t), small_number)),
345 addFunctorProperty<Real>(
347 [
this, &
Re, &
mu, &drho_dp, &dmu_dp](
const auto & r,
const auto & t) -> Real
356 addFunctorProperty<Real>(
358 [
this, &
Re, &
mu, &drho_dT, &dmu_dT](
const auto & r,
const auto & t) -> Real
368 addFunctorProperty<GenericReal<is_ad>>(
372 static constexpr Real small_number = 1e-8;
374 return Re(r, t) / max(1 -
_eps(r, t), small_number);
378 addFunctorProperty<GenericReal<is_ad>>(
381 {
return Re(r, t) /
_eps(r, t); });
394 const auto rho_approx =
_fluid.rho_from_p_T(total_pressure,
_T_fluid(r, t));
401 addFunctorProperty<GenericReal<is_ad>>(
405 const auto total_pressure =
411 const auto & cp = addFunctorProperty<GenericReal<is_ad>>(
415 const auto total_pressure =
421 const auto &
mu = addFunctorProperty<GenericReal<is_ad>>(
425 const auto total_pressure =
431 const auto & k = addFunctorProperty<GenericReal<is_ad>>(
435 const auto total_pressure =
446 addFunctorProperty<GenericReal<is_ad>>(
450 const auto total_pressure =
453 Real
rho, drho_dp, drho_dT;
464 addFunctorProperty<GenericReal<is_ad>>(
468 const auto total_pressure =
477 addFunctorProperty<GenericReal<is_ad>>(
481 const auto total_pressure =
484 Real dcp_dp, dcp_dT, dummy;
487 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
496 const auto & drho_dp = addFunctorProperty<Real>(
498 [
this, &
rho](
const auto & r,
const auto & t) -> Real
500 const auto total_pressure =
503 Real drho_dp, drho_dT, dummy;
507 _fluid.rho_from_p_T(raw_pressure, raw_T_fluid, dummy, drho_dp, drho_dT);
511 const auto & drho_dT = addFunctorProperty<Real>(
513 [
this, &
rho](
const auto & r,
const auto & t) -> Real
515 const auto total_pressure =
518 Real drho_dp, drho_dT, dummy;
522 _fluid.rho_from_p_T(raw_pressure, raw_T_fluid, dummy, drho_dp, drho_dT);
526 const auto & dcp_dp = addFunctorProperty<Real>(
528 [
this, &
rho](
const auto & r,
const auto & t) -> Real
530 const auto total_pressure =
533 Real dcp_dp, dcp_dT, dummy;
537 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
541 const auto & dcp_dT = addFunctorProperty<Real>(
543 [
this, &
rho](
const auto & r,
const auto & t) -> Real
545 const auto total_pressure =
548 Real dcp_dp, dcp_dT, dummy;
552 _fluid.cp_from_p_T(raw_pressure, raw_T_fluid, dummy, dcp_dp, dcp_dT);
556 const auto & dmu_dp = addFunctorProperty<Real>(
558 [
this, &
rho](
const auto & r,
const auto & t) -> Real
560 const auto total_pressure =
563 Real dmu_dp, dmu_dT, dummy;
567 _fluid.mu_from_p_T(raw_pressure, raw_T_fluid, dummy, dmu_dp, dmu_dT);
571 const auto & dmu_dT = addFunctorProperty<Real>(
573 [
this, &
rho](
const auto & r,
const auto & t) -> Real
575 const auto total_pressure =
578 Real dmu_dp, dmu_dT, dummy;
582 _fluid.mu_from_p_T(raw_pressure, raw_T_fluid, dummy, dmu_dp, dmu_dT);
586 const auto & dk_dp = addFunctorProperty<Real>(
588 [
this, &
rho](
const auto & r,
const auto & t) -> Real
590 const auto total_pressure =
593 Real dk_dp, dk_dT, dummy;
597 _fluid.k_from_p_T(raw_pressure, raw_T_fluid, dummy, dk_dp, dk_dT);
601 const auto & dk_dT = addFunctorProperty<Real>(
603 [
this, &
rho](
const auto & r,
const auto & t) -> Real
605 const auto total_pressure =
608 Real dk_dp, dk_dT, dummy;
612 _fluid.k_from_p_T(raw_pressure, raw_T_fluid, dummy, dk_dp, dk_dT);
620 addFunctorProperty<GenericReal<is_ad>>(
624 static constexpr Real small_number = 1e-8;
630 addFunctorProperty<Real>(
632 [&
mu, &cp, &k, &dmu_dp, &dcp_dp, &dk_dp](
const auto & r,
const auto & t) -> Real
642 addFunctorProperty<Real>(
644 [&
mu, &cp, &k, &dmu_dT, &dcp_dT, &dk_dT](
const auto & r,
const auto & t) -> Real
660 const auto &
Re = addFunctorProperty<GenericReal<is_ad>>(
664 static constexpr Real small_number = 1e-8;
669 _rho(r, t),
_eps(r, t) *
_speed(r, t),
_d(r, t), max(
mu(r, t), small_number)),
673 addFunctorProperty<Real>(
675 [
this, &
Re, &
mu, &drho_dp, &dmu_dp](
const auto & r,
const auto & t) -> Real
684 addFunctorProperty<Real>(
686 [
this, &
Re, &
mu, &drho_dT, &dmu_dT](
const auto & r,
const auto & t) -> Real
696 addFunctorProperty<GenericReal<is_ad>>(
700 static constexpr Real small_number = 1e-8;
702 return Re(r, t) / max(1 -
_eps(r, t), small_number);
706 addFunctorProperty<GenericReal<is_ad>>(
709 {
return Re(r, t) /
_eps(r, t); });