Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / turbulenceModels / incompressible / RAS / NonlinearKEShih / NonlinearKEShih.H
blob15cb1063cc53c2ec3629730c20f93b059ff144af
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::incompressible::RASModels::NonlinearKEShih
27 Description
28     Shih's quadratic non-linear k-epsilon turbulence model for
29     incompressible flows
31 SourceFiles
32     NonlinearKEShih.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef NonlinearKEShih_H
37 #define NonlinearKEShih_H
39 #include "RASModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
45 namespace incompressible
47 namespace RASModels
50 /*---------------------------------------------------------------------------*\
51                       Class NonlinearKEShih Declaration
52 \*---------------------------------------------------------------------------*/
54 class NonlinearKEShih
56     public RASModel
58     // Private data
60         // Model coefficients
62             dimensionedScalar C1_;
63             dimensionedScalar C2_;
64             dimensionedScalar sigmak_;
65             dimensionedScalar sigmaEps_;
66             dimensionedScalar A1_;
67             dimensionedScalar A2_;
68             dimensionedScalar Ctau1_;
69             dimensionedScalar Ctau2_;
70             dimensionedScalar Ctau3_;
71             dimensionedScalar alphaKsi_;
73             dimensionedScalar kappa_;
74             dimensionedScalar E_;
77         // Fields
79             volScalarField k_;
80             volScalarField epsilon_;
82             volTensorField gradU_;
83             volScalarField eta_;
84             volScalarField ksi_;
85             volScalarField Cmu_;
86             volScalarField fEta_;
88             volScalarField nut_;
90             volSymmTensorField nonlinearStress_;
93 public:
95     //- Runtime type information
96     TypeName("NonlinearKEShih");
98     // Constructors
100         //- Construct from components
101         NonlinearKEShih
102         (
103             const volVectorField& U,
104             const surfaceScalarField& phi,
105             transportModel& transport
106         );
109     //- 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 // ************************************************************************* //