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

PDRkEpsilon.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::compressible::RASModels::PDRkEpsilon
00027 
00028 Description
00029     Standard k-epsilon turbulence model with additional source terms
00030     corresponding to PDR basic drag model (\link basic.H \endlink)
00031 
00032     The default model coefficients correspond to the following:
00033     @verbatim
00034         kEpsilonCoeffs
00035         {
00036             Cmu         0.09;
00037             C1          1.44;
00038             C2          1.92;
00039             C3          -0.33;  // only for compressible
00040             sigmak      1.0;    // only for compressible
00041             sigmaEps    1.3;
00042             Prt         1.0;    // only for compressible
00043         }
00044     @endverbatim
00045 
00046     The turbulence source term \f$ G_{R} \f$ appears in the
00047     \f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to
00048     interaction with unresolved obstacles.
00049 
00050     In the \f$ \epsilon  \f$ equation \f$ C_{1} G_{R} \f$ is added as a source
00051     term.
00052 
00053     In the \f$ \kappa \f$ equation \f$ G_{R} \f$ is added as a source term.
00054 
00055 SourceFiles
00056     PDRkEpsilon.C
00057     PDRkEpsilonCorrect.C
00058 
00059 \*---------------------------------------------------------------------------*/
00060 
00061 #ifndef compressiblePDRkEpsilon_H
00062 #define compressiblePDRkEpsilon_H
00063 
00064 #include "RASModel.H"
00065 
00066 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00067 
00068 namespace Foam
00069 {
00070 namespace compressible
00071 {
00072 namespace RASModels
00073 {
00074 
00075 /*---------------------------------------------------------------------------*\
00076                            Class PDRkEpsilon Declaration
00077 \*---------------------------------------------------------------------------*/
00078 
00079 class PDRkEpsilon
00080 :
00081     public RASModel
00082 {
00083     // Private data
00084 
00085     // Model coefficients
00086 
00087         dimensionedScalar Cmu_;
00088         dimensionedScalar C1_;
00089         dimensionedScalar C2_;
00090         dimensionedScalar sigmak_;
00091         dimensionedScalar sigmaEps_;
00092         dimensionedScalar Prt_;
00093 
00094     // Fields
00095 
00096         volScalarField k_;
00097         volScalarField epsilon_;
00098         volScalarField mut_;
00099         volScalarField alphat_;
00100 
00101 
00102 public:
00103 
00104     //- Runtime type information
00105     TypeName("PDRkEpsilon");
00106 
00107 
00108     // Constructors
00109 
00110         //- Construct from components
00111         PDRkEpsilon
00112         (
00113             const volScalarField& rho,
00114             const volVectorField& U,
00115             const surfaceScalarField& phi,
00116             const basicThermo& thermophysicalModel
00117         );
00118 
00119 
00120     //- Destructor
00121     virtual ~PDRkEpsilon()
00122     {}
00123 
00124 
00125     // Member Functions
00126 
00127         tmp<volScalarField> mut() const
00128         {
00129             return mut_;
00130         }
00131 
00132         //- Return the effective diffusivity for k
00133         tmp<volScalarField> DkEff() const
00134         {
00135             return tmp<volScalarField>
00136             (
00137                 new volScalarField("DkEff", mut_/sigmak_ + mu())
00138             );
00139         }
00140 
00141         //- Return the effective diffusivity for epsilon
00142         tmp<volScalarField> DepsilonEff() const
00143         {
00144             return tmp<volScalarField>
00145             (
00146                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
00147             );
00148         }
00149 
00150         //- Return the effective turbulent thermal diffusivity
00151         tmp<volScalarField> alphaEff() const
00152         {
00153             return tmp<volScalarField>
00154             (
00155                 new volScalarField("alphaEff", alphat_ + alpha())
00156             );
00157         }
00158 
00159         //- Return the turbulence kinetic energy
00160         tmp<volScalarField> k() const
00161         {
00162             return k_;
00163         }
00164 
00165         //- Return the turbulence kinetic energy dissipation rate
00166         tmp<volScalarField> epsilon() const
00167         {
00168             return epsilon_;
00169         }
00170 
00171         //- Return the Reynolds stress tensor
00172         tmp<volSymmTensorField> R() const;
00173 
00174         //- Return the effective stress tensor including the laminar stress
00175         tmp<volSymmTensorField> devRhoReff() const;
00176 
00177         //- Return the source term for the momentum equation
00178         tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00179 
00180         //- Solve the turbulence equations and correct the turbulence viscosity
00181         void correct();
00182 
00183         //- Read turbulenceProperties dictionary
00184         bool read();
00185 };
00186 
00187 
00188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00189 
00190 } // End namespace RASModels
00191 } // End namespace compressible
00192 } // End namespace Foam
00193 
00194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00195 
00196 #endif
00197 
00198 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd