|
|
|
SpalartAllmaras.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::RASModels::SpalartAllmaras 00027 00028 Description 00029 Spalart-Allmaras 1-eqn mixing-length model for incompressible external 00030 flows. 00031 00032 References: 00033 @verbatim 00034 "A One-Equation Turbulence Model for Aerodynamic Flows" 00035 P.R. Spalart, 00036 S.R. Allmaras, 00037 La Recherche A´rospatiale, No. 1, 1994, pp. 5–21. 00038 00039 Extended according to: 00040 00041 "An Unstructured Grid Generation and Adaptive Solution Technique 00042 for High Reynolds Number Compressible Flows" 00043 G.A. Ashford, 00044 Ph.D. thesis, University of Michigan, 1996. 00045 @endverbatim 00046 00047 The default model coefficients correspond to the following: 00048 @verbatim 00049 SpalartAllmarasCoeffs 00050 { 00051 Cb1 0.1355; 00052 Cb2 0.622; 00053 Cw2 0.3; 00054 Cw3 2.0; 00055 Cv1 7.1; 00056 Cv2 5.0; 00057 sigmaNut 0.66666; 00058 kappa 0.41; 00059 } 00060 @endverbatim 00061 00062 SourceFiles 00063 SpalartAllmaras.C 00064 00065 \*---------------------------------------------------------------------------*/ 00066 00067 #ifndef SpalartAllmaras_H 00068 #define SpalartAllmaras_H 00069 00070 #include "RASModel.H" 00071 #include "wallDist.H" 00072 00073 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00074 00075 namespace Foam 00076 { 00077 namespace incompressible 00078 { 00079 namespace RASModels 00080 { 00081 00082 /*---------------------------------------------------------------------------*\ 00083 Class SpalartAllmaras Declaration 00084 \*---------------------------------------------------------------------------*/ 00085 00086 class SpalartAllmaras 00087 : 00088 public RASModel 00089 { 00090 // Private data 00091 00092 // Model coefficients 00093 00094 dimensionedScalar sigmaNut_; 00095 dimensionedScalar kappa_; 00096 00097 dimensionedScalar Cb1_; 00098 dimensionedScalar Cb2_; 00099 dimensionedScalar Cw1_; 00100 dimensionedScalar Cw2_; 00101 dimensionedScalar Cw3_; 00102 dimensionedScalar Cv1_; 00103 dimensionedScalar Cv2_; 00104 00105 00106 // Fields 00107 00108 volScalarField nuTilda_; 00109 volScalarField nut_; 00110 00111 wallDist d_; 00112 00113 00114 // Private member functions 00115 00116 tmp<volScalarField> chi() const; 00117 00118 tmp<volScalarField> fv1(const volScalarField& chi) const; 00119 00120 tmp<volScalarField> fv2 00121 ( 00122 const volScalarField& chi, 00123 const volScalarField& fv1 00124 ) const; 00125 00126 tmp<volScalarField> fv3 00127 ( 00128 const volScalarField& chi, 00129 const volScalarField& fv1 00130 ) const; 00131 00132 tmp<volScalarField> fw(const volScalarField& Stilda) const; 00133 00134 00135 public: 00136 00137 //- Runtime type information 00138 TypeName("SpalartAllmaras"); 00139 00140 00141 // Constructors 00142 00143 //- Construct from components 00144 SpalartAllmaras 00145 ( 00146 const volVectorField& U, 00147 const surfaceScalarField& phi, 00148 transportModel& transport 00149 ); 00150 00151 00152 //- Destructor 00153 virtual ~SpalartAllmaras() 00154 {} 00155 00156 00157 // Member Functions 00158 00159 //- Return the turbulence viscosity 00160 virtual tmp<volScalarField> nut() const 00161 { 00162 return nut_; 00163 } 00164 00165 //- Return the effective diffusivity for nuTilda 00166 tmp<volScalarField> DnuTildaEff() const; 00167 00168 //- Return the turbulence kinetic energy 00169 virtual tmp<volScalarField> k() const; 00170 00171 //- Return the turbulence kinetic energy dissipation rate 00172 virtual tmp<volScalarField> epsilon() const; 00173 00174 //- Return the Reynolds stress tensor 00175 virtual tmp<volSymmTensorField> R() const; 00176 00177 //- Return the effective stress tensor including the laminar stress 00178 virtual tmp<volSymmTensorField> devReff() const; 00179 00180 //- Return the source term for the momentum equation 00181 virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; 00182 00183 //- Solve the turbulence equations and correct the turbulence viscosity 00184 virtual void correct(); 00185 00186 //- Read RASProperties dictionary 00187 virtual bool read(); 00188 }; 00189 00190 00191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00192 00193 } // End namespace RASModels 00194 } // End namespace incompressible 00195 } // End namespace Foam 00196 00197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00198 00199 #endif 00200 00201 // ************************************************************************* // |