https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SIMPLESolveBase Class Referenceabstract

Solve class serving as a base class for the two SIMPLE solvers that operate with different assembly algorithms. More...

#include <SIMPLESolveBase.h>

Inheritance diagram for SIMPLESolveBase:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 SIMPLESolveBase (Executioner &ex)
 
virtual void setInnerSolve (SolveObject &) override
 
virtual void linkRhieChowUserObject ()=0
 Fetch the Rhie Chow user object that is reponsible for determining face velocities and mass flux.
 
void setupPressurePin ()
 Setup pressure pin if there is need for one.
 
virtual void checkIntegrity ()
 Check if the user defined time kernels.
 
virtual void initialSetup ()
 
virtual bool solve ()=0
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Member Functions

void checkDependentParameterError (const std::string &main_parameter, const std::vector< std::string > &dependent_parameters, const bool should_be_defined)
 
virtual std::vector< std::pair< unsigned int, Real > > solveMomentumPredictor ()=0
 Solve a momentum predictor step with a fixed pressure field.
 
virtual std::pair< unsigned int, Real > solvePressureCorrector ()=0
 Solve a pressure corrector step.
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &) const
 

Protected Attributes

const std::vector< SolverSystemName > & _momentum_system_names
 The names of the momentum systems.
 
SIMPLESolverConfiguration _momentum_linear_control
 Options for the linear solver of the momentum equation.
 
const Real _momentum_l_abs_tol
 Absolute linear tolerance for the momentum equation(s).
 
Moose::PetscSupport::PetscOptions _momentum_petsc_options
 Options which hold the petsc settings for the momentum equation.
 
const Real _momentum_equation_relaxation
 The user-defined relaxation parameter for the momentum equation.
 
const SolverSystemName & _pressure_system_name
 The name of the pressure system.
 
SIMPLESolverConfiguration _pressure_linear_control
 Options for the linear solver of the pressure equation.
 
const Real _pressure_l_abs_tol
 Absolute linear tolerance for the pressure equation.
 
Moose::PetscSupport::PetscOptions _pressure_petsc_options
 Options which hold the petsc settings for the pressure equation.
 
const Real _pressure_variable_relaxation
 The user-defined relaxation parameter for the pressure variable.
 
const bool _pin_pressure
 If the pressure needs to be pinned.
 
const Real _pressure_pin_value
 The value we want to enforce for pressure.
 
dof_id_type _pressure_pin_dof
 The dof ID where the pressure needs to be pinned.
 
const bool _has_energy_system
 Boolean for easy check if a fluid energy system shall be solved or not.
 
const Real _energy_equation_relaxation
 The user-defined relaxation parameter for the energy equation.
 
Moose::PetscSupport::PetscOptions _energy_petsc_options
 Options which hold the petsc settings for the fluid energy equation.
 
SIMPLESolverConfiguration _energy_linear_control
 Options for the linear solver of the energy equation.
 
const Real _energy_l_abs_tol
 Absolute linear tolerance for the energy equations.
 
const bool _has_solid_energy_system
 Boolean for easy check if a solid 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.
 
SIMPLESolverConfiguration _solid_energy_linear_control
 Options for the linear solver of the energy equation.
 
const Real _solid_energy_l_abs_tol
 Absolute linear tolerance for the energy equations.
 
const std::vector< SolverSystemName > & _passive_scalar_system_names
 The names of the passive scalar systems.
 
const bool _has_passive_scalar_systems
 Boolean for easy check if a passive scalar systems shall be solved or not.
 
std::vector< unsigned int_passive_scalar_system_numbers
 
const std::vector< Real > _passive_scalar_equation_relaxation
 The user-defined relaxation parameter(s) for the passive scalar equation(s)
 
Moose::PetscSupport::PetscOptions _passive_scalar_petsc_options
 Options which hold the petsc settings for the passive scalar equation(s)
 
SIMPLESolverConfiguration _passive_scalar_linear_control
 Options for the linear solver of the passive scalar equation(s)
 
const Real _passive_scalar_l_abs_tol
 Absolute linear tolerance for the passive scalar equation(s).
 
const std::vector< SolverSystemName > & _pm_radiation_system_names
 The names of the participating media radiation systems.
 
const bool _has_pm_radiation_systems
 Boolean for easy check if participating media radiation systems shall be solved or not.
 
std::vector< unsigned int_pm_radiation_system_numbers
 
const std::vector< Real > _pm_radiation_equation_relaxation
 The user-defined relaxation parameter(s) for the participating media radiation equation(s)
 
Moose::PetscSupport::PetscOptions _pm_radiation_petsc_options
 Options which hold the petsc settings for the participating media radiation equation(s)
 
SIMPLESolverConfiguration _pm_radiation_linear_control
 Options for the linear solver of the participating media radiation equation(s)
 
const Real _pm_radiation_l_abs_tol
 Absolute linear tolerance for the participating media radiation equation(s).
 
const std::vector< SolverSystemName > & _turbulence_system_names
 The names of the turbulence systems.
 
const bool _has_turbulence_systems
 Boolean for easy check if a turbulence scalar systems shall be solved or not.
 
std::vector< unsigned int_turbulence_system_numbers
 
const std::vector< Real > _turbulence_equation_relaxation
 The user-defined relaxation parameter(s) for the turbulence equation(s)
 
std::vector< Real > _turbulence_field_relaxation
 The user-defined relaxation parameter(s) for the turbulence field(s)
 
std::vector< Real > _turbulence_field_min_limit
 The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..
 
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
 Options which hold the petsc settings for the turbulence equation(s)
 
SIMPLESolverConfiguration _turbulence_linear_control
 Options for the linear solver of the turbulence equation(s)
 
const Real _turbulence_l_abs_tol
 Absolute linear tolerance for the turbulence equation(s).
 
const std::vector< Real > _momentum_absolute_tolerance
 The user-defined absolute tolerance(s) for determining the convergence in momentum.
 
const Real _pressure_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in pressure.
 
const Real _energy_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in energy.
 
const Real _solid_energy_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in solid energy.
 
const std::vector< Real > _passive_scalar_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in passive scalars.
 
const std::vector< Real > _pm_radiation_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in participating media radiation.
 
const std::vector< Real > _turbulence_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence turbulence variables.
 
const unsigned int _num_iterations
 The maximum number of momentum-pressure iterations.
 
const bool _continue_on_max_its
 If solve should continue if maximum number of iterations is hit.
 
const bool _print_fields
 Debug parameter which allows printing the coupling and solution vectors/matrices.
 
Executioner_executioner
 
FEProblemBase_problem
 
DisplacedProblem_displaced_problem
 
MooseMesh_mesh
 
MooseMesh_displaced_mesh
 
SystemBase_solver_sys
 
AuxiliarySystem_aux
 
SolveObject_inner_solve
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

Private Member Functions

const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const UserObjectBasegetUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const TcastUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
const MooseObject_ppi_moose_object
 
const InputParameters_ppi_params
 
