initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / NonlinearKEShih / NonlinearKEShih.H
blobcf2277ec1adf97ac34ff7165a0fb8acc624b7610
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::incompressible::RASModels::NonlinearKEShih
28 Description
29     Shih's quadratic non-linear k-epsilon turbulence model for
30     incompressible flows
32 SourceFiles
33     NonlinearKEShih.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef NonlinearKEShih_H
38 #define NonlinearKEShih_H
40 #include "RASModel.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 namespace incompressible
48 namespace RASModels
51 /*---------------------------------------------------------------------------*\
52                       Class NonlinearKEShih Declaration
53 \*---------------------------------------------------------------------------*/
55 class NonlinearKEShih
57     public RASModel
59     // Private data
61         // Model coefficients
63             dimensionedScalar C1_;
64             dimensionedScalar C2_;
65             dimensionedScalar sigmak_;
66             dimensionedScalar sigmaEps_;
67             dimensionedScalar A1_;
68             dimensionedScalar A2_;
69             dimensionedScalar Ctau1_;
70             dimensionedScalar Ctau2_;
71             dimensionedScalar Ctau3_;
72             dimensionedScalar alphaKsi_;
74             dimensionedScalar kappa_;
75             dimensionedScalar E_;
78         // Fields
80             volScalarField k_;
81             volScalarField epsilon_;
83             volTensorField gradU_;
84             volScalarField eta_;
85             volScalarField ksi_;
86             volScalarField Cmu_;
87             volScalarField fEta_;
89             volScalarField nut_;
91             volSymmTensorField nonlinearStress_;
94 public:
96     //- Runtime type information
97     TypeName("NonlinearKEShih");
99     // Constructors
101         //- Construct from components
102         NonlinearKEShih
103         (
104             const volVectorField& U,
105             const surfaceScalarField& phi,
106             transportModel& transport
107         );
110     //- Destructor
111     virtual ~NonlinearKEShih()
112     {}
115     // Member Functions
117         //- Return the turbulence viscosity
118         virtual tmp<volScalarField> nut() const
119         {
120             return nut_;
121         }
123         //- Return the effective diffusivity for k
124         tmp<volScalarField> DkEff() const
125         {
126             return tmp<volScalarField>
127             (
128                 new volScalarField("DkEff", nut_/sigmak_ + nu())
129             );
130         }
132         //- Return the effective diffusivity for epsilon
133         tmp<volScalarField> DepsilonEff() const
134         {
135             return tmp<volScalarField>
136             (
137                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
138             );
139         }
141         //- Return the turbulence kinetic energy
142         virtual tmp<volScalarField> k() const
143         {
144             return k_;
145         }
147         //- Return the turbulence kinetic energy dissipation rate
148         virtual tmp<volScalarField> epsilon() const
149         {
150             return epsilon_;
151         }
153         //- Return the Reynolds stress tensor
154         virtual tmp<volSymmTensorField> R() const;
156         //- Return the effective stress tensor including the laminar stress
157         virtual tmp<volSymmTensorField> devReff() const;
159         //- Return the source term for the momentum equation
160         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
162         //- Solve the turbulence equations and correct the turbulence viscosity
163         virtual void correct();
165         //- Read RASProperties dictionary
166         virtual bool read();
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace RASModels
173 } // End namespace incompressible
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 #endif
180 // ************************************************************************* //