https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected 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. More...
 
void setupPressurePin ()
 Setup pressure pin if there is need for one. More...
 
virtual void checkIntegrity ()
 Check if the user defined time kernels. More...
 
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 haveParameter (const std::string &name) 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. More...
 
virtual std::pair< unsigned int, RealsolvePressureCorrector ()=0
 Solve a pressure corrector step. More...
 
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. More...
 
SIMPLESolverConfiguration _momentum_linear_control
 Options for the linear solver of the momentum equation. More...
 
const Real _momentum_l_abs_tol
 Absolute linear tolerance for the momentum equation(s). More...
 
Moose::PetscSupport::PetscOptions _momentum_petsc_options
 Options which hold the petsc settings for the momentum equation. More...
 
const Real _momentum_equation_relaxation
 The user-defined relaxation parameter for the momentum equation. More...
 
const SolverSystemName & _pressure_system_name
 The name of the pressure system. More...
 
SIMPLESolverConfiguration _pressure_linear_control
 Options for the linear solver of the pressure equation. More...
 
const Real _pressure_l_abs_tol
 Absolute linear tolerance for the pressure equation. More...
 
Moose::PetscSupport::PetscOptions _pressure_petsc_options
 Options which hold the petsc settings for the pressure equation. More...
 
const Real _pressure_variable_relaxation
 The user-defined relaxation parameter for the pressure variable. More...
 
const bool _pin_pressure
 If the pressure needs to be pinned. More...
 
const Real _pressure_pin_value
 The value we want to enforce for pressure. More...
 
dof_id_type _pressure_pin_dof
 The dof ID where the pressure needs to be pinned. More...
 
const bool _has_energy_system
 Boolean for easy check if a fluid energy system shall be solved or not. More...
 
const Real _energy_equation_relaxation
 The user-defined relaxation parameter for the energy equation. More...
 
Moose::PetscSupport::PetscOptions _energy_petsc_options
 Options which hold the petsc settings for the fluid energy equation. More...
 
SIMPLESolverConfiguration _energy_linear_control
 Options for the linear solver of the energy equation. More...
 
const Real _energy_l_abs_tol
 Absolute linear tolerance for the energy equations. More...
 
const bool _has_solid_energy_system
 Boolean for easy check if a solid energy system shall be solved or not. More...
 
Moose::PetscSupport::PetscOptions _solid_energy_petsc_options
 Options which hold the petsc settings for the fluid energy equation. More...
 
SIMPLESolverConfiguration _solid_energy_linear_control
 Options for the linear solver of the energy equation. More...
 
const Real _solid_energy_l_abs_tol
 Absolute linear tolerance for the energy equations. More...
 
const std::vector< SolverSystemName > & _passive_scalar_system_names
 The names of the passive scalar systems. More...
 
const bool _has_passive_scalar_systems
 Boolean for easy check if a passive scalar systems shall be solved or not. More...
 
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) More...
 
Moose::PetscSupport::PetscOptions _passive_scalar_petsc_options
 Options which hold the petsc settings for the passive scalar equation(s) More...
 
SIMPLESolverConfiguration _passive_scalar_linear_control
 Options for the linear solver of the passive scalar equation(s) More...
 
const Real _passive_scalar_l_abs_tol
 Absolute linear tolerance for the passive scalar equation(s). More...
 
const std::vector< SolverSystemName > & _pm_radiation_system_names
 The names of the participating media radiation systems. More...
 
const bool _has_pm_radiation_systems
 Boolean for easy check if participating media radiation systems shall be solved or not. More...
 
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) More...
 
Moose::PetscSupport::PetscOptions _pm_radiation_petsc_options
 Options which hold the petsc settings for the participating media radiation equation(s) More...
 
SIMPLESolverConfiguration _pm_radiation_linear_control
 Options for the linear solver of the participating media radiation equation(s) More...
 
const Real _pm_radiation_l_abs_tol
 Absolute linear tolerance for the participating media radiation equation(s). More...
 