const FEProblemBase_ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const MooseObject_uoi_moose_object
 
const FEProblemBase_uoi_feproblem
 
const THREAD_ID _uoi_tid
 

Detailed Description

Solve class serving as a base class for the two SIMPLE solvers that operate with different assembly algorithms.

Includes base routines and variables for the coupling of momentum and pressure.

Definition at line 41 of file SIMPLESolveBase.h.

Constructor & Destructor Documentation

◆ SIMPLESolveBase()

SIMPLESolveBase::SIMPLESolveBase ( Executioner ex)

Definition at line 421 of file SIMPLESolveBase.C.

422 : SolveObject(ex),
424 _momentum_system_names(getParam<std::vector<SolverSystemName>>("momentum_systems")),
425 _momentum_l_abs_tol(getParam<Real>("momentum_l_abs_tol")),
426 _momentum_equation_relaxation(getParam<Real>("momentum_equation_relaxation")),
427 _pressure_system_name(getParam<SolverSystemName>("pressure_system")),
428 _pressure_l_abs_tol(getParam<Real>("pressure_l_abs_tol")),
429 _pressure_variable_relaxation(getParam<Real>("pressure_variable_relaxation")),
430 _pin_pressure(getParam<bool>("pin_pressure")),
431 _pressure_pin_value(getParam<Real>("pressure_pin_value")),
433 _has_energy_system(isParamValid("energy_system")),
434 _energy_equation_relaxation(getParam<Real>("energy_equation_relaxation")),
435 _energy_l_abs_tol(getParam<Real>("energy_l_abs_tol")),
437 _solid_energy_l_abs_tol(getParam<Real>("solid_energy_l_abs_tol")),
438 _passive_scalar_system_names(getParam<std::vector<SolverSystemName>>("passive_scalar_systems")),
441 getParam<std::vector<Real>>("passive_scalar_equation_relaxation")),
442 _passive_scalar_l_abs_tol(getParam<Real>("passive_scalar_l_abs_tol")),
443 _pm_radiation_system_names(getParam<std::vector<SolverSystemName>>("pm_radiation_systems")),
446 getParam<std::vector<Real>>("pm_radiation_equation_relaxation")),
447 _pm_radiation_l_abs_tol(getParam<Real>("pm_radiation_l_abs_tol")),
448 _turbulence_system_names(getParam<std::vector<SolverSystemName>>("turbulence_systems")),
450 _turbulence_equation_relaxation(getParam<std::vector<Real>>("turbulence_equation_relaxation")),
451 _turbulence_field_relaxation(getParam<std::vector<Real>>("turbulence_field_relaxation")),
452 _turbulence_field_min_limit(getParam<std::vector<Real>>("turbulence_field_min_limit")),
453 _turbulence_l_abs_tol(getParam<Real>("turbulence_l_abs_tol")),
454 _momentum_absolute_tolerance(getParam<std::vector<Real>>("momentum_absolute_tolerance")),
455 _pressure_absolute_tolerance(getParam<Real>("pressure_absolute_tolerance")),
456 _energy_absolute_tolerance(getParam<Real>("energy_absolute_tolerance")),
457 _solid_energy_absolute_tolerance(getParam<Real>("solid_energy_absolute_tolerance")),
459 getParam<std::vector<Real>>("passive_scalar_absolute_tolerance")),
461 getParam<std::vector<Real>>("pm_radiation_absolute_tolerance")),
462 _turbulence_absolute_tolerance(getParam<std::vector<Real>>("turbulence_absolute_tolerance")),
463 _num_iterations(getParam<unsigned int>("num_iterations")),
464 _continue_on_max_its(getParam<bool>("continue_on_max_its")),
465 _print_fields(getParam<bool>("print_fields"))
466{
467 // The momentum absolute tolerances must either be given as a single value
468 // (applied to all components) or one value per momentum component.
471 paramError("momentum_absolute_tolerance",
472 "The number of momentum absolute tolerances must be one or match the number of "
473 "momentum systems.");
474
475 const auto & momentum_petsc_options = getParam<MultiMooseEnum>("momentum_petsc_options");
476 const auto & momentum_petsc_pair_options = getParam<MooseEnumItem, std::string>(
477 "momentum_petsc_options_iname", "momentum_petsc_options_value");
479 momentum_petsc_options, "", *this, _momentum_petsc_options);
481 momentum_petsc_pair_options, _problem.mesh().dimension(), "", *this, _momentum_petsc_options);
482
483 _momentum_linear_control.real_valued_data["rel_tol"] = getParam<Real>("momentum_l_tol");
484 _momentum_linear_control.real_valued_data["abs_tol"] = getParam<Real>("momentum_l_abs_tol");
486 getParam<unsigned int>("momentum_l_max_its");
487
488 const auto & pressure_petsc_options = getParam<MultiMooseEnum>("pressure_petsc_options");
489 const auto & pressure_petsc_pair_options = getParam<MooseEnumItem, std::string>(
490 "pressure_petsc_options_iname", "pressure_petsc_options_value");
492 pressure_petsc_options, "", *this, _pressure_petsc_options);
494 pressure_petsc_pair_options, _problem.mesh().dimension(), "", *this, _pressure_petsc_options);
495
496 _pressure_linear_control.real_valued_data["rel_tol"] = getParam<Real>("pressure_l_tol");
497 _pressure_linear_control.real_valued_data["abs_tol"] = getParam<Real>("pressure_l_abs_tol");
499 getParam<unsigned int>("pressure_l_max_its");
500
502 {
503 const auto & energy_petsc_options = getParam<MultiMooseEnum>("energy_petsc_options");
504 const auto & energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
505 "energy_petsc_options_iname", "energy_petsc_options_value");
507 energy_petsc_options, "", *this, _energy_petsc_options);
509 energy_petsc_pair_options, _problem.mesh().dimension(), "", *this, _energy_petsc_options);
510
511 _energy_linear_control.real_valued_data["rel_tol"] = getParam<Real>("energy_l_tol");
512 _energy_linear_control.real_valued_data["abs_tol"] = getParam<Real>("energy_l_abs_tol");
513 _energy_linear_control.int_valued_data["max_its"] = getParam<unsigned int>("energy_l_max_its");
514 }
515 else
516 checkDependentParameterError("energy_system",
517 {"energy_petsc_options",
518 "energy_petsc_options_iname",
519 "energy_petsc_options_value",
520 "energy_l_tol",
521 "energy_l_abs_tol",
522 "energy_l_max_its",
523 "energy_absolute_tolerance",
524 "energy_equation_relaxation"},
525 false);
526
528 {
529 const auto & solid_energy_petsc_options =
530 getParam<MultiMooseEnum>("solid_energy_petsc_options");
531 const auto & solid_energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
532 "solid_energy_petsc_options_iname", "solid_energy_petsc_options_value");
534 solid_energy_petsc_options, "", *this, _solid_energy_petsc_options);
535 Moose::PetscSupport::addPetscPairsToPetscOptions(solid_energy_petsc_pair_options,
537 "",
538 *this,
540
541 _solid_energy_linear_control.real_valued_data["rel_tol"] = getParam<Real>("solid_energy_l_tol");
543 getParam<Real>("solid_energy_l_abs_tol");
545 getParam<unsigned int>("solid_energy_l_max_its");
546 }
547 else
548 checkDependentParameterError("solid_energy_system",
549 {"solid_energy_petsc_options",
550 "solid_energy_petsc_options_iname",
551 "solid_energy_petsc_options_value",
552 "solid_energy_l_tol",
553 "solid_energy_l_abs_tol",
554 "solid_energy_l_max_its",
555 "solid_energy_absolute_tolerance",
556 "solid_energy_equation_relaxation"},
557 false);
558
559 // We check for input errors with regards to the participating media radiation equations. At the
560 // same time, we set up the corresponding system numbers
562 {
564 paramError("pm_radiation_equation_relaxation",
565 "The number of equation relaxation parameters does not match the number of "
566 "participating media radiation equations!");
568 paramError("pm_radiation_absolute_tolerance",
569 "The number of absolute tolerances does not match the number of "
570 "participating media radiation equations!");
571 }
573 {
574 const auto & pm_radiation_petsc_options =
575 getParam<MultiMooseEnum>("pm_radiation_petsc_options");
576 const auto & pm_radiation_petsc_pair_options = getParam<MooseEnumItem, std::string>(
577 "pm_radiation_petsc_options_iname", "pm_radiation_petsc_options_value");
579 pm_radiation_petsc_options, "", *this, _pm_radiation_petsc_options);
580 Moose::PetscSupport::addPetscPairsToPetscOptions(pm_radiation_petsc_pair_options,
582 "",
583 *this,
585
586 _pm_radiation_linear_control.real_valued_data["rel_tol"] = getParam<Real>("pm_radiation_l_tol");
588 getParam<Real>("pm_radiation_l_abs_tol");
590 getParam<unsigned int>("pm_radiation_l_max_its");
591 }
592 else
593 checkDependentParameterError("pm_radiation_systems",
594 {"pm_radiation_petsc_options",
595 "pm_radiation_petsc_options_iname",
596 "pm_radiation_petsc_options_value",
597 "pm_radiation_l_tol",
598 "pm_radiation_l_abs_tol",
599 "pm_radiation_l_max_its",
600 "pm_radiation_equation_relaxation",
601 "pm_radiation_absolute_tolerance"},
602 false);
603
604 // We check for input errors with regards to the passive scalar equations. At the same time, we
605 // set up the corresponding system numbers
607 {
609 paramError("passive_scalar_equation_relaxation",
610 "The number of equation relaxation parameters does not match the number of "
611 "passive scalar equations!");
613 paramError("passive_scalar_absolute_tolerance",
614 "The number of absolute tolerances does not match the number of "
615 "passive scalar equations!");
616 }
618 {
619 const auto & passive_scalar_petsc_options =
620 getParam<MultiMooseEnum>("passive_scalar_petsc_options");
621 const auto & passive_scalar_petsc_pair_options = getParam<MooseEnumItem, std::string>(
622 "passive_scalar_petsc_options_iname", "passive_scalar_petsc_options_value");
624 passive_scalar_petsc_options, "", *this, _passive_scalar_petsc_options);
625 Moose::PetscSupport::addPetscPairsToPetscOptions(passive_scalar_petsc_pair_options,
627 "",
628 *this,
630
632 getParam<Real>("passive_scalar_l_tol");
634 getParam<Real>("passive_scalar_l_abs_tol");
636 getParam<unsigned int>("passive_scalar_l_max_its");
637 }
638 else
639 checkDependentParameterError("passive_scalar_systems",
640 {"passive_scalar_petsc_options",
641 "passive_scalar_petsc_options_iname",
642 "passive_scalar_petsc_options_value",
643 "passive_scalar_l_tol",
644 "passive_scalar_l_abs_tol",
645 "passive_scalar_l_max_its",
646 "passive_scalar_equation_relaxation",
647 "passive_scalar_absolute_tolerance"},
648 false);
649
650 // We check for input errors with regards to the surrogate turbulence equations. At the same time,
651 // we set up the corresponding system numbers
653 {
655 paramError("turbulence_equation_relaxation",
656 "The number of equation relaxation parameters does not match the number of "
657 "turbulence equations!");
659 paramError("turbulence_absolute_tolerance",
660 "The number of absolute tolerances does not match the number of "
661 "turbulence equations!");
662 if (_turbulence_field_min_limit.empty())
663 // If no minimum bounds are given, initialize to default value 1e-8
665
666 // Assign turbulence field relaxation as 1.0 if not defined
669
670 const auto & turbulence_petsc_options = getParam<MultiMooseEnum>("turbulence_petsc_options");
671 const auto & turbulence_petsc_pair_options = getParam<MooseEnumItem, std::string>(
672 "turbulence_petsc_options_iname", "turbulence_petsc_options_value");
674 turbulence_petsc_options, "", *this, _turbulence_petsc_options);
675 Moose::PetscSupport::addPetscPairsToPetscOptions(turbulence_petsc_pair_options,
677 "",
678 *this,
680
681 _turbulence_linear_control.real_valued_data["rel_tol"] = getParam<Real>("turbulence_l_tol");
682 _turbulence_linear_control.real_valued_data["abs_tol"] = getParam<Real>("turbulence_l_abs_tol");
684 getParam<unsigned int>("turbulence_l_max_its");
685 }
686 else
687 checkDependentParameterError("turbulence_systems",
688 {"turbulence_petsc_options",
689 "turbulence_petsc_options_iname",
690 "turbulence_petsc_options_value",
691 "turbulence_l_tol",
692 "turbulence_l_abs_tol",
693 "turbulence_l_max_its",
694 "turbulence_equation_relaxation",
695 "turbulence_field_relaxation",
696 "turbulence_field_min_limit",
697 "turbulence_absolute_tolerance"},
698 false);
699}
virtual MooseMesh & mesh() override
void paramError(const std::string &param, Args... args) const
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
virtual unsigned int dimension() const
const std::vector< Real > _turbulence_equation_relaxation
The user-defined relaxation parameter(s) for the turbulence equation(s)
const Real _momentum_equation_relaxation
The user-defined relaxation parameter for the momentum equation.
const bool _has_energy_system
Boolean for easy check if a fluid energy system shall be solved or not.
dof_id_type _pressure_pin_dof
The dof ID where the pressure needs to be pinned.
const bool _has_turbulence_systems
Boolean for easy check if a turbulence scalar systems shall be solved or not.
const SolverSystemName & _pressure_system_name
The name of the pressure system.
SIMPLESolverConfiguration _pm_radiation_linear_control
Options for the linear solver of the participating media radiation equation(s)
const std::vector< SolverSystemName > & _passive_scalar_system_names
The names of the passive scalar systems.
const std::vector< Real > _pm_radiation_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in participating media radiation.
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
Options which hold the petsc settings for the turbulence equation(s)
const bool _has_pm_radiation_systems
Boolean for easy check if participating media radiation systems shall be solved or not.
const Real _pressure_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in pressure.
const std::vector< SolverSystemName > & _turbulence_system_names
The names of the turbulence systems.
const Real _turbulence_l_abs_tol
Absolute linear tolerance for the turbulence equation(s).
const std::vector< Real > _passive_scalar_equation_relaxation
The user-defined relaxation parameter(s) for the passive scalar equation(s)
const Real _pressure_l_abs_tol
Absolute linear tolerance for the pressure equation.
const Real _passive_scalar_l_abs_tol
Absolute linear tolerance for the passive scalar equation(s).
const bool _has_solid_energy_system
Boolean for easy check if a solid energy system shall be solved or not.
Moose::PetscSupport::PetscOptions _passive_scalar_petsc_options
Options which hold the petsc settings for the passive scalar equation(s)
SIMPLESolverConfiguration _pressure_linear_control
Options for the linear solver of the pressure equation.
std::vector< Real > _turbulence_field_relaxation
The user-defined relaxation parameter(s) for the turbulence field(s)
const std::vector< Real > _turbulence_absolute_tolerance
The user-defined absolute tolerance for determining the convergence turbulence variables.
const std::vector< Real > _momentum_absolute_tolerance
The user-defined absolute tolerance(s) for determining the convergence in momentum.
SIMPLESolverConfiguration _solid_energy_linear_control
Options for the linear solver of the energy equation.
const bool _has_passive_scalar_systems
Boolean for easy check if a passive scalar systems shall be solved or not.
std::vector< Real > _turbulence_field_min_limit
The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..
Moose::PetscSupport::PetscOptions _pm_radiation_petsc_options
Options which hold the petsc settings for the participating media radiation equation(s)
const std::vector< SolverSystemName > & _pm_radiation_system_names
The names of the participating media radiation systems.
const Real _pm_radiation_l_abs_tol
Absolute linear tolerance for the participating media radiation equation(s).
const Real _pressure_variable_relaxation
The user-defined relaxation parameter for the pressure variable.
const Real _momentum_l_abs_tol
Absolute linear tolerance for the momentum equation(s).
Moose::PetscSupport::PetscOptions _momentum_petsc_options
Options which hold the petsc settings for the momentum equation.
SIMPLESolverConfiguration _energy_linear_control
Options for the linear solver of the energy equation.
const Real _energy_l_abs_tol
Absolute linear tolerance for the energy equations.
const Real _pressure_pin_value
The value we want to enforce for pressure.
Moose::PetscSupport::PetscOptions _solid_energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
Moose::PetscSupport::PetscOptions _pressure_petsc_options
Options which hold the petsc settings for the pressure equation.
const bool _continue_on_max_its
If solve should continue if maximum number of iterations is hit.
void checkDependentParameterError(const std::string &main_parameter, const std::vector< std::string > &dependent_parameters, const bool should_be_defined)
const Real _energy_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in energy.
const unsigned int _num_iterations
The maximum number of momentum-pressure iterations.
const std::vector< Real > _passive_scalar_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in passive scalars.
SIMPLESolverConfiguration _turbulence_linear_control
Options for the linear solver of the turbulence equation(s)
const std::vector< SolverSystemName > & _momentum_system_names
The names of the momentum systems.
const Real _energy_equation_relaxation
The user-defined relaxation parameter for the energy equation.
SIMPLESolverConfiguration _momentum_linear_control
Options for the linear solver of the momentum equation.
SIMPLESolverConfiguration _passive_scalar_linear_control
Options for the linear solver of the passive scalar equation(s)
const Real _solid_energy_l_abs_tol
Absolute linear tolerance for the energy equations.
const bool _pin_pressure
If the pressure needs to be pinned.
Moose::PetscSupport::PetscOptions _energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
const std::vector< Real > _pm_radiation_equation_relaxation
The user-defined relaxation parameter(s) for the participating media radiation equation(s)
const bool _print_fields
Debug parameter which allows printing the coupling and solution vectors/matrices.
const Real _solid_energy_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in solid energy.
FEProblemBase & _problem
std::map< std::string, int > int_valued_data
std::map< std::string, Real > real_valued_data
void addPetscFlagsToPetscOptions(const MultiMooseEnum &petsc_flags, std::string prefix, const ParallelParamObject &param_object, PetscOptions &petsc_options)
void addPetscPairsToPetscOptions(const std::vector< std::pair< MooseEnumItem, std::string > > &petsc_pair_options, const unsigned int mesh_dimension, std::string prefix, const ParallelParamObject &param_object, PetscOptions &petsc_options)
const unsigned int invalid_uint

