FreeFOAM The Cross-Platform CFD Toolkit
LamBremhorstKE.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::incompressible::RASModels::LamBremhorstKE
26 
27 Description
28  Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
29  for incompressible flows
30 
31 SourceFiles
32  LamBremhorstKE.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef LamBremhorstKE_H
37 #define LamBremhorstKE_H
38 
40 #include <finiteVolume/wallDist.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace incompressible
47 {
48 namespace RASModels
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class LamBremhorstKE Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public RASModel
58 {
59  // Private data
60 
61  dimensionedScalar Cmu_;
64  dimensionedScalar sigmaEps_;
65 
66  volScalarField k_;
67  volScalarField epsilon_;
68 
69  wallDist y_;
70  volScalarField Rt_;
71 
72  volScalarField fMu_;
73  volScalarField nut_;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("LamBremhorstKE");
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const volVectorField& U,
88  const surfaceScalarField& phi,
90  );
91 
92 
93  //- Destructor
94  virtual ~LamBremhorstKE()
95  {}
96 
97 
98  // Member Functions
99 
100  //- Return the turbulence viscosity
101  virtual tmp<volScalarField> nut() const
102  {
103  return nut_;
104  }
105 
106  //- Return the effective diffusivity for k
108  {
109  return tmp<volScalarField>
110  (
111  new volScalarField("DkEff", nut_ + nu())
112  );
113  }
114 
115  //- Return the effective diffusivity for epsilon
117  {
118  return tmp<volScalarField>
119  (
120  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
121  );
122  }
123 
124  //- Return the turbulence kinetic energy
125  virtual tmp<volScalarField> k() const
126  {
127  return k_;
128  }
129 
130  //- Return the turbulence kinetic energy dissipation rate
131  virtual tmp<volScalarField> epsilon() const
132  {
133  return epsilon_;
134  }
135 
136  //- Return the Reynolds stress tensor
137  virtual tmp<volSymmTensorField> R() const;
138 
139  //- Return the effective stress tensor including the laminar stress
140  virtual tmp<volSymmTensorField> devReff() const;
141 
142  //- Return the source term for the momentum equation
144 
145  //- Solve the turbulence equations and correct the turbulence viscosity
146  virtual void correct();
147 
148  //- Read RASProperties dictionary
149  virtual bool read();
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace RASModels
156 } // End namespace incompressible
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************ vim: set sw=4 sts=4 et: ************************ //