1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::incompressible::turbulenceModels
29 Namespace for incompressible turbulence turbulence models.
32 Foam::incompressible::turbulenceModel
35 Abstract base class for incompressible turbulence models
36 (RAS, LES and laminar).
42 \*---------------------------------------------------------------------------*/
44 #ifndef turbulenceModel_H
45 #define turbulenceModel_H
47 #include "primitiveFieldsFwd.H"
48 #include "volFieldsFwd.H"
49 #include "surfaceFieldsFwd.H"
50 #include "fvMatricesFwd.H"
51 #include "incompressible/transportModel/transportModel.H"
53 #include "runTimeSelectionTables.H"
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 // Forward declarations
63 namespace incompressible
66 /*---------------------------------------------------------------------------*\
67 Class turbulenceModel Declaration
68 \*---------------------------------------------------------------------------*/
80 const volVectorField& U_;
81 const surfaceScalarField& phi_;
83 transportModel& transportModel_;
88 // Private Member Functions
90 //- Disallow default bitwise copy construct
91 turbulenceModel(const turbulenceModel&);
93 //- Disallow default bitwise assignment
94 void operator=(const turbulenceModel&);
99 //- Runtime type information
100 TypeName("turbulenceModel");
103 // Declare run-time New selection table
106 declareRunTimeNewSelectionTable
112 const volVectorField& U,
113 const surfaceScalarField& phi,
114 transportModel& lamTransportModel
116 (U, phi, lamTransportModel)
123 //- Construct from components
126 const volVectorField& U,
127 const surfaceScalarField& phi,
128 transportModel& lamTransportModel
134 //- Return a reference to the selected turbulence model
135 static autoPtr<incompressible::turbulenceModel> New
137 const volVectorField& U,
138 const surfaceScalarField& phi,
139 transportModel& lamTransportModel
145 virtual ~turbulenceModel()
151 //- Access function to velocity field
152 inline const volVectorField& U() const
157 //- Access function to flux field
158 inline const surfaceScalarField& phi() const
163 //- Access function to incompressible transport model
164 inline transportModel& transport() const
166 return transportModel_;
169 //- Return the laminar viscosity
170 const volScalarField& nu() const
172 return transportModel_.nu();
175 //- Return the turbulence viscosity
176 virtual tmp<volScalarField> nut() const = 0;
178 //- Return the effective viscosity
179 virtual tmp<volScalarField> nuEff() const = 0;
181 //- Return the turbulence kinetic energy
182 virtual tmp<volScalarField> k() const = 0;
184 //- Return the turbulence kinetic energy dissipation rate
185 virtual tmp<volScalarField> epsilon() const = 0;
187 //- Return the Reynolds stress tensor
188 virtual tmp<volSymmTensorField> R() const = 0;
190 //- Return the effective stress tensor including the laminar stress
191 virtual tmp<volSymmTensorField> devReff() const = 0;
193 //- Return the source term for the momentum equation
194 virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
196 //- Solve the turbulence equations and correct the turbulence viscosity
197 virtual void correct() = 0;
199 //- Read turbulenceProperties dictionary
200 virtual bool read() = 0;
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 } // End namespace incompressible
207 } // End namespace Foam
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 // ************************************************************************* //