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");
43 "Initial value of the enthalpy variable, only to be used when solving for enthalpy");
51 "use_external_enthalpy_material",
52 "Material properties");
54 "energy_two_term_bc_expansion",
57 "Inlet boundary conditions");
58 params.
addParamNamesToGroup(
"energy_wall_types energy_wall_functors",
"Wall boundary conditions");
68 isParamValid(
"add_energy_equation")
69 ? getParam<bool>(
"add_energy_equation")
70 : (usingNavierStokesFVSyntax() ? isParamSetByUser(
"energy_inlet_functors") : true)),
71 _solve_for_enthalpy(getParam<bool>(
"solve_for_enthalpy")),
72 _fluid_enthalpy_name(getSpecificEnthalpyName()),
73 _fluid_temperature_name(getParam<NonlinearVariableName>(
"fluid_temperature_variable")),
74 _specific_heat_name(getParam<MooseFunctorName>(
"specific_heat")),
75 _thermal_conductivity_blocks(
76 parameters.isParamValid(
"thermal_conductivity_blocks")
77 ? getParam<
std::vector<
std::vector<SubdomainName>>>(
"thermal_conductivity_blocks")
78 :
std::vector<
std::vector<SubdomainName>>()),
79 _thermal_conductivity_name(getParam<
std::vector<MooseFunctorName>>(
"thermal_conductivity")),
80 _ambient_convection_blocks(
81 getParam<
std::vector<
std::vector<SubdomainName>>>(
"ambient_convection_blocks")),
82 _ambient_convection_alpha(getParam<
std::vector<MooseFunctorName>>(
"ambient_convection_alpha")),
83 _ambient_temperature(getParam<
std::vector<MooseFunctorName>>(
"ambient_temperature")),
84 _energy_inlet_types(getParam<
MultiMooseEnum>(
"energy_inlet_types")),
85 _energy_inlet_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_inlet_functors")),
87 _energy_wall_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_wall_functors"))
105 checkVectorParamsSameLengthIfSet<MooseFunctorName, MooseFunctorName>(
"ambient_convection_alpha",
106 "ambient_temperature");
113 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_inlet_functors",
114 "energy_inlet_types");
116 checkVectorParamsSameLengthIfSet<BoundaryName, MooseFunctorName>(
117 "energy_wall_boundaries",
"energy_wall_functors",
false);
119 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_wall_functors",
120 "energy_wall_types");
138 if (
getParam<std::vector<MooseFunctorName>>(
"ambient_temperature").size())
168 checkBlockwiseConsistency<MooseFunctorName>(
"thermal_conductivity_blocks",
169 {
"thermal_conductivity"});
170 bool have_scalar =
false;
171 bool have_vector =
false;
193 "We only allow functor of type Real/ADReal or ADRealVectorValue for thermal " 194 "conductivity! Functor '" +
201 paramError(
"thermal_conductivity",
"Cannot use anisotropic diffusion with non-porous flows!");
203 if (have_vector == have_scalar)
205 "The entries on thermal conductivity shall either be scalars of vectors, mixing " 206 "them is not supported!");
218 "initial_temperature",
219 "T_fluid is defined externally of WCNSFVFluidHeatTransferPhysicsBase, so should the inital " 233 bool temperature_ic_used =
false;
241 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_temperature");
244 temperature_ic_used =
true;
265 params.
set<std::vector<VariableName>>(
"T") = {};
268 paramError(
"initial_temperature",
"Only Real values supported when solving for enthalpy");
271 temperature_ic_used =
true;
284 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_enthalpy");
298 const auto object_type = use_ad ?
"ADParsedFunctorMaterial" :
"ParsedFunctorMaterial";
301 std::vector<std::string> f_names;
306 params.
set<std::vector<std::string>>(
"functor_names") = f_names;
307 params.
set<std::string>(
"expression") =
318 unsigned short necessary_layers = getParam<unsigned short>(
"ghost_layers");
321 if (getParam<MooseEnum>(
"energy_face_interpolation") ==
"skewness-corrected")
322 necessary_layers = std::max(necessary_layers, (
unsigned short)3);
324 return necessary_layers;
static InputParameters validParams()
std::string prefix() const
virtual void addFVInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
static InputParameters validParams()
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
virtual void addEnergySeparatorBC()=0
void addInitialConditions() override
void defineKOverCpFunctors(const bool use_ad)
Define the k/cp diffusion coefficients when solving for enthalpy.
virtual void addEnergyExternalHeatSource()=0
void assignBlocks(InputParameters ¶ms, const std::vector< SubdomainName > &blocks) const
static InputParameters validParams()
virtual void addEnergyTimeKernels()=0
Functions adding kernels for the incompressible / weakly compressible energy equation.
void paramError(const std::string ¶m, Args... args) const
const T & getParam(const std::string &name) const
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual void addEnergyWallBC()=0
const InputParameters & parameters() const
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
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
virtual FEProblemBase & getProblem()
static InputParameters validParams()
static InputParameters validParams()
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
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 std::string & _current_task
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of ghosting layers needed.
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 variableExists(const VariableName &var_name, bool error_if_aux) const
bool _define_variables
Whether to define variables if they do not exist.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool processThermalConductivity()
Process thermal conductivity (multiple functor input options are available).
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
bool isParamValid(const std::string &name) const
Base class to hold common parameters and utilities between all the weakly compressible Navier Stokes-...
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type) const
const WCNSFVTurbulencePhysics * getCoupledTurbulencePhysics() const
bool parsesToReal(const std::string &input, Real *parsed_real)
static InputParameters commonFluidEnergyEquationParams()
bool isParamSetByUser(const std::string &name) const
void saveSolverVariableName(const VariableName &var_name)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
virtual void addEnergyHeatConductionKernels()=0
void addFVKernels() override
const NonlinearVariableName & getPressureName() const