initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / turbulenceModels / RAS / incompressible / LamBremhorstKE / LamBremhorstKE.H
blobf0e8a0ba591eb69444cf1ae356104e586bcff0a8
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::RASModels::LamBremhorstKE
28 Description
29     Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
30     for incompressible flows
32 SourceFiles
33     LamBremhorstKE.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef LamBremhorstKE_H
38 #define LamBremhorstKE_H
40 #include "RASModel.H"
41 #include "wallDist.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace incompressible
49 namespace RASModels
52 /*---------------------------------------------------------------------------*\
53                            Class LamBremhorstKE Declaration
54 \*---------------------------------------------------------------------------*/
56 class LamBremhorstKE
58     public RASModel
60     // Private data
62         dimensionedScalar Cmu_;
63         dimensionedScalar C1_;
64         dimensionedScalar C2_;
65         dimensionedScalar alphaEps_;
67         volScalarField k_;
68         volScalarField epsilon_;
70         wallDist y_;
71         volScalarField Rt_;
73         volScalarField fMu_;
74         volScalarField nut_;
77 public:
79     //- Runtime type information
80     TypeName("LamBremhorstKE");
83     // Constructors
85         //- from components
86         LamBremhorstKE
87         (
88             const volVectorField& U,
89             const surfaceScalarField& phi,
90             transportModel& transport
91         );
94     // Destructor
96         ~LamBremhorstKE()
97         {}
100     // Member Functions
102         //- Return the turbulence viscosity
103         tmp<volScalarField> nut() const
104         {
105             return nut_;
106         }
108         //- Return the effective diffusivity for k
109         tmp<volScalarField> DkEff() const
110         {
111             return tmp<volScalarField>
112             (
113                 new volScalarField("DkEff", nut_ + nu())
114             );
115         }
117         //- Return the effective diffusivity for epsilon
118         tmp<volScalarField> DepsilonEff() const
119         {
120             return tmp<volScalarField>
121             (
122                 new volScalarField("DepsilonEff", alphaEps_*nut_ + nu())
123             );
124         }
126         //- Return the turbulence kinetic energy
127         tmp<volScalarField> k() const
128         {
129             return k_;
130         }
132         //- Return the turbulence kinetic energy dissipation rate
133         tmp<volScalarField> epsilon() const
134         {
135             return epsilon_;
136         }
138         //- Return the Reynolds stress tensor
139         tmp<volSymmTensorField> R() const;
141         //- Return the effective stress tensor including the laminar stress
142         tmp<volSymmTensorField> devReff() const;
144         //- Return the source term for the momentum equation
145         tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
147         //- Solve the turbulence equations and correct the turbulence viscosity
148         void correct();
150         //- Read turbulenceProperties dictionary
151         bool read();
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 } // End namespace RASModels
158 } // End namespace incompressible
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 #endif
165 // ************************************************************************* //