OpenFOAM logo
Open Source CFD Toolkit

mixedSmagorinsky.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-2005 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     mixedSmagorinsky
00027 
00028 Description
00029 <pre>
00030       The mixed Isochoric Smagorinsky Model
00031       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00032       The mixed model is a linear combination of an eddy viscosity model
00033       (Smagorinsky) with a scale similarity model.  Hence
00034 
00035           B = (L + C) + R = (F(v*v) - F(v)*F(v)) + R
00036 
00037       The algebraic eddy viscosity SGS model is founded on the assumption
00038       that local equilibrium prevails, hence
00039 
00040           R = 2/3*k*I - 2*nuEff*dev(D)
00041 
00042       where
00043 
00044           k = cI*delta^2*||D||^2
00045           nuEff = ck*sqrt(k)*delta + nu
00046 
00047       The Leonard and cross contributions are incorporated
00048       by adding,
00049 
00050          + div(((filter(U*U) - filter(U)*filter(U)) -
00051            0.333*I*tr(filter(U*U) - filter(U)*filter(U))))
00052          + div((filter(U*epsilon) - filter(U)*filter(epsilon)))
00053 
00054       to the rhs. of the equations.
00055 </pre>
00056 
00057 SourceFiles
00058     mixedSmagorinsky.C
00059 
00060 \*---------------------------------------------------------------------------*/
00061 
00062 #ifndef mixedSmagorinsky_H
00063 #define mixedSmagorinsky_H
00064 
00065 #include "scaleSimilarity.H"
00066 #include "Smagorinsky.H"
00067 
00068 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00069 
00070 namespace Foam
00071 {
00072 namespace LESmodels
00073 {
00074 
00075 /*---------------------------------------------------------------------------*\
00076                            Class mixedSmagorinsky Declaration
00077 \*---------------------------------------------------------------------------*/
00078 
00079 class mixedSmagorinsky
00080 :
00081     public scaleSimilarity,
00082     public Smagorinsky
00083 {
00084     // Private Member Functions
00085 
00086         // Disallow default bitwise copy construct and assignment
00087         mixedSmagorinsky(const mixedSmagorinsky&);
00088         mixedSmagorinsky& operator=(const mixedSmagorinsky&);
00089 
00090 public:
00091 
00092     //- Runtime type information
00093     TypeName("mixedSmagorinsky");
00094 
00095 
00096     // Constructors
00097 
00098         //- Constructor from components
00099         mixedSmagorinsky
00100         (
00101             const volVectorField& U,
00102             const surfaceScalarField& phi,
00103             transportModel& transport
00104         );
00105 
00106 
00107     // Destructor
00108 
00109         ~mixedSmagorinsky()
00110         {}
00111 
00112 
00113     // Member Functions
00114 
00115         //- Return B.
00116         tmp<volTensorField> B() const;
00117 
00118         //- Return the SGS turbulent kinetic energy.
00119         tmp<volScalarField> k() const;
00120 
00121         //- Return the SGS turbulent disipation rate.
00122         tmp<volScalarField> epsilon() const;
00123 
00124         //- Return the SGS viscosity.
00125         tmp<volScalarField> nuSgs() const
00126         {
00127             return nuSgs_;
00128         }
00129 
00130         //- Implementation of div(B). This is necessary to override
00131         // (and include) the div(B) terms from both the parent classes.
00132         tmp<fvVectorMatrix> divB(volVectorField& U) const;
00133 
00134         //- Correct Eddy-Viscosity and related properties
00135         void correct(const tmp<volTensorField>& gradU);
00136 
00137         //- Read turbulenceProperties dictionary
00138         bool read();
00139 };
00140 
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 } // End namespace LESmodels
00145 } // End namespace Foam
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 #endif
00150 
00151 // ************************************************************************* //
For further information go to www.openfoam.org