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 // ************************************************************************* //
incompressiblePrimalSolver.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::RASTurbulenceModel::solverControl_
autoPtr< SIMPLEControl > solverControl_
Solver control.
Definition: RASTurbulenceModel.H:70
Foam::RASTurbulenceModel::solveIter
virtual void solveIter()
Execute one iteration of the solution algorithm.
Definition: RASTurbulenceModel.C:83
Foam::RASTurbulenceModel
Solves for a RAS turbulence model, with constant U and phi values.
Definition: RASTurbulenceModel.H:50
Foam::RASTurbulenceModel::~RASTurbulenceModel
virtual ~RASTurbulenceModel()=default
Destructor.
Foam::RASTurbulenceModel::allocateVars
incompressibleVars & allocateVars()
Protected Member Functions.
Definition: RASTurbulenceModel.C:51
SIMPLEControl.H
Foam::RASTurbulenceModel::loop
virtual bool loop()
Looper (advances iters, time step)
Definition: RASTurbulenceModel.C:116
Foam::RASTurbulenceModel::solve
virtual void solve()
Main control loop.
Definition: RASTurbulenceModel.C:102
Foam::incompressiblePrimalSolver
Base class for primal incompressible solvers.
Definition: incompressiblePrimalSolver.H:53
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::RASTurbulenceModel::incoVars_
incompressibleVars & incoVars_
Reference to incompressibleVars.
Definition: RASTurbulenceModel.H:75
os
OBJstream os(runTime.globalPath()/outputName)
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::solver::mesh
const fvMesh & mesh() const
Return the solver mesh.
Definition: solver.C:96
Foam::RASTurbulenceModel::TypeName
TypeName("RASTurbulenceModel")
Run-time type information.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::solver::dict
virtual const dictionary & dict() const
Return the solver dictionary.
Definition: solver.C:113
Foam::incompressibleVars
Base class for solution control classes.
Definition: incompressibleVars.H:54
Foam::RASTurbulenceModel::writeData
virtual bool writeData(Ostream &os) const
Read average iteration.
Definition: RASTurbulenceModel.C:122