initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / LES / dynOneEqEddy / dynOneEqEddy.H
blob5bb0d727520e6b59af77325ccb009471f76ec3e3
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::compressible::LESModels::dynOneEqEddy
28 Description
29     One Equation Eddy Viscosity Model for compressible flows.
31     Eddy viscosity SGS model using a modeled balance equation to simulate
32     the behaviour of k.
33     Thus
34     @verbatim
35         d/dt(k) + div(U*k) - div(nuSgs*grad(k))
36         =
37         -rho*B*L - ce*rho*k^3/2/delta
39     and
41         B = 2/3*k*I - 2*nuSgs*dev(D)
43     where
45         D = symm(grad(U));
46         nuSgs = ck*sqrt(k)*delta
47     @endverbatim
49 SourceFiles
50     dynOneEqEddy.C
52 \*---------------------------------------------------------------------------*/
54 #ifndef compressibleDynOneEqEddy_H
55 #define compressibleDynOneEqEddy_H
57 #include "GenEddyVisc.H"
58 #include "LESfilter.H"
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 namespace Foam
64 namespace compressible
66 namespace LESModels
69 /*---------------------------------------------------------------------------*\
70                            Class dynOneEqEddy Declaration
71 \*---------------------------------------------------------------------------*/
73 class dynOneEqEddy
75     public GenEddyVisc
77     // Private data
79         autoPtr<LESfilter> filterPtr_;
80         LESfilter& filter_;
83     // Private Member Functions
85         //- Update sub-grid scale fields
86         void updateSubGridScaleFields(const volSymmTensorField& D);
88         //- Calculate ck, ce by filtering the velocity field U.
89         dimensionedScalar ck_(const volSymmTensorField& D) const;
90         dimensionedScalar ce_(const volSymmTensorField& D) const;
92         // Disallow default bitwise copy construct and assignment
93         dynOneEqEddy(const dynOneEqEddy&);
94         dynOneEqEddy& operator=(const dynOneEqEddy&);
97 public:
99     //- Runtime type information
100     TypeName("dynOneEqEddy");
103     // Constructors
105         //- Constructor from components
106         dynOneEqEddy
107         (
108             const volScalarField& rho,
109             const volVectorField& U,
110             const surfaceScalarField& phi,
111             const basicThermo& thermoPhysicalModel
112         );
115     // Destructor
116     virtual ~dynOneEqEddy()
117     {}
120     // Member Functions
122         //- Return the effective diffusivity for k
123         tmp<volScalarField> DkEff() const
124         {
125             return tmp<volScalarField>
126             (
127                 new volScalarField("DkEff", muSgs_ + mu())
128             );
129         }
131         //- Correct Eddy-Viscosity and related properties
132         virtual void correct(const tmp<volTensorField>& gradU);
134         //- Read LESProperties dictionary
135         virtual bool read();
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace LESModels
142 } // End namespace compressible
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #endif
149 // ************************************************************************* //