00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::incompressible::LESModels::locDynOneEqEddy 00026 00027 Description 00028 Localised Dynamic One Equation Eddy Viscosity Model for incompressible 00029 flows 00030 00031 Eddy viscosity SGS model using a modeled balance equation to simulate 00032 the behaviour of k, hence 00033 @verbatim 00034 d/dt(k) + div(U*k) - div(nuSgs*grad(k)) 00035 = 00036 -B*L - ce*rho*k^3/2/delta 00037 and 00038 B = 2/3*k*I - 2*nuSgs*dev(D) 00039 Beff = 2/3*k*I - 2*nuEff*dev(D) 00040 where 00041 nuSgs = cD*delta^2*||D|| 00042 nuEff = nuSgs + nu 00043 @endverbatim 00044 00045 A dynamic procedure is here applied to evaluate ck and ce 00046 @verbatim 00047 ck=<L.M>/<M.M> 00048 and 00049 ce=<e*m>/<m*m> 00050 where 00051 K = 0.5*(F(U.U) - F(U).F(U)) 00052 L = (F(U*U) - F(U)*F(U) - 0.33*K*I) 00053 M = delta*(F(sqrt(k)*D) - 2*sqrt(K + filter(k))*F(D)) 00054 m = pow(K + F(k), 3.0/2.0)/(2*delta) - F(pow(k, 3.0/2.0))/delta 00055 e = 2*delta*ck*(F(sqrt(k)*(D && D)) - 2*sqrt(K + F(k))*(F(D) && F(D)))/ 00056 @endverbatim 00057 00058 SourceFiles 00059 locDynOneEqEddy.C 00060 00061 \*---------------------------------------------------------------------------*/ 00062 00063 #ifndef locDynOneEqEddy_H 00064 #define locDynOneEqEddy_H 00065 00066 #include <incompressibleLESModels/GenEddyVisc.H> 00067 #include <LESfilters/simpleFilter.H> 00068 #include <LESfilters/LESfilter.H> 00069 00070 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00071 00072 namespace Foam 00073 { 00074 namespace incompressible 00075 { 00076 namespace LESModels 00077 { 00078 00079 /*---------------------------------------------------------------------------*\ 00080 Class locDynOneEqEddy Declaration 00081 \*---------------------------------------------------------------------------*/ 00082 00083 class locDynOneEqEddy 00084 : 00085 public GenEddyVisc 00086 { 00087 // Private data 00088 00089 volScalarField k_; 00090 00091 simpleFilter simpleFilter_; 00092 autoPtr<LESfilter> filterPtr_; 00093 LESfilter& filter_; 00094 00095 00096 // Private Member Functions 00097 00098 //- Update sub-grid scale fields 00099 void updateSubGridScaleFields 00100 ( 00101 const volSymmTensorField& D, 00102 const volScalarField& KK 00103 ); 00104 00105 //- Calculate ck, ce by filtering the velocity field U. 00106 volScalarField ck 00107 ( 00108 const volSymmTensorField&, 00109 const volScalarField& 00110 ) const; 00111 00112 volScalarField ce 00113 ( 00114 const volSymmTensorField&, 00115 const volScalarField& 00116 ) const; 00117 00118 // Disallow default bitwise copy construct and assignment 00119 locDynOneEqEddy(const locDynOneEqEddy&); 00120 locDynOneEqEddy& operator=(const locDynOneEqEddy&); 00121 00122 00123 public: 00124 00125 //- Runtime type information 00126 TypeName("locDynOneEqEddy"); 00127 00128 // Constructors 00129 00130 //- Construct from components 00131 locDynOneEqEddy 00132 ( 00133 const volVectorField& U, 00134 const surfaceScalarField& phi, 00135 transportModel& transport 00136 ); 00137 00138 00139 //- Destructor 00140 virtual ~locDynOneEqEddy() 00141 {} 00142 00143 00144 // Member Functions 00145 00146 //- Return SGS kinetic energy 00147 virtual tmp<volScalarField> k() const 00148 { 00149 return k_; 00150 } 00151 00152 //- Return the effective diffusivity for k 00153 tmp<volScalarField> DkEff() const 00154 { 00155 return tmp<volScalarField> 00156 ( 00157 new volScalarField("DkEff", nuSgs_ + nu()) 00158 ); 00159 } 00160 00161 //- Correct Eddy-Viscosity and related properties 00162 virtual void correct(const tmp<volTensorField>& gradU); 00163 00164 //- Read LESProperties dictionary 00165 virtual bool read(); 00166 }; 00167 00168 00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00170 00171 } // End namespace LESModels 00172 } // End namespace incompressible 00173 } // End namespace Foam 00174 00175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00176 00177 #endif 00178 00179 // ************************ vim: set sw=4 sts=4 et: ************************ //