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

SIMPLE-based solution object with nonlinear FV system assembly. More...

#include <SIMPLESolveNonlinearAssembly.h>

Inheritance diagram for SIMPLESolveNonlinearAssembly:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

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

Protected Member Functions

virtual std::vector< std::pair< unsigned int, Real > > solveMomentumPredictor () override
 Solve a momentum predictor step with a fixed pressure field.
 
virtual std::pair< unsigned int, Real > solvePressureCorrector () override
 Solve a pressure corrector step.
 
virtual void checkTimeKernels (NonlinearSystemBase &system)
 Check if the system contains time kernels.
 
std::pair< unsigned int, Real > solveAdvectedSystem (const unsigned int system_num, NonlinearSystemBase &system, const Real relaxation_factor, libMesh::SolverConfiguration &solver_config, const Real abs_tol)
 Solve an equation which contains an advection term that depends on the solution of the segregated Navier-Stokes equations.
 
std::pair< unsigned int, Real > solveSolidEnergySystem ()
 Solve the solid energy conservation equation.
 
void checkDependentParameterError (const std::string &main_parameter, const std::vector< std::string > &dependent_parameters, const bool should_be_defined)
 
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

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

Private Member Functions

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

Static Private Member Functions

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

Private Attributes

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

Detailed Description

SIMPLE-based solution object with nonlinear FV system assembly.

Definition at line 20 of file SIMPLESolveNonlinearAssembly.h.

Constructor & Destructor Documentation

◆ SIMPLESolveNonlinearAssembly()

SIMPLESolveNonlinearAssembly::SIMPLESolveNonlinearAssembly ( Executioner ex)

Definition at line 30 of file SIMPLESolveNonlinearAssembly.C.

