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