Member Function Documentation

◆ checkDependentParameterError()

void SIMPLESolveBase::checkDependentParameterError ( const std::string &  main_parameter,
const std::vector< std::string > &  dependent_parameters,
const bool  should_be_defined 
)
protected

Definition at line 711 of file SIMPLESolveBase.C.

714{
715 for (const auto & param : dependent_parameters)
716 if (parameters().isParamSetByUser(param) == !should_be_defined)
717 paramError(param,
718 "This parameter should " + std::string(should_be_defined ? "" : "not") +
719 " be given by the user with the corresponding " + main_parameter +
720 " setting!");
721}
const InputParameters & parameters() const
bool isParamSetByUser(const std::string &name) const
if(subdm)

Referenced by SIMPLESolveBase(), and SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly().

◆ checkIntegrity()

virtual void SIMPLESolveBase::checkIntegrity ( )
inlinevirtual

Check if the user defined time kernels.

Reimplemented in SIMPLESolve, and SIMPLESolveNonlinearAssembly.

Definition at line 61 of file SIMPLESolveBase.h.

61{}

◆ linkRhieChowUserObject()

virtual void SIMPLESolveBase::linkRhieChowUserObject ( )
pure virtual

Fetch the Rhie Chow user object that is reponsible for determining face velocities and mass flux.

Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.