31 : SIMPLESolveBase(ex),
32 _pressure_sys_number(_problem.nlSysNum(getParam<SolverSystemName>("pressure_system"))),
34 _has_turbulence_systems(!getParam<std::vector<SolverSystemName>>("turbulence_systems").empty()),
36 ? _problem.nlSysNum(getParam<SolverSystemName>("energy_system"))
39 : nullptr),
42 ? _problem.nlSysNum(getParam<SolverSystemName>("solid_energy_system"))
45 ? &_problem.getNonlinearSystemBase(_solid_energy_sys_number)
46 : nullptr),
47 _turbulence_system_names(getParam<std::vector<SolverSystemName>>("turbulence_systems")),
48 _turbulence_equation_relaxation(getParam<std::vector<Real>>("turbulence_equation_relaxation")),
49 _turbulence_field_min_limit(getParam<std::vector<Real>>("turbulence_field_min_limit")),
50 _turbulence_l_abs_tol(getParam<Real>("turbulence_l_abs_tol")),
51 _turbulence_absolute_tolerance(getParam<std::vector<Real>>("turbulence_absolute_tolerance")),
52 _pressure_tag_name(getParam<TagName>("pressure_gradient_tag")),
54{
55 // We disable this considering that this object passes petsc options a little differently
57
58 // We fetch the system numbers for the momentum components plus add vectors
59 // for removing the contribution from the pressure gradient terms.
60 for (auto system_i : index_range(_momentum_system_names))
61 {
63 _momentum_systems.push_back(
65 _momentum_systems[system_i]->addVector(_pressure_tag_id, false, PARALLEL);
66
67 // We disable this considering that this object passes petsc options a little differently
68 _momentum_systems[system_i]->system().prefix_with_name(false);
69 }
70
72 for (auto system_i : index_range(_passive_scalar_system_names))
73 {
78
79 // We disable this considering that this object passes petsc options a little differently
80 _passive_scalar_systems[system_i]->system().prefix_with_name(false);
81 }
82
84 {
85 for (auto system_i : index_range(_turbulence_system_names))
86 {
88 _turbulence_systems.push_back(
90
91 // We disable this considering that this object passes petsc options a little differently
92 _turbulence_systems[system_i]->system().prefix_with_name(false);
93 }
94
95 // We check for input errors with regards to the turbulence equations. At the same time, we
96 // set up the corresponding system numbers
98 paramError("turbulence_equation_relaxation",
99 "The number of equation relaxation parameters does not match the number of "
100 "turbulence scalar equations!");
102 paramError("turbulence_absolute_tolerance",
103 "The number of absolute tolerances does not match the number of "
104 "turbulence equations!");
105 if (_turbulence_field_min_limit.empty())
106 // If no minimum bounds are given, initialize to default value 1e-8
109 paramError("turbulence_field_min_limit",
110 "The number of lower bounds for turbulent quantities does not match the "
111 "number of turbulence equations!");
112 }
113
114 if (isParamValid("solid_energy_system") && !_has_energy_system)
116 "solid_energy_system",
117 "We cannot solve a solid energy system without solving for the fluid energy as well!");
118
120 {
121 const auto & turbulence_petsc_options = getParam<MultiMooseEnum>("turbulence_petsc_options");
122 const auto & turbulence_petsc_pair_options = getParam<MooseEnumItem, std::string>(
123 "turbulence_petsc_options_iname", "turbulence_petsc_options_value");
125 turbulence_petsc_options, "", *this, _turbulence_petsc_options);
126 Moose::PetscSupport::addPetscPairsToPetscOptions(turbulence_petsc_pair_options,
128 "",
129 *this,
131
132 _turbulence_linear_control.real_valued_data["rel_tol"] = getParam<Real>("turbulence_l_tol");
133 _turbulence_linear_control.real_valued_data["abs_tol"] = getParam<Real>("turbulence_l_abs_tol");
135 getParam<unsigned int>("turbulence_l_max_its");
136 }
137 else
138 checkDependentParameterError("turbulence_system",
139 {"turbulence_petsc_options",
140 "turbulence_petsc_options_iname",
141 "turbulence_petsc_options_value",
142 "turbulence_l_tol",
143 "turbulence_l_abs_tol",
144 "turbulence_l_max_its",
145 "turbulence_equation_relaxation",
146 "turbulence_absolute_tolerance"},
147 false);
148}
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const override
virtual MooseMesh & mesh() override
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
void paramError(const std::string &param, Args... args) const
const T & getParam(const std::string &name) const
bool isParamValid(const std::string &name) const
virtual unsigned int dimension() const
virtual libMesh::System & system() override
Solve class serving as a base class for the two SIMPLE solvers that operate with different assembly a...
const bool _has_energy_system
Boolean for easy check if a fluid energy system shall be solved or not.
const std::vector< SolverSystemName > & _passive_scalar_system_names
The names of the passive scalar systems.
std::vector< unsigned int > _passive_scalar_system_numbers
const bool _has_solid_energy_system
Boolean for easy check if a solid energy system shall be solved or not.
const bool _has_passive_scalar_systems
Boolean for easy check if a passive 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 std::vector< SolverSystemName > & _momentum_system_names
The names of the momentum systems.
const std::vector< Real > _turbulence_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in turbulence equations.
const TagName _pressure_tag_name
The name of the vector tag which corresponds to the pressure gradient terms in the momentum equation.
const bool _has_turbulence_systems
Boolean for easy check if turbulence systems shall be solved or not.
SIMPLESolverConfiguration _turbulence_linear_control
Options for the linear solver of the turbulence equation(s)
NonlinearSystemBase * _solid_energy_system
Pointer to the nonlinear system corresponding to the solid energy equation.
std::vector< unsigned int > _momentum_system_numbers
The number(s) of the system(s) corresponding to the momentum equation(s)
std::vector< Real > _turbulence_field_min_limit
The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..
const TagID _pressure_tag_id
The ID of the tag which corresponds to the pressure gradient terms in the momentum equation.
std::vector< unsigned int > _turbulence_system_numbers
const unsigned int _energy_sys_number
The number of the system corresponding to the energy equation.
const unsigned int _pressure_sys_number
The number of the system corresponding to the pressure equation.
std::vector< NonlinearSystemBase * > _momentum_systems
Pointer(s) to the system(s) corresponding to the momentum equation(s)
const std::vector< Real > _turbulence_equation_relaxation
The user-defined relaxation parameter(s) for the turbulence equation(s)
std::vector< NonlinearSystemBase * > _turbulence_systems
Pointer(s) to the system(s) corresponding to the turbulence equation(s)
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
Options which hold the petsc settings for the turbulence equation(s)
const unsigned int _solid_energy_sys_number
The number of the system corresponding to the solid energy equation.
NonlinearSystemBase * _energy_system
Pointer to the nonlinear system corresponding to the fluid energy equation.
const std::vector< SolverSystemName > & _turbulence_system_names
The names of the turbulence scalar systems.
const Real _turbulence_l_abs_tol
Absolute linear tolerance for the turbulence equation(s).
std::vector< NonlinearSystemBase * > _passive_scalar_systems
Pointer(s) to the system(s) corresponding to the passive scalar equation(s)
NonlinearSystemBase & _pressure_system
Reference to the nonlinear system corresponding to the pressure equation.
FEProblemBase & _problem
std::map< std::string, int > int_valued_data
std::map< std::string, Real > real_valued_data
void prefix_with_name(bool value)
void addPetscFlagsToPetscOptions(const MultiMooseEnum &petsc_flags, std::string prefix, const ParallelParamObject &param_object, PetscOptions &petsc_options)
void addPetscPairsToPetscOptions(const std::vector< std::pair< MooseEnumItem, std::string > > &petsc_pair_options, const unsigned int mesh_dimension, std::string prefix, const ParallelParamObject &param_object, PetscOptions &petsc_options)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
auto index_range(const T &sizable)
const unsigned int invalid_uint
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ checkDependentParameterError()

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

Definition at line 711 of file SIMPLESolveBase.C.

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

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

◆ checkIntegrity()

void SIMPLESolveNonlinearAssembly::checkIntegrity ( )
overridevirtual

Check if the user defined time kernels.

Reimplemented from SIMPLESolveBase.

Definition at line 707 of file SIMPLESolveNonlinearAssembly.C.

708{
709 // check to make sure that we don't have any time kernels in this simulation (Steady State)
710 for (const auto system : _momentum_systems)
711 checkTimeKernels(*system);
712
714
716 {
720 }
721
723 for (const auto system : _passive_scalar_systems)
724 checkTimeKernels(*system);
725
727 for (const auto system : _turbulence_systems)
728 checkTimeKernels(*system);
729}
virtual void checkTimeKernels(NonlinearSystemBase &system)
Check if the system contains time kernels.

Referenced by SIMPLENonlinearAssembly::init().

◆ checkTimeKernels()

void SIMPLESolveNonlinearAssembly::checkTimeKernels ( NonlinearSystemBase system)
protectedvirtual

Check if the system contains time kernels.

Definition at line 732 of file SIMPLESolveNonlinearAssembly.C.

733{
734 // check to make sure that we don't have any time kernels in this simulation (Steady State)
735 if (system.containsTimeKernel())
736 mooseError("You have specified time kernels in your steady state simulation in system",
737 system.name());
738}
void mooseError(Args &&... args) const
virtual bool containsTimeKernel() override
virtual const std::string & name() const

Referenced by checkIntegrity().

◆ linkRhieChowUserObject()

void SIMPLESolveNonlinearAssembly::linkRhieChowUserObject ( )
overridevirtual

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

Implements SIMPLESolveBase.

Definition at line 151 of file SIMPLESolveNonlinearAssembly.C.

152{
153 // Fetch the segregated rhie-chow object and transfer some information about the momentum
154 // system(s)
156 &getUserObject<INSFVRhieChowInterpolatorSegregated>("rhie_chow_user_object"));
158
159 // Initialize the face velocities in the RC object
161}
A user object which implements the Rhie Chow interpolation for segregated momentum-pressure systems.
void initFaceVelocities()
Initialize the container for face velocities.
void linkMomentumSystem(std::vector< NonlinearSystemBase * > momentum_systems, const std::vector< unsigned int > &momentum_system_numbers, const TagID pressure_gradient_tag)
Update the momentum system-related information.
INSFVRhieChowInterpolatorSegregated * _rc_uo
Pointer to the segregated RhieChow interpolation object.

Referenced by SIMPLENonlinearAssembly::init().

◆ setInnerSolve()

virtual void SIMPLESolveBase::setInnerSolve ( SolveObject )
inlineoverridevirtualinherited

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 }

◆ setupPressurePin()

void SIMPLESolveBase::setupPressurePin ( )
inherited

Setup pressure pin if there is need for one.

Definition at line 702 of file SIMPLESolveBase.C.

703{
704 if (_pin_pressure)
706 _problem.mesh(),
707 getParam<Point>("pressure_pin_point"));
708}
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
dof_id_type _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.

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

◆ solve()

bool SIMPLESolveNonlinearAssembly::solve ( )
overridevirtual

Performs the momentum pressure coupling.

Returns
True if solver is converged.

Implements SolveObject.

Definition at line 436 of file SIMPLESolveNonlinearAssembly.C.

