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

kOmegaSST.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     kOmegaSST
00027 
00028 Description
00029     Implementation of the k-omega-SST turbulence model as described in
00030 
00031     Menter, F., Esch, T.
00032     "Elements of Industrial Heat Transfer Prediction"
00033     16th Brazilian Congress of Mechanical Engineering (COBEM),
00034     Nov. 2001
00035 
00036     Note that this implementation is written in terms of alpha diffusion
00037     coefficients rather than the more traditional sigma (alpha = 1/sigma) so
00038     that the blending can be applied to all coefficuients in a consistent
00039     manner.  The paper suggests that sigma is blended but this woulf not be 
00040     consistent with the blending of the k-epsilon and k-omega models.
00041 
00042     Also note that the error in the last term of equation (2) relating to
00043     sigma has been corrected.
00044 
00045     Wall-functions aer applied in this implementation by using equations (14)
00046     to specify the near-wall omega as appropriate.
00047 
00048     The blending functions (15) and (16) are not currently used because of the
00049     uncertainty in their origin, range of applicability and that is y+ becomes
00050     sufficiently small blending u_tau in this manner clearly becomes nonsense.
00051 
00052 SourceFiles
00053     kOmegaSST.C
00054     kOmegaWallFunctionsI.H
00055     kOmegaWallViscosityI.H
00056     wallOmegaI.H
00057 
00058 \*---------------------------------------------------------------------------*/
00059 
00060 #ifndef kOmegaSST_H
00061 #define kOmegaSST_H
00062 
00063 #include "turbulenceModel.H"
00064 #include "wallDist.H"
00065 
00066 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00067 
00068 namespace Foam
00069 {
00070 namespace turbulenceModels
00071 {
00072 
00073 /*---------------------------------------------------------------------------*\
00074                            Class kOmega Declaration
00075 \*---------------------------------------------------------------------------*/
00076 
00077 class kOmegaSST
00078 :
00079     public turbulenceModel
00080 {
00081     // Private data
00082 
00083         dimensionedScalar alphaK1;
00084         dimensionedScalar alphaK2;
00085 
00086         dimensionedScalar alphaOmega1;
00087         dimensionedScalar alphaOmega2;
00088 
00089         dimensionedScalar gamma1;
00090         dimensionedScalar gamma2;
00091 
00092         dimensionedScalar beta1;
00093         dimensionedScalar beta2;
00094 
00095         dimensionedScalar betaStar;
00096 
00097         dimensionedScalar a1;
00098         dimensionedScalar c1;
00099 
00100         dimensionedScalar omega0_;
00101         dimensionedScalar omegaSmall_;
00102 
00103         dimensionedScalar Cmu;
00104 
00105         wallDist y_;
00106 
00107         volScalarField k_;
00108         volScalarField omega_;
00109         volScalarField nut_;
00110 
00111 
00112     // Private member functions
00113 
00114         tmp<volScalarField> F1(const volScalarField& CDkOmega) const;
00115         tmp<volScalarField> F2() const;
00116 
00117         tmp<volScalarField> blend
00118         (
00119             const volScalarField& F1,
00120             const dimensionedScalar& psi1,
00121             const dimensionedScalar& psi2
00122         ) const
00123         {
00124             return F1*(psi1 - psi2) + psi2;
00125         }
00126 
00127         tmp<volScalarField> alphaK
00128         (
00129             const volScalarField& F1
00130         ) const
00131         {
00132             return blend(F1, alphaK1, alphaK2);
00133         }
00134 
00135         tmp<volScalarField> alphaOmega
00136         (
00137             const volScalarField& F1
00138         ) const
00139         {
00140             return blend(F1, alphaOmega1, alphaOmega2);
00141         }
00142 
00143         tmp<volScalarField> beta
00144         (
00145             const volScalarField& F1
00146         ) const
00147         {
00148             return blend(F1, beta1, beta2);
00149         }
00150 
00151         tmp<volScalarField> gamma
00152         (
00153             const volScalarField& F1
00154         ) const
00155         {
00156             return blend(F1, gamma1, gamma2);
00157         }
00158 
00159 
00160 public:
00161 
00162     //- Runtime type information
00163     TypeName("kOmegaSST");
00164 
00165 
00166     // Constructors
00167 
00168         //- Construct from components
00169         kOmegaSST
00170         (
00171             const volVectorField& U,
00172             const surfaceScalarField& phi,
00173             transportModel& transport
00174         );
00175 
00176 
00177     // Destructor
00178 
00179         ~kOmegaSST()
00180         {}
00181 
00182 
00183     // Member Functions
00184 
00185         tmp<volScalarField> nut() const
00186         {
00187             return nut_;
00188         }
00189 
00190         //- Return the effective diffusivity for k
00191         tmp<volScalarField> DkEff(const volScalarField& F1) const
00192         {
00193             return tmp<volScalarField> 
00194             (
00195                 new volScalarField("DkEff", alphaK(F1)*nut_ + nu())
00196             );
00197         }
00198 
00199         //- Return the effective diffusivity for omega
00200         tmp<volScalarField> DomegaEff(const volScalarField& F1) const
00201         {
00202             return tmp<volScalarField> 
00203             (
00204                 new volScalarField("DomegaEff", alphaOmega(F1)*nut_ + nu())
00205             );
00206         }
00207 
00208         tmp<volScalarField> k() const
00209         {
00210             return k_;
00211         }
00212 
00213         tmp<volScalarField> omega() const
00214         {
00215             return omega_;
00216         }
00217 
00218         tmp<volScalarField> epsilon() const
00219         {
00220             return betaStar*k_*omega_;
00221         }
00222 
00223         tmp<volSymmTensorField> R() const;
00224 
00225         tmp<fvVectorMatrix> divR(volVectorField& U) const;
00226 
00227         void correct();
00228 
00229         //- Read turbulenceProperties dictionary
00230         bool read();
00231 };
00232 
00233 
00234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00235 
00236 } // End namespace turbulenceModels
00237 } // End namespace Foam
00238 
00239 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00240 
00241 #endif
00242 
00243 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd