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

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-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::incompressible::RASModels::SpalartAllmaras
00026 
00027 Description
00028     Spalart-Allmaras 1-eqn mixing-length model for incompressible external
00029     flows.
00030 
00031     References:
00032     @verbatim
00033         "A One-Equation Turbulence Model for Aerodynamic Flows"
00034         P.R. Spalart,
00035         S.R. Allmaras,
00036         La Recherche Aerospatiale, No. 1, 1994, pp. 5--21.
00037 
00038         Extended according to:
00039 
00040         "An Unstructured Grid Generation and Adaptive Solution Technique
00041         for High Reynolds Number Compressible Flows"
00042         G.A. Ashford,
00043         Ph.D. thesis, University of Michigan, 1996.
00044     @endverbatim
00045 
00046     The default model coefficients correspond to the following:
00047     @verbatim
00048         SpalartAllmarasCoeffs
00049         {
00050             Cb1         0.1355;
00051             Cb2         0.622;
00052             Cw2         0.3;
00053             Cw3         2.0;
00054             Cv1         7.1;
00055             Cv2         5.0;
00056             sigmaNut    0.66666;
00057             kappa       0.41;
00058         }
00059     @endverbatim
00060 
00061 SourceFiles
00062     SpalartAllmaras.C
00063 
00064 \*---------------------------------------------------------------------------*/
00065 
00066 #ifndef SpalartAllmaras_H
00067 #define SpalartAllmaras_H
00068 
00069 #include <incompressibleRASModels/RASModel.H>
00070 #include <finiteVolume/wallDist.H>
00071 
00072 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00073 
00074 namespace Foam
00075 {
00076 namespace incompressible
00077 {
00078 namespace RASModels
00079 {
00080 
00081 /*---------------------------------------------------------------------------*\
00082                            Class SpalartAllmaras Declaration
00083 \*---------------------------------------------------------------------------*/
00084 
00085 class SpalartAllmaras
00086 :
00087     public RASModel
00088 {
00089     // Private data
00090 
00091         // Model coefficients
00092 
00093             dimensionedScalar sigmaNut_;
00094             dimensionedScalar kappa_;
00095 
00096             dimensionedScalar Cb1_;
00097             dimensionedScalar Cb2_;
00098             dimensionedScalar Cw1_;
00099             dimensionedScalar Cw2_;
00100             dimensionedScalar Cw3_;
00101             dimensionedScalar Cv1_;
00102             dimensionedScalar Cv2_;
00103 
00104 
00105         // Fields
00106 
00107             volScalarField nuTilda_;
00108             volScalarField nut_;
00109 
00110             wallDist d_;
00111 
00112 
00113     // Private member functions
00114 
00115         tmp<volScalarField> chi() const;
00116 
00117         tmp<volScalarField> fv1(const volScalarField& chi) const;
00118 
00119         tmp<volScalarField> fv2
00120         (
00121             const volScalarField& chi,
00122             const volScalarField& fv1
00123         ) const;
00124 
00125         tmp<volScalarField> fv3
00126         (
00127             const volScalarField& chi,
00128             const volScalarField& fv1
00129         ) const;
00130 
00131         tmp<volScalarField> fw(const volScalarField& Stilda) const;
00132 
00133 
00134 public:
00135 
00136     //- Runtime type information
00137     TypeName("SpalartAllmaras");
00138 
00139 
00140     // Constructors
00141 
00142         //- Construct from components
00143         SpalartAllmaras
00144         (
00145             const volVectorField& U,
00146             const surfaceScalarField& phi,
00147             transportModel& transport
00148         );
00149 
00150 
00151     //- Destructor
00152     virtual ~SpalartAllmaras()
00153     {}
00154 
00155 
00156     // Member Functions
00157 
00158         //- Return the turbulence viscosity
00159         virtual tmp<volScalarField> nut() const
00160         {
00161             return nut_;
00162         }
00163 
00164         //- Return the effective diffusivity for nuTilda
00165         tmp<volScalarField> DnuTildaEff() const;
00166 
00167         //- Return the turbulence kinetic energy
00168         virtual tmp<volScalarField> k() const;
00169 
00170         //- Return the turbulence kinetic energy dissipation rate
00171         virtual tmp<volScalarField> epsilon() const;
00172 
00173         //- Return the Reynolds stress tensor
00174         virtual tmp<volSymmTensorField> R() const;
00175 
00176         //- Return the effective stress tensor including the laminar stress
00177         virtual tmp<volSymmTensorField> devReff() const;
00178 
00179         //- Return the source term for the momentum equation
00180         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00181 
00182         //- Solve the turbulence equations and correct the turbulence viscosity
00183         virtual void correct();
00184 
00185         //- Read RASProperties dictionary
00186         virtual bool read();
00187 };
00188 
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 } // End namespace RASModels
00193 } // End namespace incompressible
00194 } // End namespace Foam
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines