initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / LienCubicKE / LienCubicKE.H
blob8a3d969467413a71438cc23bee347d8d8a1c78f2
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::LienCubicKE
28 Description
29     Lien cubic non-linear k-epsilon turbulence model for incompressible flows.
31 SourceFiles
32     LienCubicKE.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef LienCubicKE_H
37 #define LienCubicKE_H
39 #include "RASModel.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
45 namespace incompressible
47 namespace RASModels
50 /*---------------------------------------------------------------------------*\
51                            Class LienCubicKE Declaration
52 \*---------------------------------------------------------------------------*/
54 class LienCubicKE
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_;
74         // Fields
76             volScalarField k_;
77             volScalarField epsilon_;
79             volTensorField gradU_;
80             volScalarField eta_;
81             volScalarField ksi_;
82             volScalarField Cmu_;
83             volScalarField fEta_;
84             volScalarField C5viscosity_;
86             volScalarField nut_;
88             volSymmTensorField nonlinearStress_;
91 public:
93     //- Runtime type information
94     TypeName("LienCubicKE");
96     // Constructors
98         //- Construct from components
99         LienCubicKE
100         (
101             const volVectorField& U,
102             const surfaceScalarField& phi,
103             transportModel& transport
104         );
107     // Destructor
108     virtual ~LienCubicKE()
109     {}
112     // Member Functions
114         //- Return the turbulence viscosity
115         virtual tmp<volScalarField> nut() const
116         {
117             return nut_;
118         }
120         //- Return the effective diffusivity for k
121         tmp<volScalarField> DkEff() const
122         {
123             return tmp<volScalarField>
124             (
125                 new volScalarField("DkEff", nut_/sigmak_ + nu())
126             );
127         }
129         //- Return the effective diffusivity for epsilon
130         tmp<volScalarField> DepsilonEff() const
131         {
132             return tmp<volScalarField>
133             (
134                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
135             );
136         }
138         //- Return the turbulence kinetic energy
139         virtual tmp<volScalarField> k() const
140         {
141             return k_;
142         }
144         //- Return the turbulence kinetic energy dissipation rate
145         virtual tmp<volScalarField> epsilon() const
146         {
147             return epsilon_;
148         }
150         //- Return the Reynolds stress tensor
151         virtual tmp<volSymmTensorField> R() const;
153         //- Return the effective stress tensor including the laminar stress
154         virtual tmp<volSymmTensorField> devReff() const;
156         //- Return the source term for the momentum equation
157         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
159         //- Solve the turbulence equations and correct the turbulence viscosity
160         virtual void correct();
162         //- Read RASProperties dictionary
163         virtual bool read();
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace RASModels
170 } // End namespace incompressible
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 #endif
177 // ************************************************************************* //