OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

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-2007 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> chi() const;
00087         tmp<volScalarField> fv1(const volScalarField& chi) const;
00088         tmp<volScalarField> fv2
00089         (
00090             const volScalarField& chi,
00091             const volScalarField& fv1
00092         ) const;
00093         tmp<volScalarField> fv3
00094         (
00095             const volScalarField& chi,
00096             const volScalarField& fv1
00097         ) const;
00098         tmp<volScalarField> fw(const volScalarField& Stilda) const;
00099 
00100 
00101 public:
00102 
00103     //- Runtime type information
00104     TypeName("SpalartAllmaras");
00105 
00106 
00107     // Constructors
00108 
00109         //- from components
00110         SpalartAllmaras
00111         (
00112             const volVectorField& U,
00113             const surfaceScalarField& phi,
00114             transportModel& transport
00115         );
00116 
00117 
00118     // Destructor
00119 
00120         ~SpalartAllmaras()
00121         {}
00122 
00123 
00124     // Member Functions
00125 
00126         tmp<volScalarField> nut() const
00127         {
00128             return nut_;
00129         }
00130 
00131         //- Return the effective diffusivity for nuTilda
00132         tmp<volScalarField> DnuTildaEff() const
00133         {
00134             return tmp<volScalarField> 
00135             (
00136                 new volScalarField("DnuTildaEff", alphaNut*nuTilda_ + nu())
00137             );
00138         }
00139 
00140         tmp<volScalarField> k() const
00141         {
00142             return tmp<volScalarField> 
00143             (
00144                 new volScalarField
00145                 (
00146                     IOobject
00147                     (
00148                         "k",
00149                         runTime_.timeName(),
00150                         mesh_
00151                     ),
00152                     mesh_,
00153                     dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
00154                 )
00155             );
00156         }
00157 
00158         tmp<volScalarField> epsilon() const
00159         {
00160             return tmp<volScalarField> 
00161             (
00162                 new volScalarField
00163                 (
00164                     IOobject
00165                     (
00166                         "epslion",
00167                         runTime_.timeName(),
00168                         mesh_
00169                     ),
00170                     mesh_,
00171                     dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
00172                 )
00173             );
00174         }
00175 
00176         tmp<volSymmTensorField> R() const;
00177 
00178         tmp<fvVectorMatrix> divR(volVectorField& U) const;
00179 
00180         void correct();
00181 
00182         //- Read turbulenceProperties dictionary
00183         bool read();
00184 };
00185 
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 } // End namespace turbulenceModels
00190 } // End namespace Foam
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 #endif
00195 
00196 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd