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

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-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::LRR
00027 
00028 Description
00029     Launder, Reece and Rodi Reynolds-stress turbulence model for
00030     incompressible flows.
00031 
00032     The default model coefficients correspond to the following:
00033     @verbatim
00034         LRRCoeffs
00035         {
00036             Cmu         0.09;
00037             Clrr1       1.8;
00038             Clrr2       0.6;
00039             C1          1.44;
00040             C2          1.92;
00041             Cs          0.25;
00042             Ceps        0.15;
00043             sigmaEps    1.3;
00044             couplingFactor  0.0;    // only for incompressible
00045         }
00046     @endverbatim
00047 
00048 SourceFiles
00049     LRR.C
00050 
00051 \*---------------------------------------------------------------------------*/
00052 
00053 #ifndef LRR_H
00054 #define LRR_H
00055 
00056 #include "RASModel.H"
00057 
00058 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00059 
00060 namespace Foam
00061 {
00062 namespace incompressible
00063 {
00064 namespace RASModels
00065 {
00066 
00067 /*---------------------------------------------------------------------------*\
00068                            Class LRR Declaration
00069 \*---------------------------------------------------------------------------*/
00070 
00071 class LRR
00072 :
00073     public RASModel
00074 {
00075     // Private data
00076 
00077         // Model coefficients
00078 
00079             dimensionedScalar Cmu_;
00080 
00081             dimensionedScalar Clrr1_;
00082             dimensionedScalar Clrr2_;
00083 
00084             dimensionedScalar C1_;
00085             dimensionedScalar C2_;
00086             dimensionedScalar Cs_;
00087             dimensionedScalar Ceps_;
00088             dimensionedScalar sigmaEps_;
00089 
00090             dimensionedScalar couplingFactor_;
00091 
00092 
00093         // Fields
00094 
00095             volSymmTensorField R_;
00096             volScalarField k_;
00097             volScalarField epsilon_;
00098             volScalarField nut_;
00099 
00100 
00101 public:
00102 
00103     //- Runtime type information
00104     TypeName("LRR");
00105 
00106     // Constructors
00107 
00108         //- Construct from components
00109         LRR
00110         (
00111             const volVectorField& U,
00112             const surfaceScalarField& phi,
00113             transportModel& transport
00114         );
00115 
00116 
00117     //- Destructor
00118     virtual ~LRR()
00119     {}
00120 
00121 
00122     // Member Functions
00123 
00124         //- Return the turbulence viscosity
00125         virtual tmp<volScalarField> nut() const
00126         {
00127             return nut_;
00128         }
00129 
00130         //- Return the effective diffusivity for R
00131         tmp<volScalarField> DREff() const
00132         {
00133             return tmp<volScalarField>
00134             (
00135                 new volScalarField("DREff", nut_ + nu())
00136             );
00137         }
00138 
00139         //- Return the effective diffusivity for epsilon
00140         tmp<volScalarField> DepsilonEff() const
00141         {
00142             return tmp<volScalarField>
00143             (
00144                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00145             );
00146         }
00147 
00148         //- Return the turbulence kinetic energy
00149         virtual tmp<volScalarField> k() const
00150         {
00151             return k_;
00152         }
00153 
00154         //- Return the turbulence kinetic energy dissipation rate
00155         virtual tmp<volScalarField> epsilon() const
00156         {
00157             return epsilon_;
00158         }
00159 
00160         //- Return the Reynolds stress tensor
00161         virtual tmp<volSymmTensorField> R() const
00162         {
00163             return R_;
00164         }
00165 
00166         //- Return the effective stress tensor including the laminar stress
00167         virtual tmp<volSymmTensorField> devReff() const;
00168 
00169         //- Return the source term for the momentum equation
00170         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00171 
00172         //- Solve the turbulence equations and correct the turbulence viscosity
00173         virtual void correct();
00174 
00175         //- Read RASProperties dictionary
00176         virtual bool read();
00177 };
00178 
00179 
00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00181 
00182 } // End namespace RASModels
00183 } // End namespace incompressible
00184 } // End namespace Foam
00185 
00186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00187 
00188 #endif
00189 
00190 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd