26 "use_nonorthogonal_correction",
28 "Whether to use a non-orthogonal correction. This can potentially slow down convergence " 29 ", but reduces numerical dispersion on non-orthogonal meshes. Can be safely turned off on " 30 "orthogonal meshes.");
31 params.
set<std::vector<SolverSystemName>>(
"system_names") = {
"energy_system"};
53 paramError(
"porous_medium_treatment",
"Porous media not supported at this time");
71 const auto var_type =
"MooseLinearVariableFVReal";
74 params.set<SolverSystemName>(
"solver_sys") =
getSolverSystem(variable_name);
79 "Variable (" + variable_name +
80 ") supplied to the WCNSLinearFVFluidHeatTransferPhysics does not exist!");
86 std::string kernel_type =
"LinearFVTimeDerivative";
87 std::string kernel_name =
prefix() +
"ins_energy_time";
90 params.
set<LinearVariableName>(
"variable") =
94 params.
set<MooseFunctorName>(
"factor") =
"rho_cp";
104 std::string kernel_type =
"LinearFVEnergyAdvection";
105 std::string kernel_name =
prefix() +
"ins_energy_advection";
109 if (!getParam<bool>(
"solve_for_enthalpy"))
112 params.
set<
MooseEnum>(
"advected_quantity") =
"temperature";
114 paramError(
"specific_heat",
"Must be a Real number. Functors not supported at this time");
121 getParam<MooseEnum>(
"energy_advection_interpolation");
130 const auto num_used_blocks = num_blocks ? num_blocks : 1;
132 for (
const auto block_i :
make_range(num_used_blocks))
134 std::string block_name =
"";
140 const std::string kernel_type =
"LinearFVDiffusion";
150 params.
set<MooseFunctorName>(
"diffusion_coeff") =
153 std::vector<SubdomainName> block_names =
160 "Vector thermal conductivities not currently supported with the linear finite " 161 "volume discretization");
163 params.
set<
bool>(
"use_nonorthogonal_correction") =
164 getParam<bool>(
"use_nonorthogonal_correction");
167 kernel_type,
prefix() +
"ins_energy_diffusion_" + block_name, params);
175 unsigned int num_used_blocks = num_convection_blocks ? num_convection_blocks : 1;
177 const std::string kernel_type =
"LinearFVVolumetricHeatTransfer";
179 params.
set<LinearVariableName>(
"variable") =
182 params.
set<
bool>(
"is_solid") =
false;
184 for (
unsigned int block_i = 0; block_i < num_used_blocks; ++block_i)
186 std::string block_name =
"";
187 if (num_convection_blocks)
195 block_name = std::to_string(block_i);
202 kernel_type,
prefix() +
"ambient_convection_" + block_name, params);
209 const std::string kernel_type =
"LinearFVSource";
211 params.
set<LinearVariableName>(
"variable") =
214 params.
set<MooseFunctorName>(
"source_density") =
215 getParam<MooseFunctorName>(
"external_heat_source");
216 params.
set<MooseFunctorName>(
"scaling_factor") =
217 std::to_string(getParam<Real>(
"external_heat_source_coeff"));
234 const auto var_type =
"MooseLinearVariableFVReal";
242 ") supplied to the WCNSLinearFVFluidHeatTransferPhysics does not exist!");
252 const std::string kernel_type =
"FunctorAux";
256 params.
set<MooseFunctorName>(
"functor") =
"T_from_p_h";
271 ") should be the same size as inlet_boundaries (size " +
272 std::to_string(inlet_boundaries.size()) +
")");
276 ") should be the same size as inlet_boundaries (size " +
277 std::to_string(inlet_boundaries.size()) +
")");
283 const std::string bc_type =
"LinearFVAdvectionDiffusionFunctorDirichletBC";
287 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
296 params.
set<MooseFunctorName>(
"functor") =
"h_from_p_T";
302 paramError(
"energy_inlet_types",
"Heat flux inlet boundary conditions not yet supported");
305 paramError(
"energy_inlet_types",
"Flux inlet boundary conditions not yet supported");
313 ? getParam<std::vector<BoundaryName>>(
"energy_wall_boundaries")
318 ") should be the same size as wall_boundaries (size " +
319 std::to_string(wall_boundaries.size()) +
")");
323 ") should be the same size as wall_boundaries (size " +
324 std::to_string(wall_boundaries.size()) +
")");
330 const std::string bc_type =
"LinearFVAdvectionDiffusionFunctorDirichletBC";
334 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
343 params.
set<MooseFunctorName>(
"functor") =
"h_from_p_T";
350 const std::string bc_type =
"LinearFVAdvectionDiffusionFunctorNeumannBC";
353 params.
set<LinearVariableName>(
"variable") = var_name;
355 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
358 bc_type, var_name +
"_heatflux_" + wall_boundaries[bc_ind], params);
362 const std::string bc_type =
"LinearFVConvectiveHeatTransferBC";
364 params.
set<LinearVariableName>(
"variable") =
367 const auto Tinf_htc_functors =
369 if (Tinf_htc_functors.size() != 2)
371 "'convection' wall types require two functors specified as " 372 "<Tinf_functor>:<htc_functor>.");
374 params.
set<MooseFunctorName>(
"h") = Tinf_htc_functors[1];
375 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
380 wall_boundaries[bc_ind],
385 "energy_wall_types",
_energy_wall_types[bc_ind],
" wall type is currently unsupported.");
393 if (outlet_boundaries.empty())
396 for (
const auto & outlet_bdy : outlet_boundaries)
398 const std::string bc_type =
"LinearFVAdvectionDiffusionOutflowBC";
401 params.
set<std::vector<BoundaryName>>(
"boundary") = {outlet_bdy};
402 params.
set<
bool>(
"use_two_term_expansion") = getParam<bool>(
"energy_two_term_bc_expansion");
404 params.
set<LinearVariableName>(
"variable") = variable_name;
419 const auto object_type =
"ADParsedFunctorMaterial";
422 std::vector<std::string> f_names;
427 params.
set<std::vector<std::string>>(
"functor_names") = f_names;
428 params.
set<std::string>(
"expression") =
std::string prefix() const
WCNSLinearFVFluidHeatTransferPhysics(const InputParameters ¶meters)
bool parsesToReal(const std::string &input)
virtual void addMaterials() override
MooseFunctorName _specific_heat_name
Name of the specific heat material property.
void assignBlocks(InputParameters ¶ms, const std::vector< SubdomainName > &blocks) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
const MooseFunctorName _density_name
Name of the density material property.
virtual void addAuxiliaryVariables() override
void addMaterials() override
const std::vector< BoundaryName > & getOutletBoundaries() const
Get the outlet boundaries.
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSLinearFVFluidHeatTransferPhysics)
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
std::vector< MooseFunctorName > _ambient_temperature
Name of the solid domain temperature for each block-group.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
static const std::string T_solid
void addEnergyWallBC() override
InputParameters getValidParams(const std::string &name) const
const std::vector< SubdomainName > & blocks() const
unsigned int size() const
static const std::string fluid
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
VariableName _fluid_temperature_name
Fluid temperature name.
virtual void addAuxVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
std::vector< std::vector< SubdomainName > > _ambient_convection_blocks
Vector of subdomain groups where we want to have different ambient convection.
bool isFloat(const std::string &str)
MultiMooseEnum _energy_wall_types
Energy wall boundary types.
std::vector< SubdomainName > _blocks
std::vector< MooseFunctorName > _energy_wall_functors
Functors describing the wall boundary values. See energy_wall_types for what the functors actually re...
std::vector< std::string > split(const std::string &str, const std::string &delimiter, std::size_t max_count=std::numeric_limits< std::size_t >::max())
MultiMooseEnum _energy_inlet_types
Energy inlet boundary types.
virtual FEProblemBase & getProblem()
registerMooseAction("NavierStokesApp", WCNSLinearFVFluidHeatTransferPhysics, "add_aux_variable")
static InputParameters validParams()
virtual UserObjectName rhieChowUOName() const =0
Return the name of the Rhie Chow user object.
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
static const std::string T_fluid
void addEnergyTimeKernels() override
Functions adding kernels for the incompressible / weakly compressible energy equation.
Creates all the objects needed to solve the Navier Stokes energy equation.
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
virtual void addAuxiliaryKernels() override
void paramError(const std::string ¶m, Args... args) const
std::string stringify(const T &t)
const VariableName _fluid_enthalpy_name
Name of the fluid specific enthalpy.
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
const bool _has_energy_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax.
Creates all the objects needed to solve the Navier Stokes energy equation using a linear finite volum...
bool variableExists(const VariableName &var_name, bool error_if_aux) const
bool checkBlockRestrictionIdentical(const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
bool _define_variables
Whether to define variables if they do not exist.
virtual void addLinearFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
std::vector< std::vector< SubdomainName > > _thermal_conductivity_blocks
Vector of subdomain groups where we want to have different thermal conduction.
const ExecFlagType EXEC_NONLINEAR
void addEnergyAmbientConvection() override
void addEnergyOutletBC() override
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).
std::vector< MooseFunctorName > _energy_inlet_functors
Functors describing the inlet boundary values. See energy_inlet_types for what the functors actually ...
virtual void addLinearFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
static InputParameters validParams()
std::vector< MooseFunctorName > _thermal_conductivity_name
Name of the thermal conductivity functor for each block-group.
IntRange< T > make_range(T beg, T end)
const bool _solve_for_enthalpy
User-selected option to solve for enthalpy.
void addEnergyInletBC() override
Functions adding boundary conditions for the incompressible / weakly compressible energy equation...
void addEnergyAdvectionKernels() override
registerWCNSFVFluidHeatTransferPhysicsBaseTasks("NavierStokesApp", WCNSLinearFVFluidHeatTransferPhysics)
std::vector< MooseFunctorName > _ambient_convection_alpha
Name of the ambient convection heat transfer coefficients for each block-group.
void addEnergyHeatConductionKernels() override
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type) const
void addEnergyExternalHeatSource() override
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
auto index_range(const T &sizable)
virtual void addSolverVariables() override
const std::vector< BoundaryName > & getWallBoundaries() const
Get the wall boundaries.