OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

NonlinearKEShih.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::incompressible::RASModels::NonlinearKEShih
00027 
00028 Description
00029     Shih's quadratic non-linear k-epsilon turbulence model for
00030     incompressible flows
00031 
00032 SourceFiles
00033     NonlinearKEShih.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef NonlinearKEShih_H
00038 #define NonlinearKEShih_H
00039 
00040 #include "RASModel.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace incompressible
00047 {
00048 namespace RASModels
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                       Class NonlinearKEShih Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class NonlinearKEShih
00056 :
00057     public RASModel
00058 {
00059     // Private data
00060 
00061         // Model coefficients
00062 
00063             dimensionedScalar C1_;
00064             dimensionedScalar C2_;
00065             dimensionedScalar sigmak_;
00066             dimensionedScalar sigmaEps_;
00067             dimensionedScalar A1_;
00068             dimensionedScalar A2_;
00069             dimensionedScalar Ctau1_;
00070             dimensionedScalar Ctau2_;
00071             dimensionedScalar Ctau3_;
00072             dimensionedScalar alphaKsi_;
00073 
00074             dimensionedScalar kappa_;
00075             dimensionedScalar E_;
00076 
00077 
00078         // Fields
00079 
00080             volScalarField k_;
00081             volScalarField epsilon_;
00082 
00083             volTensorField gradU_;
00084             volScalarField eta_;
00085             volScalarField ksi_;
00086             volScalarField Cmu_;
00087             volScalarField fEta_;
00088 
00089             volScalarField nut_;
00090 
00091             volSymmTensorField nonlinearStress_;
00092 
00093 
00094 public:
00095 
00096     //- Runtime type information
00097     TypeName("NonlinearKEShih");
00098 
00099     // Constructors
00100 
00101         //- Construct from components
00102         NonlinearKEShih
00103         (
00104             const volVectorField& U,
00105             const surfaceScalarField& phi,
00106             transportModel& transport
00107         );
00108 
00109 
00110     //- Destructor
00111     virtual ~NonlinearKEShih()
00112     {}
00113 
00114 
00115     // Member Functions
00116 
00117         //- Return the turbulence viscosity
00118         virtual tmp<volScalarField> nut() const
00119         {
00120             return nut_;
00121         }
00122 
00123         //- Return the effective diffusivity for k
00124         tmp<volScalarField> DkEff() const
00125         {
00126             return tmp<volScalarField>
00127             (
00128                 new volScalarField("DkEff", nut_/sigmak_ + nu())
00129             );
00130         }
00131 
00132         //- Return the effective diffusivity for epsilon
00133         tmp<volScalarField> DepsilonEff() const
00134         {
00135             return tmp<volScalarField>
00136             (
00137                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00138             );
00139         }
00140 
00141         //- Return the turbulence kinetic energy
00142         virtual tmp<volScalarField> k() const
00143         {
00144             return k_;
00145         }
00146 
00147         //- Return the turbulence kinetic energy dissipation rate
00148         virtual tmp<volScalarField> epsilon() const
00149         {
00150             return epsilon_;
00151         }
00152 
00153         //- Return the Reynolds stress tensor
00154         virtual tmp<volSymmTensorField> R() const;
00155 
00156         //- Return the effective stress tensor including the laminar stress
00157         virtual tmp<volSymmTensorField> devReff() const;
00158 
00159         //- Return the source term for the momentum equation
00160         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00161 
00162         //- Solve the turbulence equations and correct the turbulence viscosity
00163         virtual void correct();
00164 
00165         //- Read RASProperties dictionary
00166         virtual bool read();
00167 };
00168 
00169 
00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00171 
00172 } // End namespace RASModels
00173 } // End namespace incompressible
00174 } // End namespace Foam
00175 
00176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00177 
00178 #endif
00179 
00180 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd