FreeFOAM The Cross-Platform CFD Toolkit
basic.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::PDRDragModels::basic
26 
27 Description
28  Basic sub-grid obstacle drag model.
29  Details supplied by J Puttock 2/7/06.
30 
31  <b> Sub-grid drag term </b>
32 
33  The resistance term (force per unit of volume) is given by:
34 
35  \f[
36  R = -\frac{1}{2} \rho \vert \dwea{\vec{U}} \vert \dwea{\vec{U}}.D
37  \f]
38 
39  where:
40 
41  \f$ D \f$ is the tensor field "CR" in \f$ m^{-1} \f$
42 
43  This is term is treated implicitly in UEqn.H
44 
45  <b> Sub-grid turbulence generation </b>
46 
47  The turbulence source term \f$ G_{R} \f$ occurring in the
48  \f$ \kappa-\epsilon \f$ equations for the generation of turbulence due
49  to interaction with unresolved obstacles :
50 
51  \f$ G_{R} = C_{s}\beta_{\nu}
52  \mu_{eff} A_{w}^{2}(\dwea{\vec{U}}-\dwea{\vec{U}_{s}})^2 + \frac{1}{2}
53  \rho \vert \dwea{\vec{U}} \vert \dwea{\vec{U}}.T.\dwea{\vec{U}} \f$
54 
55  where:
56 
57  \f$ C_{s} \f$ = 1
58 
59  \f$ \beta_{\nu} \f$ is the volume porosity (file "betav").
60 
61  \f$ \mu_{eff} \f$ is the effective viscosity.
62 
63  \f$ A_{w}^{2}\f$ is the obstacle surface area per unit of volume
64  (file "Aw").
65 
66  \f$ \dwea{\vec{U}_{s}} \f$ is the slip velocity and is considered
67  \f$ \frac{1}{2}. \dwea{\vec{U}} \f$.
68 
69  \f$ T \f$ is a tensor in the file CT.
70 
71  The term \f$ G_{R} \f$ is treated explicitly in the \f$ \kappa-\epsilon
72  \f$ Eqs in the \link PDRkEpsilon.C \endlink file.
73 
74 
75 SourceFiles
76  basic.C
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef basic_H
81 #define basic_H
82 
85 
86 
87 namespace Foam
88 {
89 namespace PDRDragModels
90 {
91 
92 /*---------------------------------------------------------------------------*\
93  Class basic Declaration
94 \*---------------------------------------------------------------------------*/
95 
96 class basic
97 :
98  public PDRDragModel
99 {
100  // Private data
101 
102  dimensionedScalar Csu;
103  dimensionedScalar Csk;
104 
105  volScalarField Aw2_;
106  volSymmTensorField CR_;
107  volSymmTensorField CT_;
108 
109 
110  // Private Member Functions
111 
112  //- Disallow copy construct
113  basic(const basic&);
114 
115  //- Disallow default bitwise assignment
116  void operator=(const basic&);
117 
118 
119 public:
120 
121  //- Runtime type information
122  TypeName("basic");
123 
124 
125  // Constructors
126 
127  //- Construct from components
128  basic
129  (
130  const dictionary& PDRProperties,
132  const volScalarField& rho,
133  const volVectorField& U,
134  const surfaceScalarField& phi
135  );
136 
137 
138  // Destructor
139 
140  virtual ~basic();
141 
142 
143  // Member Functions
144 
145  //- Return the momentum drag coefficient
146  virtual tmp<volSymmTensorField> Dcu() const;
147 
148  //- Return the momentum drag turbulence generation rate
149  virtual tmp<volScalarField> Gk() const;
150 
151  //- Update properties from given dictionary
152  virtual bool read(const dictionary& PDRProperties);
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace PDRDragModels
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************ vim: set sw=4 sts=4 et: ************************ //