https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WCNSFVFluidHeatTransferPhysics.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11#include "WCNSFVFlowPhysics.h"
12#include "NSFVBase.h"
13#include "NS.h"
14
17
20{
22 params.transferParam<MooseEnum>(NSFVBase::validParams(), "energy_face_interpolation");
23 params.transferParam<Real>(NSFVBase::validParams(), "energy_scaling");
24 params.addParam<bool>(
25 "check_bc_compatibility",
26 true,
27 "Whether to check for known incompatibility between boundary conditions for "
28 "the heat transport equation physics and other physics");
29 params.addParamNamesToGroup("check_bc_compatibility", "Advanced");
30
31 params.addParamNamesToGroup("energy_scaling", "Numerical scheme");
32 return params;
33}
34
37{
38 checkSecondParamNotSetIfFirstOneSet("solve_for_enthalpy", "fluid_temperature_variable");
39}
40
41void
43{
44 // For compatibility with Modules/NavierStokesFV syntax
46 return;
47
48 const auto & solver_variable_name =
50
51 // Dont add if the user already defined the variable
52 if (!shouldCreateVariable(solver_variable_name, _blocks, /*error if aux*/ true))
54 "energy_scaling",
55 "energy_face_interpolation",
56 "energy_two_term_bc_expansion"},
57 "INSFVEnergyVariable");
58 else if (_define_variables)
59 {
60 auto params = getFactory().getValidParams("INSFVEnergyVariable");
61 params.set<std::vector<Real>>("scaling") = {getParam<Real>("energy_scaling")};
62 params.set<MooseEnum>("face_interp_method") = getParam<MooseEnum>("energy_face_interpolation");
63 params.set<bool>("two_term_boundary_expansion") =
64 getParam<bool>("energy_two_term_bc_expansion");
65 addSharedSolverVariable("INSFVEnergyVariable", solver_variable_name, params);
66 }
67 else
68 // we don't let the user select the enthalpy variable name at this time
69 paramError(_solve_for_enthalpy ? "solve_for_enthalpy" : "fluid_temperature_variable",
70 "Variable (" + solver_variable_name +
71 ") supplied to the WCNSFVFluidHeatTransferPhysics does not exist!");
72}
73
74void
76{
77 std::string kernel_type =
78 ((_compressibility == "weakly-compressible") ? "WCNSFVEnergyTimeDerivative"
79 : "INSFVEnergyTimeDerivative");
80 std::string kernel_name =
81 prefix() + ((_compressibility == "weakly-compressible") ? "wcns" : "ins") + "_energy_time";
83 {
84 kernel_type = "PINSFVEnergyTimeDerivative";
85 kernel_name = prefix() + ((_compressibility == "weakly-compressible") ? "pwcns" : "pins") +
86 "_energy_time";
87 }
88
89 const auto & solver_variable_name =
91
92 InputParameters params = getFactory().getValidParams(kernel_type);
93 assignBlocks(params, _blocks);
94 params.set<NonlinearVariableName>("variable") = solver_variable_name;
95 params.set<MooseFunctorName>(NS::density) = _density_name;
96 params.set<MooseFunctorName>(NS::time_deriv(NS::specific_enthalpy)) =
98 if (_compressibility == "weakly-compressible")
99 {
100 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
101 params.set<MooseFunctorName>(NS::specific_enthalpy) = NS::specific_enthalpy;
102 }
104 {
105 params.set<MooseFunctorName>(NS::porosity) =
108 /*thread_id=*/0))
109 {
110 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
111 params.set<MooseFunctorName>(NS::specific_enthalpy) = NS::specific_enthalpy;
112 }
113
114 params.set<bool>("is_solid") = false;
115 }
116
117 getProblem().addFVKernel(kernel_type, kernel_name, params);
118}
119
120void
122{
123 std::string kernel_type = "INSFVEnergyAdvection";
124 std::string kernel_name = prefix() + "ins_energy_advection";
126 {
127 kernel_type = "PINSFVEnergyAdvection";
128 kernel_name = prefix() + "pins_energy_advection";
129 }
130
131 const auto & solver_variable_name =
133
134 InputParameters params = getFactory().getValidParams(kernel_type);
135 params.set<NonlinearVariableName>("variable") = solver_variable_name;
136 assignBlocks(params, _blocks);
137 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
138 params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
139 params.set<MooseEnum>("advected_interp_method") =
140 getParam<MooseEnum>("energy_advection_interpolation");
141
142 getProblem().addFVKernel(kernel_type, kernel_name, params);
143}
144
145void
147{
148 const auto vector_conductivity = processThermalConductivity();
149 const auto num_blocks = _thermal_conductivity_blocks.size();
150 const auto num_used_blocks = num_blocks ? num_blocks : 1;
151 const auto & solver_variable_name =
153
154 for (const auto block_i : make_range(num_used_blocks))
155 {
156 std::string block_name = "";
157 if (num_blocks)
158 block_name = Moose::stringify(_thermal_conductivity_blocks[block_i]);
159 else
160 block_name = "all";
161
163 {
164 const auto kernel_type =
165 vector_conductivity ? "PINSFVEnergyAnisotropicDiffusion" : "PINSFVEnergyDiffusion";
166
167 InputParameters params = getFactory().getValidParams(kernel_type);
168 params.set<NonlinearVariableName>("variable") = solver_variable_name;
169 const auto block_names = num_blocks ? _thermal_conductivity_blocks[block_i] : _blocks;
170 assignBlocks(params, block_names);
171 const auto conductivity_name = vector_conductivity ? NS::kappa : NS::k;
172 params.set<MooseFunctorName>(NS::porosity) =
174 params.set<bool>("effective_conductivity") = getParam<bool>("effective_conductivity");
176 params.set<MooseFunctorName>(conductivity_name) = _thermal_conductivity_name[block_i];
177 else
178 params.set<MooseFunctorName>(conductivity_name) =
179 _thermal_conductivity_name[block_i] + "_by_cp";
180
182 kernel_type, prefix() + "pins_energy_diffusion_" + block_name, params);
183 }
184 else
185 {
186 const std::string kernel_type = "FVDiffusion";
187 InputParameters params = getFactory().getValidParams(kernel_type);
188 params.set<NonlinearVariableName>("variable") = solver_variable_name;
189 std::vector<SubdomainName> block_names =
190 num_blocks ? _thermal_conductivity_blocks[block_i] : _blocks;
191 assignBlocks(params, block_names);
193 params.set<MooseFunctorName>("coeff") = _thermal_conductivity_name[block_i];
194 else
195 params.set<MooseFunctorName>("coeff") = _thermal_conductivity_name[block_i] + "_by_cp";
196
198 kernel_type, prefix() + "ins_energy_diffusion_" + block_name, params);
199 }
200 }
201}
202
203void
205{
206 unsigned int num_convection_blocks = _ambient_convection_blocks.size();
207 unsigned int num_used_blocks = num_convection_blocks ? num_convection_blocks : 1;
208 const auto & solver_variable_name =
210
211 const std::string kernel_type = "PINSFVEnergyAmbientConvection";
212 InputParameters params = getFactory().getValidParams(kernel_type);
213 params.set<NonlinearVariableName>("variable") = solver_variable_name;
214 params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
215 params.set<bool>("is_solid") = false;
216
217 for (unsigned int block_i = 0; block_i < num_used_blocks; ++block_i)
218 {
219 std::string block_name = "";
220 if (num_convection_blocks)
221 {
222 params.set<std::vector<SubdomainName>>("block") = _ambient_convection_blocks[block_i];
223 block_name = Moose::stringify(_ambient_convection_blocks[block_i]);
224 }
225 else
226 {
227 assignBlocks(params, _blocks);
228 block_name = std::to_string(block_i);
229 }
230
231 params.set<MooseFunctorName>("h_solid_fluid") = _ambient_convection_alpha[block_i];
232 params.set<MooseFunctorName>(NS::T_solid) = _ambient_temperature[block_i];
233
234 getProblem().addFVKernel(kernel_type, prefix() + "ambient_convection_" + block_name, params);
235 }
236}
237
238void
240{
241 const auto & solver_variable_name =
243 const std::string kernel_type = "FVCoupledForce";
244 InputParameters params = getFactory().getValidParams(kernel_type);
245 params.set<NonlinearVariableName>("variable") = solver_variable_name;
246 assignBlocks(params, _blocks);
247 params.set<MooseFunctorName>("v") = getParam<MooseFunctorName>("external_heat_source");
248 params.set<Real>("coef") = getParam<Real>("external_heat_source_coeff");
249
250 getProblem().addFVKernel(kernel_type, prefix() + "external_heat_source", params);
251}
252
253void
255{
256 const auto & inlet_boundaries = _flow_equations_physics->getInletBoundaries();
257 // These are parameter errors for now. If Components add boundaries to Physics, the error
258 // may not be due to parameters anymore.
259 if (inlet_boundaries.size() != _energy_inlet_types.size())
260 paramError("energy_inlet_types",
261 "Energy inlet types (size " + std::to_string(_energy_inlet_types.size()) +
262 ") should be the same size as inlet_boundaries (size " +
263 std::to_string(inlet_boundaries.size()) + ")");
264 if (inlet_boundaries.size() != _energy_inlet_functors.size())
265 paramError("energy_inlet_functors",
266 "Energy inlet functors (size " + std::to_string(_energy_inlet_functors.size()) +
267 ") should be the same size as inlet_boundaries (size " +
268 std::to_string(inlet_boundaries.size()) + ")");
269
270 const auto & solver_variable_name =
272
273 unsigned int flux_bc_counter = 0;
274 for (const auto bc_ind : index_range(_energy_inlet_types))
275 {
276 if (_energy_inlet_types[bc_ind] == "fixed-temperature")
277 {
278 const std::string bc_type = _solve_for_enthalpy
279 ? "FVSpecificEnthalpyFromPressureTemperatureDirichletBC"
280 : "FVADFunctorDirichletBC";
281 InputParameters params = getFactory().getValidParams(bc_type);
282 params.set<NonlinearVariableName>("variable") = solver_variable_name;
284 params.set<MooseFunctorName>("functor") = _energy_inlet_functors[bc_ind];
285 else
286 {
287 mooseAssert(_flow_equations_physics, "Should be coupled");
288 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
289 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
290 params.set<MooseFunctorName>(NS::T_fluid) = _energy_inlet_functors[bc_ind];
291 }
292 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
293
294 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
295
296 // Check the BCs for momentum
297 const auto momentum_inlet_type =
298 _flow_equations_physics->inletBoundaryType(inlet_boundaries[bc_ind]);
299 if (getParam<bool>("check_bc_compatibility") &&
300 (momentum_inlet_type == NS::MomentumInletTypes::FLUX_VELOCITY ||
301 momentum_inlet_type == NS::MomentumInletTypes::FLUX_MASS))
302 paramError("energy_inlet_types",
303 "At inlet '" + inlet_boundaries[bc_ind] +
304 "', you are using a Dirichlet boundary condition on temperature, and a "
305 "flux boundary condition on momentum. This is known to create an "
306 "undesirable inlet source term.");
307 }
308 else if (_energy_inlet_types[bc_ind] == "heatflux")
309 {
310 const std::string bc_type = "FVFunctionNeumannBC";
311 InputParameters params = getFactory().getValidParams(bc_type);
312 params.set<NonlinearVariableName>("variable") = solver_variable_name;
313 params.set<FunctionName>("function") = _energy_inlet_functors[bc_ind];
314 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
315
316 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
317 }
318 else if (_energy_inlet_types[bc_ind] == "flux-mass" ||
319 _energy_inlet_types[bc_ind] == "flux-velocity")
320 {
321 const std::string bc_type = "WCNSFVEnergyFluxBC";
322 InputParameters params = getFactory().getValidParams(bc_type);
323 params.set<NonlinearVariableName>("variable") = solver_variable_name;
324 const auto & flux_inlet_directions = _flow_equations_physics->getFluxInletDirections();
325 const auto & flux_inlet_pps = _flow_equations_physics->getFluxInletPPs();
326
327 if (flux_inlet_pps.size() < flux_bc_counter)
329 "flux_inlet_pps",
330 "Should be specified for all 'flux-mass/velocity' boundary conditions");
331
332 if (flux_inlet_directions.size())
333 {
334 if (flux_inlet_directions.size() < flux_bc_counter)
335 _flow_equations_physics->paramError("flux_inlet_pps",
336 "Should be specified for all or none of the "
337 "'flux-mass/velocity' boundary conditions");
338 params.set<Point>("direction") = flux_inlet_directions[flux_bc_counter];
339 }
340 if (_energy_inlet_types[bc_ind] == "flux-mass")
341 {
342 params.set<PostprocessorName>("mdot_pp") = flux_inlet_pps[flux_bc_counter];
343 params.set<PostprocessorName>("area_pp") = "area_pp_" + inlet_boundaries[bc_ind];
344 }
345 else
346 params.set<PostprocessorName>("velocity_pp") = flux_inlet_pps[flux_bc_counter];
347
348 params.set<PostprocessorName>("temperature_pp") = _energy_inlet_functors[bc_ind];
349 params.set<MooseFunctorName>(NS::density) = _density_name;
350 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
351 params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
352
354 {
355 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
356 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
357 }
358
360 params.set<MooseFunctorName>(NS::specific_enthalpy) = _fluid_enthalpy_name;
361
362 for (const auto d : make_range(dimension()))
363 params.set<MooseFunctorName>(NS::velocity_vector[d]) = _velocity_names[d];
364
365 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
366
367 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
368 flux_bc_counter += 1;
369 }
370 }
371}
372
373void
375{
376 const auto & wall_boundaries = isParamSetByUser("energy_wall_boundaries")
377 ? getParam<std::vector<BoundaryName>>("energy_wall_boundaries")
379 if (wall_boundaries.size() != _energy_wall_types.size())
380 paramError("energy_wall_types",
381 "Energy wall types (size " + std::to_string(_energy_wall_types.size()) +
382 ") should be the same size as wall_boundaries (size " +
383 std::to_string(wall_boundaries.size()) + ")");
384 if (wall_boundaries.size() != _energy_wall_functors.size())
385 paramError("energy_wall_functors",
386 "Energy wall functors (size " + std::to_string(_energy_wall_functors.size()) +
387 ") should be the same size as wall_boundaries (size " +
388 std::to_string(wall_boundaries.size()) + ")");
389
390 const auto & solver_variable_name =
392
393 for (unsigned int bc_ind = 0; bc_ind < _energy_wall_types.size(); ++bc_ind)
394 {
395 if (_energy_wall_types[bc_ind] == "fixed-temperature")
396 {
397 const std::string bc_type = _solve_for_enthalpy
398 ? "FVSpecificEnthalpyFromPressureTemperatureDirichletBC"
399 : "FVADFunctorDirichletBC";
400 InputParameters params = getFactory().getValidParams(bc_type);
401 params.set<NonlinearVariableName>("variable") = solver_variable_name;
403 params.set<MooseFunctorName>("functor") = _energy_wall_functors[bc_ind];
404 else
405 {
406 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
407 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
408 params.set<MooseFunctorName>(NS::T_fluid) = _energy_wall_functors[bc_ind];
409 }
410 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
411
412 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
413 }
414 else if (_energy_wall_types[bc_ind] == "heatflux")
415 {
416 const std::string bc_type = "FVFunctorNeumannBC";
417 InputParameters params = getFactory().getValidParams(bc_type);
418 params.set<NonlinearVariableName>("variable") = solver_variable_name;
419 params.set<MooseFunctorName>("functor") = _energy_wall_functors[bc_ind];
420 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
421
422 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
423 }
424 else if (_energy_wall_types[bc_ind] == "convection")
425 {
426 const std::string bc_type = "FVFunctorConvectiveHeatFluxBC";
427 InputParameters params = getFactory().getValidParams(bc_type);
428 params.set<NonlinearVariableName>("variable") = solver_variable_name;
429 params.set<MooseFunctorName>("T_bulk") = _fluid_temperature_name;
430 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
431 params.set<bool>("is_solid") = false;
432 const auto Tinf_htc_functors =
433 MooseUtils::split(_energy_wall_functors[bc_ind], /*delimiter=*/":", /*max_count=*/1);
434 if (Tinf_htc_functors.size() != 2)
435 paramError("energy_wall_functors",
436 "'convective' wall types require two functors specified as "
437 "<Tinf_functor>:<htc_functor>.");
438 params.set<MooseFunctorName>("T_solid") = Tinf_htc_functors[0];
439 params.set<MooseFunctorName>("heat_transfer_coefficient") = Tinf_htc_functors[1];
440
441 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
442 }
443 // We add this boundary condition here to facilitate the input of wall boundaries / functors for
444 // energy. If there are too many turbulence options and this gets out of hand we will have to
445 // move this to the turbulence Physics
446 else if (_energy_wall_types[bc_ind] == "wallfunction")
447 {
449 paramError("coupled_turbulence_physics",
450 "A coupled turbulence Physics was not found for defining the wall function "
451 "boundary condition on boundary: " +
452 wall_boundaries[bc_ind]);
453 const std::string bc_type = "INSFVTurbulentTemperatureWallFunction";
454 InputParameters params = getFactory().getValidParams(bc_type);
455 params.set<NonlinearVariableName>("variable") = solver_variable_name;
456 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
457 params.set<MooseEnum>("wall_treatment") =
459 params.set<MooseFunctorName>("T_w") = _energy_wall_functors[bc_ind];
460 params.set<MooseFunctorName>(NS::density) = _density_name;
461 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
462 params.set<MooseFunctorName>(NS::TKE) = _turbulence_physics->tkeName();
463 if (_thermal_conductivity_name.size() != 1)
464 mooseError("Several anisotropic thermal conductivity (kappa) regions have been specified. "
465 "Selecting the right kappa coefficient for the turbulence boundaries is not "
466 "currently implemented.\nBoundaries:\n" +
468 "\nKappa(s) specified:\n" + Moose::stringify(_thermal_conductivity_name));
469 params.set<MooseFunctorName>(NS::kappa) = _thermal_conductivity_name[0];
470 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
471 const std::string u_names[3] = {"u", "v", "w"};
472 for (const auto d : make_range(dimension()))
473 params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
474 // Currently only Newton method for WCNSFVFluidHeatTransferPhysics
475 params.set<bool>("newton_solve") = true;
476 getProblem().addFVBC(bc_type, prefix() + "wallfunction_" + wall_boundaries[bc_ind], params);
477 }
478 else
480 "energy_wall_types", _energy_wall_types[bc_ind], " wall type is currently unsupported.");
481 }
482}
483
484void
486{
488 return;
489
490 // Note that this material choice does not make sense for Newton-INSFV + solve_for_enthalpy since
491 // this material explicitly computes enthalpy from temperature
492 const auto object_type = "INSFVEnthalpyFunctorMaterial";
493
494 InputParameters params = getFactory().getValidParams(object_type);
495 assignBlocks(params, _blocks);
496
497 params.set<MooseFunctorName>(NS::density) = _density_name;
498 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
499
500 // In all cases, the functor material defines rho_h and dh/dt
501 // 1st case, we solve for h, the functor material also defines T_fluid
503 {
504 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
505 params.set<MooseFunctorName>(NS::specific_enthalpy + "_in") = _fluid_enthalpy_name;
506 params.set<bool>("assumed_constant_cp") = false;
508 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
509 else
510 paramError(NS::fluid, "Required when solving for enthalpy");
511 }
512 // the functor material computes enthalpy from the temperature
513 else
514 {
515 params.set<MooseFunctorName>("temperature") = _fluid_temperature_name;
516 params.set<MooseFunctorName>(NS::specific_enthalpy) = _fluid_enthalpy_name;
517
518 // using the fluid properties instead of assuming a constant cp
520 {
521 params.set<bool>("assumed_constant_cp") = false;
522 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
523 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
524 }
525 }
526 // We'll default to outputting the temperature because it's a common need
528 {
529 params.set<std::vector<std::string>>("output_properties") = {_fluid_temperature_name};
530 params.set<std::vector<OutputName>>("outputs") = {"all"};
531 }
532
533 getProblem().addMaterial(object_type, prefix() + "enthalpy_material", params);
534
537 /*use ad*/ true);
538}
539
540void
542{
544 {
545 const auto & solver_variable_name =
547
548 const std::string bc_type = "INSFVScalarFieldSeparatorBC";
549 InputParameters params = getFactory().getValidParams(bc_type);
550 params.set<NonlinearVariableName>("variable") = solver_variable_name;
551 params.set<std::vector<BoundaryName>>("boundary") =
553 getProblem().addFVBC(bc_type, prefix() + solver_variable_name + "_separators", params);
554 }
555}
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
registerWCNSFVFluidHeatTransferPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters &parameters)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
void checkSecondParamNotSetIfFirstOneSet(const std::string &param1, const std::string &param2) const
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void transferParam(const InputParameters &source_param, const std::string &name, const std::string &new_name="", const std::string &new_description="")
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void paramError(const std::string &param, Args... args) const
bool isParamSetByUser(const std::string &name) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
unsigned int size() const
static InputParameters validParams()
Definition NSFVBase.C:378
bool _define_variables
Whether to define variables if they do not exist.
virtual FEProblemBase & getProblem()
Factory & getFactory()
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
unsigned int dimension() const
void reportPotentiallyMissedParameters(const std::vector< std::string > &param_names, const std::string &object_type, const std::string &object_name="") const
std::string prefix() const
void addSharedSolverVariable(const std::string &var_type, const VariableName &var_name, InputParameters params)
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
std::vector< SubdomainName > _blocks
bool hasFunctor(const std::string &name, const THREAD_ID tid) const
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const WCNSFVTurbulencePhysicsBase * _turbulence_physics
Turbulence.
const MooseFunctorName _dynamic_viscosity_name
Name of the dynamic viscosity material property.
const std::vector< std::string > _velocity_names
Velocity names.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible.
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities.
const MooseFunctorName _density_name
Name of the density material property.
const NonlinearVariableName & getPressureName() const
const std::vector< BoundaryName > & getWallBoundaries() const
Get the wall boundaries.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
const std::vector< BoundaryName > & getHydraulicSeparators() const
Get the hydraulic separator boundaries.
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
const std::vector< PostprocessorName > & getFluxInletPPs() const
Get the inlet flux postprocessor if using a flux inlet.
const std::vector< Point > & getFluxInletDirections() const
Get the inlet direction if using a flux inlet.
NS::MomentumInletTypes inletBoundaryType(const BoundaryName &boundary_name) const
Get the type of the inlet BC.
Creates all the objects needed to solve the Navier Stokes energy equation.
std::vector< MooseFunctorName > _energy_inlet_functors
Functors describing the inlet boundary values. See energy_inlet_types for what the functors actually ...
std::vector< MooseFunctorName > _energy_wall_functors
Functors describing the wall boundary values. See energy_wall_types for what the functors actually re...
MooseFunctorName _specific_heat_name
Name of the specific heat material property.
std::vector< MooseFunctorName > _ambient_convection_alpha
Name of the ambient convection heat transfer coefficients for each block-group.
const VariableName _fluid_enthalpy_name
Name of the fluid specific enthalpy.
bool processThermalConductivity()
Process thermal conductivity (multiple functor input options are available).
std::vector< std::vector< SubdomainName > > _ambient_convection_blocks
Vector of subdomain groups where we want to have different ambient convection.
VariableName _fluid_temperature_name
Fluid temperature name.
void defineEffectiveThermalDiffusionCoeffFunctors(const bool use_ad)
Define the effective diffusion coefficient when:
const bool _has_energy_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax.
const bool _solve_for_enthalpy
User-selected option to solve for enthalpy.
std::vector< MooseFunctorName > _thermal_conductivity_name
Name of the thermal conductivity functor for each block-group.
std::vector< std::vector< SubdomainName > > _thermal_conductivity_blocks
Vector of subdomain groups where we want to have different thermal conduction.
MultiMooseEnum _energy_wall_types
Energy wall boundary types.
MultiMooseEnum _energy_inlet_types
Energy inlet boundary types.
std::vector< MooseFunctorName > _ambient_temperature
Name of the solid domain temperature for each block-group.
Creates all the objects needed to solve the Navier Stokes energy equation.
WCNSFVFluidHeatTransferPhysics(const InputParameters &parameters)
void addEnergyTimeKernels() override
Functions adding kernels for the incompressible / weakly compressible energy equation If the material...
void addEnergyInletBC() override
Functions adding boundary conditions for the incompressible simulation.
std::vector< BoundaryName > turbulenceWalls() const
The names of the boundaries with turbulence wall functions.
MooseEnum turbulenceTemperatureWallTreatment() const
The turbulence temperature wall treatment (same for all turbulence walls currently)
MooseFunctorName tkeName() const
The name of the turbulent kinetic energy variable.
std::vector< std::string > split(const std::string &str, const std::string &delimiter, std::size_t max_count)
std::string stringify(const T &t)
static const std::string density
Definition NS.h:34
static const std::string T_fluid
Definition NS.h:110
static const std::string cp
Definition NS.h:125
static const std::string mu
Definition NS.h:127
const std::string velocity_vector[3]
Definition NS.h:50
static const std::string TKE
Definition NS.h:181
static const std::string k
Definition NS.h:134
static const std::string T_solid
Definition NS.h:111
static const std::string specific_enthalpy
Definition NS.h:69
static const std::string kappa
Definition NS.h:120
static const std::string porosity
Definition NS.h:108
std::string time_deriv(const std::string &var)
Definition NS.h:98
static const std::string fluid
Definition NS.h:88
static const std::string pressure
Definition NS.h:57