![]() |
|
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 dynOneEqEddy 00027 00028 Description 00029 <pre> 00030 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*k^3/2/delta 00038 00039 and 00040 00041 B = 2/3*k*I - 2*nuEff*dev(D) 00042 00043 where 00044 00045 D = symm(grad(U)); 00046 nuSgs = ck*sqrt(k)*delta 00047 nuEff = nuSgs + nu 00048 </pre> 00049 00050 SourceFiles 00051 dynOneEqEddy.C 00052 00053 \*---------------------------------------------------------------------------*/ 00054 00055 #ifndef dynOneEqEddy_H 00056 #define dynOneEqEddy_H 00057 00058 #include "GenEddyVisc.H" 00059 #include "LESfilter.H" 00060 00061 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00062 00063 namespace Foam 00064 { 00065 namespace LESmodels 00066 { 00067 00068 /*---------------------------------------------------------------------------*\ 00069 Class dynOneEqEddy Declaration 00070 \*---------------------------------------------------------------------------*/ 00071 00072 class dynOneEqEddy 00073 : 00074 public GenEddyVisc 00075 { 00076 // Private data 00077 00078 volScalarField k_; 00079 00080 autoPtr<LESfilter> filterPtr_; 00081 LESfilter& filter_; 00082 00083 00084 // Private Member Functions 00085 00086 //- Calculate ck, ce by filtering the velocity field U. 00087 dimensionedScalar ck(const volTensorField& D) const; 00088 dimensionedScalar ce(const volTensorField& D) const; 00089 00090 // Disallow default bitwise copy construct and assignment 00091 dynOneEqEddy(const dynOneEqEddy&); 00092 dynOneEqEddy& operator=(const dynOneEqEddy&); 00093 00094 00095 public: 00096 00097 //- Runtime type information 00098 TypeName("dynOneEqEddy"); 00099 00100 // Constructors 00101 00102 //- Constructor from components 00103 dynOneEqEddy 00104 ( 00105 const volVectorField& U, 00106 const surfaceScalarField& phi, 00107 transportModel& transport 00108 ); 00109 00110 00111 // Destructor 00112 00113 ~dynOneEqEddy(); 00114 00115 00116 // Member Functions 00117 00118 //- Return SGS kinetic energy 00119 tmp<volScalarField> k() const 00120 { 00121 return k_; 00122 } 00123 00124 //- Return the effective diffusivity for k 00125 tmp<volScalarField> DkEff() const 00126 { 00127 return tmp<volScalarField> 00128 ( 00129 new volScalarField("DkEff", nuSgs_ + nu()) 00130 ); 00131 } 00132 00133 //- Correct Eddy-Viscosity and related properties 00134 void correct(const tmp<volTensorField>& gradU); 00135 00136 //- Read turbulenceProperties dictionary 00137 bool read(); 00138 }; 00139 00140 00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00142 00143 } // End namespace LESmodels 00144 } // End namespace Foam 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 #endif 00149 00150 // ************************************************************************* //