const std::vector< SolverSystemName > & _turbulence_system_names
 The names of the turbulence systems. More...
 
const bool _has_turbulence_systems
 Boolean for easy check if a turbulence scalar systems shall be solved or not. More...
 
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) More...
 
std::vector< Real_turbulence_field_relaxation
 The user-defined relaxation parameter(s) for the turbulence field(s) More...
 
std::vector< Real_turbulence_field_min_limit
 The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc.. More...
 
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
 Options which hold the petsc settings for the turbulence equation(s) More...
 
SIMPLESolverConfiguration _turbulence_linear_control
 Options for the linear solver of the turbulence equation(s) More...
 
const Real _turbulence_l_abs_tol
 Absolute linear tolerance for the turbulence equation(s). More...
 
const Real _momentum_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in momentum. More...
 
const Real _pressure_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in pressure. More...
 
const Real _energy_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in energy. More...
 
const Real _solid_energy_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in solid energy. More...
 
const std::vector< Real_passive_scalar_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in passive scalars. More...
 
const std::vector< Real_pm_radiation_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence in participating media radiation. More...
 
const std::vector< Real_turbulence_absolute_tolerance
 The user-defined absolute tolerance for determining the convergence turbulence variables. More...
 
const unsigned int _num_iterations
 The maximum number of momentum-pressure iterations. More...
 
const bool _continue_on_max_its
 If solve should continue if maximum number of iterations is hit. More...
 
const bool _print_fields
 Debug parameter which allows printing the coupling and solution vectors/matrices. More...
 
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
 

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 420 of file SIMPLESolveBase.C.

