initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / turbulenceModels / LES / incompressible / GenSGSStress / GenSGSStress.H
blobeb6cc7e9065b0ab437d580637568838d4cb50269
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::incompressible::LESModels::GenSGSStress
28 Description
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
34     (SGS dissipation).
36 SourceFiles
37     GenSGSStress.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef GenSGSStress_H
42 #define GenSGSStress_H
44 #include "LESModel.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
50 namespace incompressible
52 namespace LESModels
55 /*---------------------------------------------------------------------------*\
56                            Class GenSGSStress Declaration
57 \*---------------------------------------------------------------------------*/
59 class GenSGSStress
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&);
70 protected:
72         dimensionedScalar ce_;
74         dimensionedScalar couplingFactor_;
76         volSymmTensorField B_;
77         volScalarField nuSgs_;
80 public:
82     // Constructors
84         //- Constructor from components
85         GenSGSStress
86         (
87             const volVectorField& U,
88             const surfaceScalarField& phi,
89             transportModel& transport
90         );
93     // Destructor
95         virtual ~GenSGSStress()
96         {}
99     // Member Functions
101         //- Return the SGS turbulent kinetic energy.
102         virtual tmp<volScalarField> k() const
103         {
104             return 0.5*tr(B_);
105         }
107         //- Return the SGS turbulent dissipation.
108         virtual tmp<volScalarField> epsilon() const
109         {
110             volScalarField K = k();
111             return ce_*K*sqrt(K)/delta();
112         }
114         //- Return the SGS viscosity.
115         virtual tmp<volScalarField> nuSgs() const
116         {
117             return nuSgs_;
118         }
120         //- Return the sub-grid stress tensor.
121         virtual tmp<volSymmTensorField> B() const
122         {
123             return B_;
124         }
126         //- Return the effective sub-grid turbulence stress tensor
127         //  including the laminar stress
128         virtual tmp<volSymmTensorField> devBeff() const;
130         //- Returns div(B).
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
135         bool read();
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace LESModels
142 } // End namespace incompressible
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #endif
149 // ************************************************************************* //