initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / LES / dynOneEqEddy / dynOneEqEddy.H
blob9b1a4064d6dff440439f45939eb2eb802257d653
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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::dynOneEqEddy
28 Description
29     One Equation Eddy Viscosity Model for incompressible flows.
31     Eddy viscosity SGS model using a modeled balance equation to simulate
32     the behaviour of k.
34     Thus
35     @verbatim
36         d/dt(k) + div(U*k) - div(nuSgs*grad(k))
37         =
38         -B*L - ce*k^3/2/delta
40     and
42         B = 2/3*k*I - 2*nuSgs*dev(D)
43         Beff = 2/3*k*I - 2*nuEff*dev(D)
45     where
47         D = symm(grad(U));
48         nuSgs = ck*sqrt(k)*delta
49         nuEff = nuSgs + nu
50     @endverbatim
52 SourceFiles
53     dynOneEqEddy.C
55 \*---------------------------------------------------------------------------*/
57 #ifndef dynOneEqEddy_H
58 #define dynOneEqEddy_H
60 #include "GenEddyVisc.H"
61 #include "LESfilter.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 namespace Foam
67 namespace incompressible
69 namespace LESModels
72 /*---------------------------------------------------------------------------*\
73                            Class dynOneEqEddy Declaration
74 \*---------------------------------------------------------------------------*/
76 class dynOneEqEddy
78     public GenEddyVisc
80     // Private data
82         volScalarField k_;
84         autoPtr<LESfilter> filterPtr_;
85         LESfilter& filter_;
88     // Private Member Functions
90         //- Update sub-grid scale fields
91         void updateSubGridScaleFields(const volSymmTensorField& D);
93         //- Calculate ck, ce by filtering the velocity field U.
94         dimensionedScalar ck(const volSymmTensorField& D) const;
95         dimensionedScalar ce(const volSymmTensorField& D) const;
97         // Disallow default bitwise copy construct and assignment
98         dynOneEqEddy(const dynOneEqEddy&);
99         dynOneEqEddy& operator=(const dynOneEqEddy&);
102 public:
104     //- Runtime type information
105     TypeName("dynOneEqEddy");
107     // Constructors
109         //- Construct from components
110         dynOneEqEddy
111         (
112             const volVectorField& U,
113             const surfaceScalarField& phi,
114             transportModel& transport
115         );
118     //- Destructor
119     virtual ~dynOneEqEddy()
120     {}
123     // Member Functions
125         //- Return SGS kinetic energy
126         virtual tmp<volScalarField> k() const
127         {
128             return k_;
129         }
131         //- Return the effective diffusivity for k
132         tmp<volScalarField> DkEff() const
133         {
134             return tmp<volScalarField>
135             (
136                 new volScalarField("DkEff", nuSgs_ + nu())
137             );
138         }
140         //- Correct Eddy-Viscosity and related properties
141         virtual void correct(const tmp<volTensorField>& gradU);
143         //- Read LESProperties dictionary
144         virtual bool read();
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace LESModels
151 } // End namespace incompressible
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #endif
158 // ************************************************************************* //