1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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 //- Constructor from components
87 const volVectorField& U,
88 const surfaceScalarField& phi,
89 transportModel& transport
95 virtual ~GenSGSStress()
101 //- Return the SGS turbulent kinetic energy.
102 virtual tmp<volScalarField> k() const
107 //- Return the SGS turbulent dissipation.
108 virtual tmp<volScalarField> epsilon() const
110 volScalarField K = k();
111 return ce_*K*sqrt(K)/delta();
114 //- Return the SGS viscosity.
115 virtual tmp<volScalarField> nuSgs() const
120 //- Return the sub-grid stress tensor.
121 virtual tmp<volSymmTensorField> B() const
126 //- Return the effective sub-grid turbulence stress tensor
127 // including the laminar stress
128 virtual tmp<volSymmTensorField> devBeff() const;
131 // This is the additional term due to the filtering of the NSE.
132 virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
134 //- Read turbulenceProperties dictionary
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace LESModels
142 } // End namespace incompressible
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 // ************************************************************************* //