421  : SolveObject(ex),
422  UserObjectInterface(this),
423  _momentum_system_names(getParam<std::vector<SolverSystemName>>("momentum_systems")),
424  _momentum_l_abs_tol(getParam<Real>("momentum_l_abs_tol")),
425  _momentum_equation_relaxation(getParam<Real>("momentum_equation_relaxation")),
426  _pressure_system_name(getParam<SolverSystemName>("pressure_system")),
427  _pressure_l_abs_tol(getParam<Real>("pressure_l_abs_tol")),
428  _pressure_variable_relaxation(getParam<Real>("pressure_variable_relaxation")),
429  _pin_pressure(getParam<bool>("pin_pressure")),
430  _pressure_pin_value(getParam<Real>("pressure_pin_value")),
432  _has_energy_system(isParamValid("energy_system")),
433  _energy_equation_relaxation(getParam<Real>("energy_equation_relaxation")),
434  _energy_l_abs_tol(getParam<Real>("energy_l_abs_tol")),
435  _has_solid_energy_system(_has_energy_system && isParamValid("solid_energy_system")),
436  _solid_energy_l_abs_tol(getParam<Real>("solid_energy_l_abs_tol")),
437  _passive_scalar_system_names(getParam<std::vector<SolverSystemName>>("passive_scalar_systems")),
440  getParam<std::vector<Real>>("passive_scalar_equation_relaxation")),
441  _passive_scalar_l_abs_tol(getParam<Real>("passive_scalar_l_abs_tol")),
442  _pm_radiation_system_names(getParam<std::vector<SolverSystemName>>("pm_radiation_systems")),
445  getParam<std::vector<Real>>("pm_radiation_equation_relaxation")),
446  _pm_radiation_l_abs_tol(getParam<Real>("pm_radiation_l_abs_tol")),
447  _turbulence_system_names(getParam<std::vector<SolverSystemName>>("turbulence_systems")),
449  _turbulence_equation_relaxation(getParam<std::vector<Real>>("turbulence_equation_relaxation")),
450  _turbulence_field_relaxation(getParam<std::vector<Real>>("turbulence_field_relaxation")),
451  _turbulence_field_min_limit(getParam<std::vector<Real>>("turbulence_field_min_limit")),
452  _turbulence_l_abs_tol(getParam<Real>("turbulence_l_abs_tol")),
453  _momentum_absolute_tolerance(getParam<Real>("momentum_absolute_tolerance")),
454  _pressure_absolute_tolerance(getParam<Real>("pressure_absolute_tolerance")),
455  _energy_absolute_tolerance(getParam<Real>("energy_absolute_tolerance")),
456  _solid_energy_absolute_tolerance(getParam<Real>("solid_energy_absolute_tolerance")),
458  getParam<std::vector<Real>>("passive_scalar_absolute_tolerance")),
460  getParam<std::vector<Real>>("pm_radiation_absolute_tolerance")),
461  _turbulence_absolute_tolerance(getParam<std::vector<Real>>("turbulence_absolute_tolerance")),
462  _num_iterations(getParam<unsigned int>("num_iterations")),
463  _continue_on_max_its(getParam<bool>("continue_on_max_its")),
464  _print_fields(getParam<bool>("print_fields"))
465 {
466  if (_momentum_system_names.size() != _problem.mesh().dimension())
467  paramError("momentum_systems",
468  "The number of momentum components should be equal to the number of "
469  "spatial dimensions on the mesh.");
470 
471  const auto & momentum_petsc_options = getParam<MultiMooseEnum>("momentum_petsc_options");
472  const auto & momentum_petsc_pair_options = getParam<MooseEnumItem, std::string>(
473  "momentum_petsc_options_iname", "momentum_petsc_options_value");
475  momentum_petsc_options, "", *this, _momentum_petsc_options);
477  momentum_petsc_pair_options, _problem.mesh().dimension(), "", *this, _momentum_petsc_options);
478 
479  _momentum_linear_control.real_valued_data["rel_tol"] = getParam<Real>("momentum_l_tol");
480  _momentum_linear_control.real_valued_data["abs_tol"] = getParam<Real>("momentum_l_abs_tol");
482  getParam<unsigned int>("momentum_l_max_its");
483 
484  const auto & pressure_petsc_options = getParam<MultiMooseEnum>("pressure_petsc_options");
485  const auto & pressure_petsc_pair_options = getParam<MooseEnumItem, std::string>(
486  "pressure_petsc_options_iname", "pressure_petsc_options_value");
488  pressure_petsc_options, "", *this, _pressure_petsc_options);
490  pressure_petsc_pair_options, _problem.mesh().dimension(), "", *this, _pressure_petsc_options);
491 
492  _pressure_linear_control.real_valued_data["rel_tol"] = getParam<Real>("pressure_l_tol");
493  _pressure_linear_control.real_valued_data["abs_tol"] = getParam<Real>("pressure_l_abs_tol");
495  getParam<unsigned int>("pressure_l_max_its");
496 
497  if (_has_energy_system)
498  {
499  const auto & energy_petsc_options = getParam<MultiMooseEnum>("energy_petsc_options");
500  const auto & energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
501  "energy_petsc_options_iname", "energy_petsc_options_value");
503  energy_petsc_options, "", *this, _energy_petsc_options);
505  energy_petsc_pair_options, _problem.mesh().dimension(), "", *this, _energy_petsc_options);
506 
507  _energy_linear_control.real_valued_data["rel_tol"] = getParam<Real>("energy_l_tol");
508  _energy_linear_control.real_valued_data["abs_tol"] = getParam<Real>("energy_l_abs_tol");
509  _energy_linear_control.int_valued_data["max_its"] = getParam<unsigned int>("energy_l_max_its");
510  }
511  else
512  checkDependentParameterError("energy_system",
513  {"energy_petsc_options",
514  "energy_petsc_options_iname",
515  "energy_petsc_options_value",
516  "energy_l_tol",
517  "energy_l_abs_tol",
518  "energy_l_max_its",
519  "energy_absolute_tolerance",
520  "energy_equation_relaxation"},
521  false);
522 
524  {
525  const auto & solid_energy_petsc_options =
526  getParam<MultiMooseEnum>("solid_energy_petsc_options");
527  const auto & solid_energy_petsc_pair_options = getParam<MooseEnumItem, std::string>(
528  "solid_energy_petsc_options_iname", "solid_energy_petsc_options_value");
530  solid_energy_petsc_options, "", *this, _solid_energy_petsc_options);
531  Moose::PetscSupport::addPetscPairsToPetscOptions(solid_energy_petsc_pair_options,
532  _problem.mesh().dimension(),
533  "",
534  *this,
536 
537  _solid_energy_linear_control.real_valued_data["rel_tol"] = getParam<Real>("solid_energy_l_tol");
539  getParam<Real>("solid_energy_l_abs_tol");
541  getParam<unsigned int>("solid_energy_l_max_its");
542  }
543  else
544  checkDependentParameterError("solid_energy_system",
545  {"solid_energy_petsc_options",
546  "solid_energy_petsc_options_iname",
547  "solid_energy_petsc_options_value",
548  "solid_energy_l_tol",
549  "solid_energy_l_abs_tol",
550  "solid_energy_l_max_its",
551  "solid_energy_absolute_tolerance",
552  "solid_energy_equation_relaxation"},
553  false);
554 
555  // We check for input errors with regards to the participating media radiation equations. At the
556  // same time, we set up the corresponding system numbers
558  {
560  paramError("pm_radiation_equation_relaxation",
561  "The number of equation relaxation parameters does not match the number of "
562  "participating media radiation equations!");
564  paramError("pm_radiation_absolute_tolerance",
565  "The number of absolute tolerances does not match the number of "
566  "participating media radiation equations!");
567  }
569  {
570  const auto & pm_radiation_petsc_options =
571  getParam<MultiMooseEnum>("pm_radiation_petsc_options");
572  const auto & pm_radiation_petsc_pair_options = getParam<MooseEnumItem, std::string>(
573  "pm_radiation_petsc_options_iname", "pm_radiation_petsc_options_value");
575  pm_radiation_petsc_options, "", *this, _pm_radiation_petsc_options);
576  Moose::PetscSupport::addPetscPairsToPetscOptions(pm_radiation_petsc_pair_options,
577  _problem.mesh().dimension(),
578  "",
579  *this,
581 
582  _pm_radiation_linear_control.real_valued_data["rel_tol"] = getParam<Real>("pm_radiation_l_tol");
584  getParam<Real>("pm_radiation_l_abs_tol");
586  getParam<unsigned int>("pm_radiation_l_max_its");
587  }
588  else
589  checkDependentParameterError("pm_radiation_systems",
590  {"pm_radiation_petsc_options",
591  "pm_radiation_petsc_options_iname",
592  "pm_radiation_petsc_options_value",
593  "pm_radiation_l_tol",
594  "pm_radiation_l_abs_tol",
595  "pm_radiation_l_max_its",
596  "pm_radiation_equation_relaxation",
597  "pm_radiation_absolute_tolerance"},
598  false);
599 
600  // We check for input errors with regards to the passive scalar equations. At the same time, we
601  // set up the corresponding system numbers
603  {
605  paramError("passive_scalar_equation_relaxation",
606  "The number of equation relaxation parameters does not match the number of "
607  "passive scalar equations!");
609  paramError("passive_scalar_absolute_tolerance",
610  "The number of absolute tolerances does not match the number of "
611  "passive scalar equations!");
612  }
614  {
615  const auto & passive_scalar_petsc_options =
616  getParam<MultiMooseEnum>("passive_scalar_petsc_options");
617  const auto & passive_scalar_petsc_pair_options = getParam<MooseEnumItem, std::string>(
618  "passive_scalar_petsc_options_iname", "passive_scalar_petsc_options_value");
620  passive_scalar_petsc_options, "", *this, _passive_scalar_petsc_options);
621  Moose::PetscSupport::addPetscPairsToPetscOptions(passive_scalar_petsc_pair_options,
622  _problem.mesh().dimension(),
623  "",
624  *this,
626 
628  getParam<Real>("passive_scalar_l_tol");
630  getParam<Real>("passive_scalar_l_abs_tol");
632  getParam<unsigned int>("passive_scalar_l_max_its");
633  }
634  else
635  checkDependentParameterError("passive_scalar_systems",
636  {"passive_scalar_petsc_options",
637  "passive_scalar_petsc_options_iname",
638  "passive_scalar_petsc_options_value",
639  "passive_scalar_l_tol",
640  "passive_scalar_l_abs_tol",
641  "passive_scalar_l_max_its",
642  "passive_scalar_equation_relaxation",
643  "passive_scalar_absolute_tolerance"},
644  false);
645 
646  // We check for input errors with regards to the surrogate turbulence equations. At the same time,
647  // we set up the corresponding system numbers
649  {
651  paramError("turbulence_equation_relaxation",
652  "The number of equation relaxation parameters does not match the number of "
653  "turbulence equations!");
655  paramError("turbulence_absolute_tolerance",
656  "The number of absolute tolerances does not match the number of "
657  "turbulence equations!");
658  if (_turbulence_field_min_limit.empty())
659  // If no minimum bounds are given, initialize to default value 1e-8
661 
662  // Assign turbulence field relaxation as 1.0 if not defined
663  if (_turbulence_field_relaxation.empty())
665 
666  const auto & turbulence_petsc_options = getParam<MultiMooseEnum>("turbulence_petsc_options");
667  const auto & turbulence_petsc_pair_options = getParam<MooseEnumItem, std::string>(
668  "turbulence_petsc_options_iname", "turbulence_petsc_options_value");
670  turbulence_petsc_options, "", *this, _turbulence_petsc_options);
671  Moose::PetscSupport::addPetscPairsToPetscOptions(turbulence_petsc_pair_options,
672  _problem.mesh().dimension(),
673  "",
674  *this,
676 
677  _turbulence_linear_control.real_valued_data["rel_tol"] = getParam<Real>("turbulence_l_tol");
678  _turbulence_linear_control.real_valued_data["abs_tol"] = getParam<Real>("turbulence_l_abs_tol");
680  getParam<unsigned int>("turbulence_l_max_its");
681  }
682  else
683  checkDependentParameterError("turbulence_systems",
684  {"turbulence_petsc_options",
685  "turbulence_petsc_options_iname",
686  "turbulence_petsc_options_value",
687  "turbulence_l_tol",
688  "turbulence_l_abs_tol",
689  "turbulence_l_max_its",
690  "turbulence_equation_relaxation",
691  "turbulence_field_relaxation",
692  "turbulence_field_min_limit",
693  "turbulence_absolute_tolerance"},
694  false);
695 }
FEProblemBase & _problem
SIMPLESolverConfiguration _momentum_linear_control
Options for the linear solver of the momentum equation.
void addPetscFlagsToPetscOptions(const MultiMooseEnum &petsc_flags, std::string prefix, const ParallelParamObject &param_object, PetscOptions &petsc_options)
SIMPLESolverConfiguration _turbulence_linear_control
Options for the linear solver of the turbulence equation(s)
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.
SIMPLESolverConfiguration _energy_linear_control
Options for the linear solver of the energy equation.
const unsigned int invalid_uint
void paramError(const std::string &param, Args... args) const
const T & getParam(const std::string &name) const
const bool _print_fields
Debug parameter which allows printing the coupling and solution vectors/matrices. ...
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
Options which hold the petsc settings for the turbulence equation(s)
SIMPLESolverConfiguration _pm_radiation_linear_control
Options for the linear solver of the participating media radiation equation(s)
const Real _solid_energy_l_abs_tol
Absolute linear tolerance for the energy equations.
const bool _has_energy_system
Boolean for easy check if a fluid energy system shall be solved or not.
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 SolverSystemName & _pressure_system_name
The name of the pressure system.
std::vector< Real > _turbulence_field_relaxation
The user-defined relaxation parameter(s) for the turbulence field(s)
const Real _passive_scalar_l_abs_tol
Absolute linear tolerance for the passive scalar equation(s).
Moose::PetscSupport::PetscOptions _solid_energy_petsc_options
Options which hold the petsc settings for the fluid energy equation.
const Real _momentum_equation_relaxation
The user-defined relaxation parameter for the momentum 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)
const Real _momentum_l_abs_tol
Absolute linear tolerance for the momentum equation(s).
std::map< std::string, Real > real_valued_data
const Real _pressure_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in pressure.
const Real _pressure_variable_relaxation
The user-defined relaxation parameter for the pressure variable.
const Real _momentum_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in momentum.
const std::vector< SolverSystemName > & _pm_radiation_system_names
The names of the participating media radiation systems.
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.
const bool _has_pm_radiation_systems
Boolean for easy check if participating media radiation systems shall be solved or not...
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 Real _pressure_l_abs_tol
Absolute linear tolerance for the pressure 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 std::vector< Real > _pm_radiation_equation_relaxation
The user-defined relaxation parameter(s) for the participating media radiation equation(s) ...
const bool _pin_pressure
If the pressure needs to be pinned.
const Real _energy_l_abs_tol
Absolute linear tolerance for the energy equations.
const std::vector< Real > _pm_radiation_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in participating media radiation...
SolveObject(Executioner &ex)
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.
const Real _pm_radiation_l_abs_tol
Absolute linear tolerance for the participating media radiation equation(s).
const std::vector< Real > _passive_scalar_equation_relaxation
The user-defined relaxation parameter(s) for the passive scalar equation(s)
const Real _energy_equation_relaxation
The user-defined relaxation parameter for the energy equation.
const Real _pressure_pin_value
The value we want to enforce for pressure.
const Real _turbulence_l_abs_tol
Absolute linear tolerance for the turbulence equation(s).
virtual MooseMesh & mesh() override
const bool _has_passive_scalar_systems
Boolean for easy check if a passive scalar systems shall be solved or not.
bool isParamValid(const std::string &name) const
const Real _solid_energy_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in solid energy.
SIMPLESolverConfiguration _solid_energy_linear_control
Options for the linear solver of the energy equation.
const bool _continue_on_max_its
If solve should continue if maximum number of iterations is hit.
Moose::PetscSupport::PetscOptions _pm_radiation_petsc_options
Options which hold the petsc settings for the participating media radiation equation(s) ...
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.
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.
UserObjectInterface(const MooseObject *moose_object)

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 707 of file SIMPLESolveBase.C.

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

