|
|
|
GenEddyVisc.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::GenEddyVisc 00027 00028 Description 00029 General base class for all incompressible models that can be implemented 00030 as 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 incompressible 00050 { 00051 namespace LESModels 00052 { 00053 00054 /*---------------------------------------------------------------------------*\ 00055 Class GenEddyVisc Declaration 00056 \*---------------------------------------------------------------------------*/ 00057 00058 class GenEddyVisc 00059 : 00060 virtual public LESModel 00061 { 00062 // Private Member Functions 00063 00064 // Disallow default bitwise copy construct and assignment 00065 GenEddyVisc(const GenEddyVisc&); 00066 GenEddyVisc& operator=(const GenEddyVisc&); 00067 00068 00069 protected: 00070 00071 dimensionedScalar ce_; 00072 00073 volScalarField nuSgs_; 00074 00075 00076 public: 00077 00078 // Constructors 00079 00080 //- Construct from components 00081 GenEddyVisc 00082 ( 00083 const volVectorField& U, 00084 const surfaceScalarField& phi, 00085 transportModel& transport 00086 ); 00087 00088 00089 //- Destructor 00090 virtual ~GenEddyVisc() 00091 {} 00092 00093 00094 // Member Functions 00095 00096 //- Return SGS kinetic energy 00097 virtual tmp<volScalarField> k() const = 0; 00098 00099 //- Return sub-grid disipation rate 00100 virtual tmp<volScalarField> epsilon() const 00101 { 00102 return ce_*k()*sqrt(k())/delta(); 00103 } 00104 00105 //- Return the SGS viscosity. 00106 virtual tmp<volScalarField> nuSgs() const 00107 { 00108 return nuSgs_; 00109 } 00110 00111 //- Return the sub-grid stress tensor. 00112 virtual tmp<volSymmTensorField> B() const; 00113 00114 //- Return the effective sub-grid turbulence stress tensor 00115 // including the laminar stress 00116 virtual tmp<volSymmTensorField> devBeff() const; 00117 00118 //- Return the deviatoric part of the effective sub-grid 00119 // turbulence stress tensor including the laminar stress 00120 virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; 00121 00122 //- Correct Eddy-Viscosity and related properties 00123 virtual void correct(const tmp<volTensorField>& gradU); 00124 00125 //- Read LESProperties dictionary 00126 virtual bool read(); 00127 }; 00128 00129 00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00131 00132 } // End namespace LESModels 00133 } // End namespace incompressible 00134 } // End namespace Foam 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 #endif 00139 00140 // ************************************************************************* // |