25 "effective_conductivity");
29 params.
addParam<
bool>(
"add_energy_equation",
30 "Whether to add the energy equation. This parameter is not necessary if " 31 "using the Physics syntax");
32 params.
addParam<
bool>(
"solve_for_enthalpy",
34 "Whether to solve for the enthalpy or the temperature of the fluid");
35 params.
addParam<NonlinearVariableName>(
36 "fluid_temperature_variable",
NS::T_fluid,
"Name of the fluid temperature variable");
44 "Initial value of the enthalpy variable, only to be used when solving for enthalpy");
52 "use_external_enthalpy_material",
53 "Material properties");
55 "energy_two_term_bc_expansion",
58 "Inlet boundary conditions");
60 "Wall boundary conditions");
70 isParamValid(
"add_energy_equation")
71 ? getParam<bool>(
"add_energy_equation")
72 : (usingNavierStokesFVSyntax() ? isParamSetByUser(
"energy_inlet_functors") : true)),
73 _solve_for_enthalpy(getParam<bool>(
"solve_for_enthalpy")),
74 _fluid_enthalpy_name(getSpecificEnthalpyName()),
75 _fluid_temperature_name(getParam<NonlinearVariableName>(
"fluid_temperature_variable")),
76 _specific_heat_name(getParam<MooseFunctorName>(
"specific_heat")),
77 _thermal_conductivity_blocks(
78 parameters.isParamValid(
"thermal_conductivity_blocks")
79 ? getParam<
std::vector<
std::vector<SubdomainName>>>(
"thermal_conductivity_blocks")
80 :
std::vector<
std::vector<SubdomainName>>()),
81 _thermal_conductivity_name(getParam<
std::vector<MooseFunctorName>>(
"thermal_conductivity")),
82 _ambient_convection_blocks(
83 getParam<
std::vector<
std::vector<SubdomainName>>>(
"ambient_convection_blocks")),
84 _ambient_convection_alpha(getParam<
std::vector<MooseFunctorName>>(
"ambient_convection_alpha")),
85 _ambient_temperature(getParam<
std::vector<MooseFunctorName>>(
"ambient_temperature")),
86 _energy_inlet_types(getParam<
MultiMooseEnum>(
"energy_inlet_types")),
87 _energy_inlet_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_inlet_functors")),
89 _energy_wall_functors(getParam<
std::vector<MooseFunctorName>>(
"energy_wall_functors"))
107 checkVectorParamsSameLengthIfSet<MooseFunctorName, MooseFunctorName>(
"ambient_convection_alpha",
108 "ambient_temperature");
115 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_inlet_functors",
116 "energy_inlet_types");
118 checkVectorParamsSameLengthIfSet<BoundaryName, MooseFunctorName>(
119 "energy_wall_boundaries",
"energy_wall_functors",
false);
121 checkVectorParamAndMultiMooseEnumLength<MooseFunctorName>(
"energy_wall_functors",
122 "energy_wall_types");
147 if (
getParam<std::vector<MooseFunctorName>>(
"ambient_temperature").size())
180 checkBlockwiseConsistency<MooseFunctorName>(
"thermal_conductivity_blocks",
181 {
"thermal_conductivity"});
182 bool have_scalar =
false;
183 bool have_vector =
false;
206 "We only allow functor of type Real/ADReal or ADRealVectorValue for thermal " 207 "conductivity! Functor '" +
214 "' was not found in the Problem. Did you mispell it?");
220 paramError(
"thermal_conductivity",
"Cannot use anisotropic diffusion with non-porous flows!");
222 if (have_vector && (have_vector == have_scalar))
224 "The entries on thermal conductivity shall either be scalars of vectors, mixing " 225 "them is not supported!");
237 "initial_temperature",
238 "T_fluid is defined externally of WCNSFVFluidHeatTransferPhysicsBase, so should the inital " 252 bool temperature_ic_used =
false;
260 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_temperature");
263 temperature_ic_used =
true;
284 params.
set<std::vector<VariableName>>(
"T") = {};
287 paramError(
"initial_temperature",
"Only Real values supported when solving for enthalpy");
290 temperature_ic_used =
true;
303 params.
set<FunctionName>(
"function") = getParam<FunctionName>(
"initial_enthalpy");
317 const auto object_type = use_ad ?
"ADParsedFunctorMaterial" :
"ParsedFunctorMaterial";
320 std::vector<std::string> f_names;
325 const auto th_cond_name =
328 params.
set<std::string>(
"expression") =
333 f_names.push_back(
"k_t");
334 params.
set<std::string>(
"expression") =
338 params.
set<std::vector<std::string>>(
"functor_names") = f_names;
348 unsigned short necessary_layers = getParam<unsigned short>(
"ghost_layers");
351 if (getParam<MooseEnum>(
"energy_face_interpolation") ==
"skewness-corrected")
352 necessary_layers = std::max(necessary_layers, (
unsigned short)3);
354 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
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
void addRequiredPhysicsTask(const std::string &task)
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual void addEnergyWallBC()=0
InputParameters getValidParams(const std::string &name) const
const std::vector< SubdomainName > & blocks() const
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type, const std::string &object_name="") const
static const std::string fluid
bool _has_turbulence_model
Because of the Modules/navierStokesFV syntax, a turbulence physics often exists without a model we sa...
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
virtual void addEnergyAmbientConvection()=0
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters ¶meters)
bool hasTurbulenceModel() const
Whether a turbulence model is in use.
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
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
Turbulence.
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...
const WCNSFVTurbulencePhysicsBase * getCoupledTurbulencePhysics() const
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 paramWarning(const std::string ¶m, Args... args) const
void defineEffectiveThermalDiffusionCoeffFunctors(const bool use_ad)
Define the effective diffusion coefficient when:
bool hasFunctor(const std::string &name, const THREAD_ID tid) 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