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.");
38 "momentum_equation_relaxation",
40 "0.0<momentum_equation_relaxation<=1.0",
41 "The relaxation which should be used for the momentum equation. (=1 for no relaxation, " 42 "diagonal dominance will still be enforced)");
46 "Singleton PETSc options for the momentum equation");
49 "Names of PETSc name/value pairs for the momentum equation");
50 params.
addParam<std::vector<std::string>>(
51 "momentum_petsc_options_value",
52 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 56 "momentum_absolute_tolerance",
58 "0.0<momentum_absolute_tolerance",
59 "The absolute tolerance on the normalized residual of the momentum equation.");
63 "0.0<=momentum_l_tol & momentum_l_tol<1.0",
64 "The relative tolerance on the normalized residual in the " 65 "linear solver of the momentum equation.");
68 "0.0<momentum_l_abs_tol",
69 "The absolute tolerance on the normalized residual in the " 70 "linear solver of the momentum equation.");
74 "The maximum allowed iterations in the linear solver of the momentum equation.");
77 "momentum_equation_relaxation momentum_petsc_options momentum_petsc_options_iname " 78 "momentum_petsc_options_value momentum_petsc_options_value momentum_absolute_tolerance " 79 "momentum_l_tol momentum_l_abs_tol momentum_l_max_its momentum_systems",
86 "pressure_variable_relaxation",
88 "0.0<pressure_variable_relaxation<=1.0",
89 "The relaxation which should be used for the pressure variable (=1 for no relaxation).");
93 "Singleton PETSc options for the pressure equation");
96 "Names of PETSc name/value pairs for the pressure equation");
97 params.
addParam<std::vector<std::string>>(
98 "pressure_petsc_options_value",
99 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 100 "pressure equation");
103 "pressure_absolute_tolerance",
105 "0.0<pressure_absolute_tolerance",
106 "The absolute tolerance on the normalized residual of the pressure equation.");
110 "0.0<=pressure_l_tol & pressure_l_tol<1.0",
111 "The relative tolerance on the normalized residual in the " 112 "linear solver of the pressure equation.");
115 "0.0<pressure_l_abs_tol",
116 "The absolute tolerance on the normalized residual in the " 117 "linear solver of the pressure equation.");
119 "pressure_l_max_its",
121 "The maximum allowed iterations in the linear solver of the pressure equation.");
124 "pressure_variable_relaxation pressure_petsc_options pressure_petsc_options_iname " 125 "pressure_petsc_options_value pressure_petsc_options_value pressure_absolute_tolerance " 126 "pressure_l_tol pressure_l_abs_tol pressure_l_max_its pressure_system",
127 "Pressure Equation");
134 "pin_pressure",
false,
"If the pressure field needs to be pinned at a point.");
136 "pressure_pin_value", 0.0,
"The value which needs to be enforced for the pressure.");
137 params.
addParam<Point>(
"pressure_pin_point",
"The point where the pressure needs to be pinned.");
139 params.
addParamNamesToGroup(
"pin_pressure pressure_pin_value pressure_pin_point",
"Pressure Pin");
144 "Use this to print the coupling and solution fields and matrices throughout the iteration.");
151 "energy_equation_relaxation",
153 "0.0<energy_equation_relaxation<=1.0",
154 "The relaxation which should be used for the energy equation. (=1 for no relaxation, " 155 "diagonal dominance will still be enforced)");
159 "Singleton PETSc options for the energy equation");
162 "Names of PETSc name/value pairs for the energy equation");
163 params.
addParam<std::vector<std::string>>(
164 "energy_petsc_options_value",
165 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 169 "energy_absolute_tolerance",
171 "0.0<energy_absolute_tolerance",
172 "The absolute tolerance on the normalized residual of the energy equation.");
176 "0.0<=energy_l_tol & energy_l_tol<1.0",
177 "The relative tolerance on the normalized residual in the " 178 "linear solver of the energy equation.");
181 "0.0<energy_l_abs_tol",
182 "The absolute tolerance on the normalized residual in the " 183 "linear solver of the energy equation.");
187 "0<energy_l_max_its",
188 "The maximum allowed iterations in the linear solver of the energy equation.");
191 "energy_equation_relaxation energy_petsc_options energy_petsc_options_iname " 192 "energy_petsc_options_value energy_petsc_options_value energy_absolute_tolerance " 193 "energy_l_tol energy_l_abs_tol energy_l_max_its",
202 "Singleton PETSc options for the solid energy equation");
205 "Names of PETSc name/value pairs for the solid energy equation");
206 params.
addParam<std::vector<std::string>>(
207 "solid_energy_petsc_options_value",
208 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 209 "solid energy equation");
212 "solid_energy_absolute_tolerance",
214 "0.0<solid_energy_absolute_tolerance",
215 "The absolute tolerance on the normalized residual of the solid energy equation.");
219 "0.0<=solid_energy_l_tol & solid_energy_l_tol<1.0",
220 "The relative tolerance on the normalized residual in the " 221 "linear solver of the solid energy equation.");
225 "0.0<solid_energy_l_abs_tol",
226 "The absolute tolerance on the normalized residual in the " 227 "linear solver of the solid energy equation.");
229 "solid_energy_l_max_its",
231 "0<solid_energy_l_max_its",
232 "The maximum allowed iterations in the linear solver of the solid energy equation.");
235 "solid_energy_petsc_options_value solid_energy_absolute_tolerance " 236 "solid_energy_l_tol solid_energy_l_abs_tol solid_energy_l_max_its",
237 "Solid Energy Equation");
242 params.
addParam<std::vector<Real>>(
"passive_scalar_equation_relaxation",
244 "The relaxation which should be used for the passive scalar " 245 "equations. (=1 for no relaxation, " 246 "diagonal dominance will still be enforced)");
250 "Singleton PETSc options for the passive scalar equation(s)");
252 "passive_scalar_petsc_options_iname",
254 "Names of PETSc name/value pairs for the passive scalar equation(s)");
255 params.
addParam<std::vector<std::string>>(
256 "passive_scalar_petsc_options_value",
257 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the " 258 "passive scalar equation(s)");
260 "passive_scalar_absolute_tolerance",
262 "The absolute tolerance(s) on the normalized residual(s) of the passive scalar equation(s).");
265 "0.0<=passive_scalar_l_tol & passive_scalar_l_tol<1.0",
266 "The relative tolerance on the normalized residual in the " 267 "linear solver of the passive scalar equation(s).");
270 "0.0<passive_scalar_l_abs_tol",
271 "The absolute tolerance on the normalized residual in the " 272 "linear solver of the passive scalar equation(s).");
274 "passive_scalar_l_max_its",
276 "The maximum allowed iterations in the linear solver of the turbulence equation.");
279 "passive_scalar_systems passive_scalar_equation_relaxation passive_scalar_petsc_options " 280 "passive_scalar_petsc_options_iname " 281 "passive_scalar_petsc_options_value passive_scalar_petsc_options_value " 282 "passive_scalar_absolute_tolerance " 283 "passive_scalar_l_tol passive_scalar_l_abs_tol passive_scalar_l_max_its",
284 "passive_scalar Equation");
294 "The number of momentum-pressure-(other fields) iterations needed.");
296 params.
addParam<
bool>(
"continue_on_max_its",
298 "If solve should continue if maximum number of iterations is hit.");
306 _momentum_system_names(getParam<
std::vector<SolverSystemName>>(
"momentum_systems")),
307 _momentum_l_abs_tol(getParam<
Real>(
"momentum_l_abs_tol")),
308 _momentum_equation_relaxation(getParam<
Real>(
"momentum_equation_relaxation")),
309 _pressure_system_name(getParam<SolverSystemName>(
"pressure_system")),
310 _pressure_l_abs_tol(getParam<
Real>(
"pressure_l_abs_tol")),
311 _pressure_variable_relaxation(getParam<
Real>(
"pressure_variable_relaxation")),
312 _pin_pressure(getParam<bool>(
"pin_pressure")),
313 _pressure_pin_value(getParam<
Real>(
"pressure_pin_value")),
315 _has_energy_system(isParamValid(
"energy_system")),
316 _energy_equation_relaxation(getParam<
Real>(
"energy_equation_relaxation")),
317 _energy_l_abs_tol(getParam<
Real>(
"energy_l_abs_tol")),
318 _has_solid_energy_system(_has_energy_system && isParamValid(
"solid_energy_system")),
319 _solid_energy_l_abs_tol(getParam<
Real>(
"solid_energy_l_abs_tol")),
320 _passive_scalar_system_names(getParam<
std::vector<SolverSystemName>>(
"passive_scalar_systems")),
321 _has_passive_scalar_systems(!_passive_scalar_system_names.empty()),
322 _passive_scalar_equation_relaxation(
323 getParam<
std::vector<
Real>>(
"passive_scalar_equation_relaxation")),
324 _passive_scalar_l_abs_tol(getParam<
Real>(
"passive_scalar_l_abs_tol")),
325 _momentum_absolute_tolerance(getParam<
Real>(
"momentum_absolute_tolerance")),
326 _pressure_absolute_tolerance(getParam<
Real>(
"pressure_absolute_tolerance")),
327 _energy_absolute_tolerance(getParam<
Real>(
"energy_absolute_tolerance")),
328 _solid_energy_absolute_tolerance(getParam<
Real>(
"solid_energy_absolute_tolerance")),
329 _passive_scalar_absolute_tolerance(
330 getParam<
std::vector<
Real>>(
"passive_scalar_absolute_tolerance")),
331 _num_iterations(getParam<unsigned
int>(
"num_iterations")),
332 _continue_on_max_its(getParam<bool>(
"continue_on_max_its")),
333 _print_fields(getParam<bool>(
"print_fields"))
337 "The number of momentum components should be equal to the number of " 338 "spatial dimensions on the mesh.");
340 const auto & momentum_petsc_options = getParam<MultiMooseEnum>(
"momentum_petsc_options");
341 const auto & momentum_petsc_pair_options = getParam<MooseEnumItem, std::string>(
342 "momentum_petsc_options_iname",
"momentum_petsc_options_value");
354 getParam<unsigned int>(
"momentum_l_max_its");
356 const auto & pressure_petsc_options = getParam<MultiMooseEnum>(
"pressure_petsc_options");
357 const auto & pressure_petsc_pair_options = getParam<MooseEnumItem, std::string>(
358 "pressure_petsc_options_iname",
"pressure_petsc_options_value");
370 getParam<unsigned int>(
"pressure_l_max_its");
374 const auto & energy_petsc_options = getParam<MultiMooseEnum>(
"energy_petsc_options");
375 const auto & energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
376 "energy_petsc_options_iname",
"energy_petsc_options_value");
388 {
"energy_petsc_options",
389 "energy_petsc_options_iname",
390 "energy_petsc_options_value",
394 "energy_absolute_tolerance",
395 "energy_equation_relaxation"},
400 const auto & solid_energy_petsc_options =
401 getParam<MultiMooseEnum>(
"solid_energy_petsc_options");
402 const auto & solid_energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
403 "solid_energy_petsc_options_iname",
"solid_energy_petsc_options_value");
414 getParam<Real>(
"solid_energy_l_abs_tol");
416 getParam<unsigned int>(
"solid_energy_l_max_its");
420 {
"solid_energy_petsc_options",
421 "solid_energy_petsc_options_iname",
422 "solid_energy_petsc_options_value",
423 "solid_energy_l_tol",
424 "solid_energy_l_abs_tol",
425 "solid_energy_l_max_its",
426 "solid_energy_absolute_tolerance",
427 "solid_energy_equation_relaxation"},
435 paramError(
"passive_scalar_equation_relaxation",
436 "The number of equation relaxation parameters does not match the number of " 437 "passive scalar equations!");
439 paramError(
"passive_scalar_absolute_tolerance",
440 "The number of absolute tolerances does not match the number of " 441 "passive scalar equations!");
445 const auto & passive_scalar_petsc_options =
446 getParam<MultiMooseEnum>(
"passive_scalar_petsc_options");
447 const auto & passive_scalar_petsc_pair_options = getParam<MooseEnumItem, std::string>(
448 "passive_scalar_petsc_options_iname",
"passive_scalar_petsc_options_value");
458 getParam<Real>(
"passive_scalar_l_tol");
460 getParam<Real>(
"passive_scalar_l_abs_tol");
462 getParam<unsigned int>(
"passive_scalar_l_max_its");
466 {
"passive_scalar_petsc_options",
467 "passive_scalar_petsc_options_iname",
468 "passive_scalar_petsc_options_value",
469 "passive_scalar_l_tol",
470 "passive_scalar_l_abs_tol",
471 "passive_scalar_l_max_its",
472 "passive_scalar_equation_relaxation",
473 "passive_scalar_absolute_tolerance"},
483 getParam<Point>(
"pressure_pin_point"));
488 const std::vector<std::string> & dependent_parameters,
489 const bool should_be_defined)
491 for (
const auto & param : dependent_parameters)
494 "This parameter should " + std::string(should_be_defined ?
"" :
"not") +
495 " 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 _energy_linear_control
Options for the linear solver of the energy equation.
const unsigned int invalid_uint
const bool _has_energy_system
Boolean for easy check if a fluid energy system shall be solved or not.
Moose::PetscSupport::PetscOptions _solid_energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
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 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< 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.
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.