◆ setInnerSolve()

virtual void SIMPLESolveBase::setInnerSolve ( SolveObject )
inlineoverridevirtual

Reimplemented from SolveObject.

Definition at line 48 of file SIMPLESolveBase.h.

49 {
50 mooseError("Cannot set inner solve object for solves that inherit from SIMPLESolveBase");
51 }
void mooseError(Args &&... args) const

◆ setupPressurePin()

void SIMPLESolveBase::setupPressurePin ( )

Setup pressure pin if there is need for one.

Definition at line 702 of file SIMPLESolveBase.C.

703{
704 if (_pin_pressure)
706 _problem.mesh(),
707 getParam<Point>("pressure_pin_point"));
708}
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
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.

Referenced by PIMPLE::init(), SIMPLE::init(), and SIMPLENonlinearAssembly::init().

◆ solveMomentumPredictor()

virtual std::vector< std::pair< unsigned int, Real > > SIMPLESolveBase::solveMomentumPredictor ( )
protectedpure virtual

Solve a momentum predictor step with a fixed pressure field.

Returns
A vector of (number of linear iterations, normalized residual norm) pairs for the momentum equations. The length of the vector equals the dimensionality of the domain.

Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.

◆ solvePressureCorrector()

virtual std::pair< unsigned int, Real > SIMPLESolveBase::solvePressureCorrector ( )
protectedpure virtual

