Forward compatibility: flex
[foam-extend-3.2.git] / src / turbulenceModels / compressible / LES / lowReOneEqEddy / lowReOneEqEddy.H
blobff9f42a1fefa8774b450b733f568626c76600fd3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::compressible::LESModels::lowReOneEqEddy
27 Description
28     One Equation Eddy Viscosity Model for compressible flow
30     @verbatim
31         d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k))
32         =
33         -rho*B*L - ce*rho*k^3/2/delta
35     and
37         B = 2/3*k*I - 2*nuSgs*dev(D)
39     where
41         nuSgsHiRe = ck*sqrt(k)*delta
42         nuSgs = (nu/beta)*(1 - exp(-beta*nuSgsHiRe/nu));
43     @endverbatim
45 SourceFiles
46     lowReOneEqEddy.C
48 \*---------------------------------------------------------------------------*/
50 #ifndef compressibleLowReOneEqEddy_H
51 #define compressibleLowReOneEqEddy_H
53 #include "GenEddyVisc.H"
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 namespace Foam
59 namespace compressible
61 namespace LESModels
64 /*---------------------------------------------------------------------------*\
65                            Class lowReOneEqEddy Declaration
66 \*---------------------------------------------------------------------------*/
68 class lowReOneEqEddy
70     public GenEddyVisc
72     // Private data
74         dimensionedScalar ck_;
75         dimensionedScalar beta_;
77     // Private Member Functions
79         //- Update sub-grid scale fields
80         void updateSubGridScaleFields();
82         // Disallow default bitwise copy construct and assignment
83         lowReOneEqEddy(const lowReOneEqEddy&);
84         lowReOneEqEddy& operator=(const lowReOneEqEddy&);
87 public:
89     //- Runtime type information
90     TypeName("lowReOneEqEddy");
93     // Constructors
95         //- Constructor from components
96         lowReOneEqEddy
97         (
98             const volScalarField& rho,
99             const volVectorField& U,
100             const surfaceScalarField& phi,
101             const basicThermo& thermoPhysicalModel
102         );
105     //- Destructor
106     virtual ~lowReOneEqEddy()
107     {}
110     // Member Functions
112         //- Return the effective diffusivity for k
113         tmp<volScalarField> DkEff() const
114         {
115             return tmp<volScalarField>
116             (
117                 new volScalarField("DkEff", muSgs_ + mu())
118             );
119         }
121         //- Correct Eddy-Viscosity and related properties
122         virtual void correct(const tmp<volTensorField>& gradU);
124         //- Read LESProperties dictionary
125         virtual bool read();
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace LESModels
132 } // End namespace compressible
133 } // End namespace Foam
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #endif
139 // ************************************************************************* //