https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSAction.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
10// Navier-Stokes includes
11#include "INSAction.h"
12
13#include "NS.h"
14#include "AddVariableAction.h"
15#include "MooseObject.h"
16#include "INSADObjectTracker.h"
17#include "NonlinearSystemBase.h"
18
19// MOOSE includes
20#include "FEProblem.h"
21
22#include "libmesh/fe.h"
23#include "libmesh/vector_value.h"
24#include "libmesh/string_to_enum.h"
25
26registerMooseAction("NavierStokesApp", INSAction, "append_mesh_generator");
27registerMooseAction("NavierStokesApp", INSAction, "add_navier_stokes_variables");
28registerMooseAction("NavierStokesApp", INSAction, "add_navier_stokes_ics");
29registerMooseAction("NavierStokesApp", INSAction, "add_navier_stokes_kernels");
30registerMooseAction("NavierStokesApp", INSAction, "add_navier_stokes_bcs");
31registerMooseAction("NavierStokesApp", INSAction, "add_material");
32
35{
37 params.addClassDescription("This class allows us to have a section of the input file for "
38 "setting up incompressible Navier-Stokes equations.");
39
40 MooseEnum type("steady-state transient", "steady-state");
41 params.addParam<MooseEnum>("equation_type", type, "Navier-Stokes equation type");
42
43 params.addParam<std::vector<SubdomainName>>(
44 "block", {}, "The list of block ids (SubdomainID) on which NS equation is defined on");
45
46 // temperature equation parameters
47 params.addParam<bool>("boussinesq_approximation", false, "True to have Boussinesq approximation");
48 params.addParam<MaterialPropertyName>(
49 "reference_temperature_name", "temp_ref", "Material property name for reference temperature");
50 params.addParam<MaterialPropertyName>(
51 "thermal_expansion_name", "alpha", "The name of the thermal expansion");
52
53 params.addParam<bool>("add_temperature_equation", false, "True to add temperature equation");
54 params.addParam<VariableName>(
55 "temperature_variable", NS::temperature, "Temperature variable name");
56 params.addParam<Real>("temperature_scaling", 1, "Scaling for the temperature variable");
57 params.addParam<Real>(
58 "initial_temperature", 0, "The initial temperature, assumed constant everywhere");
59 params.addParam<MaterialPropertyName>(
60 "thermal_conductivity_name", "k", "The name of the thermal conductivity");
61 params.addParam<MaterialPropertyName>(
62 "specific_heat_name", "cp", "The name of the specific heat");
63 params.addParam<std::vector<BoundaryName>>("natural_temperature_boundary",
64 std::vector<BoundaryName>(),
65 "Natural boundaries for temperature equation");
66 params.addParam<std::vector<BoundaryName>>("fixed_temperature_boundary",
67 std::vector<BoundaryName>(),
68 "Dirichlet boundaries for temperature equation");
69 params.addParam<std::vector<FunctionName>>(
70 "temperature_function", std::vector<FunctionName>(), "Temperature on Dirichlet boundaries");
72 params.addParam<bool>(
73 "has_heat_source", false, "Whether there is a heat source function object in the simulation");
74 params.addParam<FunctionName>("heat_source_function", "The function describing the heat source");
75 params.addCoupledVar("heat_source_var", "The coupled variable describing the heat source");
76
77 params.addParam<RealVectorValue>(
78 "gravity", RealVectorValue(0, 0, 0), "Direction of the gravity vector");
79
80 params.addParam<MaterialPropertyName>(
81 "dynamic_viscosity_name", "mu", "The name of the dynamic viscosity");
82 params.addParam<MaterialPropertyName>("density_name", "rho", "The name of the density");
83
84 params.addParam<bool>("use_ad", false, "True to use AD");
85 params.addParam<bool>(
86 "laplace", true, "Whether the viscous term of the momentum equations is in laplace form");
87 params.addParam<bool>(
88 "integrate_p_by_parts", true, "Whether to integrate the pressure term by parts");
89 params.addParam<bool>(
90 "convective_term", true, "Whether to include the convective term in Jacobian");
91 params.addParam<bool>(
92 "supg", false, "Whether to perform SUPG stabilization of the momentum residuals");
93 params.addParam<bool>(
94 "pspg", false, "Whether to perform PSPG stabilization of the mass equation");
95 params.addParam<Real>("alpha", 1, "Multiplicative factor on the stabilization parameter tau");
96 params.addParam<bool>("add_standard_velocity_variables_for_ad",
97 true,
98 "True to convert vector velocity variables into standard aux variables");
99 params.addParam<bool>(
100 "has_coupled_force",
101 false,
102 "Whether the simulation has a force due to a coupled vector variable/vector function");
103 params.addCoupledVar("coupled_force_var", "The variable(s) providing the coupled force(s)");
104 params.addParam<std::vector<FunctionName>>("coupled_force_vector_function",
105 "The function(s) standing in as a coupled force");
106
107 params.addParam<std::vector<BoundaryName>>(
108 "velocity_boundary", std::vector<BoundaryName>(), "Boundaries with given velocities");
109 params.addParam<std::vector<FunctionName>>(
110 "velocity_function", std::vector<FunctionName>(), "Functions for boundary velocities");
111 params.addParam<unsigned int>("pressure_pinned_node",
112 "The node where pressure needs to be pinned");
113 params.addParam<std::vector<BoundaryName>>(
114 "no_bc_boundary", std::vector<BoundaryName>(), "The so-called no-bc Boundaries");
115 params.addParam<std::vector<BoundaryName>>(
116 "pressure_boundary", std::vector<BoundaryName>(), "Boundaries with given pressures");
117 params.addParam<std::vector<FunctionName>>(
118 "pressure_function", std::vector<FunctionName>(), "Functions for boundary pressures");
119
122 params.addParam<MooseEnum>(
123 "family", families, "Specifies the family of FE shape functions to use for this variable");
124 params.addParam<MooseEnum>("order",
125 orders,
126 "Specifies the order of the FE shape function to use "
127 "for this variable (additional orders not listed are "
128 "allowed)");
129 params.addParam<Real>("pressure_scaling", 1, "Scaling for the pressure variable");
130 params.addParam<RealVectorValue>(
131 "velocity_scaling", RealVectorValue(1, 1, 1), "Scaling for the velocity variables");
132
133 params.addParam<Real>("initial_pressure", 0, "The initial pressure, assumed constant everywhere");
134
135 // We perturb slightly from zero to avoid divide by zero exceptions from stabilization terms
136 // involving a velocity norm in the denominator
137 params.addParam<RealVectorValue>("initial_velocity",
138 RealVectorValue(1e-15, 1e-15, 1e-15),
139 "The initial velocity, assumed constant everywhere");
140 params.addParam<std::string>("pressure_variable_name",
141 "A name for the pressure variable. If this is not provided, a "
142 "sensible default will be used.");
143 params.addParam<NonlinearSystemName>(
144 "nl_sys", "nl0", "The nonlinear system that this action belongs to.");
145
147 "equation_type block gravity dynamic_viscosity_name density_name boussinesq_approximation "
148 "reference_temperature_name thermal_expansion_name",
149 "Base");
150 params.addParamNamesToGroup("use_ad laplace integrate_p_by_parts convective_term supg pspg alpha",
151 "WeakFormControl");
152 params.addParamNamesToGroup("velocity_boundary velocity_function pressure_pinned_node "
153 "no_bc_boundary pressure_boundary pressure_function",
154 "BoundaryCondition");
156 "family order pressure_scaling velocity_scaling initial_pressure initial_velocity",
157 "Variable");
159 "add_temperature_equation temperature_variable temperature_scaling initial_temperature "
160 "thermal_conductivity_name specific_heat_name natural_temperature_boundary "
161 "fixed_temperature_boundary temperature_function",
162 "Temperature");
163 return params;
164}
165
167 : Action(parameters),
168 _type(getParam<MooseEnum>("equation_type")),
169 _blocks(getParam<std::vector<SubdomainName>>("block")),
170 _velocity_boundary(getParam<std::vector<BoundaryName>>("velocity_boundary")),
171 _velocity_function(getParam<std::vector<FunctionName>>("velocity_function")),
172 _pressure_boundary(getParam<std::vector<BoundaryName>>("pressure_boundary")),
173 _pressure_function(getParam<std::vector<FunctionName>>("pressure_function")),
174 _no_bc_boundary(getParam<std::vector<BoundaryName>>("no_bc_boundary")),
175 _has_pinned_node(isParamValid("pressure_pinned_node")),
176 _pinned_node("ins_pinned_node"),
177 _fixed_temperature_boundary(getParam<std::vector<BoundaryName>>("fixed_temperature_boundary")),
178 _temperature_function(getParam<std::vector<FunctionName>>("temperature_function")),
179 _fe_type(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
180 Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))),
181 _use_ad(getParam<bool>("use_ad")),
182 _temperature_variable_name(getParam<VariableName>("temperature_variable")),
183 _pressure_variable_name(isParamValid("pressure_variable_name")
184 ? getParam<std::string>("pressure_variable_name")
185 : "p")
186{
187 if (_pressure_function.size() != _pressure_boundary.size())
188 paramError("pressure_function",
189 "Size is not the same as the number of boundaries in 'pressure_boundary'");
191 paramError("temperature_function",
192 "Size is not the same as the number of boundaries in 'fixed_temperature_boundary'");
193 if (_use_ad)
194 {
195 if (parameters.isParamSetByUser("convective_term"))
196 mooseWarning("'convective_term' is ignored for AD");
197 }
198 else
199 {
200 if (getParam<bool>("boussinesq_approximation"))
201 mooseError("Boussinesq approximation has not been implemented for non-AD");
202 }
203
204 if (getParam<bool>("has_ambient_convection"))
205 {
206 if (!isParamValid("ambient_convection_alpha"))
208 "If 'has_ambient_convection' is true, then 'ambient_convection_alpha' must be set.");
209
210 if (!isParamValid("ambient_temperature"))
211 mooseError("If 'has_ambient_convection' is true, then 'ambient_temperature' must be set.");
212 }
213
214 if (getParam<bool>("has_heat_source"))
215 {
216 bool has_coupled = isParamValid("heat_source_var");
217 bool has_function = isParamValid("heat_source_function");
218 if (!has_coupled && !has_function)
219 mooseError("Either the 'heat_source_var' or 'heat_source_function' param must be "
220 "set for the "
221 "'INSADEnergySource' object");
222 else if (has_coupled && has_function)
223 mooseError("Both the 'heat_source_var' or 'heat_source_function' param are set for the "
224 "'INSADEnergySource' object. Please use one or the other.");
225 }
226
227 if (getParam<bool>("has_coupled_force"))
228 {
229 bool has_coupled = isParamValid("coupled_force_var");
230 bool has_function = isParamValid("coupled_force_vector_function");
231 if (!has_coupled && !has_function)
232 mooseError("Either the 'coupled_force_var' or 'coupled_force_vector_function' param must be "
233 "set for the "
234 "'INSADMomentumCoupledForce' object");
235 }
236}
237
238void
240{
241 if (_current_task == "append_mesh_generator")
242 {
244 {
245 if (_app.getMeshGeneratorNames().size() == 0)
246 mooseError("The new mesh generator system is required to pin pressure");
247
248 InputParameters params = _factory.getValidParams("ExtraNodesetGenerator");
249 params.set<std::vector<BoundaryName>>("new_boundary") = {_pinned_node};
250 params.set<std::vector<unsigned int>>("nodes") = {
251 getParam<unsigned int>("pressure_pinned_node")};
252 _app.appendMeshGenerator("ExtraNodesetGenerator", _pinned_node, params);
253 }
254 }
255
256 if (_current_task == "add_navier_stokes_variables")
257 {
258 _dim = _mesh->dimension();
259 for (const auto & subdomain_name : _blocks)
260 {
261 SubdomainID id = _mesh->getSubdomainID(subdomain_name);
262 _block_ids.insert(id);
263 if (_problem->getCoordSystem(id) != Moose::COORD_XYZ)
264 mooseError("RZ has not been added in action");
265 }
266 if (_blocks.size() == 0)
267 {
268 for (auto & id : _mesh->meshSubdomains())
269 if (_problem->getCoordSystem(id) != Moose::COORD_XYZ)
270 mooseError("RZ has not been added in action");
271 }
272 if (_velocity_function.size() != _velocity_boundary.size() * _dim)
273 paramError("velocity_function",
274 "Size is not the same as the number of boundaries in 'velocity_boundary' times "
275 "the mesh dimension");
276
277 // FIXME: need to check boundaries are non-overlapping and enclose the blocks
278
280 auto base_params = _factory.getValidParams(var_type);
281 if (_block_ids.size() != 0)
282 for (const SubdomainID & id : _block_ids)
283 base_params.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
284 base_params.set<MooseEnum>("family") = Moose::stringify(_fe_type.family);
285 base_params.set<MooseEnum>("order") = _fe_type.order.get_order();
286
287 // add primal variables
288 InputParameters params(base_params);
289 params.set<MooseEnum>("order") = _fe_type.order.get_order();
290
291 if (_use_ad)
292 {
293 // AD is using vector variables
294 if (_fe_type.family != LAGRANGE)
295 mooseError("AD has to use LAGRANGE variable family");
296 FEType fetype(_fe_type.order.get_order(), LAGRANGE_VEC);
297 auto vec_var_type = AddVariableAction::variableType(fetype);
298 auto adparams = _factory.getValidParams(vec_var_type);
299 if (_block_ids.size() != 0)
300 for (const SubdomainID & id : _block_ids)
301 adparams.set<std::vector<SubdomainName>>("block").push_back(Moose::stringify(id));
302 adparams.set<MooseEnum>("family") = Moose::stringify(fetype.family);
303 adparams.set<MooseEnum>("order") = _fe_type.order.get_order();
304
305 auto vscaling = getParam<RealVectorValue>("velocity_scaling");
306 adparams.set<std::vector<Real>>("scaling").push_back(vscaling(0));
307 _problem->addVariable(vec_var_type, NS::velocity, adparams);
308
309 // add normal velocity aux variables
310 if (getParam<bool>("add_standard_velocity_variables_for_ad"))
311 {
312 _problem->addAuxVariable(var_type, NS::velocity_x, base_params);
313 if (_dim >= 2)
314 _problem->addAuxVariable(var_type, NS::velocity_y, base_params);
315 if (_dim >= 3)
316 _problem->addAuxVariable(var_type, NS::velocity_z, base_params);
317 }
318 }
319 else
320 {
321 auto vscaling = getParam<RealVectorValue>("velocity_scaling");
322 params.set<std::vector<Real>>("scaling") = {vscaling(0)};
323 _problem->addVariable(var_type, NS::velocity_x, params);
324 if (_dim >= 2)
325 {
326 params.set<std::vector<Real>>("scaling") = {vscaling(1)};
327 _problem->addVariable(var_type, NS::velocity_y, params);
328 }
329 if (_dim >= 3)
330 {
331 params.set<std::vector<Real>>("scaling") = {vscaling(2)};
332 _problem->addVariable(var_type, NS::velocity_z, params);
333 }
334 }
335
336 if (getParam<bool>("add_temperature_equation") &&
337 !_problem
338 ->getNonlinearSystemBase(_problem->nlSysNum(getParam<NonlinearSystemName>("nl_sys")))
339 .hasVariable(_temperature_variable_name))
340 {
341 params.set<std::vector<Real>>("scaling") = {getParam<Real>("temperature_scaling")};
342 _problem->addVariable(var_type, _temperature_variable_name, params);
343 }
344
345 // for non-stablized form, the FE order for pressure need to be at least one order lower
346 int order = _fe_type.order.get_order();
347 if (!getParam<bool>("pspg"))
348 order -= 1;
349 params.set<MooseEnum>("order") = order;
350 params.set<std::vector<Real>>("scaling") = {getParam<Real>("pressure_scaling")};
351 _problem->addVariable(var_type, _pressure_variable_name, params);
352 }
353
354 if (_current_task == "add_navier_stokes_ics")
355 {
356 auto vvalue = getParam<RealVectorValue>("initial_velocity");
357 Real pvalue = getParam<Real>("initial_pressure");
358
359 if (_use_ad)
360 {
361 if (vvalue.norm() != 0)
362 {
363 InputParameters params = _factory.getValidParams("VectorConstantIC");
364 params.set<VariableName>("variable") = NS::velocity;
365 params.set<Real>("x_value") = vvalue(0);
366 if (_dim >= 2)
367 params.set<Real>("y_value") = vvalue(1);
368 if (_dim >= 3)
369 params.set<Real>("z_value") = vvalue(2);
370 _problem->addInitialCondition("VectorConstantIC", "velocity_ic", params);
371 }
372 }
373 else
374 {
375 if (vvalue(0) != 0)
376 {
377 InputParameters params = _factory.getValidParams("ConstantIC");
378 params.set<VariableName>("variable") = NS::velocity_x;
379 params.set<Real>("value") = vvalue(0);
380 _problem->addInitialCondition("ConstantIC", NS::velocity_x + "_ic", params);
381 }
382 if (vvalue(1) != 0 && _dim >= 2)
383 {
384 InputParameters params = _factory.getValidParams("ConstantIC");
385 params.set<VariableName>("variable") = NS::velocity_y;
386 params.set<Real>("value") = vvalue(1);
387 _problem->addInitialCondition("ConstantIC", NS::velocity_y + "_ic", params);
388 }
389 if (vvalue(2) != 0 && _dim >= 3)
390 {
391 InputParameters params = _factory.getValidParams("ConstantIC");
392 params.set<VariableName>("variable") = NS::velocity_z;
393 params.set<Real>("value") = vvalue(2);
394 _problem->addInitialCondition("ConstantIC", NS::velocity_z + "_ic", params);
395 }
396 }
397
398 if (getParam<bool>("add_temperature_equation"))
399 {
400 Real tvalue = getParam<Real>("initial_temperature");
401 InputParameters params = _factory.getValidParams("ConstantIC");
402 params.set<VariableName>("variable") = _temperature_variable_name;
403 params.set<Real>("value") = tvalue;
404 _problem->addInitialCondition("ConstantIC", "temperature_ic", params);
405 }
406
407 if (pvalue != 0)
408 {
409 InputParameters params = _factory.getValidParams("ConstantIC");
410 params.set<VariableName>("variable") = _pressure_variable_name;
411 params.set<Real>("value") = pvalue;
412 _problem->addInitialCondition("ConstantIC", "pressure_ic", params);
413 }
414 }
415
416 if (_current_task == "add_navier_stokes_kernels")
417 {
418 if (_type == "transient")
420
421 // Add all the inviscid flux Kernels.
422 addINSMass();
424
425 if (getParam<bool>("add_temperature_equation"))
427
428 if (_use_ad && getParam<bool>("add_standard_velocity_variables_for_ad"))
430 }
431
432 if (_current_task == "add_navier_stokes_bcs")
433 {
434 if (_velocity_boundary.size() > 0)
436
439
440 if (_no_bc_boundary.size() > 0)
441 addINSNoBCBC();
442
443 if (_pressure_boundary.size() > 0)
445
446 if (getParam<bool>("add_temperature_equation"))
447 {
448 if (_fixed_temperature_boundary.size() > 0)
450 }
451 }
452
453 if (_current_task == "add_material" && _use_ad)
454 {
455 auto set_common_parameters = [&](InputParameters & params)
456 {
457 if (_blocks.size() > 0)
458 params.set<std::vector<SubdomainName>>("block") = _blocks;
459 params.set<CoupledName>("velocity") = {NS::velocity};
461 params.set<MaterialPropertyName>("mu_name") =
462 getParam<MaterialPropertyName>("dynamic_viscosity_name");
463 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
464 };
465
466 auto set_common_3eqn_parameters = [&](InputParameters & params)
467 {
468 set_common_parameters(params);
469 params.set<CoupledName>("temperature") = {_temperature_variable_name};
470 params.set<MaterialPropertyName>("cp_name") =
471 getParam<MaterialPropertyName>("specific_heat_name");
472 };
473
474 if (getParam<bool>("add_temperature_equation"))
475 {
476 if (getParam<bool>("supg") || getParam<bool>("pspg"))
477 {
478 InputParameters params = _factory.getValidParams("INSADStabilized3Eqn");
479 set_common_3eqn_parameters(params);
480 params.set<Real>("alpha") = getParam<Real>("alpha");
481 params.set<MaterialPropertyName>("k_name") =
482 getParam<MaterialPropertyName>("thermal_conductivity_name");
483 _problem->addMaterial("INSADStabilized3Eqn", "ins_ad_material", params);
484 }
485 else
486 {
487 InputParameters params = _factory.getValidParams("INSAD3Eqn");
488 set_common_3eqn_parameters(params);
489 _problem->addMaterial("INSAD3Eqn", "ins_ad_material", params);
490 }
491 }
492 else
493 {
494 if (getParam<bool>("supg") || getParam<bool>("pspg"))
495 {
496 InputParameters params = _factory.getValidParams("INSADTauMaterial");
497 set_common_parameters(params);
498 params.set<Real>("alpha") = getParam<Real>("alpha");
499 _problem->addMaterial("INSADTauMaterial", "ins_ad_material", params);
500 }
501 else
502 {
503 InputParameters params = _factory.getValidParams("INSADMaterial");
504 set_common_parameters(params);
505 _problem->addMaterial("INSADMaterial", "ins_ad_material", params);
506 }
507 }
508 }
509}
510
511void
513{
514 if (_use_ad)
515 {
516 const std::string kernel_type = "INSADMomentumTimeDerivative";
517 InputParameters params = _factory.getValidParams(kernel_type);
518 if (_blocks.size() > 0)
519 params.set<std::vector<SubdomainName>>("block") = _blocks;
520 params.set<NonlinearVariableName>("variable") = NS::velocity;
521 _problem->addKernel(kernel_type, "ins_velocity_time_deriv", params);
522
523 if (getParam<bool>("add_temperature_equation"))
524 {
525 const std::string kernel_type = "INSADHeatConductionTimeDerivative";
526 InputParameters params = _factory.getValidParams(kernel_type);
527 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
528 if (_blocks.size() > 0)
529 params.set<std::vector<SubdomainName>>("block") = _blocks;
530 _problem->addKernel(kernel_type, "ins_temperature_time_deriv", params);
531 }
532 }
533 else
534 {
535 const std::string kernel_type = "INSMomentumTimeDerivative";
536 InputParameters params = _factory.getValidParams(kernel_type);
537 if (_blocks.size() > 0)
538 params.set<std::vector<SubdomainName>>("block") = _blocks;
539 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
540
541 const static std::string momentums[3] = {NS::velocity_x, NS::velocity_y, NS::velocity_z};
542 for (unsigned int component = 0; component < _dim; ++component)
543 {
544 params.set<NonlinearVariableName>("variable") = momentums[component];
545 _problem->addKernel(kernel_type, momentums[component] + "_time_deriv", params);
546 }
547
548 if (getParam<bool>("add_temperature_equation"))
549 {
550 const std::string kernel_type = "INSTemperatureTimeDerivative";
551 InputParameters params = _factory.getValidParams(kernel_type);
552 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
553 if (_blocks.size() > 0)
554 params.set<std::vector<SubdomainName>>("block") = _blocks;
555 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
556 params.set<MaterialPropertyName>("cp_name") =
557 getParam<MaterialPropertyName>("specific_heat_name");
558 _problem->addKernel(kernel_type, "ins_temperature_time_deriv", params);
559 }
560 }
561}
562
563void
565{
566 if (_use_ad)
567 {
568 {
569 const std::string kernel_type = "INSADMass";
570 InputParameters params = _factory.getValidParams(kernel_type);
571 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
572 if (_blocks.size() > 0)
573 params.set<std::vector<SubdomainName>>("block") = _blocks;
574 _problem->addKernel(kernel_type, "ins_mass", params);
575 }
576
577 if (getParam<bool>("pspg"))
578 {
579 const std::string kernel_type = "INSADMassPSPG";
580 InputParameters params = _factory.getValidParams(kernel_type);
581 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
582 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
583 if (_blocks.size() > 0)
584 params.set<std::vector<SubdomainName>>("block") = _blocks;
585 _problem->addKernel(kernel_type, "ins_mass_pspg", params);
586 }
587 }
588 else
589 {
590 const std::string kernel_type = "INSMass";
591 InputParameters params = _factory.getValidParams(kernel_type);
592 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
593 setKernelCommonParams(params);
594 params.set<bool>("pspg") = getParam<bool>("pspg");
595 _problem->addKernel(kernel_type, "ins_mass", params);
596 }
597}
598
599void
601{
602 const static std::string momentums[3] = {NS::velocity_x, NS::velocity_y, NS::velocity_z};
603 const static std::string coord[3] = {"x", "y", "z"};
604 InputParameters params = _factory.getValidParams("VectorVariableComponentAux");
605 params.set<CoupledName>("vector_variable") = {NS::velocity};
606 for (unsigned int component = 0; component < _dim; ++component)
607 {
608 params.set<AuxVariableName>("variable") = momentums[component];
609 params.set<MooseEnum>("component") = coord[component];
610 _problem->addAuxKernel("VectorVariableComponentAux", momentums[component] + "_aux", params);
611 }
612}
613
614void
616{
617 if (_use_ad)
618 {
619 {
620 const std::string kernel_type = "INSADMomentumAdvection";
621 InputParameters params = _factory.getValidParams(kernel_type);
622 params.set<NonlinearVariableName>("variable") = NS::velocity;
623 if (_blocks.size() > 0)
624 params.set<std::vector<SubdomainName>>("block") = _blocks;
625 _problem->addKernel(kernel_type, "ins_momentum_convection", params);
626 }
627
628 {
629 const std::string kernel_type = "INSADMomentumViscous";
630 InputParameters params = _factory.getValidParams(kernel_type);
631 params.set<NonlinearVariableName>("variable") = NS::velocity;
632 params.set<MooseEnum>("viscous_form") = (getParam<bool>("laplace") ? "laplace" : "traction");
633 if (_blocks.size() > 0)
634 params.set<std::vector<SubdomainName>>("block") = _blocks;
635 _problem->addKernel(kernel_type, "ins_momentum_viscous", params);
636 }
637
638 {
639 const std::string kernel_type = "INSADMomentumPressure";
640 InputParameters params = _factory.getValidParams(kernel_type);
641 params.set<NonlinearVariableName>("variable") = NS::velocity;
642 if (_blocks.size() > 0)
643 params.set<std::vector<SubdomainName>>("block") = _blocks;
644 params.set<bool>("integrate_p_by_parts") = getParam<bool>("integrate_p_by_parts");
646 _problem->addKernel(kernel_type, "ins_momentum_pressure", params);
647 }
648
649 auto gravity = getParam<RealVectorValue>("gravity");
650 if (gravity.norm() != 0)
651 {
652 const std::string kernel_type = "INSADGravityForce";
653 InputParameters params = _factory.getValidParams(kernel_type);
654 params.set<NonlinearVariableName>("variable") = NS::velocity;
655 if (_blocks.size() > 0)
656 params.set<std::vector<SubdomainName>>("block") = _blocks;
657 params.set<RealVectorValue>("gravity") = gravity;
658 _problem->addKernel(kernel_type, "ins_momentum_gravity", params);
659 }
660
661 if (getParam<bool>("supg"))
662 {
663 const std::string kernel_type = "INSADMomentumSUPG";
664 InputParameters params = _factory.getValidParams(kernel_type);
665 params.set<NonlinearVariableName>("variable") = NS::velocity;
666 params.set<std::vector<VariableName>>("velocity") = {NS::velocity};
667 params.set<MaterialPropertyName>("tau_name") = "tau";
668 if (_blocks.size() > 0)
669 params.set<std::vector<SubdomainName>>("block") = _blocks;
670 _problem->addKernel(kernel_type, "ins_momentum_supg", params);
671 }
672
673 if (getParam<bool>("boussinesq_approximation"))
674 {
675 const std::string kernel_type = "INSADBoussinesqBodyForce";
676 InputParameters params = _factory.getValidParams(kernel_type);
677 params.set<NonlinearVariableName>("variable") = NS::velocity;
678 params.set<std::vector<VariableName>>("temperature") = {_temperature_variable_name};
679 params.set<RealVectorValue>("gravity") = gravity;
680 params.set<MaterialPropertyName>("alpha_name") =
681 getParam<MaterialPropertyName>("thermal_expansion_name");
682 params.set<MaterialPropertyName>("ref_temp") =
683 getParam<MaterialPropertyName>("reference_temperature_name");
684 if (_blocks.size() > 0)
685 params.set<std::vector<SubdomainName>>("block") = _blocks;
686 _problem->addKernel(kernel_type, "ins_momentum_boussinesq_force", params);
687 }
688
689 if (getParam<bool>("has_coupled_force"))
690 {
691 const std::string kernel_type = "INSADMomentumCoupledForce";
692 InputParameters params = _factory.getValidParams(kernel_type);
693 params.set<NonlinearVariableName>("variable") = NS::velocity;
694 if (_blocks.size() > 0)
695 params.set<std::vector<SubdomainName>>("block") = _blocks;
696 if (isParamValid("coupled_force_var"))
697 params.set<CoupledName>("coupled_vector_var") = getParam<CoupledName>("coupled_force_var");
698 if (isParamValid("coupled_force_vector_function"))
699 params.set<std::vector<FunctionName>>("vector_function") =
700 getParam<std::vector<FunctionName>>("coupled_force_vector_function");
701
702 _problem->addKernel(kernel_type, "ins_momentum_coupled_force", params);
703 }
704 }
705 else
706 {
707 const static std::string momentums[3] = {NS::velocity_x, NS::velocity_y, NS::velocity_z};
708 std::string kernel_type;
709 if (getParam<bool>("laplace"))
710 kernel_type = "INSMomentumLaplaceForm";
711 else
712 kernel_type = "INSMomentumTractionForm";
713
714 InputParameters params = _factory.getValidParams(kernel_type);
715 setKernelCommonParams(params);
716
717 // Extra stuff needed by momentum Kernels
718 params.set<bool>("integrate_p_by_parts") = getParam<bool>("integrate_p_by_parts");
719 params.set<bool>("supg") = getParam<bool>("supg");
720
721 for (unsigned int component = 0; component < _dim; ++component)
722 {
723 params.set<NonlinearVariableName>("variable") = momentums[component];
724 params.set<unsigned int>("component") = component;
725 _problem->addKernel(kernel_type, momentums[component] + std::string("_if"), params);
726 }
727 }
728}
729
730void
732{
733 if (_use_ad)
734 {
735 {
736 const std::string kernel_type = "INSADEnergyAdvection";
737 InputParameters params = _factory.getValidParams(kernel_type);
738 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
739 if (_blocks.size() > 0)
740 params.set<std::vector<SubdomainName>>("block") = _blocks;
741 _problem->addKernel(kernel_type, "ins_temperature_convection", params);
742 }
743 {
744 const std::string kernel_type = "ADHeatConduction";
745 InputParameters params = _factory.getValidParams(kernel_type);
746 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
747 params.set<MaterialPropertyName>("thermal_conductivity") =
748 getParam<MaterialPropertyName>("thermal_conductivity_name");
749 if (_blocks.size() > 0)
750 params.set<std::vector<SubdomainName>>("block") = _blocks;
751 _problem->addKernel(kernel_type, "ins_temperature_conduction", params);
752 }
753
754 if (getParam<bool>("supg"))
755 {
756 const std::string kernel_type = "INSADEnergySUPG";
757 InputParameters params = _factory.getValidParams(kernel_type);
758 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
759 if (_blocks.size() > 0)
760 params.set<std::vector<SubdomainName>>("block") = _blocks;
761 params.set<CoupledName>("velocity") = {NS::velocity};
762 params.set<MaterialPropertyName>("tau_name") = "tau_energy";
763 _problem->addKernel(kernel_type, "ins_temperature_supg", params);
764 }
765
766 if (getParam<bool>("has_ambient_convection"))
767 {
768 const std::string kernel_type = "INSADEnergyAmbientConvection";
769 InputParameters params = _factory.getValidParams(kernel_type);
770 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
771 if (_blocks.size() > 0)
772 params.set<std::vector<SubdomainName>>("block") = _blocks;
773 params.set<Real>("alpha") = getParam<Real>("ambient_convection_alpha");
774 params.set<Real>("T_ambient") = getParam<Real>("ambient_temperature");
775 _problem->addKernel(kernel_type, "ins_temperature_ambient_convection", params);
776 }
777
778 if (getParam<bool>("has_heat_source"))
779 {
780 const std::string kernel_type = "INSADEnergySource";
781 InputParameters params = _factory.getValidParams(kernel_type);
782 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
783 if (_blocks.size() > 0)
784 params.set<std::vector<SubdomainName>>("block") = _blocks;
785 if (isParamValid("heat_source_var"))
786 params.set<CoupledName>("source_variable") = getParam<CoupledName>("heat_source_var");
787 else if (isParamValid("heat_source_function"))
788 params.set<FunctionName>("source_function") =
789 getParam<FunctionName>("heat_source_function");
790 else
791 mooseError("Either the 'heat_source_var' or 'heat_source_function' param must be "
792 "set if adding the 'INSADEnergySource' through the incompressible Navier-Stokes "
793 "action.");
794 _problem->addKernel(kernel_type, "ins_temperature_source", params);
795 }
796 }
797 else
798 {
799 const std::string kernel_type = "INSTemperature";
800 InputParameters params = _factory.getValidParams(kernel_type);
801 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
802 params.set<CoupledName>("u") = {NS::velocity_x};
803 if (_dim >= 2)
804 params.set<CoupledName>("v") = {NS::velocity_y};
805 if (_dim >= 3)
806 params.set<CoupledName>("w") = {NS::velocity_z};
807 params.set<MaterialPropertyName>("k_name") =
808 getParam<MaterialPropertyName>("thermal_conductivity_name");
809 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
810 params.set<MaterialPropertyName>("cp_name") =
811 getParam<MaterialPropertyName>("specific_heat_name");
812 if (_blocks.size() > 0)
813 params.set<std::vector<SubdomainName>>("block") = _blocks;
814 _problem->addKernel(kernel_type, "ins_temperature", params);
815 }
816}
817
818void
820{
821 const static std::string momentums[3] = {NS::velocity_x, NS::velocity_y, NS::velocity_z};
822 for (unsigned int i = 0; i < _velocity_boundary.size(); ++i)
823 {
824 if (_use_ad)
825 {
826 InputParameters params = _factory.getValidParams("ADVectorFunctionDirichletBC");
827
828 {
829 const FunctionName funcx = _velocity_function[i * _dim];
830 if (funcx == "NA")
831 params.set<bool>("set_x_comp") = false;
832 else
833 {
834 std::stringstream ss(funcx);
835 Real val;
836 if ((ss >> val).fail() || !ss.eof())
837 {
838 if (!_problem->hasFunction(funcx))
839 {
840 InputParameters func_params = _factory.getValidParams("ConstantFunction");
841 func_params.set<Real>("value") = val;
842 _problem->addFunction("ConstantFunction", funcx, func_params);
843 }
844 }
845 params.set<FunctionName>("function_x") = funcx;
846 }
847 }
848
849 if (_dim >= 2)
850 {
851 const FunctionName funcy = _velocity_function[i * _dim + 1];
852 if (funcy == "NA")
853 params.set<bool>("set_y_comp") = false;
854 else
855 {
856 std::stringstream ss(funcy);
857 Real val;
858 if ((ss >> val).fail() || !ss.eof())
859 {
860 if (!_problem->hasFunction(funcy))
861 {
862 InputParameters func_params = _factory.getValidParams("ConstantFunction");
863 func_params.set<Real>("value") = val;
864 _problem->addFunction("ConstantFunction", funcy, func_params);
865 }
866 }
867 params.set<FunctionName>("function_y") = funcy;
868 }
869 }
870
871 if (_dim >= 3)
872 {
873 const FunctionName funcz = _velocity_function[i * _dim + 1];
874 if (funcz == "NA")
875 params.set<bool>("set_z_comp") = false;
876 else
877 {
878 std::stringstream ss(funcz);
879 Real val;
880 if ((ss >> val).fail() || !ss.eof())
881 {
882 if (!_problem->hasFunction(funcz))
883 {
884 InputParameters func_params = _factory.getValidParams("ConstantFunction");
885 func_params.set<Real>("value") = val;
886 _problem->addFunction("ConstantFunction", funcz, func_params);
887 }
888 }
889 params.set<FunctionName>("function_z") = funcz;
890 }
891 }
892
893 params.set<NonlinearVariableName>("variable") = NS::velocity;
894 params.set<std::vector<BoundaryName>>("boundary") = {_velocity_boundary[i]};
895 _problem->addBoundaryCondition(
896 "ADVectorFunctionDirichletBC", "ins_velocity_bc_" + _velocity_boundary[i], params);
897 }
898 else
899 {
900 for (unsigned int component = 0; component < _dim; ++component)
901 {
902 const FunctionName func = _velocity_function[i * _dim + component];
903 if (func == "NA")
904 continue;
905
906 std::stringstream ss(func);
907 Real val;
908 if ((ss >> val).fail() || !ss.eof())
909 {
910 InputParameters params = _factory.getValidParams("FunctionDirichletBC");
911 params.set<FunctionName>("function") = func;
912 params.set<NonlinearVariableName>("variable") = momentums[component];
913 params.set<std::vector<BoundaryName>>("boundary") = {_velocity_boundary[i]};
914 _problem->addBoundaryCondition(
915 "FunctionDirichletBC", momentums[component] + "_" + _velocity_boundary[i], params);
916 }
917 else
918 {
919 InputParameters params = _factory.getValidParams("DirichletBC");
920 params.set<Real>("value") = val;
921 params.set<NonlinearVariableName>("variable") = momentums[component];
922 params.set<std::vector<BoundaryName>>("boundary") = {_velocity_boundary[i]};
923 _problem->addBoundaryCondition(
924 "DirichletBC", momentums[component] + "_" + _velocity_boundary[i], params);
925 }
926 }
927 }
928 }
929}
930
931void
933{
934 for (unsigned int i = 0; i < _fixed_temperature_boundary.size(); ++i)
935 {
936 const FunctionName func = _temperature_function[i];
937 if (func == "NA")
938 continue;
939
940 std::stringstream ss(func);
941 Real val;
942 if ((ss >> val).fail() || !ss.eof())
943 {
944 InputParameters params = _factory.getValidParams("FunctionDirichletBC");
945 params.set<FunctionName>("function") = func;
946 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
947 params.set<std::vector<BoundaryName>>("boundary") = {_fixed_temperature_boundary[i]};
948 _problem->addBoundaryCondition("FunctionDirichletBC",
951 params);
952 }
953 else
954 {
955 InputParameters params = _factory.getValidParams("DirichletBC");
956 params.set<Real>("value") = val;
957 params.set<NonlinearVariableName>("variable") = _temperature_variable_name;
958 params.set<std::vector<BoundaryName>>("boundary") = {_fixed_temperature_boundary[i]};
959 _problem->addBoundaryCondition(
960 "DirichletBC", _temperature_variable_name + "_" + _fixed_temperature_boundary[i], params);
961 }
962 }
963}
964
965void
967{
968 for (unsigned int i = 0; i < _pressure_boundary.size(); ++i)
969 {
970 const FunctionName func = _pressure_function[i];
971 std::stringstream ss(func);
972 Real val;
973 if ((ss >> val).fail() || !ss.eof())
974 {
975 InputParameters params = _factory.getValidParams("FunctionDirichletBC");
976 params.set<FunctionName>("function") = func;
977 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
978 params.set<std::vector<BoundaryName>>("boundary") = {_pressure_boundary[i]};
979 _problem->addBoundaryCondition(
980 "FunctionDirichletBC", NS::pressure + _pressure_boundary[i], params);
981 }
982 else
983 {
984 InputParameters params = _factory.getValidParams("DirichletBC");
985 params.set<Real>("value") = val;
986 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
987 params.set<std::vector<BoundaryName>>("boundary") = {_pressure_boundary[i]};
988 _problem->addBoundaryCondition("DirichletBC", NS::pressure + _pressure_boundary[i], params);
989 }
990 }
991}
992
993void
995{
996 InputParameters params = _factory.getValidParams("DirichletBC");
997 params.set<Real>("value") = 0;
998 params.set<NonlinearVariableName>("variable") = _pressure_variable_name;
999 params.set<std::vector<BoundaryName>>("boundary") = {_pinned_node};
1000 _problem->addBoundaryCondition("DirichletBC", "pressure_pin", params);
1001}
1002
1003void
1005{
1006 if (_use_ad)
1007 {
1008 const std::string kernel_type = "INSADMomentumNoBCBC";
1009 InputParameters params = _factory.getValidParams(kernel_type);
1010 params.set<NonlinearVariableName>("variable") = NS::velocity;
1011 if (_blocks.size() > 0)
1012 params.set<std::vector<SubdomainName>>("block") = _blocks;
1013 params.set<bool>("integrate_p_by_parts") = getParam<bool>("integrate_p_by_parts");
1015 params.set<MooseEnum>("viscous_form") = (getParam<bool>("laplace") ? "laplace" : "traction");
1016 _problem->addBoundaryCondition(kernel_type, "ins_momentum_nobc_bc", params);
1017 }
1018 else
1019 {
1020 const static std::string momentums[3] = {NS::velocity_x, NS::velocity_y, NS::velocity_z};
1021 std::string kernel_type;
1022 if (getParam<bool>("laplace"))
1023 kernel_type = "INSMomentumNoBCBCLaplaceForm";
1024 else
1025 kernel_type = "INSMomentumNoBCBCTractionForm";
1026 InputParameters params = _factory.getValidParams(kernel_type);
1027 params.set<std::vector<BoundaryName>>("boundary") = _no_bc_boundary;
1028 setNoBCCommonParams(params);
1029 for (unsigned int component = 0; component < _dim; ++component)
1030 {
1031 params.set<NonlinearVariableName>("variable") = momentums[component];
1032 _problem->addBoundaryCondition(kernel_type, momentums[component] + "_nobc_bc", params);
1033 }
1034 }
1035}
1036
1037void
1039{
1040 if (_blocks.size() > 0)
1041 params.set<std::vector<SubdomainName>>("block") = _blocks;
1042
1043 // coupled variables
1044 params.set<CoupledName>("u") = {NS::velocity_x};
1045 if (_dim >= 2)
1046 params.set<CoupledName>("v") = {NS::velocity_y};
1047 if (_dim >= 3)
1048 params.set<CoupledName>("w") = {NS::velocity_z};
1050 params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
1051 params.set<MaterialPropertyName>("mu_name") =
1052 getParam<MaterialPropertyName>("dynamic_viscosity_name");
1053 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
1054 params.set<Real>("alpha") = getParam<Real>("alpha");
1055 params.set<bool>("laplace") = getParam<bool>("laplace");
1056 // this parameter only affecting Jacobian evaluation in non-AD
1057 params.set<bool>("convective_term") = getParam<bool>("convective_term");
1058 // FIXME: this parameter seems not changing solution much?
1059 params.set<bool>("transient_term") = (_type == "transient");
1060}
1061
1062void
1064{
1065 // coupled variables
1066 params.set<CoupledName>("u") = {NS::velocity_x};
1067 if (_dim >= 2)
1068 params.set<CoupledName>("v") = {NS::velocity_y};
1069 if (_dim >= 3)
1070 params.set<CoupledName>("w") = {NS::velocity_z};
1072 params.set<RealVectorValue>("gravity") = getParam<RealVectorValue>("gravity");
1073 params.set<MaterialPropertyName>("mu_name") =
1074 getParam<MaterialPropertyName>("dynamic_viscosity_name");
1075 params.set<MaterialPropertyName>("rho_name") = getParam<MaterialPropertyName>("density_name");
1076 params.set<bool>("integrate_p_by_parts") = getParam<bool>("integrate_p_by_parts");
1077}
subdomain_id_type SubdomainID
void addAmbientConvectionParams(InputParameters &params)
Global for adding ambient convection parameters.
registerMooseAction("NavierStokesApp", INSAction, "append_mesh_generator")
std::vector< VariableName > CoupledName
std::shared_ptr< MooseMesh > & _mesh
static InputParameters validParams()
MooseApp & _app
std::shared_ptr< FEProblemBase > & _problem
const std::string & _current_task
static MooseEnum getNonlinearVariableFamilies()
static MooseEnum getNonlinearVariableOrders()
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
InputParameters getValidParams(const std::string &name) const
This class allows us to have a section of the input file like the following which automatically adds ...
Definition INSAction.h:26
void addINSPinnedPressureBC()
Definition INSAction.C:994
std::vector< BoundaryName > _velocity_boundary
Boundaries with velocity specified.
Definition INSAction.h:58
void addINSVelocityBC()
Definition INSAction.C:819
std::set< SubdomainID > _block_ids
Subdomain IDs.
Definition INSAction.h:84
void addINSMomentum()
Definition INSAction.C:615
VariableName _temperature_variable_name
Temperature variable name to facilitate temperature variable added outside.
Definition INSAction.h:80
std::vector< BoundaryName > _fixed_temperature_boundary
Boundaries with temperature specified.
Definition INSAction.h:72
BoundaryName _pinned_node
The node set name of the pinned node.
Definition INSAction.h:70
void addINSNoBCBC()
Definition INSAction.C:1004
void addINSVelocityAux()
Definition INSAction.C:600
void addINSMass()
Definition INSAction.C:564
bool _use_ad
Whether we use AD or not.
Definition INSAction.h:78
std::vector< FunctionName > _temperature_function
Temperature function names at fixed temperature boundaries.
Definition INSAction.h:74
void addINSTemperatureBC()
Definition INSAction.C:932
static InputParameters validParams()
Definition INSAction.C:34
unsigned int _dim
Mesh dimension.
Definition INSAction.h:82
INSAction(const InputParameters &parameters)
Definition INSAction.C:166
libMesh::FEType _fe_type
FE type for various variables.
Definition INSAction.h:76
virtual void act() override
Definition INSAction.C:239
MooseEnum _type
Equation type, transient or steady-state.
Definition INSAction.h:54
const std::string _pressure_variable_name
pressure variable name
Definition INSAction.h:86
bool _has_pinned_node
Whether or not we need to pin pressure at a node.
Definition INSAction.h:68
void addINSTemperature()
Definition INSAction.C:731
void addINSTimeKernels()
Definition INSAction.C:512
std::vector< SubdomainName > _blocks
Subdomains Navier-Stokes equation is defined on.
Definition INSAction.h:56
void setNoBCCommonParams(InputParameters &params)
Definition INSAction.C:1063
void setKernelCommonParams(InputParameters &params)
Definition INSAction.C:1038
std::vector< BoundaryName > _no_bc_boundary
No-BC boundaries.
Definition INSAction.h:66
std::vector< FunctionName > _pressure_function
Pressure function names at pressure boundaries.
Definition INSAction.h:64
std::vector< BoundaryName > _pressure_boundary
Boundaries with pressure specified.
Definition INSAction.h:62
void addINSPressureBC()
Definition INSAction.C:966
std::vector< FunctionName > _velocity_function
Velocity function names at velocity boundaries.
Definition INSAction.h:60
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
bool isParamSetByUser(const std::string &name) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addCoupledVar(const std::string &name, const std::string &doc_string)
std::vector< std::string > getMeshGeneratorNames() const
const MeshGenerator & appendMeshGenerator(const std::string &type, const std::string &name, InputParameters params)
const InputParameters & parameters() const
const std::string & type() const
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
void mooseWarning(Args &&... args) const
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
Factory & _factory
OrderWrapper order
std::string stringify(const T &t)
static const std::string velocity_y
Definition NS.h:48
static const std::string temperature
Definition NS.h:60
static const std::string velocity_z
Definition NS.h:49
static const std::string velocity_x
Definition NS.h:47
static const std::string pressure
Definition NS.h:57
static const std::string velocity
Definition NS.h:46