Solve a pressure corrector step.

Returns
The number of linear iterations and the normalized residual norm of the pressure equation.

Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.

◆ validParams()

InputParameters SIMPLESolveBase::validParams ( )
static

Definition at line 15 of file SIMPLESolveBase.C.

16{
18 params.addRequiredParam<UserObjectName>("rhie_chow_user_object", "The rhie-chow user-object");
19
20 /*
21 * The names of the different systems in the segregated solver
22 */
23 params.addRequiredParam<std::vector<SolverSystemName>>(
24 "momentum_systems", "The solver system(s) for the momentum equation(s).");
25 params.addRequiredParam<SolverSystemName>("pressure_system",
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 "pm_radiation_systems",
34 {},
35 "The solver system for each participating media radiation equation.");
36 params.addParam<std::vector<SolverSystemName>>(
37 "turbulence_systems", {}, "The solver system for each surrogate turbulence equation.");
38
39 /*
40 * Parameters to control the solution of the momentum equation
41 */
42
44 "momentum_equation_relaxation",
45 1.0,
46 "0.0<momentum_equation_relaxation<=1.0",
47 "The relaxation which should be used for the momentum equation. (=1 for no relaxation, "
48 "diagonal dominance will still be enforced)");
49
50 params.addParam<MultiMooseEnum>("momentum_petsc_options",
52 "Singleton PETSc options for the momentum equation");
53 params.addParam<MultiMooseEnum>("momentum_petsc_options_iname",
55 "Names of PETSc name/value pairs for the momentum equation");
56 params.addParam<std::vector<std::string>>(
57 "momentum_petsc_options_value",
58 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
59 "momentum equation");
60
61 params.addRangeCheckedParam<std::vector<Real>>(
62 "momentum_absolute_tolerance",
63 {1e-5},
64 "0.0<momentum_absolute_tolerance",
65 "The absolute tolerance(s) on the normalized residual(s) of the momentum equation(s). "
66 "If a single value is provided it is applied to all momentum components.");
67
68 params.addRangeCheckedParam<Real>("momentum_l_tol",
69 1e-5,
70 "0.0<=momentum_l_tol & momentum_l_tol<1.0",
71 "The relative tolerance on the normalized residual in the "
72 "linear solver of the momentum equation.");
73 params.addRangeCheckedParam<Real>("momentum_l_abs_tol",
74 1e-50,
75 "0.0<momentum_l_abs_tol",
76 "The absolute tolerance on the normalized residual in the "
77 "linear solver of the momentum equation.");
78 params.addParam<unsigned int>(
79 "momentum_l_max_its",
80 10000,
81 "The maximum allowed iterations in the linear solver of the momentum equation.");
82
84 "momentum_equation_relaxation momentum_petsc_options momentum_petsc_options_iname "
85 "momentum_petsc_options_value momentum_petsc_options_value momentum_absolute_tolerance "
86 "momentum_l_tol momentum_l_abs_tol momentum_l_max_its momentum_systems",
87 "Momentum Equation");
88
89 /*
90 * Parameters to control the solution of the pressure equation
91 */
93 "pressure_variable_relaxation",
94 1.0,
95 "0.0<pressure_variable_relaxation<=1.0",
96 "The relaxation which should be used for the pressure variable (=1 for no relaxation).");
97
98 params.addParam<MultiMooseEnum>("pressure_petsc_options",
100 "Singleton PETSc options for the pressure equation");
101 params.addParam<MultiMooseEnum>("pressure_petsc_options_iname",
103 "Names of PETSc name/value pairs for the pressure equation");
104 params.addParam<std::vector<std::string>>(
105 "pressure_petsc_options_value",
106 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
107 "pressure equation");
108
110 "pressure_absolute_tolerance",
111 1e-5,
112 "0.0<pressure_absolute_tolerance",
113 "The absolute tolerance on the normalized residual of the pressure equation.");
114
115 params.addRangeCheckedParam<Real>("pressure_l_tol",
116 1e-5,
117 "0.0<=pressure_l_tol & pressure_l_tol<1.0",
118 "The relative tolerance on the normalized residual in the "
119 "linear solver of the pressure equation.");
120 params.addRangeCheckedParam<Real>("pressure_l_abs_tol",
121 1e-10,
122 "0.0<pressure_l_abs_tol",
123 "The absolute tolerance on the normalized residual in the "
124 "linear solver of the pressure equation.");
125 params.addParam<unsigned int>(
126 "pressure_l_max_its",
127 10000,
128 "The maximum allowed iterations in the linear solver of the pressure equation.");
129
131 "pressure_variable_relaxation pressure_petsc_options pressure_petsc_options_iname "
132 "pressure_petsc_options_value pressure_petsc_options_value pressure_absolute_tolerance "
133 "pressure_l_tol pressure_l_abs_tol pressure_l_max_its pressure_system",
134 "Pressure Equation");
135
136 /*
137 * Pressure pin parameters for enclosed flows
138 */
139
140 params.addParam<bool>(
141 "pin_pressure", false, "If the pressure field needs to be pinned at a point.");
142 params.addParam<Real>(
143 "pressure_pin_value", 0.0, "The value which needs to be enforced for the pressure.");
144 params.addParam<Point>("pressure_pin_point", "The point where the pressure needs to be pinned.");
145
146 params.addParamNamesToGroup("pin_pressure pressure_pin_value pressure_pin_point", "Pressure Pin");
147
148 params.addParam<bool>(
149 "print_fields",
150 false,
151 "Use this to print the coupling and solution fields and matrices throughout the iteration.");
152
153 /*
154 * Parameters to control the solution of the energy equation
155 */
156
158 "energy_equation_relaxation",
159 1.0,
160 "0.0<energy_equation_relaxation<=1.0",
161 "The relaxation which should be used for the energy equation. (=1 for no relaxation, "
162 "diagonal dominance will still be enforced)");
163
164 params.addParam<MultiMooseEnum>("energy_petsc_options",
166 "Singleton PETSc options for the energy equation");
167 params.addParam<MultiMooseEnum>("energy_petsc_options_iname",
169 "Names of PETSc name/value pairs for the energy equation");
170 params.addParam<std::vector<std::string>>(
171 "energy_petsc_options_value",
172 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
173 "energy equation");
174
176 "energy_absolute_tolerance",
177 1e-5,
178 "0.0<energy_absolute_tolerance",
179 "The absolute tolerance on the normalized residual of the energy equation.");
180
181 params.addRangeCheckedParam<Real>("energy_l_tol",
182 1e-5,
183 "0.0<=energy_l_tol & energy_l_tol<1.0",
184 "The relative tolerance on the normalized residual in the "
185 "linear solver of the energy equation.");
186 params.addRangeCheckedParam<Real>("energy_l_abs_tol",
187 1e-10,
188 "0.0<energy_l_abs_tol",
189 "The absolute tolerance on the normalized residual in the "
190 "linear solver of the energy equation.");
191 params.addRangeCheckedParam<unsigned int>(
192 "energy_l_max_its",
193 10000,
194 "0<energy_l_max_its",
195 "The maximum allowed iterations in the linear solver of the energy equation.");
196
198 "energy_equation_relaxation energy_petsc_options energy_petsc_options_iname "
199 "energy_petsc_options_value energy_petsc_options_value energy_absolute_tolerance "
200 "energy_l_tol energy_l_abs_tol energy_l_max_its",
201 "Energy Equation");
202
203 /*
204 * Parameters to control the solution of the solid energy equation
205 */
206
207 params.addParam<MultiMooseEnum>("solid_energy_petsc_options",
209 "Singleton PETSc options for the solid energy equation");
210 params.addParam<MultiMooseEnum>("solid_energy_petsc_options_iname",
212 "Names of PETSc name/value pairs for the solid energy equation");
213 params.addParam<std::vector<std::string>>(
214 "solid_energy_petsc_options_value",
215 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
216 "solid energy equation");
217
219 "solid_energy_absolute_tolerance",
220 1e-5,
221 "0.0<solid_energy_absolute_tolerance",
222 "The absolute tolerance on the normalized residual of the solid energy equation.");
223
224 params.addRangeCheckedParam<Real>("solid_energy_l_tol",
225 1e-5,
226 "0.0<=solid_energy_l_tol & solid_energy_l_tol<1.0",
227 "The relative tolerance on the normalized residual in the "
228 "linear solver of the solid energy equation.");
229
230 params.addRangeCheckedParam<Real>("solid_energy_l_abs_tol",
231 1e-10,
232 "0.0<solid_energy_l_abs_tol",
233 "The absolute tolerance on the normalized residual in the "
234 "linear solver of the solid energy equation.");
235 params.addRangeCheckedParam<unsigned int>(
236 "solid_energy_l_max_its",
237 10000,
238 "0<solid_energy_l_max_its",
239 "The maximum allowed iterations in the linear solver of the solid energy equation.");
240
241 params.addParamNamesToGroup("solid_energy_petsc_options solid_energy_petsc_options_iname "
242 "solid_energy_petsc_options_value solid_energy_absolute_tolerance "
243 "solid_energy_l_tol solid_energy_l_abs_tol solid_energy_l_max_its",
244 "Solid Energy Equation");
245
246 /*
247 * Parameters to control the solution of each scalar advection system
248 */
249 params.addParam<std::vector<Real>>("passive_scalar_equation_relaxation",
250 std::vector<Real>(),
251 "The relaxation which should be used for the passive scalar "
252 "equations. (=1 for no relaxation, "
253 "diagonal dominance will still be enforced)");
254
255 params.addParam<MultiMooseEnum>("passive_scalar_petsc_options",
257 "Singleton PETSc options for the passive scalar equation(s)");
258 params.addParam<MultiMooseEnum>(
259 "passive_scalar_petsc_options_iname",
261 "Names of PETSc name/value pairs for the passive scalar equation(s)");
262 params.addParam<std::vector<std::string>>(
263 "passive_scalar_petsc_options_value",
264 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
265 "passive scalar equation(s)");
266 params.addParam<std::vector<Real>>(
267 "passive_scalar_absolute_tolerance",
268 std::vector<Real>(),
269 "The absolute tolerance(s) on the normalized residual(s) of the passive scalar equation(s).");
270 params.addRangeCheckedParam<Real>("passive_scalar_l_tol",
271 1e-5,
272 "0.0<=passive_scalar_l_tol & passive_scalar_l_tol<1.0",
273 "The relative tolerance on the normalized residual in the "
274 "linear solver of the passive scalar equation(s).");
275 params.addRangeCheckedParam<Real>("passive_scalar_l_abs_tol",
276 1e-10,
277 "0.0<passive_scalar_l_abs_tol",
278 "The absolute tolerance on the normalized residual in the "
279 "linear solver of the passive scalar equation(s).");
280 params.addParam<unsigned int>(
281 "passive_scalar_l_max_its",
282 10000,
283 "The maximum allowed iterations in the linear solver of the turbulence equation.");
284
286 "passive_scalar_systems passive_scalar_equation_relaxation passive_scalar_petsc_options "
287 "passive_scalar_petsc_options_iname "
288 "passive_scalar_petsc_options_value passive_scalar_petsc_options_value "
289 "passive_scalar_absolute_tolerance "
290 "passive_scalar_l_tol passive_scalar_l_abs_tol passive_scalar_l_max_its",
291 "Passive Scalars Advection Equation");
292
293 /*
294 * Parameters to control the solution of each participating media radiation equation
295 */
296 params.addParam<std::vector<Real>>(
297 "pm_radiation_equation_relaxation",
298 std::vector<Real>(),
299 "The relaxation which should be used for the participating media radiation "
300 "equations. (=1 for no relaxation, "
301 "diagonal dominance will still be enforced)");
302
303 params.addParam<MultiMooseEnum>(
304 "pm_radiation_petsc_options",
306 "Singleton PETSc options for the participating media radiation equation(s)");
307 params.addParam<MultiMooseEnum>(
308 "pm_radiation_petsc_options_iname",
310 "Names of PETSc name/value pairs for the participating media radiation equation(s)");
311 params.addParam<std::vector<std::string>>(
312 "pm_radiation_petsc_options_value",
313 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
314 "participating media radiation equation(s)");
315 params.addParam<std::vector<Real>>("pm_radiation_absolute_tolerance",
316 std::vector<Real>(),
317 "The absolute tolerance(s) on the normalized residual(s) of "
318 "the participating media radiation equation(s).");
320 "pm_radiation_l_tol",
321 1e-5,
322 "0.0<=pm_radiation_l_tol & pm_radiation_l_tol<1.0",
323 "The relative tolerance on the normalized residual in the "
324 "linear solver of the participating media radiation equation(s).");
326 "pm_radiation_l_abs_tol",
327 1e-10,
328 "0.0<pm_radiation_l_abs_tol",
329 "The absolute tolerance on the normalized residual in the "
330 "linear solver of the participating media radiation equation(s).");
331 params.addParam<unsigned int>("pm_radiation_l_max_its",
332 10000,
333 "The maximum allowed iterations in the linear solver of the "
334 "participating media radiation equation.");
335
337 "pm_radiation_systems pm_radiation_equation_relaxation pm_radiation_petsc_options "
338 "pm_radiation_petsc_options_iname "
339 "pm_radiation_petsc_options_value pm_radiation_petsc_options_value "
340 "pm_radiation_absolute_tolerance "
341 "pm_radiation_l_tol pm_radiation_l_abs_tol pm_radiation_l_max_its",
342 "Participating Medium Radiation Equation");
343
344 /*
345 * Parameters to control the solution of each turbulence system
346 */
347 params.addParam<std::vector<Real>>("turbulence_equation_relaxation",
348 std::vector<Real>(),
349 "The relaxation which should be used for the turbulence "
350 "equations. (=1 for no relaxation, "
351 "diagonal dominance will still be enforced)");
352
353 params.addParam<std::vector<Real>>("turbulence_field_relaxation",
354 std::vector<Real>(),
355 "The relaxation which should be used for the turbulence "
356 "fields.");
357
358 params.addParam<std::vector<Real>>(
359 "turbulence_field_min_limit",
360 std::vector<Real>(),
361 "The lower limit imposed on turbulent quantities. The recommended value for robustness "
362 "is 1e-8. This is the imposed default if not set.");
363
364 params.addParam<MultiMooseEnum>("turbulence_petsc_options",
366 "Singleton PETSc options for the turbulence equation(s)");
367 params.addParam<MultiMooseEnum>("turbulence_petsc_options_iname",
369 "Names of PETSc name/value pairs for the turbulence equation(s)");
370 params.addParam<std::vector<std::string>>(
371 "turbulence_petsc_options_value",
372 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\" for the "
373 "turbulence equation(s)");
374 params.addParam<std::vector<Real>>(
375 "turbulence_absolute_tolerance",
376 std::vector<Real>(),
377 "The absolute tolerance(s) on the normalized residual(s) of the turbulence equation(s).");
378 params.addRangeCheckedParam<Real>("turbulence_l_tol",
379 1e-5,
380 "0.0<=turbulence_l_tol & turbulence_l_tol<1.0",
381 "The relative tolerance on the normalized residual in the "
382 "linear solver of the turbulence equation(s).");
383 params.addRangeCheckedParam<Real>("turbulence_l_abs_tol",
384 1e-10,
385 "0.0<turbulence_l_abs_tol",
386 "The absolute tolerance on the normalized residual in the "
387 "linear solver of the turbulence equation(s).");
388 params.addParam<unsigned int>(
389 "turbulence_l_max_its",
390 10000,
391 "The maximum allowed iterations in the linear solver of the turbulence equation.");
392
393 params.addParamNamesToGroup("turbulence_systems "
394 "turbulence_equation_relaxation "
395 "turbulence_field_relaxation "
396 "turbulence_field_min_limit "
397 "turbulence_petsc_options "
398 "turbulence_petsc_options_iname "
399 "turbulence_petsc_options_value turbulence_petsc_options_value "
400 "turbulence_absolute_tolerance "
401 "turbulence_l_tol turbulence_l_abs_tol turbulence_l_max_its",
402 "Turbulence Equations");
403
404 /*
405 * SIMPLE iteration control
406 */
407
408 params.addRangeCheckedParam<unsigned int>(
409 "num_iterations",
410 1000,
411 "0<num_iterations",
412 "The number of momentum-pressure-(other fields) iterations needed.");
413
414 params.addParam<bool>("continue_on_max_its",
415 false,
416 "If solve should continue if maximum number of iterations is hit.");
417
418 return params;
419}
InputParameters emptyInputParameters()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
MultiMooseEnum getCommonPetscFlags()
MultiMooseEnum getCommonPetscKeys()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by LinearAssemblySegregatedSolve::validParams(), and SIMPLESolveNonlinearAssembly::validParams().

