1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::incompressible::LESModels::GenSGSStress
28 General base class for all incompressible models that directly
29 solve for the SGS stress tensor B.
31 Contains tensor fields B (the SGS stress tensor) as well as scalar
32 fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon
38 \*---------------------------------------------------------------------------*/
40 #ifndef GenSGSStress_H
41 #define GenSGSStress_H
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace incompressible
54 /*---------------------------------------------------------------------------*\
55 Class GenSGSStress Declaration
56 \*---------------------------------------------------------------------------*/
60 virtual public LESModel
62 // Private Member Functions
64 // Disallow default bitwise copy construct and assignment
65 GenSGSStress(const GenSGSStress&);
66 GenSGSStress& operator=(const GenSGSStress&);
71 dimensionedScalar ce_;
73 dimensionedScalar couplingFactor_;
75 volSymmTensorField B_;
76 volScalarField nuSgs_;
81 //- Partial Runtime type information
82 static const word typeName;
86 //- Construct from components
89 const volVectorField& U,
90 const surfaceScalarField& phi,
91 transportModel& transport,
92 const word& turbulenceModelName = turbulenceModel::typeName,
93 const word& modelName = typeName
98 virtual ~GenSGSStress()
104 //- Return the SGS turbulent kinetic energy.
105 virtual tmp<volScalarField> k() const
110 //- Return the SGS turbulent dissipation.
111 virtual tmp<volScalarField> epsilon() const
113 const volScalarField K(k());
114 return ce_*K*sqrt(K)/delta();
117 //- Return the SGS viscosity.
118 virtual tmp<volScalarField> nuSgs() const
123 //- Return the sub-grid stress tensor.
124 virtual tmp<volSymmTensorField> B() const
129 //- Return the effective sub-grid turbulence stress tensor
130 // including the laminar stress
131 virtual tmp<volSymmTensorField> devBeff() const;
134 // This is the additional term due to the filtering of the NSE.
135 virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
137 //- Read LESProperties dictionary
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace LESModels
145 } // End namespace incompressible
146 } // End namespace Foam
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 // ************************************************************************* //