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_face_interpolation 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 assignBlocks(params, _blocks);
62 params.set<std::vector<Real>>("scaling") = {getParam<Real>("energy_scaling")};
63 params.set<MooseEnum>("face_interp_method") = getParam<MooseEnum>("energy_face_interpolation");
64 params.set<bool>("two_term_boundary_expansion") =
65 getParam<bool>("energy_two_term_bc_expansion");
66 params.set<SolverSystemName>("solver_sys") = getSolverSystem(solver_variable_name);
67 getProblem().addVariable("INSFVEnergyVariable", solver_variable_name, params);
68 }
69 else
70 // we don't let the user select the enthalpy variable name at this time
71 paramError(_solve_for_enthalpy ? "solve_for_enthalpy" : "fluid_temperature_variable",
72 "Variable (" + solver_variable_name +
73 ") supplied to the WCNSFVFluidHeatTransferPhysics does not exist!");
74}
75
76void
78{
79 std::string kernel_type =
80 ((_compressibility == "weakly-compressible") ? "WCNSFVEnergyTimeDerivative"
81 : "INSFVEnergyTimeDerivative");
82 std::string kernel_name =
83 prefix() + ((_compressibility == "weakly-compressible") ? "wcns" : "ins") + "_energy_time";
85 {
86 kernel_type = "PINSFVEnergyTimeDerivative";
87 kernel_name = prefix() + ((_compressibility == "weakly-compressible") ? "pwcns" : "pins") +
88 "_energy_time";
89 }
90
91 const auto & solver_variable_name =
93
94 InputParameters params = getFactory().getValidParams(kernel_type);
95 assignBlocks(params, _blocks);
96 params.set<NonlinearVariableName>("variable") = solver_variable_name;
97 params.set<MooseFunctorName>(NS::density) = _density_name;
98 params.set<MooseFunctorName>(NS::time_deriv(NS::specific_enthalpy)) =
100 if (_compressibility == "weakly-compressible")
101 {
102 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
103 params.set<MooseFunctorName>(NS::specific_enthalpy) = NS::specific_enthalpy;
104 }
106 {
107 params.set<MooseFunctorName>(NS::porosity) =
110 /*thread_id=*/0))
111 {
112 params.set<MooseFunctorName>(NS::time_deriv(NS::density)) = NS::time_deriv(_density_name);
113 params.set<MooseFunctorName>(NS::specific_enthalpy) = NS::specific_enthalpy;
114 }
115
116 params.set<bool>("is_solid") = false;
117 }
118
119 getProblem().addFVKernel(kernel_type, kernel_name, params);
120}
121
122void
124{
125 std::string kernel_type = "INSFVEnergyAdvection";
126 std::string kernel_name = prefix() + "ins_energy_advection";
128 {
129 kernel_type = "PINSFVEnergyAdvection";
130 kernel_name = prefix() + "pins_energy_advection";
131 }
132
133 const auto & solver_variable_name =
135
136 InputParameters params = getFactory().getValidParams(kernel_type);
137 params.set<NonlinearVariableName>("variable") = solver_variable_name;
138 assignBlocks(params, _blocks);
139 params.set<MooseEnum>("velocity_interp_method") = _velocity_interpolation;
140 params.set<UserObjectName>("rhie_chow_user_object") = _flow_equations_physics->rhieChowUOName();
141 params.set<MooseEnum>("advected_interp_method") =
142 getParam<MooseEnum>("energy_advection_interpolation");
143
144 getProblem().addFVKernel(kernel_type, kernel_name, params);
145}
146
147void
149{
150 const auto vector_conductivity = processThermalConductivity();
151 const auto num_blocks = _thermal_conductivity_blocks.size();
152 const auto num_used_blocks = num_blocks ? num_blocks : 1;
153 const auto & solver_variable_name =
155
156 for (const auto block_i : make_range(num_used_blocks))
157 {
158 std::string block_name = "";
159 if (num_blocks)
160 block_name = Moose::stringify(_thermal_conductivity_blocks[block_i]);
161 else
162 block_name = "all";
163
165 {
166 const auto kernel_type =
167 vector_conductivity ? "PINSFVEnergyAnisotropicDiffusion" : "PINSFVEnergyDiffusion";
168
169 InputParameters params = getFactory().getValidParams(kernel_type);
170 params.set<NonlinearVariableName>("variable") = solver_variable_name;
171 const auto block_names = num_blocks ? _thermal_conductivity_blocks[block_i] : _blocks;
172 assignBlocks(params, block_names);
173 const auto conductivity_name = vector_conductivity ? NS::kappa : NS::k;
174 params.set<MooseFunctorName>(NS::porosity) =
176 params.set<bool>("effective_conductivity") = getParam<bool>("effective_conductivity");
178 params.set<MooseFunctorName>(conductivity_name) = _thermal_conductivity_name[block_i];
179 else
180 params.set<MooseFunctorName>(conductivity_name) =
181 _thermal_conductivity_name[block_i] + "_by_cp";
182
184 kernel_type, prefix() + "pins_energy_diffusion_" + block_name, params);
185 }
186 else
187 {
188 const std::string kernel_type = "FVDiffusion";
189 InputParameters params = getFactory().getValidParams(kernel_type);
190 params.set<NonlinearVariableName>("variable") = solver_variable_name;
191 std::vector<SubdomainName> block_names =
192 num_blocks ? _thermal_conductivity_blocks[block_i] : _blocks;
193 assignBlocks(params, block_names);
195 params.set<MooseFunctorName>("coeff") = _thermal_conductivity_name[block_i];
196 else
197 params.set<MooseFunctorName>("coeff") = _thermal_conductivity_name[block_i] + "_by_cp";
198
200 kernel_type, prefix() + "ins_energy_diffusion_" + block_name, params);
201 }
202 }
203}
204
205void
207{
208 unsigned int num_convection_blocks = _ambient_convection_blocks.size();
209 unsigned int num_used_blocks = num_convection_blocks ? num_convection_blocks : 1;
210 const auto & solver_variable_name =
212
213 const std::string kernel_type = "PINSFVEnergyAmbientConvection";
214 InputParameters params = getFactory().getValidParams(kernel_type);
215 params.set<NonlinearVariableName>("variable") = solver_variable_name;
216 params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
217 params.set<bool>("is_solid") = false;
218
219 for (unsigned int block_i = 0; block_i < num_used_blocks; ++block_i)
220 {
221 std::string block_name = "";
222 if (num_convection_blocks)
223 {
224 params.set<std::vector<SubdomainName>>("block") = _ambient_convection_blocks[block_i];
225 block_name = Moose::stringify(_ambient_convection_blocks[block_i]);
226 }
227 else
228 {
229 assignBlocks(params, _blocks);
230 block_name = std::to_string(block_i);
231 }
232
233 params.set<MooseFunctorName>("h_solid_fluid") = _ambient_convection_alpha[block_i];
234 params.set<MooseFunctorName>(NS::T_solid) = _ambient_temperature[block_i];
235
236 getProblem().addFVKernel(kernel_type, prefix() + "ambient_convection_" + block_name, params);
237 }
238}
239
240void
242{
243 const auto & solver_variable_name =
245 const std::string kernel_type = "FVCoupledForce";
246 InputParameters params = getFactory().getValidParams(kernel_type);
247 params.set<NonlinearVariableName>("variable") = solver_variable_name;
248 assignBlocks(params, _blocks);
249 params.set<MooseFunctorName>("v") = getParam<MooseFunctorName>("external_heat_source");
250 params.set<Real>("coef") = getParam<Real>("external_heat_source_coeff");
251
252 getProblem().addFVKernel(kernel_type, prefix() + "external_heat_source", params);
253}
254
255void
257{
258 const auto & inlet_boundaries = _flow_equations_physics->getInletBoundaries();
259 // These are parameter errors for now. If Components add boundaries to Physics, the error
260 // may not be due to parameters anymore.
261 if (inlet_boundaries.size() != _energy_inlet_types.size())
262 paramError("energy_inlet_types",
263 "Energy inlet types (size " + std::to_string(_energy_inlet_types.size()) +
264 ") should be the same size as inlet_boundaries (size " +
265 std::to_string(inlet_boundaries.size()) + ")");
266 if (inlet_boundaries.size() != _energy_inlet_functors.size())
267 paramError("energy_inlet_functors",
268 "Energy inlet functors (size " + std::to_string(_energy_inlet_functors.size()) +
269 ") should be the same size as inlet_boundaries (size " +
270 std::to_string(inlet_boundaries.size()) + ")");
271
272 const auto & solver_variable_name =
274
275 unsigned int flux_bc_counter = 0;
276 for (const auto bc_ind : index_range(_energy_inlet_types))
277 {
278 if (_energy_inlet_types[bc_ind] == "fixed-temperature")
279 {
280 const std::string bc_type = _solve_for_enthalpy
281 ? "FVSpecificEnthalpyFromPressureTemperatureDirichletBC"
282 : "FVADFunctorDirichletBC";
283 InputParameters params = getFactory().getValidParams(bc_type);
284 params.set<NonlinearVariableName>("variable") = solver_variable_name;
286 params.set<MooseFunctorName>("functor") = _energy_inlet_functors[bc_ind];
287 else
288 {
289 mooseAssert(_flow_equations_physics, "Should be coupled");
290 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
291 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
292 params.set<MooseFunctorName>(NS::T_fluid) = _energy_inlet_functors[bc_ind];
293 }
294 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
295
296 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
297
298 // Check the BCs for momentum
299 const auto momentum_inlet_type =
300 _flow_equations_physics->inletBoundaryType(inlet_boundaries[bc_ind]);
301 if (getParam<bool>("check_bc_compatibility") &&
302 (momentum_inlet_type == NS::MomentumInletTypes::FLUX_VELOCITY ||
303 momentum_inlet_type == NS::MomentumInletTypes::FLUX_MASS))
304 paramError("energy_inlet_types",
305 "At inlet '" + inlet_boundaries[bc_ind] +
306 "', you are using a Dirichlet boundary condition on temperature, and a "
307 "flux boundary condition on momentum. This is known to create an "
308 "undesirable inlet source term.");
309 }
310 else if (_energy_inlet_types[bc_ind] == "heatflux")
311 {
312 const std::string bc_type = "FVFunctionNeumannBC";
313 InputParameters params = getFactory().getValidParams(bc_type);
314 params.set<NonlinearVariableName>("variable") = solver_variable_name;
315 params.set<FunctionName>("function") = _energy_inlet_functors[bc_ind];
316 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
317
318 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
319 }
320 else if (_energy_inlet_types[bc_ind] == "flux-mass" ||
321 _energy_inlet_types[bc_ind] == "flux-velocity")
322 {
323 const std::string bc_type = "WCNSFVEnergyFluxBC";
324 InputParameters params = getFactory().getValidParams(bc_type);
325 params.set<NonlinearVariableName>("variable") = solver_variable_name;
326 const auto & flux_inlet_directions = _flow_equations_physics->getFluxInletDirections();
327 const auto & flux_inlet_pps = _flow_equations_physics->getFluxInletPPs();
328
329 if (flux_inlet_pps.size() < flux_bc_counter)
331 "flux_inlet_pps",
332 "Should be specified for all 'flux-mass/velocity' boundary conditions");
333
334 if (flux_inlet_directions.size())
335 {
336 if (flux_inlet_directions.size() < flux_bc_counter)
337 _flow_equations_physics->paramError("flux_inlet_pps",
338 "Should be specified for all or none of the "
339 "'flux-mass/velocity' boundary conditions");
340 params.set<Point>("direction") = flux_inlet_directions[flux_bc_counter];
341 }
342 if (_energy_inlet_types[bc_ind] == "flux-mass")
343 {
344 params.set<PostprocessorName>("mdot_pp") = flux_inlet_pps[flux_bc_counter];
345 params.set<PostprocessorName>("area_pp") = "area_pp_" + inlet_boundaries[bc_ind];
346 }
347 else
348 params.set<PostprocessorName>("velocity_pp") = flux_inlet_pps[flux_bc_counter];
349
350 params.set<PostprocessorName>("temperature_pp") = _energy_inlet_functors[bc_ind];
351 params.set<MooseFunctorName>(NS::density) = _density_name;
352 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
353 params.set<MooseFunctorName>(NS::T_fluid) = _fluid_temperature_name;
354
356 {
357 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
358 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
359 }
360
362 params.set<MooseFunctorName>(NS::specific_enthalpy) = _fluid_enthalpy_name;
363
364 for (const auto d : make_range(dimension()))
365 params.set<MooseFunctorName>(NS::velocity_vector[d]) = _velocity_names[d];
366
367 params.set<std::vector<BoundaryName>>("boundary") = {inlet_boundaries[bc_ind]};
368
369 getProblem().addFVBC(bc_type, solver_variable_name + "_" + inlet_boundaries[bc_ind], params);
370 flux_bc_counter += 1;
371 }
372 }
373}
374
375void
377{
378 const auto & wall_boundaries = isParamSetByUser("energy_wall_boundaries")
379 ? getParam<std::vector<BoundaryName>>("energy_wall_boundaries")
381 if (wall_boundaries.size() != _energy_wall_types.size())
382 paramError("energy_wall_types",
383 "Energy wall types (size " + std::to_string(_energy_wall_types.size()) +
384 ") should be the same size as wall_boundaries (size " +
385 std::to_string(wall_boundaries.size()) + ")");
386 if (wall_boundaries.size() != _energy_wall_functors.size())
387 paramError("energy_wall_functors",
388 "Energy wall functors (size " + std::to_string(_energy_wall_functors.size()) +
389 ") should be the same size as wall_boundaries (size " +
390 std::to_string(wall_boundaries.size()) + ")");
391
392 const auto & solver_variable_name =
394
395 for (unsigned int bc_ind = 0; bc_ind < _energy_wall_types.size(); ++bc_ind)
396 {
397 if (_energy_wall_types[bc_ind] == "fixed-temperature")
398 {
399 const std::string bc_type = _solve_for_enthalpy
400 ? "FVSpecificEnthalpyFromPressureTemperatureDirichletBC"
401 : "FVADFunctorDirichletBC";
402 InputParameters params = getFactory().getValidParams(bc_type);
403 params.set<NonlinearVariableName>("variable") = solver_variable_name;
405 params.set<MooseFunctorName>("functor") = _energy_wall_functors[bc_ind];
406 else
407 {
408 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
409 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
410 params.set<MooseFunctorName>(NS::T_fluid) = _energy_wall_functors[bc_ind];
411 }
412 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
413
414 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
415 }
416 else if (_energy_wall_types[bc_ind] == "heatflux")
417 {
418 const std::string bc_type = "FVFunctorNeumannBC";
419 InputParameters params = getFactory().getValidParams(bc_type);
420 params.set<NonlinearVariableName>("variable") = solver_variable_name;
421 params.set<MooseFunctorName>("functor") = _energy_wall_functors[bc_ind];
422 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
423
424 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
425 }
426 else if (_energy_wall_types[bc_ind] == "convection")
427 {
428 const std::string bc_type = "FVFunctorConvectiveHeatFluxBC";
429 InputParameters params = getFactory().getValidParams(bc_type);
430 params.set<NonlinearVariableName>("variable") = solver_variable_name;
431 params.set<MooseFunctorName>("T_bulk") = _fluid_temperature_name;
432 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
433 params.set<bool>("is_solid") = false;
434 const auto Tinf_htc_functors =
435 MooseUtils::split(_energy_wall_functors[bc_ind], /*delimiter=*/":", /*max_count=*/1);
436 if (Tinf_htc_functors.size() != 2)
437 paramError("energy_wall_functors",
438 "'convective' wall types require two functors specified as "
439 "<Tinf_functor>:<htc_functor>.");
440 params.set<MooseFunctorName>("T_solid") = Tinf_htc_functors[0];
441 params.set<MooseFunctorName>("heat_transfer_coefficient") = Tinf_htc_functors[1];
442
443 getProblem().addFVBC(bc_type, solver_variable_name + "_" + wall_boundaries[bc_ind], params);
444 }
445 // We add this boundary condition here to facilitate the input of wall boundaries / functors for
446 // energy. If there are too many turbulence options and this gets out of hand we will have to
447 // move this to the turbulence Physics
448 else if (_energy_wall_types[bc_ind] == "wallfunction")
449 {
451 paramError("coupled_turbulence_physics",
452 "A coupled turbulence Physics was not found for defining the wall function "
453 "boundary condition on boundary: " +
454 wall_boundaries[bc_ind]);
455 const std::string bc_type = "INSFVTurbulentTemperatureWallFunction";
456 InputParameters params = getFactory().getValidParams(bc_type);
457 params.set<NonlinearVariableName>("variable") = solver_variable_name;
458 params.set<std::vector<BoundaryName>>("boundary") = {wall_boundaries[bc_ind]};
459 params.set<MooseEnum>("wall_treatment") =
461 params.set<MooseFunctorName>("T_w") = _energy_wall_functors[bc_ind];
462 params.set<MooseFunctorName>(NS::density) = _density_name;
463 params.set<MooseFunctorName>(NS::mu) = _dynamic_viscosity_name;
464 params.set<MooseFunctorName>(NS::TKE) = _turbulence_physics->tkeName();
465 if (_thermal_conductivity_name.size() != 1)
466 mooseError("Several anisotropic thermal conductivity (kappa) regions have been specified. "
467 "Selecting the right kappa coefficient for the turbulence boundaries is not "
468 "currently implemented.\nBoundaries:\n" +
470 "\nKappa(s) specified:\n" + Moose::stringify(_thermal_conductivity_name));
471 params.set<MooseFunctorName>(NS::kappa) = _thermal_conductivity_name[0];
472 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
473 const std::string u_names[3] = {"u", "v", "w"};
474 for (const auto d : make_range(dimension()))
475 params.set<MooseFunctorName>(u_names[d]) = _velocity_names[d];
476 // Currently only Newton method for WCNSFVFluidHeatTransferPhysics
477 params.set<bool>("newton_solve") = true;
478 getProblem().addFVBC(bc_type, prefix() + "wallfunction_" + wall_boundaries[bc_ind], params);
479 }
480 else
482 "energy_wall_types", _energy_wall_types[bc_ind], " wall type is currently unsupported.");
483 }
484}
485
486void
488{
490 return;
491
492 // Note that this material choice does not make sense for Newton-INSFV + solve_for_enthalpy since
493 // this material explicitly computes enthalpy from temperature
494 const auto object_type = "INSFVEnthalpyFunctorMaterial";
495
496 InputParameters params = getFactory().getValidParams(object_type);
497 assignBlocks(params, _blocks);
498
499 params.set<MooseFunctorName>(NS::density) = _density_name;
500 params.set<MooseFunctorName>(NS::cp) = _specific_heat_name;
501
502 // In all cases, the functor material defines rho_h and dh/dt
503 // 1st case, we solve for h, the functor material also defines T_fluid
505 {
506 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
507 params.set<MooseFunctorName>(NS::specific_enthalpy + "_in") = _fluid_enthalpy_name;
508 params.set<bool>("assumed_constant_cp") = false;
510 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
511 else
512 paramError(NS::fluid, "Required when solving for enthalpy");
513 }
514 // the functor material computes enthalpy from the temperature
515 else
516 {
517 params.set<MooseFunctorName>("temperature") = _fluid_temperature_name;
518 params.set<MooseFunctorName>(NS::specific_enthalpy) = _fluid_enthalpy_name;
519
520 // using the fluid properties instead of assuming a constant cp
522 {
523 params.set<bool>("assumed_constant_cp") = false;
524 params.set<UserObjectName>(NS::fluid) = getParam<UserObjectName>(NS::fluid);
525 params.set<MooseFunctorName>(NS::pressure) = _flow_equations_physics->getPressureName();
526 }
527 }
528 // We'll default to outputting the temperature because it's a common need
530 {
531 params.set<std::vector<std::string>>("output_properties") = {_fluid_temperature_name};
532 params.set<std::vector<OutputName>>("outputs") = {"all"};
533 }
534
535 getProblem().addMaterial(object_type, prefix() + "enthalpy_material", params);
536
539 /*use ad*/ true);
540}
541
542void
544{
546 {
547 const auto & solver_variable_name =
549
550 const std::string bc_type = "INSFVScalarFieldSeparatorBC";
551 InputParameters params = getFactory().getValidParams(bc_type);
552 params.set<NonlinearVariableName>("variable") = solver_variable_name;
553 params.set<std::vector<BoundaryName>>("boundary") =
555 getProblem().addFVBC(bc_type, prefix() + solver_variable_name + "_separators", params);
556 }
557}
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
registerWCNSFVFluidHeatTransferPhysicsBaseTasks("NavierStokesApp", WCNSFVFluidHeatTransferPhysics)
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &params)
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:371
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
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
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:180
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