437{
439
440 // Dummy solver parameter file which is needed for switching petsc options
441 SolverParams solver_params;
442 solver_params._type = Moose::SolveType::ST_LINEAR;
443 solver_params._line_search = Moose::LineSearchType::LS_NONE;
444
445 // Initialize the quantities which matter in terms of the iteration
446 unsigned int iteration_counter = 0;
447
448 // Assign residuals to general residual vector
449 unsigned int no_systems =
452 no_systems += _turbulence_systems.size();
453 std::vector<std::pair<unsigned int, Real>> ns_its_residuals(no_systems, std::make_pair(0, 1.0));
454
455 std::vector<Real> ns_abs_tols;
456 ns_abs_tols.reserve(no_systems);
457
458 for (const auto system_i : index_range(_momentum_systems))
459 {
460 const auto abs_tol = _momentum_absolute_tolerance.size() == 1
463 ns_abs_tols.push_back(abs_tol);
464 }
465
466 ns_abs_tols.push_back(_pressure_absolute_tolerance);
468 {
469 ns_abs_tols.push_back(_energy_absolute_tolerance);
471 ns_abs_tols.push_back(_solid_energy_absolute_tolerance);
472 }
474 for (auto system_i : index_range(_turbulence_absolute_tolerance))
475 ns_abs_tols.push_back(_turbulence_absolute_tolerance[system_i]);
476
477 bool converged = false;
478 // Loop until converged or hit the maximum allowed iteration number
479 while (iteration_counter < _num_iterations && !converged)
480 {
481 iteration_counter++;
482 // Resdiual index
483 size_t residual_index = 0;
484
485 // Execute all objects tagged as nonlinear
486 // This will execute everything in the problem at nonlinear, including the aux kernels.
487 // This way we compute the aux kernels before the momentum equations are solved.
488 _problem.execute(EXEC_NONLINEAR);
489
490 // We clear the caches in the momentum and pressure variables
491 for (auto system_i : index_range(_momentum_systems))
492 _momentum_systems[system_i]->residualSetup();
494
495 // If we solve for energy, we clear the caches there too
497 {
501 }
502
503 // If we solve for turbulence, we clear the caches there too
505 for (auto system_i : index_range(_turbulence_systems))
506 _turbulence_systems[system_i]->residualSetup();
507
508 // We set the preconditioner/controllable parameters through petsc options. Linear
509 // tolerances will be overridden within the solver. In case of a segregated momentum
510 // solver, we assume that every velocity component uses the same preconditioner
512
513 // Solve the momentum predictor step
514 auto momentum_residual = solveMomentumPredictor();
515 for (const auto system_i : index_range(momentum_residual))
516 ns_its_residuals[system_i] = momentum_residual[system_i];
517
518 // Compute the coupling fields between the momentum and pressure equations
520
521 // We set the preconditioner/controllable parameters for the pressure equations through
522 // petsc options. Linear tolerances will be overridden within the solver.
524
525 // Solve the pressure corrector
526 ns_its_residuals[momentum_residual.size()] = solvePressureCorrector();
527 // We need this to make sure we evaluate cell gradients for the nonorthogonal correction in
528 // the face velocity update
530
531 // Compute the face velocity which is used in the advection terms
533
534 auto & pressure_current_solution = *(_pressure_system.system().current_local_solution.get());
535 auto & pressure_old_solution = *(_pressure_system.solutionPreviousNewton());
536 // Relax the pressure update for the next momentum predictor
538 pressure_current_solution, pressure_old_solution, _pressure_variable_relaxation);
539
540 // Overwrite old solution
541 pressure_old_solution = pressure_current_solution;
542 _pressure_system.setSolution(pressure_current_solution);
543
544 // We clear out the caches so that the gradients can be computed with the relaxed solution
546
547 // Reconstruct the cell velocity as well to accelerate convergence
549
550 // Update residual index
551 residual_index = momentum_residual.size();
552
553 // If we have an energy equation, solve it here. We assume the material properties in the
554 // Navier-Stokes equations depend on temperature, therefore we can not solve for temperature
555 // outside of the velocity-pressure loop
557 {
558 // We set the preconditioner/controllable parameters through petsc options. Linear
559 // tolerances will be overridden within the solver.
561 residual_index += 1;
562 ns_its_residuals[residual_index] = solveAdvectedSystem(_energy_sys_number,
567
569 {
570 // We set the preconditioner/controllable parameters through petsc options. Linear
571 // tolerances will be overridden within the solver.
573 residual_index += 1;
574 ns_its_residuals[residual_index] = solveSolidEnergySystem();
575 }
576 }
577
578 // If we have an turbulence equations, we solve it here. We solve it inside the
579 // momentum-pressure loop because it affects the turbulent viscosity
581 {
583
584 for (auto system_i : index_range(_turbulence_systems))
585 {
586 residual_index += 1;
587 ns_its_residuals[residual_index] =
589 *_turbulence_systems[system_i],
593
594 auto & current_solution =
595 *(_turbulence_systems[system_i]->system().current_local_solution.get());
596 NS::FV::limitSolutionUpdate(current_solution, _turbulence_field_min_limit[system_i]);
597
598 // Relax the turbulence update for the next momentum predictor
599 auto & old_solution = *(_turbulence_systems[system_i]->solutionPreviousNewton());
600
601 // Relax the pressure update for the next momentum predictor
603 current_solution, old_solution, _turbulence_equation_relaxation[system_i]);
604
605 // Overwrite old solution
606 old_solution = current_solution;
607 _turbulence_systems[system_i]->setSolution(current_solution);
608
609 // We clear out the caches so that the gradients can be computed with the relaxed solution
610 _turbulence_systems[system_i]->residualSetup();
611 }
612 }
613
614 // Printing residuals
615 residual_index = 0;
616 _console << "Iteration " << iteration_counter << " Initial residual norms:" << std::endl;
617 for (auto system_i : index_range(_momentum_systems))
618 _console << " Momentum equation:"
619 << (_momentum_systems.size() > 1
620 ? std::string(" Component ") + std::to_string(system_i + 1) +
621 std::string(" ")
622 : std::string(" "))
623 << COLOR_GREEN << ns_its_residuals[system_i].second << COLOR_DEFAULT << std::endl;
624 _console << " Pressure equation: " << COLOR_GREEN
625 << ns_its_residuals[momentum_residual.size()].second << COLOR_DEFAULT << std::endl;
626 residual_index = momentum_residual.size();
627
629 {
630 residual_index += 1;
631 _console << " Energy equation: " << COLOR_GREEN << ns_its_residuals[residual_index].second
632 << COLOR_DEFAULT << std::endl;
634 {
635 residual_index += 1;
636 _console << " Solid energy equation: " << COLOR_GREEN
637 << ns_its_residuals[residual_index].second << COLOR_DEFAULT << std::endl;
638 }
639 }
640
642 {
643 _console << "Turbulence Iteration " << std::endl;
644 for (auto system_i : index_range(_turbulence_systems))
645 {
646 residual_index += 1;
647 _console << _turbulence_systems[system_i]->name() << " " << COLOR_GREEN
648 << ns_its_residuals[residual_index].second << COLOR_DEFAULT << std::endl;
649 }
650 }
651
652 converged = NS::FV::converged(ns_its_residuals, ns_abs_tols);
653 }
654
656
657 // Now we solve for the passive scalar equations, they should not influence the solution of the
658 // system above. The reason why we need more than one iteration is due to the matrix relaxation
659 // which can be used to stabilize the equations
661 {
662 _console << " Passive Scalar Iteration " << iteration_counter << std::endl;
663
664 // We set the options used by Petsc (preconditioners etc). We assume that every passive
665 // scalar equation uses the same options for now.
667
668 iteration_counter = 0;
669 std::vector<std::pair<unsigned int, Real>> passive_scalar_residuals(
670 _passive_scalar_systems.size(), std::make_pair(0, 1.0));
671
672 bool passive_scalar_converged =
673 NS::FV::converged(passive_scalar_residuals, _passive_scalar_absolute_tolerance);
674 while (iteration_counter < _num_iterations && !passive_scalar_converged)
675 {
676 // We clear the caches in the passive scalar variables
677 for (auto system_i : index_range(_passive_scalar_systems))
678 _passive_scalar_systems[system_i]->residualSetup();
679
680 iteration_counter++;
681
682 // Solve the passive scalar equations
683 for (auto system_i : index_range(_passive_scalar_systems))
684 passive_scalar_residuals[system_i] =
686 *_passive_scalar_systems[system_i],
690
691 _console << "Iteration " << iteration_counter << " Initial residual norms:" << std::endl;
692 for (auto system_i : index_range(_passive_scalar_systems))
693 _console << _passive_scalar_systems[system_i]->name() << " " << COLOR_GREEN
694 << passive_scalar_residuals[system_i].second << COLOR_DEFAULT << std::endl;
695
696 passive_scalar_converged =
697 NS::FV::converged(passive_scalar_residuals, _passive_scalar_absolute_tolerance);
698 }
699
700 converged = _continue_on_max_its ? true : passive_scalar_converged;
701 }
702
703 return converged;
704}
const ConsoleStream _console
virtual void execute(const ExecFlagType &exec_type)
void computeHbyA(bool verbose)
Computes the inverse of the digaonal (1/A) of the system matrix plus the H/A components for the press...
void computeFaceVelocity()
Update the values of the face velocities in the containers.
void computeCellVelocity()
Update the cell values of the velocity variables.
const std::string & name() const
virtual void residualSetup() override
const Real _pressure_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in pressure.
const std::vector< Real > _passive_scalar_equation_relaxation
The user-defined relaxation parameter(s) for the passive scalar equation(s)
const Real _passive_scalar_l_abs_tol
Absolute linear tolerance for the passive scalar equation(s).
Moose::PetscSupport::PetscOptions _passive_scalar_petsc_options
Options which hold the petsc settings for the passive scalar equation(s)
const std::vector< Real > _momentum_absolute_tolerance
The user-defined absolute tolerance(s) for determining the convergence in momentum.
const Real _pressure_variable_relaxation
The user-defined relaxation parameter for the pressure variable.
Moose::PetscSupport::PetscOptions _momentum_petsc_options
Options which hold the petsc settings for the momentum equation.
SIMPLESolverConfiguration _energy_linear_control
Options for the linear solver of the energy equation.
const Real _energy_l_abs_tol
Absolute linear tolerance for the energy equations.
Moose::PetscSupport::PetscOptions _pressure_petsc_options
Options which hold the petsc settings for the pressure equation.
const bool _continue_on_max_its
If solve should continue if maximum number of iterations is hit.
const Real _energy_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in energy.
const unsigned int _num_iterations
The maximum number of momentum-pressure iterations.
const std::vector< Real > _passive_scalar_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in passive scalars.
const Real _energy_equation_relaxation
The user-defined relaxation parameter for the energy equation.
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.
const bool _print_fields
Debug parameter which allows printing the coupling and solution vectors/matrices.
const Real _solid_energy_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in solid energy.
virtual std::vector< std::pair< unsigned int, Real > > solveMomentumPredictor() override
Solve a momentum predictor step with a fixed pressure field.
virtual std::pair< unsigned int, Real > solvePressureCorrector() override
Solve a pressure corrector step.
std::pair< unsigned int, Real > solveAdvectedSystem(const unsigned int system_num, NonlinearSystemBase &system, const Real relaxation_factor, libMesh::SolverConfiguration &solver_config, const Real abs_tol)
Solve an equation which contains an advection term that depends on the solution of the segregated Nav...
std::pair< unsigned int, Real > solveSolidEnergySystem()
Solve the solid energy conservation equation.
Moose::LineSearchType _line_search
Moose::SolveType _type
void setSolution(const NumericVector< Number > &soln)
virtual const NumericVector< Number > * solutionPreviousNewton() const
std::unique_ptr< NumericVector< Number > > current_local_solution
void petscSetOptions(const PetscOptions &po, const SolverParams &solver_params, FEProblemBase *const problem=nullptr)
bool converged(const std::vector< std::pair< unsigned int, Real > > &residuals, const std::vector< Real > &abs_tolerances)
Based on the residuals, determine if the iterative process converged or not.
void relaxSolutionUpdate(NumericVector< Number > &vec_new, const NumericVector< Number > &vec_old, const Real relaxation_factor)
Relax the update on a solution field using the following approach: $u = u_{old}+\lambda (u - u_{old})...
void limitSolutionUpdate(NumericVector< Number > &solution, const Real min_limit=std::numeric_limits< Real >::epsilon(), const Real max_limit=1e10)
Limit a solution to its minimum and maximum bounds: $u = min(max(u, min_limit), max_limit)$.

