22 #include "libmesh/fe.h" 23 #include "libmesh/vector_value.h" 24 #include "libmesh/string_to_enum.h" 40 "setting up incompressible Navier-Stokes equations.");
42 MooseEnum type(
"steady-state transient",
"steady-state");
45 params.
addParam<std::vector<SubdomainName>>(
46 "block", {},
"The list of block ids (SubdomainID) on which NS equation is defined on");
49 params.
addParam<
bool>(
"boussinesq_approximation",
false,
"True to have Boussinesq approximation");
50 params.
addParam<MaterialPropertyName>(
51 "reference_temperature_name",
"temp_ref",
"Material property name for reference temperature");
52 params.
addParam<MaterialPropertyName>(
53 "thermal_expansion_name",
"alpha",
"The name of the thermal expansion");
55 params.
addParam<
bool>(
"add_temperature_equation",
false,
"True to add temperature equation");
58 params.
addParam<
Real>(
"temperature_scaling", 1,
"Scaling for the temperature variable");
60 "initial_temperature", 0,
"The initial temperature, assumed constant everywhere");
61 params.
addParam<MaterialPropertyName>(
62 "thermal_conductivity_name",
"k",
"The name of the thermal conductivity");
63 params.
addParam<MaterialPropertyName>(
64 "specific_heat_name",
"cp",
"The name of the specific heat");
65 params.
addParam<std::vector<BoundaryName>>(
"natural_temperature_boundary",
66 std::vector<BoundaryName>(),
67 "Natural boundaries for temperature equation");
68 params.
addParam<std::vector<BoundaryName>>(
"fixed_temperature_boundary",
69 std::vector<BoundaryName>(),
70 "Dirichlet boundaries for temperature equation");
71 params.
addParam<std::vector<FunctionName>>(
72 "temperature_function", std::vector<FunctionName>(),
"Temperature on Dirichlet boundaries");
75 "has_heat_source",
false,
"Whether there is a heat source function object in the simulation");
76 params.
addParam<FunctionName>(
"heat_source_function",
"The function describing the heat source");
77 params.
addCoupledVar(
"heat_source_var",
"The coupled variable describing the heat source");
80 "gravity",
RealVectorValue(0, 0, 0),
"Direction of the gravity vector");
82 params.
addParam<MaterialPropertyName>(
83 "dynamic_viscosity_name",
"mu",
"The name of the dynamic viscosity");
84 params.
addParam<MaterialPropertyName>(
"density_name",
"rho",
"The name of the density");
86 params.
addParam<
bool>(
"use_ad",
false,
"True to use AD");
88 "laplace",
true,
"Whether the viscous term of the momentum equations is in laplace form");
90 "integrate_p_by_parts",
true,
"Whether to integrate the pressure term by parts");
92 "convective_term",
true,
"Whether to include the convective term in Jacobian");
94 "supg",
false,
"Whether to perform SUPG stabilization of the momentum residuals");
96 "pspg",
false,
"Whether to perform PSPG stabilization of the mass equation");
97 params.
addParam<
Real>(
"alpha", 1,
"Multiplicative factor on the stabilization parameter tau");
98 params.
addParam<
bool>(
"add_standard_velocity_variables_for_ad",
100 "True to convert vector velocity variables into standard aux variables");
104 "Whether the simulation has a force due to a coupled vector variable/vector function");
105 params.
addCoupledVar(
"coupled_force_var",
"The variable(s) providing the coupled force(s)");
106 params.
addParam<std::vector<FunctionName>>(
"coupled_force_vector_function",
107 "The function(s) standing in as a coupled force");
109 params.
addParam<std::vector<BoundaryName>>(
110 "velocity_boundary", std::vector<BoundaryName>(),
"Boundaries with given velocities");
111 params.
addParam<std::vector<FunctionName>>(
112 "velocity_function", std::vector<FunctionName>(),
"Functions for boundary velocities");
113 params.
addParam<
unsigned int>(
"pressure_pinned_node",
114 "The node where pressure needs to be pinned");
115 params.
addParam<std::vector<BoundaryName>>(
116 "no_bc_boundary", std::vector<BoundaryName>(),
"The so-called no-bc Boundaries");
117 params.
addParam<std::vector<BoundaryName>>(
118 "pressure_boundary", std::vector<BoundaryName>(),
"Boundaries with given pressures");
119 params.
addParam<std::vector<FunctionName>>(
120 "pressure_function", std::vector<FunctionName>(),
"Functions for boundary pressures");
125 "family", families,
"Specifies the family of FE shape functions to use for this variable");
128 "Specifies the order of the FE shape function to use " 129 "for this variable (additional orders not listed are " 131 params.
addParam<
Real>(
"pressure_scaling", 1,
"Scaling for the pressure variable");
133 "velocity_scaling",
RealVectorValue(1, 1, 1),
"Scaling for the velocity variables");
135 params.
addParam<
Real>(
"initial_pressure", 0,
"The initial pressure, assumed constant everywhere");
141 "The initial velocity, assumed constant everywhere");
142 params.
addParam<std::string>(
"pressure_variable_name",
143 "A name for the pressure variable. If this is not provided, a " 144 "sensible default will be used.");
145 params.
addParam<NonlinearSystemName>(
146 "nl_sys",
"nl0",
"The nonlinear system that this action belongs to.");
149 "equation_type block gravity dynamic_viscosity_name density_name boussinesq_approximation " 150 "reference_temperature_name thermal_expansion_name",
152 params.
addParamNamesToGroup(
"use_ad laplace integrate_p_by_parts convective_term supg pspg alpha",
155 "no_bc_boundary pressure_boundary pressure_function",
156 "BoundaryCondition");
158 "family order pressure_scaling velocity_scaling initial_pressure initial_velocity",
161 "add_temperature_equation temperature_variable temperature_scaling initial_temperature " 162 "thermal_conductivity_name specific_heat_name natural_temperature_boundary " 163 "fixed_temperature_boundary temperature_function",
170 _type(getParam<
MooseEnum>(
"equation_type")),
171 _blocks(getParam<
std::vector<SubdomainName>>(
"block")),
172 _velocity_boundary(getParam<
std::vector<BoundaryName>>(
"velocity_boundary")),
173 _velocity_function(getParam<
std::vector<FunctionName>>(
"velocity_function")),
174 _pressure_boundary(getParam<
std::vector<BoundaryName>>(
"pressure_boundary")),
175 _pressure_function(getParam<
std::vector<FunctionName>>(
"pressure_function")),
176 _no_bc_boundary(getParam<
std::vector<BoundaryName>>(
"no_bc_boundary")),
177 _has_pinned_node(isParamValid(
"pressure_pinned_node")),
178 _pinned_node(
"ins_pinned_node"),
179 _fixed_temperature_boundary(getParam<
std::vector<BoundaryName>>(
"fixed_temperature_boundary")),
180 _temperature_function(getParam<
std::vector<FunctionName>>(
"temperature_function")),
183 _use_ad(getParam<bool>(
"use_ad")),
184 _temperature_variable_name(getParam<VariableName>(
"temperature_variable")),
185 _pressure_variable_name(isParamValid(
"pressure_variable_name")
186 ? getParam<
std::string>(
"pressure_variable_name")
191 "Size is not the same as the number of boundaries in 'pressure_boundary'");
194 "Size is not the same as the number of boundaries in 'fixed_temperature_boundary'");
202 if (getParam<bool>(
"boussinesq_approximation"))
203 mooseError(
"Boussinesq approximation has not been implemented for non-AD");
206 if (getParam<bool>(
"has_ambient_convection"))
210 "If 'has_ambient_convection' is true, then 'ambient_convection_alpha' must be set.");
213 mooseError(
"If 'has_ambient_convection' is true, then 'ambient_temperature' must be set.");
216 if (getParam<bool>(
"has_heat_source"))
219 bool has_function =
isParamValid(
"heat_source_function");
220 if (!has_coupled && !has_function)
221 mooseError(
"Either the 'heat_source_var' or 'heat_source_function' param must be " 223 "'INSADEnergySource' object");
224 else if (has_coupled && has_function)
225 mooseError(
"Both the 'heat_source_var' or 'heat_source_function' param are set for the " 226 "'INSADEnergySource' object. Please use one or the other.");
229 if (getParam<bool>(
"has_coupled_force"))
232 bool has_function =
isParamValid(
"coupled_force_vector_function");
233 if (!has_coupled && !has_function)
234 mooseError(
"Either the 'coupled_force_var' or 'coupled_force_vector_function' param must be " 236 "'INSADMomentumCoupledForce' object");
248 mooseError(
"The new mesh generator system is required to pin pressure");
251 params.
set<std::vector<BoundaryName>>(
"new_boundary") = {
_pinned_node};
252 params.
set<std::vector<unsigned int>>(
"nodes") = {
253 getParam<unsigned int>(
"pressure_pinned_node")};
261 for (
const auto & subdomain_name :
_blocks)
266 mooseError(
"RZ has not been added in action");
270 for (
auto &
id :
_mesh->meshSubdomains())
272 mooseError(
"RZ has not been added in action");
276 "Size is not the same as the number of boundaries in 'velocity_boundary' times " 277 "the mesh dimension");
282 auto base_params =
_factory.getValidParams(var_type);
285 base_params.set<std::vector<SubdomainName>>(
"block").push_back(
Moose::stringify(
id));
297 mooseError(
"AD has to use LAGRANGE variable family");
300 auto adparams =
_factory.getValidParams(vec_var_type);
303 adparams.set<std::vector<SubdomainName>>(
"block").push_back(
Moose::stringify(
id));
307 auto vscaling = getParam<RealVectorValue>(
"velocity_scaling");
308 adparams.set<std::vector<Real>>(
"scaling").push_back(vscaling(0));
312 if (getParam<bool>(
"add_standard_velocity_variables_for_ad"))
323 auto vscaling = getParam<RealVectorValue>(
"velocity_scaling");
324 params.
set<std::vector<Real>>(
"scaling") = {vscaling(0)};
328 params.
set<std::vector<Real>>(
"scaling") = {vscaling(1)};
333 params.
set<std::vector<Real>>(
"scaling") = {vscaling(2)};
338 if (getParam<bool>(
"add_temperature_equation") &&
340 ->getNonlinearSystemBase(
_problem->nlSysNum(getParam<NonlinearSystemName>(
"nl_sys")))
343 params.
set<std::vector<Real>>(
"scaling") = {getParam<Real>(
"temperature_scaling")};
349 if (!getParam<bool>(
"pspg"))
352 params.
set<std::vector<Real>>(
"scaling") = {getParam<Real>(
"pressure_scaling")};
358 auto vvalue = getParam<RealVectorValue>(
"initial_velocity");
359 Real pvalue = getParam<Real>(
"initial_pressure");
363 if (vvalue.norm() != 0)
367 params.
set<
Real>(
"x_value") = vvalue(0);
369 params.
set<
Real>(
"y_value") = vvalue(1);
371 params.
set<
Real>(
"z_value") = vvalue(2);
372 _problem->addInitialCondition(
"VectorConstantIC",
"velocity_ic", params);
381 params.
set<
Real>(
"value") = vvalue(0);
384 if (vvalue(1) != 0 &&
_dim >= 2)
388 params.
set<
Real>(
"value") = vvalue(1);
391 if (vvalue(2) != 0 &&
_dim >= 3)
395 params.
set<
Real>(
"value") = vvalue(2);
400 if (getParam<bool>(
"add_temperature_equation"))
402 Real tvalue = getParam<Real>(
"initial_temperature");
405 params.set<
Real>(
"value") = tvalue;
406 _problem->addInitialCondition(
"ConstantIC",
"temperature_ic", params);
413 params.
set<
Real>(
"value") = pvalue;
414 _problem->addInitialCondition(
"ConstantIC",
"pressure_ic", params);
420 if (
_type ==
"transient")
427 if (getParam<bool>(
"add_temperature_equation"))
430 if (
_use_ad && getParam<bool>(
"add_standard_velocity_variables_for_ad"))
448 if (getParam<bool>(
"add_temperature_equation"))
460 params.set<std::vector<SubdomainName>>(
"block") =
_blocks;
463 params.set<MaterialPropertyName>(
"mu_name") =
464 getParam<MaterialPropertyName>(
"dynamic_viscosity_name");
465 params.set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
470 set_common_parameters(params);
472 params.set<MaterialPropertyName>(
"cp_name") =
473 getParam<MaterialPropertyName>(
"specific_heat_name");
476 if (getParam<bool>(
"add_temperature_equation"))
478 if (getParam<bool>(
"supg") || getParam<bool>(
"pspg"))
481 set_common_3eqn_parameters(params);
482 params.
set<
Real>(
"alpha") = getParam<Real>(
"alpha");
483 params.
set<MaterialPropertyName>(
"k_name") =
484 getParam<MaterialPropertyName>(
"thermal_conductivity_name");
485 _problem->addMaterial(
"INSADStabilized3Eqn",
"ins_ad_material", params);
490 set_common_3eqn_parameters(params);
491 _problem->addMaterial(
"INSAD3Eqn",
"ins_ad_material", params);
496 if (getParam<bool>(
"supg") || getParam<bool>(
"pspg"))
499 set_common_parameters(params);
500 params.
set<
Real>(
"alpha") = getParam<Real>(
"alpha");
501 _problem->addMaterial(
"INSADTauMaterial",
"ins_ad_material", params);
506 set_common_parameters(params);
507 _problem->addMaterial(
"INSADMaterial",
"ins_ad_material", params);
518 const std::string kernel_type =
"INSADMomentumTimeDerivative";
521 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
523 _problem->addKernel(kernel_type,
"ins_velocity_time_deriv", params);
525 if (getParam<bool>(
"add_temperature_equation"))
527 const std::string kernel_type =
"INSADHeatConductionTimeDerivative";
531 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
532 _problem->addKernel(kernel_type,
"ins_temperature_time_deriv", params);
537 const std::string kernel_type =
"INSMomentumTimeDerivative";
540 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
541 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
546 params.
set<NonlinearVariableName>(
"variable") = momentums[
component];
550 if (getParam<bool>(
"add_temperature_equation"))
552 const std::string kernel_type =
"INSTemperatureTimeDerivative";
556 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
557 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
558 params.
set<MaterialPropertyName>(
"cp_name") =
559 getParam<MaterialPropertyName>(
"specific_heat_name");
560 _problem->addKernel(kernel_type,
"ins_temperature_time_deriv", params);
571 const std::string kernel_type =
"INSADMass";
575 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
576 _problem->addKernel(kernel_type,
"ins_mass", params);
579 if (getParam<bool>(
"pspg"))
581 const std::string kernel_type =
"INSADMassPSPG";
584 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
586 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
587 _problem->addKernel(kernel_type,
"ins_mass_pspg", params);
592 const std::string kernel_type =
"INSMass";
596 params.
set<
bool>(
"pspg") = getParam<bool>(
"pspg");
597 _problem->addKernel(kernel_type,
"ins_mass", params);
605 const static std::string coord[3] = {
"x",
"y",
"z"};
610 params.
set<AuxVariableName>(
"variable") = momentums[
component];
612 _problem->addAuxKernel(
"VectorVariableComponentAux", momentums[
component] +
"_aux", params);
622 const std::string kernel_type =
"INSADMomentumAdvection";
626 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
627 _problem->addKernel(kernel_type,
"ins_momentum_convection", params);
631 const std::string kernel_type =
"INSADMomentumViscous";
634 params.
set<
MooseEnum>(
"viscous_form") = (getParam<bool>(
"laplace") ?
"laplace" :
"traction");
636 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
637 _problem->addKernel(kernel_type,
"ins_momentum_viscous", params);
641 const std::string kernel_type =
"INSADMomentumPressure";
645 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
646 params.
set<
bool>(
"integrate_p_by_parts") = getParam<bool>(
"integrate_p_by_parts");
648 _problem->addKernel(kernel_type,
"ins_momentum_pressure", params);
651 auto gravity = getParam<RealVectorValue>(
"gravity");
652 if (gravity.norm() != 0)
654 const std::string kernel_type =
"INSADGravityForce";
658 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
660 _problem->addKernel(kernel_type,
"ins_momentum_gravity", params);
663 if (getParam<bool>(
"supg"))
665 const std::string kernel_type =
"INSADMomentumSUPG";
669 params.
set<MaterialPropertyName>(
"tau_name") =
"tau";
671 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
672 _problem->addKernel(kernel_type,
"ins_momentum_supg", params);
675 if (getParam<bool>(
"boussinesq_approximation"))
677 const std::string kernel_type =
"INSADBoussinesqBodyForce";
682 params.
set<MaterialPropertyName>(
"alpha_name") =
683 getParam<MaterialPropertyName>(
"thermal_expansion_name");
684 params.
set<MaterialPropertyName>(
"ref_temp") =
685 getParam<MaterialPropertyName>(
"reference_temperature_name");
687 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
688 _problem->addKernel(kernel_type,
"ins_momentum_boussinesq_force", params);
691 if (getParam<bool>(
"has_coupled_force"))
693 const std::string kernel_type =
"INSADMomentumCoupledForce";
697 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
699 params.
set<
CoupledName>(
"coupled_vector_var") = getParam<CoupledName>(
"coupled_force_var");
701 params.
set<std::vector<FunctionName>>(
"vector_function") =
702 getParam<std::vector<FunctionName>>(
"coupled_force_vector_function");
704 _problem->addKernel(kernel_type,
"ins_momentum_coupled_force", params);
710 std::string kernel_type;
711 if (getParam<bool>(
"laplace"))
712 kernel_type =
"INSMomentumLaplaceForm";
714 kernel_type =
"INSMomentumTractionForm";
720 params.
set<
bool>(
"integrate_p_by_parts") = getParam<bool>(
"integrate_p_by_parts");
721 params.
set<
bool>(
"supg") = getParam<bool>(
"supg");
725 params.
set<NonlinearVariableName>(
"variable") = momentums[
component];
727 _problem->addKernel(kernel_type, momentums[
component] + std::string(
"_if"), params);
738 const std::string kernel_type =
"INSADEnergyAdvection";
742 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
743 _problem->addKernel(kernel_type,
"ins_temperature_convection", params);
746 const std::string kernel_type =
"ADHeatConduction";
749 params.
set<MaterialPropertyName>(
"thermal_conductivity") =
750 getParam<MaterialPropertyName>(
"thermal_conductivity_name");
752 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
753 _problem->addKernel(kernel_type,
"ins_temperature_conduction", params);
756 if (getParam<bool>(
"supg"))
758 const std::string kernel_type =
"INSADEnergySUPG";
762 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
764 params.
set<MaterialPropertyName>(
"tau_name") =
"tau_energy";
765 _problem->addKernel(kernel_type,
"ins_temperature_supg", params);
768 if (getParam<bool>(
"has_ambient_convection"))
770 const std::string kernel_type =
"INSADEnergyAmbientConvection";
774 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
775 params.
set<
Real>(
"alpha") = getParam<Real>(
"ambient_convection_alpha");
776 params.
set<
Real>(
"T_ambient") = getParam<Real>(
"ambient_temperature");
777 _problem->addKernel(kernel_type,
"ins_temperature_ambient_convection", params);
780 if (getParam<bool>(
"has_heat_source"))
782 const std::string kernel_type =
"INSADEnergySource";
786 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
788 params.
set<
CoupledName>(
"source_variable") = getParam<CoupledName>(
"heat_source_var");
790 params.
set<FunctionName>(
"source_function") =
791 getParam<FunctionName>(
"heat_source_function");
793 mooseError(
"Either the 'heat_source_var' or 'heat_source_function' param must be " 794 "set if adding the 'INSADEnergySource' through the incompressible Navier-Stokes " 796 _problem->addKernel(kernel_type,
"ins_temperature_source", params);
801 const std::string kernel_type =
"INSTemperature";
809 params.
set<MaterialPropertyName>(
"k_name") =
810 getParam<MaterialPropertyName>(
"thermal_conductivity_name");
811 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
812 params.
set<MaterialPropertyName>(
"cp_name") =
813 getParam<MaterialPropertyName>(
"specific_heat_name");
815 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
816 _problem->addKernel(kernel_type,
"ins_temperature", params);
833 params.
set<
bool>(
"set_x_comp") =
false;
836 std::stringstream ss(funcx);
838 if ((ss >> val).fail() || !ss.eof())
843 func_params.
set<
Real>(
"value") = val;
844 _problem->addFunction(
"ConstantFunction", funcx, func_params);
847 params.
set<FunctionName>(
"function_x") = funcx;
855 params.
set<
bool>(
"set_y_comp") =
false;
858 std::stringstream ss(funcy);
860 if ((ss >> val).fail() || !ss.eof())
865 func_params.
set<
Real>(
"value") = val;
866 _problem->addFunction(
"ConstantFunction", funcy, func_params);
869 params.
set<FunctionName>(
"function_y") = funcy;
877 params.
set<
bool>(
"set_z_comp") =
false;
880 std::stringstream ss(funcz);
882 if ((ss >> val).fail() || !ss.eof())
887 func_params.
set<
Real>(
"value") = val;
888 _problem->addFunction(
"ConstantFunction", funcz, func_params);
891 params.
set<FunctionName>(
"function_z") = funcz;
908 std::stringstream ss(func);
910 if ((ss >> val).fail() || !ss.eof())
913 params.
set<FunctionName>(
"function") = func;
914 params.
set<NonlinearVariableName>(
"variable") = momentums[
component];
922 params.
set<
Real>(
"value") = val;
923 params.
set<NonlinearVariableName>(
"variable") = momentums[
component];
942 std::stringstream ss(func);
944 if ((ss >> val).fail() || !ss.eof())
947 params.
set<FunctionName>(
"function") = func;
950 _problem->addBoundaryCondition(
"FunctionDirichletBC",
958 params.
set<
Real>(
"value") = val;
973 std::stringstream ss(func);
975 if ((ss >> val).fail() || !ss.eof())
978 params.
set<FunctionName>(
"function") = func;
987 params.
set<
Real>(
"value") = val;
1002 _problem->addBoundaryCondition(
"DirichletBC",
"pressure_pin", params);
1010 const std::string kernel_type =
"INSADMomentumNoBCBC";
1014 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
1015 params.
set<
bool>(
"integrate_p_by_parts") = getParam<bool>(
"integrate_p_by_parts");
1017 params.
set<
MooseEnum>(
"viscous_form") = (getParam<bool>(
"laplace") ?
"laplace" :
"traction");
1018 _problem->addBoundaryCondition(kernel_type,
"ins_momentum_nobc_bc", params);
1023 std::string kernel_type;
1024 if (getParam<bool>(
"laplace"))
1025 kernel_type =
"INSMomentumNoBCBCLaplaceForm";
1027 kernel_type =
"INSMomentumNoBCBCTractionForm";
1033 params.
set<NonlinearVariableName>(
"variable") = momentums[
component];
1034 _problem->addBoundaryCondition(kernel_type, momentums[
component] +
"_nobc_bc", params);
1043 params.
set<std::vector<SubdomainName>>(
"block") =
_blocks;
1053 params.
set<MaterialPropertyName>(
"mu_name") =
1054 getParam<MaterialPropertyName>(
"dynamic_viscosity_name");
1055 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
1056 params.
set<
Real>(
"alpha") = getParam<Real>(
"alpha");
1057 params.
set<
bool>(
"laplace") = getParam<bool>(
"laplace");
1059 params.
set<
bool>(
"convective_term") = getParam<bool>(
"convective_term");
1061 params.
set<
bool>(
"transient_term") = (
_type ==
"transient");
1075 params.
set<MaterialPropertyName>(
"mu_name") =
1076 getParam<MaterialPropertyName>(
"dynamic_viscosity_name");
1077 params.
set<MaterialPropertyName>(
"rho_name") = getParam<MaterialPropertyName>(
"density_name");
1078 params.
set<
bool>(
"integrate_p_by_parts") = getParam<bool>(
"integrate_p_by_parts");
BoundaryName _pinned_node
The node set name of the pinned node.
static InputParameters validParams()
VectorValue< Real > RealVectorValue
std::vector< std::string > getMeshGeneratorNames() const
void addINSTemperatureBC()
static const std::string component
MooseEnum _type
Equation type, transient or steady-state.
static const std::string velocity_z
std::vector< FunctionName > _temperature_function
Temperature function names at fixed temperature boundaries.
static const std::string velocity_x
static const std::string temperature
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
VariableName _temperature_variable_name
Temperature variable name to facilitate temperature variable added outside.
virtual void act() override
void mooseWarning(Args &&... args) const
std::vector< BoundaryName > _velocity_boundary
Boundaries with velocity specified.
static MooseEnum getNonlinearVariableFamilies()
bool isParamValid(const std::string &name) const
std::vector< SubdomainName > _blocks
Subdomains Navier-Stokes equation is defined on.
static InputParameters validParams()
static MooseEnum getNonlinearVariableOrders()
This class allows us to have a section of the input file like the following which automatically adds ...
const std::string _pressure_variable_name
pressure variable name
std::set< SubdomainID > _block_ids
Subdomain IDs.
bool _use_ad
Whether we use AD or not.
T string_to_enum(const std::string &s)
void setNoBCCommonParams(InputParameters ¶ms)
const std::string & _current_task
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
static const std::string velocity_y
void paramError(const std::string ¶m, Args... args) const
void addAmbientConvectionParams(InputParameters ¶ms)
Global for adding ambient convection parameters.
std::string stringify(const T &t)
libMesh::FEType _fe_type
FE type for various variables.
const MeshGenerator & appendMeshGenerator(const std::string &type, const std::string &name, InputParameters params)
std::vector< FunctionName > _pressure_function
Pressure function names at pressure boundaries.
std::shared_ptr< MooseMesh > & _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
INSAction(const InputParameters ¶meters)
std::vector< BoundaryName > _fixed_temperature_boundary
Boundaries with temperature specified.
std::vector< VariableName > CoupledName
static const std::string pressure
bool _has_pinned_node
Whether or not we need to pin pressure at a node.
void setKernelCommonParams(InputParameters ¶ms)
unsigned int _dim
Mesh dimension.
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
static const std::string velocity
registerMooseAction("NavierStokesApp", INSAction, "append_mesh_generator")
std::vector< BoundaryName > _pressure_boundary
Boundaries with pressure specified.
void addINSPinnedPressureBC()
std::vector< BoundaryName > _no_bc_boundary
No-BC boundaries.
std::vector< FunctionName > _velocity_function
Velocity function names at velocity boundaries.