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 compressiblekOmegaSST_H
00061 #define compressiblekOmegaSST_H
00062 
00063 #include "turbulenceModel.H"
00064 #include "wallDist.H"
00065 
00066 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00067 
00068 namespace Foam
00069 {
00070 namespace compressible
00071 {
00072 namespace turbulenceModels
00073 {
00074 
00075 /*---------------------------------------------------------------------------*\
00076                            Class kOmega Declaration
00077 \*---------------------------------------------------------------------------*/
00078 
00079 class kOmegaSST
00080 :
00081     public turbulenceModel
00082 {
00083     // Private data
00084 
00085         dimensionedScalar alphaK1;
00086         dimensionedScalar alphaK2;
00087 
00088         dimensionedScalar alphaOmega1;
00089         dimensionedScalar alphaOmega2;
00090 
00091         dimensionedScalar alphah;
00092 
00093         dimensionedScalar gamma1;
00094         dimensionedScalar gamma2;
00095 
00096         dimensionedScalar beta1;
00097         dimensionedScalar beta2;
00098 
00099         dimensionedScalar betaStar;
00100 
00101         dimensionedScalar a1;
00102         dimensionedScalar c1;
00103 
00104         dimensionedScalar omega0_;
00105         dimensionedScalar omegaSmall_;
00106 
00107         dimensionedScalar Cmu;
00108 
00109         wallDist y_;
00110 
00111         volScalarField k_;
00112         volScalarField omega_;
00113         volScalarField mut_;
00114 
00115 
00116     // Private member functions
00117 
00118         tmp<volScalarField> F1(const volScalarField& CDkOmega) const;
00119         tmp<volScalarField> F2() const;
00120 
00121         tmp<volScalarField> blend
00122         (
00123             const volScalarField& F1,
00124             const dimensionedScalar& psi1,
00125             const dimensionedScalar& psi2
00126         ) const
00127         {
00128             return F1*(psi1 - psi2) + psi2;
00129         }
00130 
00131         tmp<volScalarField> alphaK
00132         (
00133             const volScalarField& F1
00134         ) const
00135         {
00136             return blend(F1, alphaK1, alphaK2);
00137         }
00138 
00139         tmp<volScalarField> alphaOmega
00140         (
00141             const volScalarField& F1
00142         ) const
00143         {
00144             return blend(F1, alphaOmega1, alphaOmega2);
00145         }
00146 
00147         tmp<volScalarField> beta
00148         (
00149             const volScalarField& F1
00150         ) const
00151         {
00152             return blend(F1, beta1, beta2);
00153         }
00154 
00155         tmp<volScalarField> gamma
00156         (
00157             const volScalarField& F1
00158         ) const
00159         {
00160             return blend(F1, gamma1, gamma2);
00161         }
00162 
00163 
00164 public:
00165 
00166     //- Runtime type information
00167     TypeName("kOmegaSST");
00168 
00169 
00170     // Constructors
00171 
00172         //- Construct from components
00173         kOmegaSST
00174         (
00175             const volScalarField& rho,
00176             const volVectorField& U,
00177             const surfaceScalarField& phi,
00178             basicThermo& thermophysicalModel
00179         );
00180 
00181 
00182     // Destructor
00183 
00184         ~kOmegaSST()
00185         {}
00186 
00187 
00188     // Member Functions
00189 
00190         tmp<volScalarField> mut() const
00191         {
00192             return mut_;
00193         }
00194 
00195         //- Return the effective diffusivity for k
00196         tmp<volScalarField> DkEff(const volScalarField& F1) const
00197         {
00198             return tmp<volScalarField> 
00199             (
00200                 new volScalarField("DkEff", alphaK(F1)*mut_ + mu())
00201             );
00202         }
00203 
00204         //- Return the effective diffusivity for omega
00205         tmp<volScalarField> DomegaEff(const volScalarField& F1) const
00206         {
00207             return tmp<volScalarField> 
00208             (
00209                 new volScalarField("DomegaEff", alphaOmega(F1)*mut_ + mu())
00210             );
00211         }
00212 
00213         //- Return the effective turbulent thermal diffusivity
00214         tmp<volScalarField> alphaEff() const
00215         {
00216             return tmp<volScalarField> 
00217             (
00218                 new volScalarField("alphaEff", alphah*mut_ + alpha())
00219             );
00220         }
00221 
00222         tmp<volScalarField> k() const
00223         {
00224             return k_;
00225         }
00226 
00227         tmp<volScalarField> omega() const
00228         {
00229             return omega_;
00230         }
00231 
00232         tmp<volScalarField> epsilon() const
00233         {
00234             return betaStar*k_*omega_;
00235         }
00236 
00237         tmp<volSymmTensorField> R() const;
00238 
00239         tmp<fvVectorMatrix> divRhoR(volVectorField& U) const;
00240 
00241         void correct();
00242 
00243         //- Read turbulenceProperties dictionary
00244         bool read();
00245 };
00246 
00247 
00248 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00249 
00250 } // End namespace turbulenceModels
00251 } // End namespace compressible
00252 } // End namespace Foam
00253 
00254 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00255 
00256 #endif
00257 
00258 // ************************************************************************* //
Copyright © 2000-2007 OpenCFD Ltd