◆ solveAdvectedSystem()

std::pair< unsigned int, Real > SIMPLESolveNonlinearAssembly::solveAdvectedSystem ( const unsigned int  system_num,
NonlinearSystemBase system,
const Real  relaxation_factor,
libMesh::SolverConfiguration solver_config,
const Real  abs_tol 
)
protected

Solve an equation which contains an advection term that depends on the solution of the segregated Navier-Stokes equations.

Parameters
system_numThe number of the system which is solved
systemReference to the system which is solved
relaxation_factorThe relaxation factor for matrix relaxation
solver_configThe solver configuration object for the linear solve
abs_tolThe scaled absolute tolerance for the linear solve
Returns
The normalized residual norm of the equation.

Definition at line 305 of file SIMPLESolveNonlinearAssembly.C.

310{
312
313 // We will need some members from the implicit nonlinear system
314 NonlinearImplicitSystem & ni_system = cast_ref<NonlinearImplicitSystem &>(system.system());
315
316 // We will need the solution, the right hand side and the matrix
317 NumericVector<Number> & current_local_solution = *(ni_system.current_local_solution);
318 NumericVector<Number> & solution = *(ni_system.solution);
319 SparseMatrix<Number> & mmat = *(ni_system.matrix);
320 NumericVector<Number> & rhs = *(ni_system.rhs);
321
322 // We need a vector that stores the (diagonal_relaxed-original_diagonal) vector
323 auto diff_diagonal = solution.zero_clone();
324
325 // Fetch the linear solver from the system
326 libMesh::PetscLinearSolver<Real> & linear_solver =
327 cast_ref<libMesh::PetscLinearSolver<Real> &>(*ni_system.get_linear_solver());
328
329 // We need a zero vector to be able to emulate the Ax=b system by evaluating the
330 // residual and jacobian. Unfortunately, this will leave us with the -b on the right hand side
331 // so we correct it by multiplying it with (-1)
332 auto zero_solution = current_local_solution.zero_clone();
333 _problem.computeResidualAndJacobian(*zero_solution, rhs, mmat);
334 rhs.scale(-1.0);
335
336 // Go and relax the system matrix and the right hand side
337 NS::FV::relaxMatrix(mmat, relaxation_factor, *diff_diagonal);
338 NS::FV::relaxRightHandSide(rhs, solution, *diff_diagonal);
339
340 if (_print_fields)
341 {
342 _console << system.name() << " system matrix" << std::endl;
343 mmat.print();
344 _console << system.name() << " RHS vector" << std::endl;
345 rhs.print();
346 }
347
348 // We compute the normalization factors based on the fluxes
349 Real norm_factor = NS::FV::computeNormalizationFactor(solution, mmat, rhs);
350
351 // We need the non-preconditioned norm to be consistent with the norm factor
352 LibmeshPetscCall(KSPSetNormType(linear_solver.ksp(), KSP_NORM_UNPRECONDITIONED));
353
354 // Setting the linear tolerances and maximum iteration counts
355 solver_config.real_valued_data["abs_tol"] = absolute_tol * norm_factor;
356 linear_solver.set_solver_configuration(solver_config);
357
358 // Solve the system and update current local solution
359 auto its_res_pair = linear_solver.solve(mmat, mmat, solution, rhs);
360 ni_system.update();
361
362 if (_print_fields)
363 {
364 _console << " rhs when we solve " << system.name() << std::endl;
365 rhs.print();
366 _console << system.name() << " solution " << std::endl;
367 solution.print();
368 _console << " Norm factor " << norm_factor << std::endl;
369 }
370
371 system.setSolution(current_local_solution);
372
373 return std::make_pair(its_res_pair.first, linear_solver.get_initial_residual() / norm_factor);
374}
void setCurrentNonlinearSystem(const unsigned int nl_sys_num)
void computeResidualAndJacobian(const NumericVector< libMesh::Number > &soln, NumericVector< libMesh::Number > &residual, libMesh::SparseMatrix< libMesh::Number > &jacobian)
void set_solver_configuration(SolverConfiguration &solver_configuration)
virtual std::pair< unsigned int, Real > solve(SparseMatrix< T > &matrix_in, NumericVector< T > &solution_in, NumericVector< T > &rhs_in, const std::optional< double > tol=std::nullopt, const std::optional< unsigned int > m_its=std::nullopt) override
Real computeNormalizationFactor(const NumericVector< Number > &solution, const SparseMatrix< Number > &mat, const NumericVector< Number > &rhs)
Compute a normalization factor which is applied to the linear residual to determine convergence.
void relaxMatrix(SparseMatrix< Number > &matrix_in, const Real relaxation_parameter, NumericVector< Number > &diff_diagonal)
Relax the matrix to ensure diagonal dominance, we hold onto the difference in diagonals for later use...
void relaxRightHandSide(NumericVector< Number > &rhs_in, const NumericVector< Number > &solution_in, const NumericVector< Number > &diff_diagonal)
Relax the right hand side of an equation, this needs to be called once and the system matrix has been...