Member Data Documentation

◆ _continue_on_max_its

const bool SIMPLESolveBase::_continue_on_max_its
protected

If solve should continue if maximum number of iterations is hit.

Definition at line 264 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _energy_absolute_tolerance

const Real SIMPLESolveBase::_energy_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence in energy.

Definition at line 246 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), and SIMPLESolveNonlinearAssembly::solve().

◆ _energy_equation_relaxation

const Real SIMPLESolveBase::_energy_equation_relaxation
protected

The user-defined relaxation parameter for the energy equation.

Definition at line 130 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _energy_l_abs_tol

const Real SIMPLESolveBase::_energy_l_abs_tol
protected

Absolute linear tolerance for the energy equations.

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 140 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _energy_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_energy_linear_control
protected

Options for the linear solver of the energy equation.

Definition at line 136 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _energy_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_energy_petsc_options
protected

Options which hold the petsc settings for the fluid energy equation.

Definition at line 133 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _has_energy_system

const bool SIMPLESolveBase::_has_energy_system
protected

◆ _has_passive_scalar_systems

const bool SIMPLESolveBase::_has_passive_scalar_systems
protected

◆ _has_pm_radiation_systems

const bool SIMPLESolveBase::_has_pm_radiation_systems
protected

Boolean for easy check if participating media radiation systems shall be solved or not.

