https://mooseframework.inl.gov
SIMPLESolveNonlinearAssembly.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // Moose includes
13 #include "RhieChowMassFlux.h"
14 #include "SIMPLESolveBase.h"
16 
21 {
22 public:
24 
26 
27  virtual void linkRhieChowUserObject() override;
28 
29  virtual void checkIntegrity() override;
30 
35  virtual bool solve() override;
36 
37 protected:
38  virtual std::vector<std::pair<unsigned int, Real>> solveMomentumPredictor() override;
39  virtual std::pair<unsigned int, Real> solvePressureCorrector() override;
40 
42  virtual void checkTimeKernels(NonlinearSystemBase & system);
43 
52  std::pair<unsigned int, Real> solveAdvectedSystem(const unsigned int system_num,
53  NonlinearSystemBase & system,
54  const Real relaxation_factor,
55  libMesh::SolverConfiguration & solver_config,
56  const Real abs_tol);
57 
60  std::pair<unsigned int, Real> solveSolidEnergySystem();
61 
63  std::vector<unsigned int> _momentum_system_numbers;
64 
66  std::vector<NonlinearSystemBase *> _momentum_systems;
67 
69  const unsigned int _pressure_sys_number;
70 
73 
74  // ************************ For quick equation check ********************* //
75 
78 
79  // ************************ Energy Eq Variables ************************** //
80 
82  const unsigned int _energy_sys_number;
83 
86 
87  // ********************* Solid Energy Eq Variables *********************** //
88 
90  const unsigned int _solid_energy_sys_number;
91 
94 
95  // ********************* Passive Scalar Eq. Variables *********************** //
96 
98  std::vector<NonlinearSystemBase *> _passive_scalar_systems;
99 
100  // ********************* Turbulence Eq Variables ************************* //
101 
103  const std::vector<SolverSystemName> & _turbulence_system_names;
104 
105  // The number(s) of the system(s) corresponding to the turbulence equation(s)
106  std::vector<unsigned int> _turbulence_system_numbers;
107 
109  std::vector<NonlinearSystemBase *> _turbulence_systems;
110 
112  const std::vector<Real> _turbulence_equation_relaxation;
113 
115  std::vector<Real> _turbulence_field_min_limit;
116 
119 
122 
126 
127  // ********************* SIMPLE iteration variables ********************** //
128 
130  const std::vector<Real> _turbulence_absolute_tolerance;
131 
132  // *************************** Other variables *************************** //
133 
136 
139  const TagName _pressure_tag_name;
140 
144 };
const unsigned int _energy_sys_number
The number of the system corresponding to the energy equation.
const TagID _pressure_tag_id
The ID of the tag which corresponds to the pressure gradient terms in the momentum equation...
unsigned int TagID
INSFVRhieChowInterpolatorSegregated * _rc_uo
Pointer to the segregated RhieChow interpolation object.
std::vector< Real > _turbulence_field_min_limit
The user-defined lower limit for turbulent quantities e.g. k, eps/omega, etc..
std::vector< unsigned int > _turbulence_system_numbers
virtual void checkTimeKernels(NonlinearSystemBase &system)
Check if the system contains time kernels.
const unsigned int _solid_energy_sys_number
The number of the system corresponding to the solid energy equation.
virtual void linkRhieChowUserObject() override
Fetch the Rhie Chow user object that is reponsible for determining face velocities and mass flux...
const Real _turbulence_l_abs_tol
Absolute linear tolerance for the turbulence equation(s).
NonlinearSystemBase & _pressure_system
Reference to the nonlinear system corresponding to the pressure equation.
const TagName _pressure_tag_name
The name of the vector tag which corresponds to the pressure gradient terms in the momentum equation...
SIMPLESolverConfiguration _turbulence_linear_control
Options for the linear solver of the turbulence equation(s)
const bool _has_turbulence_systems
Boolean for easy check if turbulence systems shall be solved or not.
const std::vector< SolverSystemName > & _turbulence_system_names
The names of the turbulence scalar systems.
std::pair< unsigned int, Real > solveSolidEnergySystem()
Solve the solid energy conservation equation.
SIMPLE-based solution object with nonlinear FV system assembly.
Solver configuration class used with the linear solvers in a SIMPLE solver.
NonlinearSystemBase * _solid_energy_system
Pointer to the nonlinear system corresponding to the solid energy equation.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool solve() override
Performs the momentum pressure coupling.
NonlinearSystemBase * _energy_system
Pointer to the nonlinear system corresponding to the fluid energy equation.
std::vector< NonlinearSystemBase * > _momentum_systems
Pointer(s) to the system(s) corresponding to the momentum equation(s)
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...
Solve class serving as a base class for the two SIMPLE solvers that operate with different assembly a...
Moose::PetscSupport::PetscOptions _turbulence_petsc_options
Options which hold the petsc settings for the turbulence equation(s)
const unsigned int _pressure_sys_number
The number of the system corresponding to the pressure equation.
const std::vector< Real > _turbulence_absolute_tolerance
The user-defined absolute tolerance for determining the convergence in turbulence equations...
const std::vector< Real > _turbulence_equation_relaxation
The user-defined relaxation parameter(s) for the turbulence equation(s)
std::vector< NonlinearSystemBase * > _passive_scalar_systems
Pointer(s) to the system(s) corresponding to the passive scalar equation(s)
std::vector< NonlinearSystemBase * > _turbulence_systems
Pointer(s) to the system(s) corresponding to the turbulence equation(s)
std::vector< unsigned int > _momentum_system_numbers
The number(s) of the system(s) corresponding to the momentum equation(s)
virtual void checkIntegrity() override
Check if the user defined time kernels.
A user object which implements the Rhie Chow interpolation for segregated momentum-pressure systems...
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.