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::LESModels::GenSGSStress
29 General base class for all incompressible models that directly
30 solve for the SGS stress tensor B.
32 Contains tensor fields B (the SGS stress tensor) as well as scalar
33 fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon
39 \*---------------------------------------------------------------------------*/
41 #ifndef GenSGSStress_H
42 #define GenSGSStress_H
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace incompressible
55 /*---------------------------------------------------------------------------*\
56 Class GenSGSStress Declaration
57 \*---------------------------------------------------------------------------*/
61 virtual public LESModel
63 // Private Member Functions
65 // Disallow default bitwise copy construct and assignment
66 GenSGSStress(const GenSGSStress&);
67 GenSGSStress& operator=(const GenSGSStress&);
72 dimensionedScalar ce_;
74 dimensionedScalar couplingFactor_;
76 volSymmTensorField B_;
77 volScalarField nuSgs_;
84 //- Construct from components
87 const volVectorField& U,
88 const surfaceScalarField& phi,
89 transportModel& transport
94 virtual ~GenSGSStress()
100 //- Return the SGS turbulent kinetic energy.
101 virtual tmp<volScalarField> k() const
106 //- Return the SGS turbulent dissipation.
107 virtual tmp<volScalarField> epsilon() const
109 volScalarField K = k();
110 return ce_*K*sqrt(K)/delta();
113 //- Return the SGS viscosity.
114 virtual tmp<volScalarField> nuSgs() const
119 //- Return the sub-grid stress tensor.
120 virtual tmp<volSymmTensorField> B() const
125 //- Return the effective sub-grid turbulence stress tensor
126 // including the laminar stress
127 virtual tmp<volSymmTensorField> devBeff() const;
130 // This is the additional term due to the filtering of the NSE.
131 virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
133 //- Read LESProperties dictionary
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace LESModels
141 } // End namespace incompressible
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 // ************************************************************************* //