|
|
|
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::compressible::LESModels::GenEddyVisc 00027 00028 Description 00029 General base class for all compressible 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 compressibleGenEddyVisc_H 00041 #define compressibleGenEddyVisc_H 00042 00043 #include "LESModel.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 namespace compressible 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 // Model coefficients 00072 00073 dimensionedScalar ce_; 00074 dimensionedScalar Prt_; 00075 00076 00077 // Fields 00078 00079 volScalarField k_; 00080 volScalarField muSgs_; 00081 volScalarField alphaSgs_; 00082 00083 00084 public: 00085 00086 // Constructors 00087 00088 //- Construct from components 00089 GenEddyVisc 00090 ( 00091 const volScalarField& rho, 00092 const volVectorField& U, 00093 const surfaceScalarField& phi, 00094 const basicThermo& thermoPhysicalModel 00095 ); 00096 00097 00098 //- Destructor 00099 virtual ~GenEddyVisc() 00100 {} 00101 00102 00103 // Member Functions 00104 00105 //- Return SGS kinetic energy 00106 virtual tmp<volScalarField> k() const 00107 { 00108 return k_; 00109 } 00110 00111 //- Return sub-grid disipation rate 00112 virtual tmp<volScalarField> epsilon() const 00113 { 00114 return ce_*k_*sqrt(k_)/delta(); 00115 } 00116 00117 //- Return viscosity 00118 virtual tmp<volScalarField> muSgs() const 00119 { 00120 return muSgs_; 00121 } 00122 00123 //- Return thermal diffusivity 00124 virtual tmp<volScalarField> alphaSgs() const 00125 { 00126 return alphaSgs_; 00127 } 00128 00129 //- Return thermal diffusivity 00130 virtual tmp<volScalarField> alphaEff() const 00131 { 00132 return tmp<volScalarField> 00133 ( 00134 new volScalarField("alphaEff", alphaSgs_ + alpha()) 00135 ); 00136 } 00137 00138 //- Return the sub-grid stress tensor. 00139 virtual tmp<volSymmTensorField> B() const; 00140 00141 //- Return the deviatoric part of the effective sub-grid 00142 // turbulence stress tensor including the laminar stress 00143 virtual tmp<volSymmTensorField> devRhoBeff() const; 00144 00145 //- Returns div(rho*dev(B)). 00146 // This is the additional term due to the filtering of the NSE. 00147 virtual tmp<fvVectorMatrix> divDevRhoBeff(volVectorField& U) const; 00148 00149 //- Correct Eddy-Viscosity and related properties 00150 virtual void correct(const tmp<volTensorField>& gradU); 00151 00152 //- Read LESProperties dictionary 00153 virtual bool read(); 00154 }; 00155 00156 00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00158 00159 } // End namespace LESModels 00160 } // End namespace compressible 00161 } // End namespace Foam 00162 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00164 00165 #endif 00166 00167 // ************************************************************************* // |