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