OpenFOAM logo
Open Source CFD Toolkit

SpalartAllmaras.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-2005 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     SpalartAllmaras
00027 
00028 Description
00029 
00030 SourceFiles
00031     SpalartAllmaras.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef compressibleSpalartAllmaras_H
00036 #define compressibleSpalartAllmaras_H
00037 
00038 #include "LESmodel.H"
00039 #include "volFields.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 namespace compressible
00046 {
00047 namespace LESmodels
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                            Class SpalartAllmaras Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class SpalartAllmaras
00055 :
00056     public LESmodel
00057 {
00058     // Private data
00059 
00060         dimensionedScalar alphaNut_;
00061 
00062         dimensionedScalar Cb1_;
00063         dimensionedScalar Cb2_;
00064         dimensionedScalar Cv1_;
00065         dimensionedScalar CDES_;
00066         dimensionedScalar ck_;
00067         dimensionedScalar kappa_;
00068         dimensionedScalar Cw1_;
00069         dimensionedScalar Cw2_;
00070         dimensionedScalar Cw3_;
00071 
00072 
00073     // Private member functions
00074 
00075         tmp<volScalarField> fv1() const;
00076         tmp<volScalarField> fv2() const;
00077         tmp<volScalarField> fw(const volScalarField& Stilda) const;
00078 
00079         // Disallow default bitwise copy construct and assignment
00080         SpalartAllmaras(const SpalartAllmaras&);
00081         SpalartAllmaras& operator=(const SpalartAllmaras&);       
00082 
00083         volScalarField nuTilda_;
00084         volScalarField dTilda_;
00085         volScalarField muSgs_;
00086 
00087 public:
00088 
00089     //- Runtime type information
00090     TypeName("SpalartAllmaras");
00091 
00092 
00093     // Constructors
00094 
00095         //- Constructor from components
00096         SpalartAllmaras
00097         (
00098             const volScalarField& rho,
00099             const volVectorField& U,
00100             const surfaceScalarField& phi,
00101             const basicThermo& thermoPhysicalModel
00102         );
00103 
00104 
00105     // Destructor
00106 
00107         ~SpalartAllmaras()
00108         {}
00109 
00110 
00111     // Member Functions
00112 
00113         //- Evaluate B. This is done on the fly : its not usually necessary,
00114         //  but will be if we want to compare with experiments or DNS
00115         tmp<volTensorField> B() const;
00116         
00117         //- Return SGS kinetic energy
00118         tmp<volScalarField> k() const
00119         {
00120             return sqr(muSgs()/rho()/ck_/dTilda_);
00121         }
00122 
00123         //- Return sub-grid disipation rate
00124         tmp<volScalarField> epsilon() const;
00125 
00126         tmp<volScalarField> nuTilda() const
00127         {
00128             return nuTilda_;
00129         }
00130 
00131         //- Return SGS viscosity
00132         tmp<volScalarField> muSgs() const
00133         {
00134             return muSgs_;
00135         }       
00136 
00137         //- Return thermal conductivity
00138         virtual tmp<volScalarField> alphaEff() const
00139         {
00140             return tmp<volScalarField>
00141             (
00142                 new volScalarField("alphaEff", muSgs_ + alpha())
00143             );
00144         }
00145 
00146         //- Returns divergence of B : i.e. the additional term in the
00147         //  filtered NSE.
00148         tmp<fvVectorMatrix> divRhoB(volVectorField& U) const;
00149 
00150         //- Correct nuTilda and related properties
00151         void correct(const tmp<volTensorField>& gradU);
00152 
00153         //- Read turbulenceProperties dictionary
00154         bool read();
00155 };
00156 
00157 
00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00159 
00160 } // End namespace LESmodels
00161 } // End namespace compressible
00162 } // End namespace Foam
00163 
00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00165 
00166 #endif
00167 
00168 // ************************************************************************* //
For further information go to www.openfoam.org