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::compressible::LESModels::GenEddyVisc
29 General base class for all compressible models that can be implemented as
30 an eddy viscosity, i.e. algebraic and one-equation models.
32 Contains fields for k (SGS turbulent kinetic energy), gamma
33 (modelled viscosity) and epsilon (SGS dissipation).
38 \*---------------------------------------------------------------------------*/
40 #ifndef compressibleGenEddyVisc_H
41 #define compressibleGenEddyVisc_H
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace compressible
54 /*---------------------------------------------------------------------------*\
55 Class GenEddyVisc Declaration
56 \*---------------------------------------------------------------------------*/
60 virtual public LESModel
62 // Private Member Functions
64 // Disallow default bitwise copy construct and assignment
65 GenEddyVisc(const GenEddyVisc&);
66 GenEddyVisc& operator=(const GenEddyVisc&);
73 dimensionedScalar ce_;
74 dimensionedScalar Prt_;
80 volScalarField muSgs_;
81 volScalarField alphaSgs_;
88 //- Construct from components
91 const volScalarField& rho,
92 const volVectorField& U,
93 const surfaceScalarField& phi,
94 const basicThermo& thermoPhysicalModel
99 virtual ~GenEddyVisc()
105 //- Return SGS kinetic energy
106 virtual tmp<volScalarField> k() const
111 //- Return sub-grid disipation rate
112 virtual tmp<volScalarField> epsilon() const
114 return ce_*k_*sqrt(k_)/delta();
118 virtual tmp<volScalarField> muSgs() const
123 //- Return thermal diffusivity
124 virtual tmp<volScalarField> alphaSgs() const
129 //- Return thermal diffusivity
130 virtual tmp<volScalarField> alphaEff() const
132 return tmp<volScalarField>
134 new volScalarField("alphaEff", alphaSgs_ + alpha())
138 //- Return the sub-grid stress tensor.
139 virtual tmp<volSymmTensorField> B() const;
141 //- Return the deviatoric part of the effective sub-grid
142 // turbulence stress tensor including the laminar stress
143 virtual tmp<volSymmTensorField> devRhoBeff() const;
145 //- Returns div(rho*dev(B)).
146 // This is the additional term due to the filtering of the NSE.
147 virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const;
149 //- Correct Eddy-Viscosity and related properties
150 virtual void correct(const tmp<volTensorField>& gradU);
152 //- Read LESProperties dictionary
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace LESModels
160 } // End namespace compressible
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //