fluidSolutionControl.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fluidSolutionControl
26 
27 Description
28  Fluid solution control class. Holds flags specific to the solution of
29  fluids.
30 
31 SourceFiles
32  fluidSolutionControlI.H
33  fluidSolutionControl.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef fluidSolutionControl_H
38 #define fluidSolutionControl_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class fluidSolutionControl Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55 protected:
56 
57  // Protected data
58 
59  //- Flag to indicate to solve for the optional models
60  bool models_;
61 
62  //- Flag to indicate to solve for the thermophysics
63  bool thermophysics_;
64 
65  //- Flag to indicate to solve for the flow
66  bool flow_;
67 
68  //- Flag to indicate to solve for momentum
69  bool momentumPredictor_;
70 
71  //- Flag to indicate to solve using transonic algorithm
72  bool transonic_;
73 
74  //- Flag to indicate to relax pressure using the "consistent" approach
75  // of simplec
76  bool consistent_;
77 
78 
79 public:
80 
81  // Static Data Members
82 
83  //- Run-time type information
84  TypeName("fluidSolutionControl");
85 
86 
87  // Constructors
88 
89  //- Construct from a mesh and the name of the algorithm
91 
92 
93  //- Destructor
94  virtual ~fluidSolutionControl();
95 
96 
97  // Member Functions
98 
99  // IO
100 
101  //- Read controls
102  virtual bool read();
103 
104  // Access
105 
106  //- Flag to indicate to solve for the options models
107  inline bool models() const;
108 
109  //- Flag to indicate to solve for the thermophysics
110  inline bool thermophysics() const;
111 
112  //- Flag to indicate to solve for the flow
113  inline bool flow() const;
114 
115  //- Flag to indicate to solve for momentum
116  inline bool momentumPredictor() const;
117 
118  //- Flag to indicate to solve using transonic algorithm
119  inline bool transonic() const;
120 
121  //- Flag to indicate to relax pressure using the "consistent"
122  // approach of simplec
123  inline bool consistent() const;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #include "fluidSolutionControlI.H"
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Fluid solution control class. Holds flags specific to the solution of fluids.
bool models_
Flag to indicate to solve for the optional models.
bool transonic_
Flag to indicate to solve using transonic algorithm.
bool transonic() const
Flag to indicate to solve using transonic algorithm.
bool thermophysics() const
Flag to indicate to solve for the thermophysics.
bool models() const
Flag to indicate to solve for the options models.
bool momentumPredictor_
Flag to indicate to solve for momentum.
fluidSolutionControl(fvMesh &mesh, const word &algorithmName)
Construct from a mesh and the name of the algorithm.
bool flow_
Flag to indicate to solve for the flow.
bool thermophysics_
Flag to indicate to solve for the thermophysics.
TypeName("fluidSolutionControl")
Run-time type information.
bool momentumPredictor() const
Flag to indicate to solve for momentum.
bool consistent_
Flag to indicate to relax pressure using the "consistent" approach.
bool flow() const
Flag to indicate to solve for the flow.
virtual ~fluidSolutionControl()
Destructor.
bool consistent() const
Flag to indicate to relax pressure using the "consistent".
virtual bool read()
Read controls.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Non-orthogonal solution control class. Provides non-orthogonal-loop control methods.
const fvMesh & mesh() const
Return the mesh.
const word & algorithmName() const
Return the name of the algorithm.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.