1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 <OpenFOAM/primitiveFieldsFwd.H>
48 #include <finiteVolume/volFieldsFwd.H>
49 #include <finiteVolume/surfaceFieldsFwd.H>
50 #include <finiteVolume/fvMatricesFwd.H>
51 #include <incompressibleTransportModels/transportModel.H>
52 #include <OpenFOAM/autoPtr.H>
53 #include <OpenFOAM/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
105 declareRunTimeNewSelectionTable
111 const volVectorField& U,
112 const surfaceScalarField& phi,
113 transportModel& lamTransportModel
115 (U, phi, lamTransportModel)
121 //- Construct from components
124 const volVectorField& U,
125 const surfaceScalarField& phi,
126 transportModel& lamTransportModel
132 //- Return a reference to the selected turbulence model
133 static autoPtr<turbulenceModel> New
135 const volVectorField& U,
136 const surfaceScalarField& phi,
137 transportModel& lamTransportModel
142 virtual ~turbulenceModel()
148 //- Access function to velocity field
149 inline const volVectorField& U() const
154 //- Access function to flux field
155 inline const surfaceScalarField& phi() const
160 //- Access function to incompressible transport model
161 inline transportModel& transport() const
163 return transportModel_;
166 //- Return the laminar viscosity
167 const volScalarField& nu() const
169 return transportModel_.nu();
172 //- Return the turbulence viscosity
173 virtual tmp<volScalarField> nut() const = 0;
175 //- Return the effective viscosity
176 virtual tmp<volScalarField> nuEff() const = 0;
178 //- Return the turbulence kinetic energy
179 virtual tmp<volScalarField> k() const = 0;
181 //- Return the turbulence kinetic energy dissipation rate
182 virtual tmp<volScalarField> epsilon() const = 0;
184 //- Return the Reynolds stress tensor
185 virtual tmp<volSymmTensorField> R() const = 0;
187 //- Return the effective stress tensor including the laminar stress
188 virtual tmp<volSymmTensorField> devReff() const = 0;
190 //- Return the source term for the momentum equation
191 virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
193 //- Solve the turbulence equations and correct the turbulence viscosity
194 virtual void correct() = 0;
196 //- Read turbulenceProperties dictionary
197 virtual bool read() = 0;
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 } // End namespace incompressible
204 } // End namespace Foam
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 // ************************ vim: set sw=4 sts=4 et: ************************ //