Referenced by solve().

◆ solveMomentumPredictor()

std::vector< std::pair< unsigned int, Real > > SIMPLESolveNonlinearAssembly::solveMomentumPredictor ( )
overrideprotectedvirtual

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.

Implements SIMPLESolveBase.

Definition at line 164 of file SIMPLESolveNonlinearAssembly.C.

165{
166 // Temporary storage for the (flux-normalized) residuals form
167 // different momentum components
168 std::vector<std::pair<unsigned int, Real>> its_normalized_residuals;
169
170 // We can create this here with the assumption that every momentum component has the same number
171 // of dofs
172 auto zero_solution = _momentum_systems[0]->system().current_local_solution->zero_clone();
173
174 // Solve the momentum equations.
175 // TO DO: These equations are VERY similar. If we can store the differences (things coming from
176 // BCs for example) separately, it is enough to construct one matrix.
177 for (const auto system_i : index_range(_momentum_systems))
178 {
180
181 // We will need the right hand side and the solution of the next component
182 NonlinearImplicitSystem & momentum_system =
183 cast_ref<NonlinearImplicitSystem &>(_momentum_systems[system_i]->system());
184
185 libMesh::PetscLinearSolver<Real> & momentum_solver =
186 cast_ref<libMesh::PetscLinearSolver<Real> &>(*momentum_system.get_linear_solver());
187
188 NumericVector<Number> & solution = *(momentum_system.solution);
189 NumericVector<Number> & rhs = *(momentum_system.rhs);
190 SparseMatrix<Number> & mmat = *(momentum_system.matrix);
191
192 auto diff_diagonal = solution.zero_clone();
193
194 // We plug zero in this to get the system matrix and the right hand side of the linear problem
195 _problem.computeResidualAndJacobian(*zero_solution, rhs, mmat);
196 // Sadly, this returns -b so we multiply with -1
197 rhs.scale(-1.0);
198
199 // Still need to relax the right hand side with the same vector
201 NS::FV::relaxRightHandSide(rhs, solution, *diff_diagonal);
202
203 // The normalization factor depends on the right hand side so we need to recompute it for this
204 // component
205 Real norm_factor = NS::FV::computeNormalizationFactor(solution, mmat, rhs);
206
207 // Very important, for deciding the convergence, we need the unpreconditioned
208 // norms in the linear solve
209 LibmeshPetscCall(KSPSetNormType(momentum_solver.ksp(), KSP_NORM_UNPRECONDITIONED));
210 // Solve this component. We don't update the ghosted solution yet, that will come at the end
211 // of the corrector step. Also setting the linear tolerances and maximum iteration counts.
214
215 // We solve the equation
216 auto its_resid_pair = momentum_solver.solve(mmat, mmat, solution, rhs);
217 momentum_system.update();
218
219 // Save the normalized residual
220 its_normalized_residuals.push_back(
221 std::make_pair(its_resid_pair.first, momentum_solver.get_initial_residual() / norm_factor));
222
223 if (_print_fields)
224 {
225 _console << " matrix when we solve " << std::endl;
226 mmat.print();
227 _console << " rhs when we solve " << std::endl;
228 rhs.print();
229 _console << " velocity solution component " << system_i << std::endl;
230 solution.print();
231 _console << "Norm factor " << norm_factor << std::endl;
232 _console << Moose::stringify(momentum_solver.get_initial_residual()) << std::endl;
233 }
234
235 _momentum_systems[system_i]->setSolution(*(momentum_system.current_local_solution));
236 _momentum_systems[system_i]->copyPreviousSolutions(Moose::SolutionIterationType::Nonlinear);
237 }
238
239 return its_normalized_residuals;
240}
const Real _momentum_equation_relaxation
The user-defined relaxation parameter for the momentum equation.
const Real _momentum_l_abs_tol
Absolute linear tolerance for the momentum equation(s).
SIMPLESolverConfiguration _momentum_linear_control
Options for the linear solver of the momentum equation.
std::string stringify(const T &t)