Definition at line 187 of file SIMPLESolveBase.h.

Referenced by SIMPLESolve::checkIntegrity(), LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), LinearAssemblySegregatedSolve::setupResidualStorage(), SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _has_solid_energy_system

const bool SIMPLESolveBase::_has_solid_energy_system
protected

◆ _has_turbulence_systems

const bool SIMPLESolveBase::_has_turbulence_systems
protected

◆ _momentum_absolute_tolerance

const std::vector<Real> SIMPLESolveBase::_momentum_absolute_tolerance
protected

The user-defined absolute tolerance(s) for determining the convergence in momentum.

If a single value is provided it is applied to all momentum components; otherwise one value per momentum system is expected.

Definition at line 240 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), SIMPLESolveBase(), and SIMPLESolveNonlinearAssembly::solve().

◆ _momentum_equation_relaxation

const Real SIMPLESolveBase::_momentum_equation_relaxation
protected

The user-defined relaxation parameter for the momentum equation.

Definition at line 95 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solveMomentumPredictor(), and SIMPLESolveNonlinearAssembly::solveMomentumPredictor().

◆ _momentum_l_abs_tol

const Real SIMPLESolveBase::_momentum_l_abs_tol
protected

Absolute linear tolerance for the momentum equation(s).

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 89 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solveMomentumPredictor(), and SIMPLESolveNonlinearAssembly::solveMomentumPredictor().

◆ _momentum_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_momentum_linear_control
protected

Options for the linear solver of the momentum equation.

Definition at line 85 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solveMomentumPredictor(), and SIMPLESolveNonlinearAssembly::solveMomentumPredictor().

◆ _momentum_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_momentum_petsc_options
protected

Options which hold the petsc settings for the momentum equation.

Definition at line 92 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _momentum_system_names

const std::vector<SolverSystemName>& SIMPLESolveBase::_momentum_system_names
protected

◆ _num_iterations

const unsigned int SIMPLESolveBase::_num_iterations
protected

The maximum number of momentum-pressure iterations.

Definition at line 261 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_absolute_tolerance

