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