|
|
|
Smagorinsky.HGo 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::LESModels::Smagorinsky 00027 00028 Description 00029 The Isochoric Smagorinsky Model for incompressible flows. 00030 00031 Algebraic eddy viscosity SGS model founded on the assumption that 00032 local equilibrium prevails. 00033 Thus, 00034 @verbatim 00035 B = 2/3*k*I - 2*nuSgs*dev(D) 00036 Beff = 2/3*k*I - 2*nuEff*dev(D) 00037 00038 where 00039 00040 D = symm(grad(U)); 00041 k = (2*ck/ce)*delta^2*||D||^2 00042 nuSgs = ck*sqrt(k)*delta 00043 nuEff = nuSgs + nu 00044 @endverbatim 00045 00046 SourceFiles 00047 Smagorinsky.C 00048 00049 \*---------------------------------------------------------------------------*/ 00050 00051 #ifndef Smagorinsky_H 00052 #define Smagorinsky_H 00053 00054 #include "GenEddyVisc.H" 00055 00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00057 00058 namespace Foam 00059 { 00060 namespace incompressible 00061 { 00062 namespace LESModels 00063 { 00064 00065 /*---------------------------------------------------------------------------*\ 00066 Class Smagorinsky Declaration 00067 \*---------------------------------------------------------------------------*/ 00068 00069 class Smagorinsky 00070 : 00071 public GenEddyVisc 00072 { 00073 // Private data 00074 00075 dimensionedScalar ck_; 00076 00077 00078 // Private Member Functions 00079 00080 //- Update sub-grid scale fields 00081 void updateSubGridScaleFields(const volTensorField& gradU); 00082 00083 // Disallow default bitwise copy construct and assignment 00084 Smagorinsky(const Smagorinsky&); 00085 Smagorinsky& operator=(const Smagorinsky&); 00086 00087 00088 public: 00089 00090 //- Runtime type information 00091 TypeName("Smagorinsky"); 00092 00093 // Constructors 00094 00095 //- Construct from components 00096 Smagorinsky 00097 ( 00098 const volVectorField& U, 00099 const surfaceScalarField& phi, 00100 transportModel& transport 00101 ); 00102 00103 00104 //- Destructor 00105 virtual ~Smagorinsky() 00106 {} 00107 00108 00109 // Member Functions 00110 00111 //- Return SGS kinetic energy 00112 // calculated from the given velocity gradient 00113 tmp<volScalarField> k(const tmp<volTensorField>& gradU) const 00114 { 00115 return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU))); 00116 } 00117 00118 //- Return SGS kinetic energy 00119 virtual tmp<volScalarField> k() const 00120 { 00121 return k(fvc::grad(U())); 00122 } 00123 00124 00125 //- Correct Eddy-Viscosity and related properties 00126 virtual void correct(const tmp<volTensorField>& gradU); 00127 00128 //- Read LESProperties dictionary 00129 virtual bool read(); 00130 }; 00131 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 } // End namespace LESModels 00136 } // End namespace incompressible 00137 } // End namespace Foam 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 #endif 00142 00143 // ************************************************************************* // |