Referenced by solve().

◆ solvePressureCorrector()

std::pair< unsigned int, Real > SIMPLESolveNonlinearAssembly::solvePressureCorrector ( )
overrideprotectedvirtual

Solve a pressure corrector step.

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

Implements SIMPLESolveBase.

Definition at line 243 of file SIMPLESolveNonlinearAssembly.C.

244{
246
247 // We will need some members from the implicit nonlinear system
248 NonlinearImplicitSystem & pressure_system =
249 cast_ref<NonlinearImplicitSystem &>(_pressure_system.system());
250
251 // We will need the solution, the right hand side and the matrix
252 NumericVector<Number> & current_local_solution = *(pressure_system.current_local_solution);
253 NumericVector<Number> & solution = *(pressure_system.solution);
254 SparseMatrix<Number> & mmat = *(pressure_system.matrix);
255 NumericVector<Number> & rhs = *(pressure_system.rhs);
256
257 // Fetch the linear solver from the system
258 libMesh::PetscLinearSolver<Real> & pressure_solver =
259 cast_ref<libMesh::PetscLinearSolver<Real> &>(*pressure_system.get_linear_solver());
260
261 // We need a zero vector to be able to emulate the Ax=b system by evaluating the
262 // residual and jacobian. Unfortunately, this will leave us with the -b on the right hand side
263 // so we correct it by multiplying it with (-1)
264 auto zero_solution = current_local_solution.zero_clone();
265 _problem.computeResidualAndJacobian(*zero_solution, rhs, mmat);
266 rhs.scale(-1.0);
267
268 if (_print_fields)
269 {
270 _console << "Pressure matrix" << std::endl;
271 mmat.print();
272 }
273
274 // We compute the normalization factors based on the fluxes
275 Real norm_factor = NS::FV::computeNormalizationFactor(solution, mmat, rhs);
276
277 // We need the non-preconditioned norm to be consistent with the norm factor
278 LibmeshPetscCall(KSPSetNormType(pressure_solver.ksp(), KSP_NORM_UNPRECONDITIONED));
279
280 // Setting the linear tolerances and maximum iteration counts
283
284 if (_pin_pressure)
286
287 auto its_res_pair = pressure_solver.solve(mmat, mmat, solution, rhs);
288 pressure_system.update();
289
290 if (_print_fields)
291 {
292 _console << " rhs when we solve pressure " << std::endl;
293 rhs.print();
294 _console << " Pressure " << std::endl;
295 solution.print();
296 _console << "Norm factor " << norm_factor << std::endl;
297 }
298
299 _pressure_system.setSolution(current_local_solution);
300
301 return std::make_pair(its_res_pair.first, pressure_solver.get_initial_residual() / norm_factor);
302}
const Real _pressure_l_abs_tol
Absolute linear tolerance for the pressure equation.
SIMPLESolverConfiguration _pressure_linear_control
Options for the linear solver of the pressure equation.
const Real _pressure_pin_value
The value we want to enforce for pressure.
void constrainSystem(SparseMatrix< Number > &mx, NumericVector< Number > &rhs, const Real desired_value, const dof_id_type dof_id)
Implicitly constrain the system by adding a factor*(u-u_desired) to it at a desired dof value.

Referenced by solve().

◆ solveSolidEnergySystem()

std::pair< unsigned int, Real > SIMPLESolveNonlinearAssembly::solveSolidEnergySystem ( )
protected

Solve the solid energy conservation equation.

Returns
The normalized residual norm of the solid equation.

Definition at line 377 of file SIMPLESolveNonlinearAssembly.C.

378{
380
381 // We will need some members from the implicit nonlinear system
382 NonlinearImplicitSystem & se_system =
383 cast_ref<NonlinearImplicitSystem &>(_solid_energy_system->system());
384
385 // We will need the solution, the right hand side and the matrix
386 NumericVector<Number> & current_local_solution = *(se_system.current_local_solution);
387 NumericVector<Number> & solution = *(se_system.solution);
388 SparseMatrix<Number> & mat = *(se_system.matrix);
389 NumericVector<Number> & rhs = *(se_system.rhs);
390
391 // Fetch the linear solver from the system
393 cast_ref<libMesh::PetscLinearSolver<Real> &>(*se_system.get_linear_solver());
394
395 // We need a zero vector to be able to emulate the Ax=b system by evaluating the
396 // residual and jacobian. Unfortunately, this will leave us with the -b on the righ hand side
397 // so we correct it by multiplying it with (-1)
398 auto zero_solution = current_local_solution.zero_clone();
399 _problem.computeResidualAndJacobian(*zero_solution, rhs, mat);
400 rhs.scale(-1.0);
401
402 if (_print_fields)
403 {
404 _console << "Solid energy matrix" << std::endl;
405 mat.print();
406 }
407
408 // We compute the normalization factors based on the fluxes
409 Real norm_factor = NS::FV::computeNormalizationFactor(solution, mat, rhs);
410
411 // We need the non-preconditioned norm to be consistent with the norm factor
412 LibmeshPetscCall(KSPSetNormType(se_solver.ksp(), KSP_NORM_UNPRECONDITIONED));
413
414 // Setting the linear tolerances and maximum iteration counts
417
418 auto its_res_pair = se_solver.solve(mat, mat, solution, rhs);
419 se_system.update();
420
421 if (_print_fields)
422 {
423 _console << " Solid energy rhs " << std::endl;
424 rhs.print();
425 _console << " Solid temperature " << std::endl;
426 solution.print();
427 _console << "Norm factor " << norm_factor << std::endl;
428 }
429
430 _solid_energy_system->setSolution(current_local_solution);
431
432 return std::make_pair(its_res_pair.first, se_solver.get_initial_residual() / norm_factor);
433}
SIMPLESolverConfiguration _solid_energy_linear_control
Options for the linear solver of the energy equation.
const Real _solid_energy_l_abs_tol
Absolute linear tolerance for the energy equations.

