25 "effective_conductivity");
28 params.
addParam<
bool>(
"add_energy_equation",
29 "Whether to add the energy equation. This parameter is not necessary if " 30 "using the Physics syntax");
31 params.
addParam<
bool>(
"solve_for_enthalpy",
33 "Whether to solve for the enthalpy or the temperature of the fluid");
34 params.
addParam<NonlinearVariableName>(
35 "fluid_temperature_variable",
NS::T_fluid,
"Name of the fluid temperature variable");
40 "Initial value of the enthalpy variable, only to be used when solving for enthalpy");
43 params.
deprecateParam(
"energy_inlet_function",
"energy_inlet_functors",
"01/01/2025");
44 params.
deprecateParam(
"energy_wall_function",
"energy_wall_functors",
"01/01/2025");
52 "use_external_enthalpy_material",
53 "Material properties");
55 "energy_two_term_bc_expansion",
58 "Inlet boundary conditions");
59 params.
addParamNamesToGroup(
"energy_wall_types energy_wall_functors",
"Wall boundary conditions");
69 isParamValid(
"add_energy_equation")
70 ? getParam<bool>(
"add_energy_equation")
71 : (usingNavierStokesFVSyntax() ? isParamSetByUser(
"energy_inlet_function") : true)),
72 _solve_for_enthalpy(getParam<bool>(
"solve_for_enthalpy")),
73 _fluid_enthalpy_name(getSpecificEnthalpyName()),
74 _fluid_temperature_name(getParam<NonlinearVariableName>(
"fluid_temperature_variable")),
75 _specific_heat_name(getParam<MooseFunctorName>(
"specific_heat")),
76 _thermal_conductivity_blocks(
77 parameters.isParamValid(
"thermal_conductivity_blocks")
78 ? getParam<
std::vector<
std::vector<SubdomainName>>>(
"thermal_conductivity_blocks")
79 :
std::vector<
std::vector<SubdomainName>>()),
80 _thermal_conductivity_name(getParam<
std::vector<MooseFunctorName>>(
"thermal_conductivity")),
81 _ambient_convection_blocks(
82 getParam<
std::vector<
std::vector<SubdomainName>>>(
"ambient_convection_blocks")),
83 _ambient_convection_alpha(getParam<
std::vector<MooseFunctorName>>(
"ambient_convection_alpha")),
84 _ambient_temperature(getParam<
std::vector<MooseFunctorName>>(
"ambient_temperature")),
85 _energy_inlet_types(getParam<
MultiMooseEnum>(
"energy_inlet_types")),
86 _energy_inlet_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_inlet_functors")),
88 _energy_wall_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_wall_functors"))
106 checkVectorParamsSameLengthIfSet<MooseFunctorName, MooseFunctorName>(
"ambient_convection_alpha",
107 "ambient_temperature");
114 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_inlet_functors",
115 "energy_inlet_types");
117 checkVectorParamsSameLengthIfSet<BoundaryName, MooseFunctorName>(
118 "energy_wall_boundaries",
"energy_wall_functors",
false);
120 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_wall_functors",
121 "energy_wall_types");
139 if (
getParam<std::vector<MooseFunctorName>>(
"ambient_temperature").size())
169 checkBlockwiseConsistency<MooseFunctorName>(
"thermal_conductivity_blocks",
170 {
"thermal_conductivity"});
171 bool have_scalar =
false;
172 bool have_vector =
false;
194 "We only allow functor of type Real/ADReal or ADRealVectorValue for thermal " 195 "conductivity! Functor '" +
202 paramError(
"thermal_conductivity",
"Cannot use anisotropic diffusion with non-porous flows!");
204 if (have_vector == have_scalar)
206 "The entries on thermal conductivity shall either be scalars of vectors, mixing " 207 "them is not supported!");
219 "initial_temperature",
220 "T_fluid is defined externally of WCNSFVFluidHeatTransferPhysicsBase, so should the inital " 235 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_temperature");
246 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_enthalpy");
260 const auto object_type =
278 "Either 'fp' must be specified or the 'h_from_p_T_functor' and " 279 "'T_from_p_h_functor' must be defined outside the Physics");
281 params.
set<MooseFunctorName>(
"h_from_p_T_functor") =
"h_from_p_T_functor";
282 params.
set<MooseFunctorName>(
"T_from_p_h_functor") =
"T_from_p_h_functor";
298 unsigned short necessary_layers = getParam<unsigned short>(
"ghost_layers");
301 if (getParam<MooseEnum>(
"energy_face_interpolation") ==
"skewness-corrected")
302 necessary_layers = std::max(necessary_layers, (
unsigned short)3);
304 return necessary_layers;
static InputParameters validParams()
std::string prefix() const
bool parsesToReal(const std::string &input)
static InputParameters validParams()
MooseFunctorName _specific_heat_name
Name of the specific heat material property.
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
virtual void addEnergySeparatorBC()=0
void addInitialConditions() override
virtual void addEnergyExternalHeatSource()=0
void assignBlocks(InputParameters ¶ms, const std::vector< SubdomainName > &blocks) const
const MooseFunctorName _density_name
Name of the density material property.
static InputParameters validParams()
void addMaterials() override
virtual void addEnergyTimeKernels()=0
Functions adding kernels for the incompressible / weakly compressible energy equation.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual void addEnergyWallBC()=0
static const std::string density
InputParameters getValidParams(const std::string &name) const
const std::vector< SubdomainName > & blocks() const
static const std::string fluid
bool shouldCreateIC(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
VariableName _fluid_temperature_name
Fluid temperature name.
std::vector< SubdomainName > _blocks
const WCNSFVTurbulencePhysics * _turbulence_physics
Turbulence.
virtual void addEnergyAmbientConvection()=0
bool isParamValid(const std::string &name) const
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
virtual FEProblemBase & getProblem()
static InputParameters validParams()
static const std::string cp
static InputParameters validParams()
static const std::string T_fluid
bool hasFunctorWithType(const std::string &name, const THREAD_ID tid) const
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
virtual void addEnergyAdvectionKernels()=0
const T & getParam(const std::string &name) const
const std::string & _current_task
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of ghosting layers needed.
void paramError(const std::string ¶m, Args... args) const
Helper class to interact with a flow and turbulence physics for a Physics that solves an advection pr...
void actOnAdditionalTasks() override
const VariableName _fluid_enthalpy_name
Name of the fluid specific enthalpy.
const bool _has_energy_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax.
virtual void addEnergyInletBC()=0
Functions adding boundary conditions for the fluid heat transfer equation.
WCNSFVFluidHeatTransferPhysicsBase(const InputParameters ¶meters)
bool _define_variables
Whether to define variables if they do not exist.
bool isParamSetByUser(const std::string &nm) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool processThermalConductivity()
Process thermal conductivity (multiple functor input options are available).
static const std::string pressure
std::vector< MooseFunctorName > _thermal_conductivity_name
Name of the thermal conductivity functor for each block-group.
const bool _solve_for_enthalpy
User-selected option to solve for enthalpy.
virtual void addEnergyOutletBC()=0
const InputParameters & parameters() const
Base class to hold common parameters and utilities between all the weakly compressible Navier Stokes-...
const WCNSFVTurbulencePhysics * getCoupledTurbulencePhysics() const
bool hasFunctor(const std::string &name, const THREAD_ID tid) const
static InputParameters commonFluidEnergyEquationParams()
void saveSolverVariableName(const VariableName &var_name)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
virtual void addEnergyHeatConductionKernels()=0
void addFVKernels() override
static const std::string specific_enthalpy
const NonlinearVariableName & getPressureName() const