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     Spalart-Allmaras 1-eqn mixing-length model for external flows.
00030 
00031     "A One-Equation Turbulence Model for Aerodynamic Flows"
00032     P.R. Spalart,
00033     S.R. Allmaras
00034     Boeing Commercial Airplane Group
00035     P.O. Box 3707, MS 7H-96
00036     Seattle, WA 98124-2207
00037     USA.
00038 
00039 SourceFiles
00040     SpalartAllmaras.C
00041     SpalartAllmarasCorrect.C
00042 
00043 \*---------------------------------------------------------------------------*/
00044 
00045 #ifndef SpalartAllmaras_H
00046 #define SpalartAllmaras_H
00047 
00048 #include "turbulenceModel.H"
00049 #include "wallDist.H"
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 namespace turbulenceModels
00056 {
00057 
00058 /*---------------------------------------------------------------------------*\
00059                            Class SpalartAllmaras Declaration
00060 \*---------------------------------------------------------------------------*/
00061 
00062 class SpalartAllmaras
00063 :
00064     public turbulenceModel
00065 {
00066     // Private data
00067 
00068         dimensionedScalar alphaNut;
00069 
00070         dimensionedScalar Cb1;
00071         dimensionedScalar Cb2;
00072         dimensionedScalar Cw1;
00073         dimensionedScalar Cw2;
00074         dimensionedScalar Cw3;
00075         dimensionedScalar Cv1;
00076         dimensionedScalar Cv2;
00077 
00078         volScalarField nuTilda_;
00079         volScalarField nut_;
00080 
00081         wallDist d_;
00082 
00083 
00084     // Private member functions
00085 
00086         tmp<volScalarField> fv1() const;
00087         tmp<volScalarField> fv2() const;
00088         tmp<volScalarField> fv3() const;
00089         tmp<volScalarField> fw(const volScalarField& Stilda) const;
00090 
00091 
00092 public:
00093 
00094     //- Runtime type information
00095     TypeName("SpalartAllmaras");
00096 
00097 
00098     // Constructors
00099 
00100         //- from components
00101         SpalartAllmaras
00102         (
00103             const volVectorField& U,
00104             const surfaceScalarField& phi,
00105             transportModel& transport
00106         );
00107 
00108 
00109     // Destructor
00110 
00111         ~SpalartAllmaras()
00112         {}
00113 
00114 
00115     // Member Functions
00116 
00117         tmp<volScalarField> nut() const
00118         {
00119             return nut_;
00120         }
00121 
00122         //- Return the effective diffusivity for nuTilda
00123         tmp<volScalarField> DnuTildaEff() const
00124         {
00125             return tmp<volScalarField> 
00126             (
00127                 new volScalarField("DnuTildaEff", alphaNut*nuTilda_ + nu())
00128             );
00129         }
00130 
00131         tmp<volScalarField> k() const
00132         {
00133             return tmp<volScalarField> 
00134             (
00135                 new volScalarField
00136                 (
00137                     IOobject
00138                     (
00139                         "k",
00140                         runTime_.timeName(),
00141                         mesh_
00142                     ),
00143                     mesh_,
00144                     dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
00145                 )
00146             );
00147         }
00148 
00149         tmp<volScalarField> epsilon() const
00150         {
00151             return tmp<volScalarField> 
00152             (
00153                 new volScalarField
00154                 (
00155                     IOobject
00156                     (
00157                         "epslion",
00158                         runTime_.timeName(),
00159                         mesh_
00160                     ),
00161                     mesh_,
00162                     dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
00163                 )
00164             );
00165         }
00166 
00167         tmp<volTensorField> R() const;
00168 
00169         tmp<fvVectorMatrix> divR(volVectorField& U) const;
00170 
00171         void correct();
00172 
00173         //- Read turbulenceProperties dictionary
00174         bool read();
00175 };
00176 
00177 
00178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00179 
00180 } // End namespace turbulenceModels
00181 } // End namespace Foam
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 #endif
00186 
00187 // ************************************************************************* //
For further information go to www.openfoam.org