![]() |
|
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 GenEddyVisc 00027 00028 Description 00029 General base class for all models that can be implemented as 00030 an eddy viscosity, i.e. algebraic and one-equation models. 00031 00032 Contains fields for k (SGS turbulent kinetic energy), gamma 00033 (modelled viscosity) and epsilon (SGS dissipation). 00034 00035 SourceFiles 00036 GenEddyVisc.C 00037 00038 \*---------------------------------------------------------------------------*/ 00039 00040 #ifndef GenEddyVisc_H 00041 #define GenEddyVisc_H 00042 00043 #include "LESmodel.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 namespace LESmodels 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class GenEddyVisc Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class GenEddyVisc 00057 : 00058 virtual public LESmodel 00059 { 00060 // Private Member Functions 00061 00062 // Disallow default bitwise copy construct and assignment 00063 GenEddyVisc(const GenEddyVisc&); 00064 GenEddyVisc& operator=(const GenEddyVisc&); 00065 00066 00067 protected: 00068 00069 dimensionedScalar ce_; 00070 00071 volScalarField nuSgs_; 00072 00073 00074 public: 00075 00076 // Constructors 00077 00078 //- Construct from components 00079 GenEddyVisc 00080 ( 00081 const volVectorField& U, 00082 const surfaceScalarField& phi, 00083 transportModel& transport 00084 ); 00085 00086 00087 // Destructor 00088 00089 virtual ~GenEddyVisc() 00090 {} 00091 00092 00093 // Member Functions 00094 00095 //- Evaluate B. This is done on the fly : its not usually necessary, 00096 // but will be if we want to compare with experiments or DNS 00097 virtual tmp<volTensorField> B() const; 00098 00099 //- Return SGS kinetic energy 00100 virtual tmp<volScalarField> k() const = 0; 00101 00102 //- Return sub-grid disipation rate 00103 virtual tmp<volScalarField> epsilon() const 00104 { 00105 return ce_*k()*sqrt(k())/delta(); 00106 } 00107 00108 //- Return the SGS viscosity. 00109 virtual tmp<volScalarField> nuSgs() const 00110 { 00111 return nuSgs_; 00112 } 00113 00114 //- Returns divergence of B : i.e. the additional term in the 00115 // filtered NSE. 00116 virtual tmp<fvVectorMatrix> divB(volVectorField& U) const; 00117 00118 //- Correct Eddy-Viscosity and related properties 00119 virtual void correct(const tmp<volTensorField>& gradU); 00120 00121 //- Read turbulenceProperties dictionary 00122 bool read(); 00123 }; 00124 00125 00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00127 00128 } // End namespace LESmodels 00129 } // End namespace Foam 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************************************************************* //