Referenced by solve().

◆ validParams()

InputParameters SIMPLESolveNonlinearAssembly::validParams ( )
static

Definition at line 18 of file SIMPLESolveNonlinearAssembly.C.

19{
21
22 params.addParam<TagName>("pressure_gradient_tag",
23 "pressure_momentum_kernels",
24 "The name of the tags associated with the kernels in the momentum "
25 "equations which are not related to the pressure gradient.");
26
27 return params;
28}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()

Referenced by SIMPLENonlinearAssembly::validParams().

Member Data Documentation

◆ _continue_on_max_its

const bool SIMPLESolveBase::_continue_on_max_its
protectedinherited

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

Definition at line 264 of file SIMPLESolveBase.h.

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

◆ _energy_absolute_tolerance

const Real SIMPLESolveBase::_energy_absolute_tolerance
protectedinherited

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

Definition at line 246 of file SIMPLESolveBase.h.

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

◆ _energy_equation_relaxation

const Real SIMPLESolveBase::_energy_equation_relaxation
protectedinherited

The user-defined relaxation parameter for the energy equation.

Definition at line 130 of file SIMPLESolveBase.h.

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

◆ _energy_l_abs_tol

const Real SIMPLESolveBase::_energy_l_abs_tol
protectedinherited

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 solve().

◆ _energy_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_energy_linear_control
protectedinherited

Options for the linear solver of the energy equation.

Definition at line 136 of file SIMPLESolveBase.h.

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

◆ _energy_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_energy_petsc_options
protectedinherited

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

Definition at line 133 of file SIMPLESolveBase.h.

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

◆ _energy_sys_number

const unsigned int SIMPLESolveNonlinearAssembly::_energy_sys_number
protected

The number of the system corresponding to the energy equation.

Definition at line 82 of file SIMPLESolveNonlinearAssembly.h.

Referenced by solve().

◆ _energy_system

NonlinearSystemBase* SIMPLESolveNonlinearAssembly::_energy_system
protected

Pointer to the nonlinear system corresponding to the fluid energy equation.

Definition at line 85 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), and solve().

◆ _has_energy_system

const bool SIMPLESolveBase::_has_energy_system
protectedinherited

◆ _has_passive_scalar_systems

const bool SIMPLESolveBase::_has_passive_scalar_systems
protectedinherited

◆ _has_pm_radiation_systems

const bool SIMPLESolveBase::_has_pm_radiation_systems
protectedinherited

◆ _has_solid_energy_system

const bool SIMPLESolveBase::_has_solid_energy_system
protectedinherited

◆ _has_turbulence_systems

const bool SIMPLESolveNonlinearAssembly::_has_turbulence_systems
protected

Boolean for easy check if turbulence systems shall be solved or not.

Definition at line 77 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), SIMPLESolveNonlinearAssembly(), and solve().

◆ _momentum_absolute_tolerance

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

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

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

Definition at line 240 of file SIMPLESolveBase.h.

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

◆ _momentum_equation_relaxation

const Real SIMPLESolveBase::_momentum_equation_relaxation
protectedinherited

The user-defined relaxation parameter for the momentum equation.

Definition at line 95 of file SIMPLESolveBase.h.

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

◆ _momentum_l_abs_tol

const Real SIMPLESolveBase::_momentum_l_abs_tol
protectedinherited

Absolute linear tolerance for the momentum equation(s).

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

Definition at line 89 of file SIMPLESolveBase.h.

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

◆ _momentum_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_momentum_linear_control
protectedinherited

Options for the linear solver of the momentum equation.

Definition at line 85 of file SIMPLESolveBase.h.

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

◆ _momentum_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_momentum_petsc_options
protectedinherited

Options which hold the petsc settings for the momentum equation.

Definition at line 92 of file SIMPLESolveBase.h.

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

◆ _momentum_system_names

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

◆ _momentum_system_numbers

std::vector<unsigned int> SIMPLESolveNonlinearAssembly::_momentum_system_numbers
protected

The number(s) of the system(s) corresponding to the momentum equation(s)

Definition at line 63 of file SIMPLESolveNonlinearAssembly.h.

Referenced by linkRhieChowUserObject(), SIMPLESolveNonlinearAssembly(), and solveMomentumPredictor().

◆ _momentum_systems

std::vector<NonlinearSystemBase *> SIMPLESolveNonlinearAssembly::_momentum_systems
protected

Pointer(s) to the system(s) corresponding to the momentum equation(s)

Definition at line 66 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), linkRhieChowUserObject(), SIMPLESolveNonlinearAssembly(), solve(), and solveMomentumPredictor().

◆ _num_iterations

const unsigned int SIMPLESolveBase::_num_iterations
protectedinherited

The maximum number of momentum-pressure iterations.

Definition at line 261 of file SIMPLESolveBase.h.

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

◆ _passive_scalar_absolute_tolerance

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

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

Definition at line 252 of file SIMPLESolveBase.h.

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

◆ _passive_scalar_equation_relaxation

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

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

Definition at line 169 of file SIMPLESolveBase.h.

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

◆ _passive_scalar_l_abs_tol

const Real SIMPLESolveBase::_passive_scalar_l_abs_tol
protectedinherited

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 solve().

◆ _passive_scalar_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_passive_scalar_linear_control
protectedinherited

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

Definition at line 175 of file SIMPLESolveBase.h.

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

◆ _passive_scalar_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_passive_scalar_petsc_options
protectedinherited

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

Definition at line 172 of file SIMPLESolveBase.h.

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

◆ _passive_scalar_system_names

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

◆ _passive_scalar_system_numbers

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

◆ _passive_scalar_systems

std::vector<NonlinearSystemBase *> SIMPLESolveNonlinearAssembly::_passive_scalar_systems
protected

Pointer(s) to the system(s) corresponding to the passive scalar equation(s)

Definition at line 98 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), SIMPLESolveNonlinearAssembly(), and solve().

◆ _pin_pressure

const bool SIMPLESolveBase::_pin_pressure
protectedinherited

If the pressure needs to be pinned.

Definition at line 116 of file SIMPLESolveBase.h.

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

◆ _pm_radiation_absolute_tolerance

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

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

Definition at line 255 of file SIMPLESolveBase.h.

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

◆ _pm_radiation_equation_relaxation

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

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

