FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

LRR.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::compressible::RASModels::LRR
00026 
00027 Description
00028     Launder, Reece and Rodi Reynolds-stress turbulence model for
00029     compressible flows.
00030 
00031     The default model coefficients correspond to the following:
00032     @verbatim
00033         LRRCoeffs
00034         {
00035             Cmu         0.09;
00036             Clrr1       1.8;
00037             Clrr2       0.6;
00038             C1          1.44;
00039             C2          1.92;
00040             Cs          0.25;
00041             Ceps        0.15;
00042             Prt         1.0;        // only for compressible
00043             sigmaEps    1.3;
00044             sigmaR      0.81967;    // only for compressible
00045             couplingFactor  0.0;    // only for incompressible
00046         }
00047     @endverbatim
00048 
00049 SourceFiles
00050     LRR.C
00051     LRRcorrect.C
00052 
00053 \*---------------------------------------------------------------------------*/
00054 
00055 #ifndef compressibleLRR_H
00056 #define compressibleLRR_H
00057 
00058 #include <compressibleRASModels/RASModel.H>
00059 
00060 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00061 
00062 namespace Foam
00063 {
00064 namespace compressible
00065 {
00066 namespace RASModels
00067 {
00068 
00069 /*---------------------------------------------------------------------------*\
00070                            Class LRR Declaration
00071 \*---------------------------------------------------------------------------*/
00072 
00073 class LRR
00074 :
00075     public RASModel
00076 {
00077     // Private data
00078 
00079         // Model coefficients
00080 
00081             dimensionedScalar Cmu_;
00082 
00083             dimensionedScalar Clrr1_;
00084             dimensionedScalar Clrr2_;
00085 
00086             dimensionedScalar C1_;
00087             dimensionedScalar C2_;
00088             dimensionedScalar Cs_;
00089             dimensionedScalar Ceps_;
00090 
00091             dimensionedScalar couplingFactor_;
00092 
00093             dimensionedScalar sigmaR_;
00094             dimensionedScalar sigmaEps_;
00095             dimensionedScalar Prt_;
00096 
00097 
00098         // Fields
00099 
00100             volSymmTensorField R_;
00101             volScalarField k_;
00102             volScalarField epsilon_;
00103             volScalarField mut_;
00104             volScalarField alphat_;
00105 
00106 
00107 public:
00108 
00109     //- Runtime type information
00110     TypeName("LRR");
00111 
00112     // Constructors
00113 
00114         //- Construct from components
00115         LRR
00116         (
00117             const volScalarField& rho,
00118             const volVectorField& U,
00119             const surfaceScalarField& phi,
00120             const basicThermo& thermophysicalModel
00121         );
00122 
00123 
00124     //- Destructor
00125     virtual ~LRR()
00126     {}
00127 
00128 
00129     // Member Functions
00130 
00131         //- Return the effective diffusivity for R
00132         tmp<volScalarField> DREff() const
00133         {
00134             return tmp<volScalarField>
00135             (
00136                 new volScalarField("DREff", mut_/sigmaR_ + mu())
00137             );
00138         }
00139 
00140         //- Return the effective diffusivity for epsilon
00141         tmp<volScalarField> DepsilonEff() const
00142         {
00143             return tmp<volScalarField>
00144             (
00145                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
00146             );
00147         }
00148 
00149         //- Return the turbulence viscosity
00150         virtual tmp<volScalarField> mut() const
00151         {
00152             return mut_;
00153         }
00154 
00155         //- Return the effective turbulent thermal diffusivity
00156         virtual tmp<volScalarField> alphaEff() const
00157         {
00158             return tmp<volScalarField>
00159             (
00160                 new volScalarField("alphaEff", alphat_ + alpha())
00161             );
00162         }
00163 
00164         //- Return the turbulence kinetic energy
00165         virtual tmp<volScalarField> k() const
00166         {
00167             return k_;
00168         }
00169 
00170         //- Return the turbulence kinetic energy dissipation rate
00171         virtual tmp<volScalarField> epsilon() const
00172         {
00173             return epsilon_;
00174         }
00175 
00176         //- Return the Reynolds stress tensor
00177         virtual tmp<volSymmTensorField> R() const
00178         {
00179             return R_;
00180         }
00181 
00182         //- Return the effective stress tensor including the laminar stress
00183         virtual tmp<volSymmTensorField> devRhoReff() const;
00184 
00185         //- Return the source term for the momentum equation
00186         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00187 
00188         //- Solve the turbulence equations and correct the turbulence viscosity
00189         virtual void correct();
00190 
00191         //- Read RASProperties dictionary
00192         virtual bool read();
00193 };
00194 
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 } // End namespace RASModels
00199 } // End namespace compressible
00200 } // End namespace Foam
00201 
00202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00203 
00204 #endif
00205 
00206 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines