Solve class serving as a base class for the two SIMPLE solvers that operate with different assembly algorithms. More...
#include <SIMPLESolveBase.h>
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< MooseObject > | getSharedPtr () |
std::shared_ptr< const MooseObject > | getSharedPtr () const |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (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 &nm) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
PerfGraph & | perfGraph () |
bool | isDefaultPostprocessorValue (const std::string ¶m_name, const unsigned int index=0) const |
bool | hasPostprocessor (const std::string ¶m_name, const unsigned int index=0) const |
bool | hasPostprocessorByName (const PostprocessorName &name) const |
std::size_t | coupledPostprocessors (const std::string ¶m_name) const |
const PostprocessorName & | getPostprocessorName (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValue (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValue (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValueOld (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValueOld (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValueOlder (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValueOlder (const std::string ¶m_name, const unsigned int index=0) const |
virtual const PostprocessorValue & | getPostprocessorValueByName (const PostprocessorName &name) const |
virtual const PostprocessorValue & | getPostprocessorValueByName (const PostprocessorName &name) const |
const PostprocessorValue & | getPostprocessorValueOldByName (const PostprocessorName &name) const |
const PostprocessorValue & | getPostprocessorValueOldByName (const PostprocessorName &name) const |
const PostprocessorValue & | getPostprocessorValueOlderByName (const PostprocessorName &name) const |
const PostprocessorValue & | getPostprocessorValueOlderByName (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 ¶m_name) const |
const T & | getUserObject (const std::string ¶m_name, bool is_dependency=true) const |
const T & | getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const |
const UserObject & | getUserObjectBase (const std::string ¶m_name, bool is_dependency=true) const |
const UserObject & | getUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_name) const |
bool | hasUserObject (const std::string ¶m_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 () |
Public Attributes | |
const ConsoleStream | _console |
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, Real > | solvePressureCorrector ()=0 |
Solve a pressure corrector step. More... | |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level) const |
PerfID | registerTimedSection (const std::string §ion_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const |
std::string | timedSectionName (const std::string §ion_name) const |
virtual void | addPostprocessorDependencyHelper (const PostprocessorName &) const |
virtual void | addUserObjectDependencyHelper (const UserObject &) 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 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 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 |
const std::string | _type |
const std::string | _name |
const InputParameters & | _pars |
Factory & | _factory |
ActionFactory & | _action_factory |
MooseApp & | _pg_moose_app |
const std::string | _prefix |
const Parallel::Communicator & | _communicator |
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.
SIMPLESolveBase::SIMPLESolveBase | ( | Executioner & | ex | ) |
Definition at line 303 of file SIMPLESolveBase.C.
|
protected |
Definition at line 487 of file SIMPLESolveBase.C.
Referenced by SIMPLESolveBase(), and SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly().
|
inlinevirtual |
Check if the user defined time kernels.
Reimplemented in SIMPLESolve, and SIMPLESolveNonlinearAssembly.
Definition at line 61 of file SIMPLESolveBase.h.
|
pure virtual |
Fetch the Rhie Chow user object that is reponsible for determining face velocities and mass flux.
Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.
|
inlineoverridevirtual |
Reimplemented from SolveObject.
Definition at line 48 of file SIMPLESolveBase.h.
void SIMPLESolveBase::setupPressurePin | ( | ) |
Setup pressure pin if there is need for one.
Definition at line 478 of file SIMPLESolveBase.C.
Referenced by SIMPLE::init(), PIMPLE::init(), and SIMPLENonlinearAssembly::init().
|
protectedpure virtual |
Solve a momentum predictor step with a fixed pressure field.
Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.
|
protectedpure virtual |
Solve a pressure corrector step.
Implemented in LinearAssemblySegregatedSolve, and SIMPLESolveNonlinearAssembly.
|
static |
Definition at line 15 of file SIMPLESolveBase.C.
Referenced by SIMPLESolveNonlinearAssembly::validParams(), and LinearAssemblySegregatedSolve::validParams().
|
protected |
If solve should continue if maximum number of iterations is hit.
Definition at line 202 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
protected |
The user-defined absolute tolerance for determining the convergence in energy.
Definition at line 190 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
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().
|
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().
|
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().
|
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().
|
protected |
Boolean for easy check if a fluid energy system shall be solved or not.
Definition at line 127 of file SIMPLESolveBase.h.
Referenced by SIMPLESolve::checkIntegrity(), SIMPLESolveNonlinearAssembly::checkIntegrity(), LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveBase(), SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solve().
|
protected |
Boolean for easy check if a passive scalar systems shall be solved or not.
Definition at line 163 of file SIMPLESolveBase.h.
Referenced by SIMPLESolve::checkIntegrity(), SIMPLESolveNonlinearAssembly::checkIntegrity(), LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveBase(), SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solve().
|
protected |
Boolean for easy check if a solid energy system shall be solved or not.
Definition at line 145 of file SIMPLESolveBase.h.
Referenced by SIMPLESolveNonlinearAssembly::checkIntegrity(), LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveBase(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solve().
|
protected |
The user-defined absolute tolerance for determining the convergence in momentum.
Definition at line 184 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
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().
|
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().
|
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().
|
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().
|
protected |
The names of the momentum systems.
Definition at line 82 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveBase(), and SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly().
|
protected |
The maximum number of momentum-pressure iterations.
Definition at line 199 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
protected |
The user-defined absolute tolerance for determining the convergence in passive scalars.
Definition at line 196 of file SIMPLESolveBase.h.
Referenced by SIMPLESolveBase(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
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().
|
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().
|
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().
|
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().
|
protected |
The names of the passive scalar systems.
Definition at line 160 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveBase(), SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly(), and LinearAssemblySegregatedSolve::solve().
|
protected |
Definition at line 166 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::LinearAssemblySegregatedSolve(), SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solve().
|
protected |
If the pressure needs to be pinned.
Definition at line 116 of file SIMPLESolveBase.h.
Referenced by setupPressurePin(), SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::solvePressureCorrector().
|
protected |
The user-defined absolute tolerance for determining the convergence in pressure.
Definition at line 187 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
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().
|
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().
|
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().
|
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().
|
protected |
The value we want to enforce for pressure.
Definition at line 119 of file SIMPLESolveBase.h.
Referenced by SIMPLESolveNonlinearAssembly::solvePressureCorrector(), and LinearAssemblySegregatedSolve::solvePressureCorrector().
|
protected |
The name of the pressure system.
Definition at line 100 of file SIMPLESolveBase.h.
|
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().
|
protected |
Debug parameter which allows printing the coupling and solution vectors/matrices.
Definition at line 207 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::correctVelocity(), SIMPLESolveNonlinearAssembly::solve(), SIMPLESolveNonlinearAssembly::solveAdvectedSystem(), LinearAssemblySegregatedSolve::solveAdvectedSystem(), SIMPLESolveNonlinearAssembly::solveMomentumPredictor(), LinearAssemblySegregatedSolve::solveMomentumPredictor(), SIMPLESolveNonlinearAssembly::solvePressureCorrector(), LinearAssemblySegregatedSolve::solvePressureCorrector(), LinearAssemblySegregatedSolve::solveSolidEnergy(), and SIMPLESolveNonlinearAssembly::solveSolidEnergySystem().
|
protected |
The user-defined absolute tolerance for determining the convergence in solid energy.
Definition at line 193 of file SIMPLESolveBase.h.
Referenced by LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
|
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().
|
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().
|
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().