RASTurbulenceModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2007-2023 PCOpt/NTUA
9  Copyright (C) 2013-2023 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 Class
29  Foam::RASTurbulenceModel
30 
31 Description
32  Solves for a RAS turbulence model, with constant U and phi values
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef RASTurbulenceModel_H
37 #define RASTurbulenceModel_H
38 
40 #include "SIMPLEControl.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class RASTurbulenceModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55 private:
56 
57  // Private Member Functions
58 
59  //- No copy construct
60  RASTurbulenceModel(const RASTurbulenceModel&) = delete;
61 
62  //- No copy assignment
63  void operator=(const RASTurbulenceModel&) = delete;
64 
65 
66 protected:
67 
68  // Protected data
69 
70  //- Solver control
72 
73  //- Reference to incompressibleVars
74  // Used for convenience and to avoid repetitive dynamic_casts
75  // Same as getIncoVars()
77 
78  //- Protected Member Functions
79 
80  //- Allocate incompressibleVars and return reference to be used for
81  //- convenience in the rest of the class.
83 
84 
85 public:
86 
87 
88  // Static Data Members
89 
90  //- Run-time type information
91  TypeName("RASTurbulenceModel");
92 
93 
94  // Constructors
95 
96  //- Construct from mesh and dictionary
98  (
99  fvMesh& mesh,
100  const word& managerType,
101  const dictionary& dict,
102  const word& solverName
103  );
104 
105 
106  //- Destructor
107  virtual ~RASTurbulenceModel() = default;
108 
109 
110  // Member Functions
111 
112  // Evolution
113 
114  //- Execute one iteration of the solution algorithm
115  virtual void solveIter();
116 
117  //- Main control loop
118  virtual void solve();
119 
120  //- Looper (advances iters, time step)
121  virtual bool loop();
122 
123  //- Read average iteration
124  virtual bool writeData(Ostream& os) const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const fvMesh & mesh() const
Return the solver mesh.
Definition: solverI.H:24
incompressibleVars & incoVars_
Reference to incompressibleVars.
virtual ~RASTurbulenceModel()=default
Destructor.
Base class for solution control classes.
virtual void solve()
Main control loop.
A class for handling words, derived from Foam::string.
Definition: word.H:63
Solves for a RAS turbulence model, with constant U and phi values.
const word & managerType() const
Return the manager type.
Definition: solverI.H:72
const dictionary & dict() const
Return the solver dictionary.
Definition: solverI.H:54
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
TypeName("RASTurbulenceModel")
Run-time type information.
virtual bool loop()
Looper (advances iters, time step)
virtual void solveIter()
Execute one iteration of the solution algorithm.
const word & solverName() const
Return the solver name.
Definition: solverI.H:30
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
incompressibleVars & allocateVars()
Protected Member Functions.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Base class for primal incompressible solvers.
virtual bool writeData(Ostream &os) const
Read average iteration.
Namespace for OpenFOAM.
autoPtr< SIMPLEControl > solverControl_
Solver control.