18 params.
addRequiredParam<UserObjectName>(
"rhie_chow_user_object",
"The rhie-chow user-object");
24 "momentum_systems",
"The solver system(s) for the momentum equation(s).");
26 "The solver system for the pressure equation.");
27 params.
addParam<SolverSystemName>(
"energy_system",
"The solver system for the energy equation.");
28 params.
addParam<SolverSystemName>(
"solid_energy_system",
29 "The solver system for the solid energy equation.");
30 params.
addParam<std::vector<SolverSystemName>>(
31 "passive_scalar_systems", {},
"The solver system for each scalar advection equation.");
32 params.
addParam<std::vector<SolverSystemName>>(
33 "turbulence_systems", {},
"The solver system for each surrogate turbulence equation.");
40 "momentum_equation_relaxation",
42 "0.0<momentum_equation_relaxation<=1.0",
43 "The relaxation which should be used for the momentum equation. (=1 for no relaxation, " 44 "diagonal dominance will still be enforced)");
48 "Singleton PETSc options for the momentum equation");
51 "Names of PETSc name/value pairs for the momentum equation");
52 params.
addParam<std::vector<std::string>>(
53 "momentum_petsc_options_value",
54 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 58 "momentum_absolute_tolerance",
60 "0.0<momentum_absolute_tolerance",
61 "The absolute tolerance on the normalized residual of the momentum equation.");
65 "0.0<=momentum_l_tol & momentum_l_tol<1.0",
66 "The relative tolerance on the normalized residual in the " 67 "linear solver of the momentum equation.");
70 "0.0<momentum_l_abs_tol",
71 "The absolute tolerance on the normalized residual in the " 72 "linear solver of the momentum equation.");
76 "The maximum allowed iterations in the linear solver of the momentum equation.");
79 "momentum_equation_relaxation momentum_petsc_options momentum_petsc_options_iname " 80 "momentum_petsc_options_value momentum_petsc_options_value momentum_absolute_tolerance " 81 "momentum_l_tol momentum_l_abs_tol momentum_l_max_its momentum_systems",
88 "pressure_variable_relaxation",
90 "0.0<pressure_variable_relaxation<=1.0",
91 "The relaxation which should be used for the pressure variable (=1 for no relaxation).");
95 "Singleton PETSc options for the pressure equation");
98 "Names of PETSc name/value pairs for the pressure equation");
99 params.
addParam<std::vector<std::string>>(
100 "pressure_petsc_options_value",
101 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 102 "pressure equation");
105 "pressure_absolute_tolerance",
107 "0.0<pressure_absolute_tolerance",
108 "The absolute tolerance on the normalized residual of the pressure equation.");
112 "0.0<=pressure_l_tol & pressure_l_tol<1.0",
113 "The relative tolerance on the normalized residual in the " 114 "linear solver of the pressure equation.");
117 "0.0<pressure_l_abs_tol",
118 "The absolute tolerance on the normalized residual in the " 119 "linear solver of the pressure equation.");
121 "pressure_l_max_its",
123 "The maximum allowed iterations in the linear solver of the pressure equation.");
126 "pressure_variable_relaxation pressure_petsc_options pressure_petsc_options_iname " 127 "pressure_petsc_options_value pressure_petsc_options_value pressure_absolute_tolerance " 128 "pressure_l_tol pressure_l_abs_tol pressure_l_max_its pressure_system",
129 "Pressure Equation");
136 "pin_pressure",
false,
"If the pressure field needs to be pinned at a point.");
138 "pressure_pin_value", 0.0,
"The value which needs to be enforced for the pressure.");
139 params.
addParam<Point>(
"pressure_pin_point",
"The point where the pressure needs to be pinned.");
141 params.
addParamNamesToGroup(
"pin_pressure pressure_pin_value pressure_pin_point",
"Pressure Pin");
146 "Use this to print the coupling and solution fields and matrices throughout the iteration.");
153 "energy_equation_relaxation",
155 "0.0<energy_equation_relaxation<=1.0",
156 "The relaxation which should be used for the energy equation. (=1 for no relaxation, " 157 "diagonal dominance will still be enforced)");
161 "Singleton PETSc options for the energy equation");
164 "Names of PETSc name/value pairs for the energy equation");
165 params.
addParam<std::vector<std::string>>(
166 "energy_petsc_options_value",
167 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 171 "energy_absolute_tolerance",
173 "0.0<energy_absolute_tolerance",
174 "The absolute tolerance on the normalized residual of the energy equation.");
178 "0.0<=energy_l_tol & energy_l_tol<1.0",
179 "The relative tolerance on the normalized residual in the " 180 "linear solver of the energy equation.");
183 "0.0<energy_l_abs_tol",
184 "The absolute tolerance on the normalized residual in the " 185 "linear solver of the energy equation.");
189 "0<energy_l_max_its",
190 "The maximum allowed iterations in the linear solver of the energy equation.");
193 "energy_equation_relaxation energy_petsc_options energy_petsc_options_iname " 194 "energy_petsc_options_value energy_petsc_options_value energy_absolute_tolerance " 195 "energy_l_tol energy_l_abs_tol energy_l_max_its",
204 "Singleton PETSc options for the solid energy equation");
207 "Names of PETSc name/value pairs for the solid energy equation");
208 params.
addParam<std::vector<std::string>>(
209 "solid_energy_petsc_options_value",
210 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 211 "solid energy equation");
214 "solid_energy_absolute_tolerance",
216 "0.0<solid_energy_absolute_tolerance",
217 "The absolute tolerance on the normalized residual of the solid energy equation.");
221 "0.0<=solid_energy_l_tol & solid_energy_l_tol<1.0",
222 "The relative tolerance on the normalized residual in the " 223 "linear solver of the solid energy equation.");
227 "0.0<solid_energy_l_abs_tol",
228 "The absolute tolerance on the normalized residual in the " 229 "linear solver of the solid energy equation.");
231 "solid_energy_l_max_its",
233 "0<solid_energy_l_max_its",
234 "The maximum allowed iterations in the linear solver of the solid energy equation.");
237 "solid_energy_petsc_options_value solid_energy_absolute_tolerance " 238 "solid_energy_l_tol solid_energy_l_abs_tol solid_energy_l_max_its",
239 "Solid Energy Equation");
244 params.
addParam<std::vector<Real>>(
"passive_scalar_equation_relaxation",
246 "The relaxation which should be used for the passive scalar " 247 "equations. (=1 for no relaxation, " 248 "diagonal dominance will still be enforced)");
252 "Singleton PETSc options for the passive scalar equation(s)");
254 "passive_scalar_petsc_options_iname",
256 "Names of PETSc name/value pairs for the passive scalar equation(s)");
257 params.
addParam<std::vector<std::string>>(
258 "passive_scalar_petsc_options_value",
259 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 260 "passive scalar equation(s)");
262 "passive_scalar_absolute_tolerance",
264 "The absolute tolerance(s) on the normalized residual(s) of the passive scalar equation(s).");
267 "0.0<=passive_scalar_l_tol & passive_scalar_l_tol<1.0",
268 "The relative tolerance on the normalized residual in the " 269 "linear solver of the passive scalar equation(s).");
272 "0.0<passive_scalar_l_abs_tol",
273 "The absolute tolerance on the normalized residual in the " 274 "linear solver of the passive scalar equation(s).");
276 "passive_scalar_l_max_its",
278 "The maximum allowed iterations in the linear solver of the turbulence equation.");
281 "passive_scalar_systems passive_scalar_equation_relaxation passive_scalar_petsc_options " 282 "passive_scalar_petsc_options_iname " 283 "passive_scalar_petsc_options_value passive_scalar_petsc_options_value " 284 "passive_scalar_absolute_tolerance " 285 "passive_scalar_l_tol passive_scalar_l_abs_tol passive_scalar_l_max_its",
286 "passive_scalar Equation");
291 params.
addParam<std::vector<Real>>(
"turbulence_equation_relaxation",
293 "The relaxation which should be used for the turbulence " 294 "equations. (=1 for no relaxation, " 295 "diagonal dominance will still be enforced)");
297 params.
addParam<std::vector<Real>>(
"turbulence_field_relaxation",
299 "The relaxation which should be used for the turbulence " 303 "turbulence_field_min_limit",
305 "The lower limit imposed on turbulent quantities. The recommended value for robustness " 306 "is 1e-8. This is the imposed default if not set.");
310 "Singleton PETSc options for the turbulence equation(s)");
313 "Names of PETSc name/value pairs for the turbulence equation(s)");
314 params.
addParam<std::vector<std::string>>(
315 "turbulence_petsc_options_value",
316 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 317 "turbulence equation(s)");
319 "turbulence_absolute_tolerance",
321 "The absolute tolerance(s) on the normalized residual(s) of the turbulence equation(s).");
324 "0.0<=turbulence_l_tol & turbulence_l_tol<1.0",
325 "The relative tolerance on the normalized residual in the " 326 "linear solver of the turbulence equation(s).");
329 "0.0<turbulence_l_abs_tol",
330 "The absolute tolerance on the normalized residual in the " 331 "linear solver of the turbulence equation(s).");
333 "turbulence_l_max_its",
335 "The maximum allowed iterations in the linear solver of the turbulence equation.");
338 "turbulence_equation_relaxation " 339 "turbulence_field_relaxation " 340 "turbulence_field_min_limit " 341 "turbulence_petsc_options " 342 "turbulence_petsc_options_iname " 343 "turbulence_petsc_options_value turbulence_petsc_options_value " 344 "turbulence_absolute_tolerance " 345 "turbulence_l_tol turbulence_l_abs_tol turbulence_l_max_its",
346 "Turbulence Equations");
356 "The number of momentum-pressure-(other fields) iterations needed.");
358 params.
addParam<
bool>(
"continue_on_max_its",
360 "If solve should continue if maximum number of iterations is hit.");
368 _momentum_system_names(getParam<
std::vector<SolverSystemName>>(
"momentum_systems")),
369 _momentum_l_abs_tol(getParam<
Real>(
"momentum_l_abs_tol")),
370 _momentum_equation_relaxation(getParam<
Real>(
"momentum_equation_relaxation")),
371 _pressure_system_name(getParam<SolverSystemName>(
"pressure_system")),
372 _pressure_l_abs_tol(getParam<
Real>(
"pressure_l_abs_tol")),
373 _pressure_variable_relaxation(getParam<
Real>(
"pressure_variable_relaxation")),
374 _pin_pressure(getParam<bool>(
"pin_pressure")),
375 _pressure_pin_value(getParam<
Real>(
"pressure_pin_value")),
377 _has_energy_system(isParamValid(
"energy_system")),
378 _energy_equation_relaxation(getParam<
Real>(
"energy_equation_relaxation")),
379 _energy_l_abs_tol(getParam<
Real>(
"energy_l_abs_tol")),
380 _has_solid_energy_system(_has_energy_system && isParamValid(
"solid_energy_system")),
381 _solid_energy_l_abs_tol(getParam<
Real>(
"solid_energy_l_abs_tol")),
382 _passive_scalar_system_names(getParam<
std::vector<SolverSystemName>>(
"passive_scalar_systems")),
383 _has_passive_scalar_systems(!_passive_scalar_system_names.empty()),
384 _passive_scalar_equation_relaxation(
385 getParam<
std::vector<
Real>>(
"passive_scalar_equation_relaxation")),
386 _passive_scalar_l_abs_tol(getParam<
Real>(
"passive_scalar_l_abs_tol")),
387 _turbulence_system_names(getParam<
std::vector<SolverSystemName>>(
"turbulence_systems")),
388 _has_turbulence_systems(!_turbulence_system_names.empty()),
389 _turbulence_equation_relaxation(getParam<
std::vector<
Real>>(
"turbulence_equation_relaxation")),
390 _turbulence_field_relaxation(getParam<
std::vector<
Real>>(
"turbulence_field_relaxation")),
391 _turbulence_field_min_limit(getParam<
std::vector<
Real>>(
"turbulence_field_min_limit")),
392 _turbulence_l_abs_tol(getParam<
Real>(
"turbulence_l_abs_tol")),
393 _momentum_absolute_tolerance(getParam<
Real>(
"momentum_absolute_tolerance")),
394 _pressure_absolute_tolerance(getParam<
Real>(
"pressure_absolute_tolerance")),
395 _energy_absolute_tolerance(getParam<
Real>(
"energy_absolute_tolerance")),
396 _solid_energy_absolute_tolerance(getParam<
Real>(
"solid_energy_absolute_tolerance")),
397 _passive_scalar_absolute_tolerance(
398 getParam<
std::vector<
Real>>(
"passive_scalar_absolute_tolerance")),
399 _turbulence_absolute_tolerance(getParam<
std::vector<
Real>>(
"turbulence_absolute_tolerance")),
400 _num_iterations(getParam<unsigned
int>(
"num_iterations")),
401 _continue_on_max_its(getParam<bool>(
"continue_on_max_its")),
402 _print_fields(getParam<bool>(
"print_fields"))
406 "The number of momentum components should be equal to the number of " 407 "spatial dimensions on the mesh.");
409 const auto & momentum_petsc_options = getParam<MultiMooseEnum>(
"momentum_petsc_options");
410 const auto & momentum_petsc_pair_options = getParam<MooseEnumItem, std::string>(
411 "momentum_petsc_options_iname",
"momentum_petsc_options_value");
423 getParam<unsigned int>(
"momentum_l_max_its");
425 const auto & pressure_petsc_options = getParam<MultiMooseEnum>(
"pressure_petsc_options");
426 const auto & pressure_petsc_pair_options = getParam<MooseEnumItem, std::string>(
427 "pressure_petsc_options_iname",
"pressure_petsc_options_value");
439 getParam<unsigned int>(
"pressure_l_max_its");
443 const auto & energy_petsc_options = getParam<MultiMooseEnum>(
"energy_petsc_options");
444 const auto & energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
445 "energy_petsc_options_iname",
"energy_petsc_options_value");
457 {
"energy_petsc_options",
458 "energy_petsc_options_iname",
459 "energy_petsc_options_value",
463 "energy_absolute_tolerance",
464 "energy_equation_relaxation"},
469 const auto & solid_energy_petsc_options =
470 getParam<MultiMooseEnum>(
"solid_energy_petsc_options");
471 const auto & solid_energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
472 "solid_energy_petsc_options_iname",
"solid_energy_petsc_options_value");
483 getParam<Real>(
"solid_energy_l_abs_tol");
485 getParam<unsigned int>(
"solid_energy_l_max_its");
489 {
"solid_energy_petsc_options",
490 "solid_energy_petsc_options_iname",
491 "solid_energy_petsc_options_value",
492 "solid_energy_l_tol",
493 "solid_energy_l_abs_tol",
494 "solid_energy_l_max_its",
495 "solid_energy_absolute_tolerance",
496 "solid_energy_equation_relaxation"},
504 paramError(
"passive_scalar_equation_relaxation",
505 "The number of equation relaxation parameters does not match the number of " 506 "passive scalar equations!");
508 paramError(
"passive_scalar_absolute_tolerance",
509 "The number of absolute tolerances does not match the number of " 510 "passive scalar equations!");
514 const auto & passive_scalar_petsc_options =
515 getParam<MultiMooseEnum>(
"passive_scalar_petsc_options");
516 const auto & passive_scalar_petsc_pair_options = getParam<MooseEnumItem, std::string>(
517 "passive_scalar_petsc_options_iname",
"passive_scalar_petsc_options_value");
527 getParam<Real>(
"passive_scalar_l_tol");
529 getParam<Real>(
"passive_scalar_l_abs_tol");
531 getParam<unsigned int>(
"passive_scalar_l_max_its");
535 {
"passive_scalar_petsc_options",
536 "passive_scalar_petsc_options_iname",
537 "passive_scalar_petsc_options_value",
538 "passive_scalar_l_tol",
539 "passive_scalar_l_abs_tol",
540 "passive_scalar_l_max_its",
541 "passive_scalar_equation_relaxation",
542 "passive_scalar_absolute_tolerance"},
551 "The number of equation relaxation parameters does not match the number of " 552 "turbulence equations!");
555 "The number of absolute tolerances does not match the number of " 556 "turbulence equations!");
565 const auto & turbulence_petsc_options = getParam<MultiMooseEnum>(
"turbulence_petsc_options");
566 const auto & turbulence_petsc_pair_options = getParam<MooseEnumItem, std::string>(
567 "turbulence_petsc_options_iname",
"turbulence_petsc_options_value");
579 getParam<unsigned int>(
"turbulence_l_max_its");
583 {
"turbulence_petsc_options",
584 "turbulence_petsc_options_iname",
585 "turbulence_petsc_options_value",
587 "turbulence_l_abs_tol",
588 "turbulence_l_max_its",
589 "turbulence_equation_relaxation",
590 "turbulence_field_relaxation",
591 "turbulence_field_min_limit",
592 "turbulence_absolute_tolerance"},
602 getParam<Point>(
"pressure_pin_point"));
607 const std::vector<std::string> & dependent_parameters,
608 const bool should_be_defined)
610 for (
const auto & param : dependent_parameters)
613 "This parameter should " + std::string(should_be_defined ?
"" :
"not") +
614 " be given by the user with the corresponding " + main_parameter +
MultiMooseEnum getCommonPetscKeys()
SIMPLESolverConfiguration _momentum_linear_control
Options for the linear solver of the momentum equation.
SIMPLESolverConfiguration _turbulence_linear_control
Options for the linear solver of the turbulence equation(s)
SIMPLESolverConfiguration _energy_linear_control
Options for the linear solver of the energy equation.
const unsigned int invalid_uint
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
Options which hold the petsc settings for the turbulence equation(s)
const bool _has_energy_system
Boolean for easy check if a fluid energy system shall be solved or not.
std::vector< Real > _turbulence_field_relaxation
The user-defined relaxation parameter(s) for the turbulence field(s)
Moose::PetscSupport::PetscOptions _solid_energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
const bool _has_turbulence_systems
Boolean for easy check if a turbulence scalar systems shall be solved or not.
void checkDependentParameterError(const std::string &main_parameter, const std::vector< std::string > &dependent_parameters, const bool should_be_defined)
static InputParameters validParams()
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
std::map< std::string, Real > real_valued_data
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
const std::vector< SolverSystemName > & _passive_scalar_system_names
The names of the passive scalar systems.
SIMPLESolverConfiguration _passive_scalar_linear_control
Options for the linear solver of the passive scalar equation(s)
Moose::PetscSupport::PetscOptions _energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
SIMPLESolverConfiguration _pressure_linear_control
Options for the linear solver of the pressure equation.
MultiMooseEnum getCommonPetscFlags()
Moose::PetscSupport::PetscOptions _passive_scalar_petsc_options
Options which hold the petsc settings for the passive scalar equation(s)
virtual unsigned int dimension() const
std::map< std::string, int > int_valued_data
Moose::PetscSupport::PetscOptions _momentum_petsc_options
Options which hold the petsc settings for the momentum equation.
const std::vector< Real > _passive_scalar_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in passive scalars.
dof_id_type _pressure_pin_dof
The dof ID where the pressure needs to be pinned.
const std::vector< SolverSystemName > & _turbulence_system_names
The names of the turbulence systems.
const bool _pin_pressure
If the pressure needs to be pinned.
void paramError(const std::string ¶m, Args... args) const
dof_id_type findPointDoFID(const MooseVariableFieldBase &variable, const MooseMesh &mesh, const Point &point)
Find the ID of the degree of freedom which corresponds to the variable and a given point on the mesh...
const std::vector< Real > _turbulence_equation_relaxation
The user-defined relaxation parameter(s) for the turbulence equation(s)
const std::vector< SolverSystemName > & _momentum_system_names
The names of the momentum systems.
bool isParamSetByUser(const std::string &nm) const
const std::vector< Real > _passive_scalar_equation_relaxation
The user-defined relaxation parameter(s) for the passive scalar equation(s)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
SIMPLESolveBase(Executioner &ex)
void addPetscPairsToPetscOptions(const std::vector< std::pair< MooseEnumItem, std::string >> &petsc_pair_options, const unsigned int mesh_dimension, const std::string &prefix, const ParallelParamObject ¶m_object, PetscOptions &petsc_options)
virtual MooseMesh & mesh() override
const InputParameters & parameters() const
const bool _has_passive_scalar_systems
Boolean for easy check if a passive scalar systems shall be solved or not.
void addPetscFlagsToPetscOptions(const MultiMooseEnum &petsc_flags, const std::string &prefix, const ParallelParamObject ¶m_object, PetscOptions &petsc_options)
SIMPLESolverConfiguration _solid_energy_linear_control
Options for the linear solver of the energy equation.
std::vector< Real > _turbulence_field_min_limit
The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..
const std::vector< Real > _turbulence_absolute_tolerance
The user-defined absolute tolerance for determining the convergence turbulence variables.
void setupPressurePin()
Setup pressure pin if there is need for one.
void ErrorVector unsigned int
Moose::PetscSupport::PetscOptions _pressure_petsc_options
Options which hold the petsc settings for the pressure equation.
const bool _has_solid_energy_system
Boolean for easy check if a solid energy system shall be solved or not.