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