const std::vector<Real> SIMPLESolveBase::_passive_scalar_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence in passive scalars.

Definition at line 252 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_equation_relaxation

const std::vector<Real> SIMPLESolveBase::_passive_scalar_equation_relaxation
protected

The user-defined relaxation parameter(s) for the passive scalar equation(s)

Definition at line 169 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_l_abs_tol

const Real SIMPLESolveBase::_passive_scalar_l_abs_tol
protected

Absolute linear tolerance for the passive scalar equation(s).

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 179 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_passive_scalar_linear_control
protected

Options for the linear solver of the passive scalar equation(s)

Definition at line 175 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_passive_scalar_petsc_options
protected

Options which hold the petsc settings for the passive scalar equation(s)

Definition at line 172 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().

◆ _passive_scalar_system_names

const std::vector<SolverSystemName>& SIMPLESolveBase::_passive_scalar_system_names
protected

◆ _passive_scalar_system_numbers

std::vector<unsigned int> SIMPLESolveBase::_passive_scalar_system_numbers
protected

◆ _pin_pressure

const bool SIMPLESolveBase::_pin_pressure
protected

◆ _pm_radiation_absolute_tolerance

const std::vector<Real> SIMPLESolveBase::_pm_radiation_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence in participating media radiation.

Definition at line 255 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), and SIMPLESolveBase().

◆ _pm_radiation_equation_relaxation

const std::vector<Real> SIMPLESolveBase::_pm_radiation_equation_relaxation
protected

The user-defined relaxation parameter(s) for the participating media radiation equation(s)

Definition at line 193 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _pm_radiation_l_abs_tol

const Real SIMPLESolveBase::_pm_radiation_l_abs_tol
protected

Absolute linear tolerance for the participating media radiation equation(s).

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 203 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve().

◆ _pm_radiation_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_pm_radiation_linear_control
protected

Options for the linear solver of the participating media radiation equation(s)

Definition at line 199 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _pm_radiation_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_pm_radiation_petsc_options
protected

Options which hold the petsc settings for the participating media radiation equation(s)

Definition at line 196 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _pm_radiation_system_names

const std::vector<SolverSystemName>& SIMPLESolveBase::_pm_radiation_system_names
protected

◆ _pm_radiation_system_numbers

std::vector<unsigned int> SIMPLESolveBase::_pm_radiation_system_numbers
protected

◆ _pressure_absolute_tolerance

const Real SIMPLESolveBase::_pressure_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence in pressure.

Definition at line 243 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), and SIMPLESolveNonlinearAssembly::solve().

◆ _pressure_l_abs_tol

const Real SIMPLESolveBase::_pressure_l_abs_tol
protected

Absolute linear tolerance for the pressure equation.

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 107 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solvePressureCorrector(), and SIMPLESolveNonlinearAssembly::solvePressureCorrector().

◆ _pressure_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_pressure_linear_control
protected

Options for the linear solver of the pressure equation.

Definition at line 103 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solvePressureCorrector(), and SIMPLESolveNonlinearAssembly::solvePressureCorrector().

◆ _pressure_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_pressure_petsc_options
protected

Options which hold the petsc settings for the pressure equation.

Definition at line 110 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::correctVelocity(), SIMPLESolveBase(), and SIMPLESolveNonlinearAssembly::solve().

◆ _pressure_pin_dof

dof_id_type SIMPLESolveBase::_pressure_pin_dof
protected

The dof ID where the pressure needs to be pinned.

Definition at line 122 of file SIMPLESolveBase.h.

Referenced by setupPressurePin(), LinearAssemblySegregatedSolve::solvePressureCorrector(), and SIMPLESolveNonlinearAssembly::solvePressureCorrector().

◆ _pressure_pin_value

const Real SIMPLESolveBase::_pressure_pin_value
protected

The value we want to enforce for pressure.

Definition at line 119 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solvePressureCorrector(), and SIMPLESolveNonlinearAssembly::solvePressureCorrector().

◆ _pressure_system_name

const SolverSystemName& SIMPLESolveBase::_pressure_system_name
protected

The name of the pressure system.

Definition at line 100 of file SIMPLESolveBase.h.

◆ _pressure_variable_relaxation

const Real SIMPLESolveBase::_pressure_variable_relaxation
protected

The user-defined relaxation parameter for the pressure variable.

Definition at line 113 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::correctVelocity(), and SIMPLESolveNonlinearAssembly::solve().

◆ _print_fields

const bool SIMPLESolveBase::_print_fields
protected

◆ _solid_energy_absolute_tolerance

const Real SIMPLESolveBase::_solid_energy_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence in solid energy.

Definition at line 249 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), and SIMPLESolveNonlinearAssembly::solve().

◆ _solid_energy_l_abs_tol

const Real SIMPLESolveBase::_solid_energy_l_abs_tol
protected

Absolute linear tolerance for the energy equations.

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 155 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solveSolidEnergy(), and SIMPLESolveNonlinearAssembly::solveSolidEnergySystem().

◆ _solid_energy_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_solid_energy_linear_control
protected

Options for the linear solver of the energy equation.

Definition at line 151 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solveSolidEnergy(), and SIMPLESolveNonlinearAssembly::solveSolidEnergySystem().

◆ _solid_energy_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_solid_energy_petsc_options
protected

Options which hold the petsc settings for the fluid energy equation.

Definition at line 148 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_absolute_tolerance

const std::vector<Real> SIMPLESolveBase::_turbulence_absolute_tolerance
protected

The user-defined absolute tolerance for determining the convergence turbulence variables.

Definition at line 258 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), and SIMPLESolveBase().

◆ _turbulence_equation_relaxation

const std::vector<Real> SIMPLESolveBase::_turbulence_equation_relaxation
protected

The user-defined relaxation parameter(s) for the turbulence equation(s)

Definition at line 217 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_field_min_limit

std::vector<Real> SIMPLESolveBase::_turbulence_field_min_limit
protected

The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..

Definition at line 223 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_field_relaxation

std::vector<Real> SIMPLESolveBase::_turbulence_field_relaxation
protected

The user-defined relaxation parameter(s) for the turbulence field(s)

Definition at line 220 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_l_abs_tol

const Real SIMPLESolveBase::_turbulence_l_abs_tol
protected

Absolute linear tolerance for the turbulence equation(s).

We need to store this, because it needs to be scaled with a representative flux.

Definition at line 233 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::solve().

◆ _turbulence_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_turbulence_linear_control
protected

Options for the linear solver of the turbulence equation(s)

Definition at line 229 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_turbulence_petsc_options
protected

Options which hold the petsc settings for the turbulence equation(s)

Definition at line 226 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), and LinearAssemblySegregatedSolve::solve().

◆ _turbulence_system_names

const std::vector<SolverSystemName>& SIMPLESolveBase::_turbulence_system_names
protected

◆ _turbulence_system_numbers

std::vector<unsigned int> SIMPLESolveBase::_turbulence_system_numbers
protected

The documentation for this class was generated from the following files: