FreeFOAM The Cross-Platform CFD Toolkit
NonlinearKEShih.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::NonlinearKEShih
26 
27 Description
28  Shih's quadratic non-linear k-epsilon turbulence model for
29  incompressible flows
30 
31 SourceFiles
32  NonlinearKEShih.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef NonlinearKEShih_H
37 #define NonlinearKEShih_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace incompressible
46 {
47 namespace RASModels
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class NonlinearKEShih Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public RASModel
57 {
58  // Private data
59 
60  // Model coefficients
61 
64  dimensionedScalar sigmak_;
65  dimensionedScalar sigmaEps_;
68  dimensionedScalar Ctau1_;
69  dimensionedScalar Ctau2_;
70  dimensionedScalar Ctau3_;
71  dimensionedScalar alphaKsi_;
72 
73  dimensionedScalar kappa_;
75 
76 
77  // Fields
78 
79  volScalarField k_;
80  volScalarField epsilon_;
81 
82  volTensorField gradU_;
83  volScalarField eta_;
84  volScalarField ksi_;
85  volScalarField Cmu_;
86  volScalarField fEta_;
87 
88  volScalarField nut_;
89 
90  volSymmTensorField nonlinearStress_;
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("NonlinearKEShih");
97 
98  // Constructors
99 
100  //- Construct from components
102  (
103  const volVectorField& U,
104  const surfaceScalarField& phi,
106  );
107 
108 
109  //- Destructor
111  {}
112 
113 
114  // Member Functions
115 
116  //- Return the turbulence viscosity
117  virtual tmp<volScalarField> nut() const
118  {
119  return nut_;
120  }
121 
122  //- Return the effective diffusivity for k
124  {
125  return tmp<volScalarField>
126  (
127  new volScalarField("DkEff", nut_/sigmak_ + nu())
128  );
129  }
130 
131  //- Return the effective diffusivity for epsilon
133  {
134  return tmp<volScalarField>
135  (
136  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
137  );
138  }
139 
140  //- Return the turbulence kinetic energy
141  virtual tmp<volScalarField> k() const
142  {
143  return k_;
144  }
145 
146  //- Return the turbulence kinetic energy dissipation rate
147  virtual tmp<volScalarField> epsilon() const
148  {
149  return epsilon_;
150  }
151 
152  //- Return the Reynolds stress tensor
153  virtual tmp<volSymmTensorField> R() const;
154 
155  //- Return the effective stress tensor including the laminar stress
156  virtual tmp<volSymmTensorField> devReff() const;
157 
158  //- Return the source term for the momentum equation
160 
161  //- Solve the turbulence equations and correct the turbulence viscosity
162  virtual void correct();
163 
164  //- Read RASProperties dictionary
165  virtual bool read();
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace RASModels
172 } // End namespace incompressible
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************ vim: set sw=4 sts=4 et: ************************ //