1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::incompressible::turbulenceModels
28 Namespace for incompressible turbulence turbulence models.
31 Foam::incompressible::turbulenceModel
34 Abstract base class for incompressible turbulence models
35 (RAS, LES and laminar).
41 \*---------------------------------------------------------------------------*/
43 #ifndef turbulenceModel_H
44 #define turbulenceModel_H
46 #include "objectRegistry.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 // ************************************************************************* //