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::RASModels::qZeta 00026 00027 Description 00028 Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model 00029 for incompressible flows 00030 00031 SourceFiles 00032 qZeta.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef qZeta_H 00037 #define qZeta_H 00038 00039 #include <incompressibleRASModels/RASModel.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 namespace incompressible 00046 { 00047 namespace RASModels 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class qZeta Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class qZeta 00055 : 00056 public RASModel 00057 { 00058 // Private data 00059 00060 // Model coefficients 00061 00062 dimensionedScalar Cmu_; 00063 dimensionedScalar C1_; 00064 dimensionedScalar C2_; 00065 dimensionedScalar sigmaZeta_; 00066 Switch anisotropic_; 00067 00068 00069 // Fields 00070 00071 volScalarField k_; 00072 volScalarField epsilon_; 00073 00074 volScalarField q_; 00075 volScalarField zeta_; 00076 00077 volScalarField nut_; 00078 00079 00080 // Private member functions 00081 00082 tmp<volScalarField> fMu() const; 00083 tmp<volScalarField> f2() const; 00084 00085 00086 public: 00087 00088 //- Runtime type information 00089 TypeName("qZeta"); 00090 00091 // Constructors 00092 00093 //- Construct from components 00094 qZeta 00095 ( 00096 const volVectorField& U, 00097 const surfaceScalarField& phi, 00098 transportModel& transport 00099 ); 00100 00101 00102 //- Destructor 00103 virtual ~qZeta() 00104 {} 00105 00106 00107 // Member Functions 00108 00109 //- Return the turbulence viscosity 00110 virtual tmp<volScalarField> nut() const 00111 { 00112 return nut_; 00113 } 00114 00115 //- Return the effective diffusivity for q 00116 tmp<volScalarField> DqEff() const 00117 { 00118 return tmp<volScalarField> 00119 ( 00120 new volScalarField("DqEff", nut_ + nu()) 00121 ); 00122 } 00123 00124 //- Return the effective diffusivity for epsilon 00125 tmp<volScalarField> DzetaEff() const 00126 { 00127 return tmp<volScalarField> 00128 ( 00129 new volScalarField("DzetaEff", nut_/sigmaZeta_ + nu()) 00130 ); 00131 } 00132 00133 //- Return the turbulence kinetic energy 00134 virtual tmp<volScalarField> k() const 00135 { 00136 return k_; 00137 } 00138 00139 //- Return the turbulence kinetic energy dissipation rate 00140 virtual tmp<volScalarField> epsilon() const 00141 { 00142 return epsilon_; 00143 } 00144 00145 //- Return the Reynolds stress tensor 00146 virtual tmp<volSymmTensorField> R() const; 00147 00148 virtual const volScalarField& q() const 00149 { 00150 return q_; 00151 } 00152 00153 virtual const volScalarField& zeta() const 00154 { 00155 return zeta_; 00156 } 00157 00158 //- Return the effective stress tensor including the laminar stress 00159 virtual tmp<volSymmTensorField> devReff() const; 00160 00161 //- Return the source term for the momentum equation 00162 virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; 00163 00164 //- Solve the turbulence equations and correct the turbulence viscosity 00165 virtual void correct(); 00166 00167 //- Read RASProperties dictionary 00168 virtual bool read(); 00169 }; 00170 00171 00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00173 00174 } // End namespace RASModels 00175 } // End namespace incompressible 00176 } // End namespace Foam 00177 00178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00179 00180 #endif 00181 00182 // ************************ vim: set sw=4 sts=4 et: ************************ //