FreeFOAM The Cross-Platform CFD Toolkit
qZeta.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::incompressible::RASModels::qZeta
26 
27 Description
28  Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model
29  for incompressible flows
30 
31 SourceFiles
32  qZeta.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef qZeta_H
37 #define qZeta_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace incompressible
46 {
47 namespace RASModels
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class qZeta Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class qZeta
55 :
56  public RASModel
57 {
58  // Private data
59 
60  // Model coefficients
61 
62  dimensionedScalar Cmu_;
65  dimensionedScalar sigmaZeta_;
66  Switch anisotropic_;
67 
68 
69  // Fields
70 
71  volScalarField k_;
72  volScalarField epsilon_;
73 
74  volScalarField q_;
75  volScalarField zeta_;
76 
77  volScalarField nut_;
78 
79 
80  // Private member functions
81 
82  tmp<volScalarField> fMu() const;
83  tmp<volScalarField> f2() const;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("qZeta");
90 
91  // Constructors
92 
93  //- Construct from components
94  qZeta
95  (
96  const volVectorField& U,
97  const surfaceScalarField& phi,
99  );
100 
101 
102  //- Destructor
103  virtual ~qZeta()
104  {}
105 
106 
107  // Member Functions
108 
109  //- Return the turbulence viscosity
110  virtual tmp<volScalarField> nut() const
111  {
112  return nut_;
113  }
114 
115  //- Return the effective diffusivity for q
117  {
118  return tmp<volScalarField>
119  (
120  new volScalarField("DqEff", nut_ + nu())
121  );
122  }
123 
124  //- Return the effective diffusivity for epsilon
126  {
127  return tmp<volScalarField>
128  (
129  new volScalarField("DzetaEff", nut_/sigmaZeta_ + nu())
130  );
131  }
132 
133  //- Return the turbulence kinetic energy
134  virtual tmp<volScalarField> k() const
135  {
136  return k_;
137  }
138 
139  //- Return the turbulence kinetic energy dissipation rate
140  virtual tmp<volScalarField> epsilon() const
141  {
142  return epsilon_;
143  }
144 
145  //- Return the Reynolds stress tensor
146  virtual tmp<volSymmTensorField> R() const;
147 
148  virtual const volScalarField& q() const
149  {
150  return q_;
151  }
152 
153  virtual const volScalarField& zeta() const
154  {
155  return zeta_;
156  }
157 
158  //- Return the effective stress tensor including the laminar stress
159  virtual tmp<volSymmTensorField> devReff() const;
160 
161  //- Return the source term for the momentum equation
163 
164  //- Solve the turbulence equations and correct the turbulence viscosity
165  virtual void correct();
166 
167  //- Read RASProperties dictionary
168  virtual bool read();
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace RASModels
175 } // End namespace incompressible
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************ vim: set sw=4 sts=4 et: ************************ //