Definition at line 193 of file SIMPLESolveBase.h.

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

◆ _pm_radiation_l_abs_tol

const Real SIMPLESolveBase::_pm_radiation_l_abs_tol
protectedinherited

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
protectedinherited

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

Definition at line 199 of file SIMPLESolveBase.h.

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

◆ _pm_radiation_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_pm_radiation_petsc_options
protectedinherited

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

Definition at line 196 of file SIMPLESolveBase.h.

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

◆ _pm_radiation_system_names

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

◆ _pm_radiation_system_numbers

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

◆ _pressure_absolute_tolerance

const Real SIMPLESolveBase::_pressure_absolute_tolerance
protectedinherited

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

Definition at line 243 of file SIMPLESolveBase.h.

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

◆ _pressure_l_abs_tol

const Real SIMPLESolveBase::_pressure_l_abs_tol
protectedinherited

Absolute linear tolerance for the pressure equation.

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

Definition at line 107 of file SIMPLESolveBase.h.

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

◆ _pressure_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_pressure_linear_control
protectedinherited

Options for the linear solver of the pressure equation.

Definition at line 103 of file SIMPLESolveBase.h.

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

◆ _pressure_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_pressure_petsc_options
protectedinherited

Options which hold the petsc settings for the pressure equation.

Definition at line 110 of file SIMPLESolveBase.h.

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

◆ _pressure_pin_dof

dof_id_type SIMPLESolveBase::_pressure_pin_dof
protectedinherited

The dof ID where the pressure needs to be pinned.

Definition at line 122 of file SIMPLESolveBase.h.

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

◆ _pressure_pin_value

const Real SIMPLESolveBase::_pressure_pin_value
protectedinherited

The value we want to enforce for pressure.

Definition at line 119 of file SIMPLESolveBase.h.

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

◆ _pressure_sys_number

const unsigned int SIMPLESolveNonlinearAssembly::_pressure_sys_number
protected

The number of the system corresponding to the pressure equation.

Definition at line 69 of file SIMPLESolveNonlinearAssembly.h.

Referenced by solvePressureCorrector().

◆ _pressure_system

NonlinearSystemBase& SIMPLESolveNonlinearAssembly::_pressure_system
protected

Reference to the nonlinear system corresponding to the pressure equation.

Definition at line 72 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), SIMPLESolveNonlinearAssembly(), solve(), and solvePressureCorrector().

◆ _pressure_system_name

const SolverSystemName& SIMPLESolveBase::_pressure_system_name
protectedinherited

The name of the pressure system.

Definition at line 100 of file SIMPLESolveBase.h.

◆ _pressure_tag_id

const TagID SIMPLESolveNonlinearAssembly::_pressure_tag_id
protected

The ID of the tag which corresponds to the pressure gradient terms in the momentum equation.

Definition at line 143 of file SIMPLESolveNonlinearAssembly.h.

Referenced by linkRhieChowUserObject(), and SIMPLESolveNonlinearAssembly().

◆ _pressure_tag_name

const TagName SIMPLESolveNonlinearAssembly::_pressure_tag_name
protected

The name of the vector tag which corresponds to the pressure gradient terms in the momentum equation.

Definition at line 139 of file SIMPLESolveNonlinearAssembly.h.

◆ _pressure_variable_relaxation

const Real SIMPLESolveBase::_pressure_variable_relaxation
protectedinherited

The user-defined relaxation parameter for the pressure variable.

Definition at line 113 of file SIMPLESolveBase.h.

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

◆ _print_fields

const bool SIMPLESolveBase::_print_fields
protectedinherited

◆ _rc_uo

INSFVRhieChowInterpolatorSegregated* SIMPLESolveNonlinearAssembly::_rc_uo
protected

Pointer to the segregated RhieChow interpolation object.

Definition at line 135 of file SIMPLESolveNonlinearAssembly.h.

Referenced by linkRhieChowUserObject(), and solve().

◆ _solid_energy_absolute_tolerance

const Real SIMPLESolveBase::_solid_energy_absolute_tolerance
protectedinherited

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

Definition at line 249 of file SIMPLESolveBase.h.

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

◆ _solid_energy_l_abs_tol

const Real SIMPLESolveBase::_solid_energy_l_abs_tol
protectedinherited

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 solveSolidEnergySystem().

◆ _solid_energy_linear_control

SIMPLESolverConfiguration SIMPLESolveBase::_solid_energy_linear_control
protectedinherited

Options for the linear solver of the energy equation.

Definition at line 151 of file SIMPLESolveBase.h.

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

◆ _solid_energy_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveBase::_solid_energy_petsc_options
protectedinherited

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

Definition at line 148 of file SIMPLESolveBase.h.

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

◆ _solid_energy_sys_number

const unsigned int SIMPLESolveNonlinearAssembly::_solid_energy_sys_number
protected

The number of the system corresponding to the solid energy equation.

Definition at line 90 of file SIMPLESolveNonlinearAssembly.h.

Referenced by solveSolidEnergySystem().

◆ _solid_energy_system

NonlinearSystemBase* SIMPLESolveNonlinearAssembly::_solid_energy_system
protected

Pointer to the nonlinear system corresponding to the solid energy equation.

Definition at line 93 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), solve(), and solveSolidEnergySystem().

◆ _turbulence_absolute_tolerance

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

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

Definition at line 130 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_equation_relaxation

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

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

Definition at line 112 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_field_min_limit

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

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

Definition at line 115 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_field_relaxation

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

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

Definition at line 220 of file SIMPLESolveBase.h.

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

◆ _turbulence_l_abs_tol

const Real SIMPLESolveNonlinearAssembly::_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 125 of file SIMPLESolveNonlinearAssembly.h.

Referenced by solve().

◆ _turbulence_linear_control

SIMPLESolverConfiguration SIMPLESolveNonlinearAssembly::_turbulence_linear_control
protected

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

Definition at line 121 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_petsc_options

Moose::PetscSupport::PetscOptions SIMPLESolveNonlinearAssembly::_turbulence_petsc_options
protected

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

Definition at line 118 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_system_names

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

The names of the turbulence scalar systems.

Definition at line 103 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly().

◆ _turbulence_system_numbers

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

Definition at line 106 of file SIMPLESolveNonlinearAssembly.h.

Referenced by SIMPLESolveNonlinearAssembly(), and solve().

◆ _turbulence_systems

std::vector<NonlinearSystemBase *> SIMPLESolveNonlinearAssembly::_turbulence_systems
protected

Pointer(s) to the system(s) corresponding to the turbulence equation(s)

Definition at line 109 of file SIMPLESolveNonlinearAssembly.h.

Referenced by checkIntegrity(), SIMPLESolveNonlinearAssembly(), and solve().


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