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-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 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  );
103 
104 
105  //- Destructor
106  virtual ~RASTurbulenceModel() = default;
107 
108 
109  // Member Functions
110 
111  // Evolution
112 
113  //- Execute one iteration of the solution algorithm
114  virtual void solveIter();
115 
116  //- Main control loop
117  virtual void solve();
118 
119  //- Looper (advances iters, time step)
120  virtual bool loop();
121 
122  //- Read average iteration
123  virtual bool writeData(Ostream& os) const;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
const fvMesh & mesh() const
Return the solver mesh.
Definition: solver.C:89
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.
virtual const dictionary & dict() const
Return the solver dictionary.
Definition: solver.C:106
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:55
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.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
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.