710 {
711  for (const auto & param : dependent_parameters)
712  if (parameters().isParamSetByUser(param) == !should_be_defined)
713  paramError(param,
714  "This parameter should " + std::string(should_be_defined ? "" : "not") +
715  " be given by the user with the corresponding " + main_parameter +
716  " setting!");
717 }
void paramError(const std::string &param, Args... args) const
const InputParameters & parameters() const
bool isParamSetByUser(const std::string &name) const

◆ 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 698 of file SIMPLESolveBase.C.

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

699 {
700  if (_pin_pressure)
702  _problem.mesh(),
703  getParam<Point>("pressure_pin_point"));
704 }
FEProblemBase & _problem
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 _pressure_pin_dof
The dof ID where the pressure needs to be pinned.
const bool _pin_pressure
If the pressure needs to be pinned.
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...
virtual MooseMesh & mesh() override

◆ 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.

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

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

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 262 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 244 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 SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 Real SIMPLESolveBase::_momentum_absolute_tolerance
protected

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

Definition at line 238 of file SIMPLESolveBase.h.

Referenced by LinearAssemblySegregatedSolve::setupResidualStorage(), 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 SIMPLESolveNonlinearAssembly::solveMomentumPredictor(), and LinearAssemblySegregatedSolve::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 SIMPLESolveNonlinearAssembly::solveMomentumPredictor(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solveMomentumPredictor(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 259 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 250 of file SIMPLESolveBase.h.

Referenced by SIMPLESolveBase(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::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 253 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 241 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 SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::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(), SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::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 SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::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 247 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 256 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: