![]() |
|
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 SpalartAllmaras 00027 00028 Description 00029 00030 SourceFiles 00031 SpalartAllmaras.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef SpalartAllmaras_H 00036 #define SpalartAllmaras_H 00037 00038 #include "LESmodel.H" 00039 #include "volFields.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 namespace LESmodels 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class SpalartAllmaras Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class SpalartAllmaras 00053 : 00054 public LESmodel 00055 { 00056 // Private data 00057 00058 dimensionedScalar alphaNut_; 00059 00060 dimensionedScalar Cb1_; 00061 dimensionedScalar Cb2_; 00062 dimensionedScalar Cv1_; 00063 dimensionedScalar Cv2_; 00064 dimensionedScalar CDES_; 00065 dimensionedScalar ck_; 00066 dimensionedScalar kappa_; 00067 dimensionedScalar Cw1_; 00068 dimensionedScalar Cw2_; 00069 dimensionedScalar Cw3_; 00070 00071 00072 // Private member functions 00073 00074 tmp<volScalarField> fv1() const; 00075 tmp<volScalarField> fv2() const; 00076 tmp<volScalarField> fv3() const; 00077 tmp<volScalarField> fw(const volScalarField& Stilda) const; 00078 00079 // Disallow default bitwise copy construct and assignment 00080 SpalartAllmaras(const SpalartAllmaras&); 00081 SpalartAllmaras& operator=(const SpalartAllmaras&); 00082 00083 volScalarField nuTilda_; 00084 volScalarField dTilda_; 00085 volScalarField nuSgs_; 00086 00087 00088 public: 00089 00090 //- Runtime type information 00091 TypeName("SpalartAllmaras"); 00092 00093 00094 // Constructors 00095 00096 //- Constructor from components 00097 SpalartAllmaras 00098 ( 00099 const volVectorField& U, 00100 const surfaceScalarField& phi, 00101 transportModel& transport 00102 ); 00103 00104 00105 // Destructor 00106 00107 ~SpalartAllmaras() 00108 {} 00109 00110 00111 // Member Functions 00112 00113 //- Evaluate B. This is done on the fly : its not usually necessary, 00114 // but will be if we want to compare with experiments or DNS 00115 tmp<volTensorField> B() const; 00116 00117 //- Return SGS kinetic energy 00118 tmp<volScalarField> k() const 00119 { 00120 return sqr(nuSgs()/ck_/dTilda_); 00121 } 00122 00123 //- Return sub-grid disipation rate 00124 tmp<volScalarField> epsilon() const; 00125 00126 tmp<volScalarField> nuTilda() const 00127 { 00128 return nuTilda_; 00129 } 00130 00131 //- Return SGS viscosity 00132 tmp<volScalarField> nuSgs() const 00133 { 00134 return nuSgs_; 00135 } 00136 00137 //- Returns divergence of B : i.e. the additional term in the 00138 // filtered NSE. 00139 tmp<fvVectorMatrix> divB(volVectorField& U) const; 00140 00141 //- Correct nuTilda and related properties 00142 void correct(const tmp<volTensorField>& gradU); 00143 00144 //- Read turbulenceProperties dictionary 00145 bool read(); 00146 }; 00147 00148 00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00150 00151 } // End namespace LESmodels 00152 } // End namespace Foam 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 #endif 00157 00158 // ************************************************************************* //