|
|
|
oneEqEddy.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::oneEqEddy 00027 00028 Description 00029 One Equation Eddy Viscosity Model for incompressible flows 00030 00031 Eddy viscosity SGS model using a modeled balance equation to simulate the 00032 behaviour of k, hence, 00033 @verbatim 00034 d/dt(k) + div(U*k) - div(nuEff*grad(k)) 00035 = 00036 -B*L - ce*k^3/2/delta 00037 00038 and 00039 00040 B = 2/3*k*I - 2*nuSgs*dev(D) 00041 Beff = 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 @endverbatim 00049 00050 SourceFiles 00051 oneEqEddy.C 00052 00053 \*---------------------------------------------------------------------------*/ 00054 00055 #ifndef oneEqEddy_H 00056 #define oneEqEddy_H 00057 00058 #include "GenEddyVisc.H" 00059 00060 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00061 00062 namespace Foam 00063 { 00064 namespace incompressible 00065 { 00066 namespace LESModels 00067 { 00068 00069 /*---------------------------------------------------------------------------*\ 00070 Class oneEqEddy Declaration 00071 \*---------------------------------------------------------------------------*/ 00072 00073 class oneEqEddy 00074 : 00075 public GenEddyVisc 00076 { 00077 // Private data 00078 00079 volScalarField k_; 00080 00081 dimensionedScalar ck_; 00082 00083 00084 // Private Member Functions 00085 00086 //- Update sub-grid scale fields 00087 void updateSubGridScaleFields(); 00088 00089 // Disallow default bitwise copy construct and assignment 00090 oneEqEddy(const oneEqEddy&); 00091 oneEqEddy& operator=(const oneEqEddy&); 00092 00093 00094 public: 00095 00096 //- Runtime type information 00097 TypeName("oneEqEddy"); 00098 00099 // Constructors 00100 00101 //- Construct from components 00102 oneEqEddy 00103 ( 00104 const volVectorField& U, 00105 const surfaceScalarField& phi, 00106 transportModel& transport 00107 ); 00108 00109 00110 //- Destructor 00111 virtual ~oneEqEddy() 00112 {} 00113 00114 00115 // Member Functions 00116 00117 //- Return SGS kinetic energy 00118 virtual tmp<volScalarField> k() const 00119 { 00120 return k_; 00121 } 00122 00123 //- Return the effective diffusivity for k 00124 tmp<volScalarField> DkEff() const 00125 { 00126 return tmp<volScalarField> 00127 ( 00128 new volScalarField("DkEff", nuSgs_ + nu()) 00129 ); 00130 } 00131 00132 //- Correct Eddy-Viscosity and related properties 00133 virtual void correct(const tmp<volTensorField>& gradU); 00134 00135 //- Read LESProperties dictionary 00136 virtual bool read(); 00137 }; 00138 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 } // End namespace LESModels 00143 } // End namespace incompressible 00144 } // End namespace Foam 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 #endif 00149 00150 // ************************************************************************* // |