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::compressible::turbulenceModels
28 Namespace for compressible turbulence turbulence models.
32 Foam::compressible::turbulenceModel
35 Abstract base class for compressible turbulence models
36 (RAS, LES and laminar).
42 \*---------------------------------------------------------------------------*/
44 #ifndef compressibleturbulenceModel_H
45 #define compressibleturbulenceModel_H
47 #include "objectRegistry.H"
48 #include "primitiveFieldsFwd.H"
49 #include "volFieldsFwd.H"
50 #include "surfaceFieldsFwd.H"
51 #include "fvMatricesFwd.H"
52 #include "basicThermo.H"
54 #include "runTimeSelectionTables.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 // Forward declarations
64 namespace compressible
67 /*---------------------------------------------------------------------------*\
68 Class turbulenceModel Declaration
69 \*---------------------------------------------------------------------------*/
81 const volScalarField& rho_;
82 const volVectorField& U_;
83 const surfaceScalarField& phi_;
85 const basicThermo& thermophysicalModel_;
90 // Private Member Functions
92 //- Disallow default bitwise copy construct
93 turbulenceModel(const turbulenceModel&);
95 //- Disallow default bitwise assignment
96 void operator=(const turbulenceModel&);
101 //- Runtime type information
102 TypeName("turbulenceModel");
105 // Declare run-time constructor selection table
108 declareRunTimeNewSelectionTable
114 const volScalarField& rho,
115 const volVectorField& U,
116 const surfaceScalarField& phi,
117 const basicThermo& thermoPhysicalModel
119 (rho, U, phi, thermoPhysicalModel)
126 //- Construct from components
129 const volScalarField& rho,
130 const volVectorField& U,
131 const surfaceScalarField& phi,
132 const basicThermo& thermoPhysicalModel
138 //- Return a reference to the selected turbulence model
139 static autoPtr<compressible::turbulenceModel> New
141 const volScalarField& rho,
142 const volVectorField& U,
143 const surfaceScalarField& phi,
144 const basicThermo& thermoPhysicalModel
149 virtual ~turbulenceModel()
155 //- Access function to density field
156 const volScalarField& rho() const
161 //- Access function to velocity field
162 const volVectorField& U() const
167 //- Access function to flux field
168 const surfaceScalarField& phi() const
173 //- Access function to thermophysical model
174 const basicThermo& thermo() const
176 return thermophysicalModel_;
179 //- Return the laminar viscosity
180 const volScalarField& mu() const
182 return thermophysicalModel_.mu();
185 //- Return the laminar thermal conductivity
186 const volScalarField& alpha() const
188 return thermophysicalModel_.alpha();
191 //- Return the turbulence viscosity
192 virtual tmp<volScalarField> mut() const = 0;
194 //- Return the effective viscosity
195 virtual tmp<volScalarField> muEff() const = 0;
197 //- Return the effective turbulent thermal diffusivity
198 virtual tmp<volScalarField> alphaEff() const = 0;
200 //- Return the turbulence kinetic energy
201 virtual tmp<volScalarField> k() const = 0;
203 //- Return the turbulence kinetic energy dissipation rate
204 virtual tmp<volScalarField> epsilon() const = 0;
206 //- Return the Reynolds stress tensor
207 virtual tmp<volSymmTensorField> R() const = 0;
209 //- Return the effective stress tensor including the laminar stress
210 virtual tmp<volSymmTensorField> devRhoReff() const = 0;
212 //- Return the source term for the momentum equation
213 virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
215 //- Solve the turbulence equations and correct the turbulence viscosity
216 virtual void correct() = 0;
218 //- Read turbulenceProperties dictionary
219 virtual bool read() = 0;
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 } // End namespace compressible
226 } // End namespace Foam
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 // ************************************************************************* //