32 paramError(
"solve_for_enthalpy",
"Enthalpy solve not supported at this time with Physics");
46 "energy_face_interpolation",
47 "energy_two_term_bc_expansion"},
48 "INSFVEnergyVariable");
53 params.set<std::vector<Real>>(
"scaling") = {getParam<Real>(
"energy_scaling")};
54 params.set<
MooseEnum>(
"face_interp_method") = getParam<MooseEnum>(
"energy_face_interpolation");
55 params.set<
bool>(
"two_term_boundary_expansion") =
56 getParam<bool>(
"energy_two_term_bc_expansion");
63 ") supplied to the WCNSFVFluidHeatTransferPhysics does not exist!");
69 std::string kernel_type =
71 :
"INSFVEnergyTimeDerivative");
72 std::string kernel_name =
76 kernel_type =
"PINSFVEnergyTimeDerivative";
103 params.
set<
bool>(
"is_solid") =
false;
112 std::string kernel_type =
"INSFVEnergyAdvection";
113 std::string kernel_name =
prefix() +
"ins_energy_advection";
116 kernel_type =
"PINSFVEnergyAdvection";
117 kernel_name =
prefix() +
"pins_energy_advection";
126 getParam<MooseEnum>(
"energy_advection_interpolation");
136 const auto num_used_blocks = num_blocks ? num_blocks : 1;
138 for (
const auto block_i :
make_range(num_used_blocks))
140 std::string block_name =
"";
148 const auto kernel_type =
149 vector_conductivity ?
"PINSFVEnergyAnisotropicDiffusion" :
"PINSFVEnergyDiffusion";
155 const auto conductivity_name = vector_conductivity ?
NS::kappa :
NS::k;
159 params.
set<
bool>(
"effective_conductivity") = getParam<bool>(
"effective_conductivity");
162 kernel_type,
prefix() +
"pins_energy_diffusion_" + block_name, params);
166 const std::string kernel_type =
"FVDiffusion";
169 std::vector<SubdomainName> block_names =
175 kernel_type,
prefix() +
"ins_energy_diffusion_" + block_name, params);
184 unsigned int num_used_blocks = num_convection_blocks ? num_convection_blocks : 1;
186 const std::string kernel_type =
"PINSFVEnergyAmbientConvection";
190 params.
set<
bool>(
"is_solid") =
false;
192 for (
unsigned int block_i = 0; block_i < num_used_blocks; ++block_i)
194 std::string block_name =
"";
195 if (num_convection_blocks)
203 block_name = std::to_string(block_i);
216 const std::string kernel_type =
"FVCoupledForce";
220 params.
set<MooseFunctorName>(
"v") = getParam<MooseFunctorName>(
"external_heat_source");
221 params.
set<
Real>(
"coef") = getParam<Real>(
"external_heat_source_coeff");
235 ") should be the same size as inlet_boundaries (size " +
236 std::to_string(inlet_boundaries.size()) +
")");
240 ") should be the same size as inlet_boundaries (size " +
241 std::to_string(inlet_boundaries.size()) +
")");
243 unsigned int flux_bc_counter = 0;
248 const std::string bc_type =
"FVADFunctorDirichletBC";
252 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
259 const std::string bc_type =
"FVFunctionNeumannBC";
263 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
271 const std::string bc_type =
"WCNSFVEnergyFluxBC";
277 if (flux_inlet_directions.size())
278 params.
set<Point>(
"direction") = flux_inlet_directions[flux_bc_counter];
281 params.
set<PostprocessorName>(
"mdot_pp") = flux_inlet_pps[flux_bc_counter];
282 params.
set<PostprocessorName>(
"area_pp") =
"area_pp_" + inlet_boundaries[bc_ind];
285 params.
set<PostprocessorName>(
"velocity_pp") = flux_inlet_pps[flux_bc_counter];
295 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
299 flux_bc_counter += 1;
308 ? getParam<std::vector<BoundaryName>>(
"energy_wall_boundaries")
313 ") should be the same size as wall_boundaries (size " +
314 std::to_string(wall_boundaries.size()) +
")");
318 ") should be the same size as wall_boundaries (size " +
319 std::to_string(wall_boundaries.size()) +
")");
325 const std::string bc_type =
"FVADFunctorDirichletBC";
329 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
336 const std::string bc_type =
"FVFunctorNeumannBC";
340 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
347 const std::string bc_type =
"FVFunctorConvectiveHeatFluxBC";
351 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
352 params.
set<
bool>(
"is_solid") =
false;
353 const auto Tinf_htc_functors =
355 if (Tinf_htc_functors.size() != 2)
357 "'convective' wall types require two functors specified as " 358 "<Tinf_functor>:<htc_functor>.");
359 params.
set<MooseFunctorName>(
"T_solid") = Tinf_htc_functors[0];
360 params.
set<MooseFunctorName>(
"heat_transfer_coefficient") = Tinf_htc_functors[1];
372 "A coupled turbulence Physics was not found for defining the wall function " 373 "boundary condition on boundary: " +
374 wall_boundaries[bc_ind]);
375 const std::string bc_type =
"INSFVTurbulentTemperatureWallFunction";
378 params.
set<std::vector<BoundaryName>>(
"boundary") = {wall_boundaries[bc_ind]};
386 mooseError(
"Several anisotropic thermal conductivity (kappa) regions have been specified. " 387 "Selecting the right kappa coefficient for the turbulence boundaries is not " 388 "currently implemented.\nBoundaries:\n" +
393 const std::string u_names[3] = {
"u",
"v",
"w"};
397 params.
set<
bool>(
"newton_solve") =
true;
402 "energy_wall_types",
_energy_wall_types[bc_ind],
" wall type is currently unsupported.");
411 const std::string bc_type =
"INSFVScalarFieldSeparatorBC";
414 params.
set<std::vector<BoundaryName>>(
"boundary") =
std::string prefix() const
void addEnergyExternalHeatSource() override
static InputParameters validParams()
MooseFunctorName _specific_heat_name
Name of the specific heat material property.
Creates all the objects needed to solve the Navier Stokes energy equation.
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 addSolverVariables() override
void addEnergyHeatConductionKernels() override
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.
static InputParameters validParams()
static const std::string T_solid
MooseEnum turbulenceTemperatureWallTreatment() const
The turbulence temperature wall treatment (same for all turbulence walls currently) ...
static const std::string density
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
unsigned int size() const
void addEnergySeparatorBC() override
VariableName _fluid_temperature_name
Fluid temperature name.
std::vector< std::vector< SubdomainName > > _ambient_convection_blocks
Vector of subdomain groups where we want to have different ambient convection.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
MultiMooseEnum _energy_wall_types
Energy wall boundary types.
const std::vector< BoundaryName > & getHydraulicSeparators() const
Get the hydraulic separator boundaries.
std::vector< SubdomainName > _blocks
unsigned int dimension() const
std::vector< MooseFunctorName > _energy_wall_functors
Functors describing the wall boundary values. See energy_wall_types for what the functors actually re...
const WCNSFVTurbulencePhysics * _turbulence_physics
Turbulence.
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()
static const std::string porosity
static const std::string cp
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
static const std::string T_fluid
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
static const std::string mu
Creates all the objects needed to solve the Navier Stokes energy equation.
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const std::vector< PostprocessorName > & getFluxInletPPs() const
Get the inlet flux postprocessor if using a flux inlet.
void paramError(const std::string ¶m, Args... args) const
std::string stringify(const T &t)
void addEnergyInletBC() override
Functions adding boundary conditions for the incompressible simulation.
WCNSFVFluidHeatTransferPhysics(const InputParameters ¶meters)
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.
bool _define_variables
Whether to define variables if they do not exist.
const std::vector< std::string > _velocity_names
Velocity names.
std::vector< std::vector< SubdomainName > > _thermal_conductivity_blocks
Vector of subdomain groups where we want to have different thermal conduction.
void addEnergyWallBC() override
bool isParamSetByUser(const std::string &nm) const
static const std::string kappa
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 ...
void addEnergyAdvectionKernels() override
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 mooseError(Args &&... args) const
std::vector< MooseFunctorName > _ambient_convection_alpha
Name of the ambient convection heat transfer coefficients for each block-group.
MooseFunctorName tkeName() const
The name of the turbulent kinetic energy variable.
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type) const
const std::string velocity_vector[3]
const std::vector< Point > & getFluxInletDirections() const
Get the inlet direction if using a flux inlet.
void addEnergyAmbientConvection() override
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
std::vector< BoundaryName > turbulenceWalls() const
The names of the boundaries with turbulence wall functions.
static const std::string k
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
auto index_range(const T &sizable)
registerWCNSFVFluidHeatTransferPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
const std::vector< BoundaryName > & getWallBoundaries() const
Get the wall boundaries.
std::string time_deriv(const std::string &var)
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities. ...
static const std::string specific_enthalpy
void addEnergyTimeKernels() override
Functions adding kernels for the incompressible / weakly compressible energy equation If the material...