OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

kOmegaSSTSAS.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) 2008-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::LESmodels::kOmegaSSTSAS
00027 
00028 Description
00029     kOmegaSSTSAS LES turbulence model for incompressible flows
00030 
00031     Note: does not have an explicit dependency on spatial discretisation
00032           i.e. LESdelta not used.
00033 
00034 SourceFiles
00035     kOmegaSSTSAS.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef kOmegaSSTSAS_H
00040 #define kOmegaSSTSAS_H
00041 
00042 #include "LESModel.H"
00043 #include "volFields.H"
00044 #include "wallDist.H"
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 namespace incompressible
00051 {
00052 namespace LESModels
00053 {
00054 
00055 /*---------------------------------------------------------------------------*\
00056                         Class kOmegaSSTSAS Declaration
00057 \*---------------------------------------------------------------------------*/
00058 
00059 class kOmegaSSTSAS
00060 :
00061     public LESModel
00062 {
00063     // Private member functions
00064 
00065         //- Update sub-grid scale fields
00066         void updateSubGridScaleFields(const volScalarField& D);
00067 
00068         // Disallow default bitwise copy construct and assignment
00069         kOmegaSSTSAS(const kOmegaSSTSAS&);
00070         kOmegaSSTSAS& operator=(const kOmegaSSTSAS&);
00071 
00072 
00073 protected:
00074 
00075     // Protected data
00076 
00077         // Model constants
00078 
00079             dimensionedScalar alphaK1_;
00080             dimensionedScalar alphaK2_;
00081 
00082             dimensionedScalar alphaOmega1_;
00083             dimensionedScalar alphaOmega2_;
00084 
00085             dimensionedScalar gamma1_;
00086             dimensionedScalar gamma2_;
00087 
00088             dimensionedScalar beta1_;
00089             dimensionedScalar beta2_;
00090 
00091             dimensionedScalar betaStar_;
00092 
00093             dimensionedScalar a1_;
00094             dimensionedScalar c1_;
00095 
00096             dimensionedScalar alphaPhi_;
00097             dimensionedScalar zetaTilda2_;
00098             dimensionedScalar FSAS_;
00099 
00100             dimensionedScalar omega0_;
00101             dimensionedScalar omegaSmall_;
00102 
00103             wallDist y_;
00104             dimensionedScalar Cmu_;
00105             dimensionedScalar kappa_;
00106 
00107 
00108         // Fields
00109 
00110             volScalarField k_;
00111             volScalarField omega_;
00112             volScalarField nuSgs_;
00113 
00114 
00115     // Protected member functions
00116 
00117         tmp<volScalarField> Lvk2
00118         (
00119             const volScalarField& S2
00120         ) const;
00121 
00122         tmp<volScalarField> F1(const volScalarField& CDkOmega) const;
00123         tmp<volScalarField> F2() const;
00124 
00125         tmp<volScalarField> blend
00126         (
00127             const volScalarField& F1,
00128             const dimensionedScalar& psi1,
00129             const dimensionedScalar& psi2
00130         ) const
00131         {
00132             return F1*(psi1 - psi2) + psi2;
00133         }
00134 
00135         tmp<volScalarField> alphaK
00136         (
00137             const volScalarField& F1
00138         ) const
00139         {
00140             return blend(F1, alphaK1_, alphaK2_);
00141         }
00142 
00143         tmp<volScalarField> alphaOmega
00144         (
00145              const volScalarField& F1
00146         ) const
00147         {
00148             return blend(F1, alphaOmega1_, alphaOmega2_);
00149         }
00150 
00151         tmp<volScalarField> beta
00152         (
00153             const volScalarField& F1
00154         ) const
00155         {
00156             return blend(F1, beta1_, beta2_);
00157         }
00158 
00159         tmp<volScalarField> gamma
00160         (
00161             const volScalarField& F1
00162         ) const
00163         {
00164             return blend(F1, gamma1_, gamma2_);
00165         }
00166 
00167 
00168 public:
00169 
00170     //- Runtime type information
00171     TypeName("kOmegaSSTSAS");
00172 
00173 
00174     // Constructors
00175 
00176         //- Construct from components
00177         kOmegaSSTSAS
00178         (
00179             const volVectorField& U,
00180             const surfaceScalarField& phi,
00181             transportModel& transport,
00182             const word& modelName = typeName
00183         );
00184 
00185 
00186     //- Destructor
00187     virtual ~kOmegaSSTSAS()
00188     {}
00189 
00190 
00191     // Member Functions
00192 
00193         //- Return SGS kinetic energy
00194         virtual tmp<volScalarField> k() const
00195         {
00196             return k_;
00197         }
00198 
00199         //- Return omega
00200         virtual tmp<volScalarField> omega() const
00201         {
00202             return omega_;
00203         }
00204 
00205         //- Return the effective diffusivity for k
00206         tmp<volScalarField> DkEff(const volScalarField& F1) const
00207         {
00208             return tmp<volScalarField>
00209             (
00210                  new volScalarField("DkEff", alphaK(F1)*nuSgs_ + nu())
00211             );
00212         }
00213 
00214         //- Return the effective diffusivity for omega
00215         tmp<volScalarField> DomegaEff(const volScalarField& F1) const
00216         {
00217             return tmp<volScalarField>
00218             (
00219                 new volScalarField("DomegaEff", alphaOmega(F1)*nuSgs_ + nu())
00220             );
00221         }
00222 
00223         //- Return sub-grid disipation rate
00224         virtual tmp<volScalarField> epsilon() const;
00225 
00226         //- Return SGS viscosity
00227         virtual tmp<volScalarField> nuSgs() const
00228         {
00229             return nuSgs_;
00230         }
00231 
00232         //- Return the sub-grid stress tensor.
00233         virtual tmp<volSymmTensorField> B() const;
00234 
00235         //- Return the effective sub-grid turbulence stress tensor
00236         //  including the laminar stress
00237         virtual tmp<volSymmTensorField> devBeff() const;
00238 
00239         //- Return the deviatoric part of the divergence of Beff
00240         //  i.e. the additional term in the filtered NSE.
00241         virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
00242 
00243         //- Solve the turbulence equations (k-w) and correct the turbulence
00244         //  viscosity
00245         virtual void correct(const tmp<volTensorField>& gradU);
00246 
00247         //- Read LESProperties dictionary
00248         virtual bool read();
00249 };
00250 
00251 
00252 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00253 
00254 } // End namespace LESModels
00255 } // End namespace incompressible
00256 } // End namespace Foam
00257 
00258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00259 
00260 #endif
00261 
00262 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd