OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide 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-2009 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     Foam::compressible::RASModels::kOmegaSST
00027 
00028 Description
00029     Implementation of the k-omega-SST turbulence model for compressible flows.
00030 
00031     Turbulence model described in:
00032     @verbatim
00033         Menter, F., Esch, T.
00034         "Elements of Industrial Heat Transfer Prediction"
00035         16th Brazilian Congress of Mechanical Engineering (COBEM),
00036         Nov. 2001
00037     @endverbatim
00038 
00039     Note that this implementation is written in terms of alpha diffusion
00040     coefficients rather than the more traditional sigma (alpha = 1/sigma) so
00041     that the blending can be applied to all coefficuients in a consistent
00042     manner.  The paper suggests that sigma is blended but this would not be
00043     consistent with the blending of the k-epsilon and k-omega models.
00044 
00045     Also note that the error in the last term of equation (2) relating to
00046     sigma has been corrected.
00047 
00048     Wall-functions are applied in this implementation by using equations (14)
00049     to specify the near-wall omega as appropriate.
00050 
00051     The blending functions (15) and (16) are not currently used because of the
00052     uncertainty in their origin, range of applicability and that is y+ becomes
00053     sufficiently small blending u_tau in this manner clearly becomes nonsense.
00054 
00055     The default model coefficients correspond to the following:
00056     @verbatim
00057         kOmegaSSTCoeffs
00058         {
00059             alphaK1     0.85034;
00060             alphaK2     1.0;
00061             alphaOmega1 0.5;
00062             alphaOmega2 0.85616;
00063             Prt         1.0;    // only for compressible
00064             beta1       0.075;
00065             beta2       0.0828;
00066             betaStar    0.09;
00067             gamma1      0.5532;
00068             gamma2      0.4403;
00069             a1          0.31;
00070             c1          10.0;
00071         }
00072     @endverbatim
00073 
00074 SourceFiles
00075     kOmegaSST.C
00076     kOmegaWallFunctionsI.H
00077     kOmegaWallViscosityI.H
00078     wallOmegaI.H
00079 
00080 \*---------------------------------------------------------------------------*/
00081 
00082 #ifndef compressiblekOmegaSST_H
00083 #define compressiblekOmegaSST_H
00084 
00085 #include "RASModel.H"
00086 #include "wallDist.H"
00087 
00088 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00089 
00090 namespace Foam
00091 {
00092 namespace compressible
00093 {
00094 namespace RASModels
00095 {
00096 
00097 /*---------------------------------------------------------------------------*\
00098                           Class kOmegaSST Declaration
00099 \*---------------------------------------------------------------------------*/
00100 
00101 class kOmegaSST
00102 :
00103     public RASModel
00104 {
00105     // Private data
00106 
00107         // Model coefficients
00108 
00109             dimensionedScalar alphaK1_;
00110             dimensionedScalar alphaK2_;
00111 
00112             dimensionedScalar alphaOmega1_;
00113             dimensionedScalar alphaOmega2_;
00114 
00115             dimensionedScalar Prt_;
00116 
00117             dimensionedScalar gamma1_;
00118             dimensionedScalar gamma2_;
00119 
00120             dimensionedScalar beta1_;
00121             dimensionedScalar beta2_;
00122 
00123             dimensionedScalar betaStar_;
00124 
00125             dimensionedScalar a1_;
00126             dimensionedScalar c1_;
00127 
00128 
00129         //- Wall distance
00130         //  Note: different to wall distance in parent RASModel
00131         wallDist y_;
00132 
00133         // Fields
00134 
00135             volScalarField k_;
00136             volScalarField omega_;
00137             volScalarField mut_;
00138             volScalarField alphat_;
00139 
00140 
00141     // Private member functions
00142 
00143         tmp<volScalarField> F1(const volScalarField& CDkOmega) const;
00144         tmp<volScalarField> F2() const;
00145 
00146         tmp<volScalarField> blend
00147         (
00148             const volScalarField& F1,
00149             const dimensionedScalar& psi1,
00150             const dimensionedScalar& psi2
00151         ) const
00152         {
00153             return F1*(psi1 - psi2) + psi2;
00154         }
00155 
00156         tmp<volScalarField> alphaK(const volScalarField& F1) const
00157         {
00158             return blend(F1, alphaK1_, alphaK2_);
00159         }
00160 
00161         tmp<volScalarField> alphaOmega(const volScalarField& F1) const
00162         {
00163             return blend(F1, alphaOmega1_, alphaOmega2_);
00164         }
00165 
00166         tmp<volScalarField> beta(const volScalarField& F1) const
00167         {
00168             return blend(F1, beta1_, beta2_);
00169         }
00170 
00171         tmp<volScalarField> gamma(const volScalarField& F1) const
00172         {
00173             return blend(F1, gamma1_, gamma2_);
00174         }
00175 
00176 
00177 public:
00178 
00179     //- Runtime type information
00180     TypeName("kOmegaSST");
00181 
00182 
00183     // Constructors
00184 
00185         //- Construct from components
00186         kOmegaSST
00187         (
00188             const volScalarField& rho,
00189             const volVectorField& U,
00190             const surfaceScalarField& phi,
00191             const basicThermo& thermophysicalModel
00192         );
00193 
00194 
00195     //- Destructor
00196     virtual ~kOmegaSST()
00197     {}
00198 
00199 
00200     // Member Functions
00201 
00202         //- Return the effective diffusivity for k
00203         tmp<volScalarField> DkEff(const volScalarField& F1) const
00204         {
00205             return tmp<volScalarField>
00206             (
00207                 new volScalarField("DkEff", alphaK(F1)*mut_ + mu())
00208             );
00209         }
00210 
00211         //- Return the effective diffusivity for omega
00212         tmp<volScalarField> DomegaEff(const volScalarField& F1) const
00213         {
00214             return tmp<volScalarField>
00215             (
00216                 new volScalarField("DomegaEff", alphaOmega(F1)*mut_ + mu())
00217             );
00218         }
00219 
00220         virtual tmp<volScalarField> mut() const
00221         {
00222             return mut_;
00223         }
00224 
00225         //- Return the effective turbulent thermal diffusivity
00226         virtual tmp<volScalarField> alphaEff() const
00227         {
00228             return tmp<volScalarField>
00229             (
00230                 new volScalarField("alphaEff", alphat_ + alpha())
00231             );
00232         }
00233 
00234         //- Return the turbulence kinetic energy
00235         virtual tmp<volScalarField> k() const
00236         {
00237             return k_;
00238         }
00239 
00240         virtual tmp<volScalarField> omega() const
00241         {
00242             return omega_;
00243         }
00244 
00245         //- Return the turbulence kinetic energy dissipation rate
00246         virtual tmp<volScalarField> epsilon() const
00247         {
00248             return tmp<volScalarField>
00249             (
00250                 new volScalarField
00251                 (
00252                     IOobject
00253                     (
00254                         "epsilon",
00255                         mesh_.time().timeName(),
00256                         mesh_
00257                     ),
00258                     betaStar_*k_*omega_,
00259                     omega_.boundaryField().types()
00260                 )
00261             );
00262         }
00263 
00264         //- Return the Reynolds stress tensor
00265         virtual tmp<volSymmTensorField> R() const;
00266 
00267         //- Return the effective stress tensor including the laminar stress
00268         virtual tmp<volSymmTensorField> devRhoReff() const;
00269 
00270         //- Return the source term for the momentum equation
00271         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00272 
00273         //- Solve the turbulence equations and correct the turbulence viscosity
00274         virtual void correct();
00275 
00276         //- Read RASProperties dictionary
00277         virtual bool read();
00278 };
00279 
00280 
00281 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00282 
00283 } // End namespace RASModels
00284 } // End namespace compressible
00285 } // End namespace Foam
00286 
00287 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00288 
00289 #endif
00290 
00291 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd