|
|
|
GenSGSStress.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::GenSGSStress 00027 00028 Description 00029 General base class for all incompressible models that directly 00030 solve for the SGS stress tensor B. 00031 00032 Contains tensor fields B (the SGS stress tensor) as well as scalar 00033 fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon 00034 (SGS dissipation). 00035 00036 SourceFiles 00037 GenSGSStress.C 00038 00039 \*---------------------------------------------------------------------------*/ 00040 00041 #ifndef GenSGSStress_H 00042 #define GenSGSStress_H 00043 00044 #include "LESModel.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 namespace incompressible 00051 { 00052 namespace LESModels 00053 { 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class GenSGSStress Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class GenSGSStress 00060 : 00061 virtual public LESModel 00062 { 00063 // Private Member Functions 00064 00065 // Disallow default bitwise copy construct and assignment 00066 GenSGSStress(const GenSGSStress&); 00067 GenSGSStress& operator=(const GenSGSStress&); 00068 00069 00070 protected: 00071 00072 dimensionedScalar ce_; 00073 00074 dimensionedScalar couplingFactor_; 00075 00076 volSymmTensorField B_; 00077 volScalarField nuSgs_; 00078 00079 00080 public: 00081 00082 // Constructors 00083 00084 //- Construct from components 00085 GenSGSStress 00086 ( 00087 const volVectorField& U, 00088 const surfaceScalarField& phi, 00089 transportModel& transport 00090 ); 00091 00092 00093 //- Destructor 00094 virtual ~GenSGSStress() 00095 {} 00096 00097 00098 // Member Functions 00099 00100 //- Return the SGS turbulent kinetic energy. 00101 virtual tmp<volScalarField> k() const 00102 { 00103 return 0.5*tr(B_); 00104 } 00105 00106 //- Return the SGS turbulent dissipation. 00107 virtual tmp<volScalarField> epsilon() const 00108 { 00109 volScalarField K = k(); 00110 return ce_*K*sqrt(K)/delta(); 00111 } 00112 00113 //- Return the SGS viscosity. 00114 virtual tmp<volScalarField> nuSgs() const 00115 { 00116 return nuSgs_; 00117 } 00118 00119 //- Return the sub-grid stress tensor. 00120 virtual tmp<volSymmTensorField> B() const 00121 { 00122 return B_; 00123 } 00124 00125 //- Return the effective sub-grid turbulence stress tensor 00126 // including the laminar stress 00127 virtual tmp<volSymmTensorField> devBeff() const; 00128 00129 //- Returns div(B). 00130 // This is the additional term due to the filtering of the NSE. 00131 virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const; 00132 00133 //- Read LESProperties dictionary 00134 virtual bool read(); 00135 }; 00136 00137 00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00139 00140 } // End namespace LESModels 00141 } // End namespace incompressible 00142 } // End namespace Foam 00143 00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00145 00146 #endif 00147 00148 // ************************************************************************* // |