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) 2011 OpenFOAM Foundation
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 
83 #include "PDRDragModel.H"
84 #include "XiEqModel.H"
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 Aw_;
106  volSymmTensorField CR_;
107 
108 
109  // Private Member Functions
110 
111  //- Disallow copy construct
112  basic(const basic&);
113 
114  //- Disallow default bitwise assignment
115  void operator=(const basic&);
116 
117 
118 public:
119 
120  //- Runtime type information
121  TypeName("basic");
122 
123 
124  // Constructors
125 
126  //- Construct from components
127  basic
128  (
129  const dictionary& PDRProperties,
131  const volScalarField& rho,
132  const volVectorField& U,
133  const surfaceScalarField& phi
134  );
135 
136 
137  //- Destructor
138  virtual ~basic();
139 
140 
141  // Member Functions
142 
143  //- Return the momentum drag coefficient
144  virtual tmp<volSymmTensorField> Dcu() const;
145 
146  //- Return the momentum drag turbulence generation rate
147  virtual tmp<volScalarField> Gk() const;
148 
149  //- Update properties from given dictionary
150  virtual bool read(const dictionary& PDRProperties);
151 
152  //- Write fields
153  void writeFields() const;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace PDRDragModels
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
U
Definition: pEqn.H:83
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
void writeFields() const
Write fields.
Base-class for sub-grid obstacle drag models. The available drag model is at basic.H.
Definition: PDRDragModel.H:53
virtual ~basic()
Destructor.
virtual tmp< volScalarField > Gk() const
Return the momentum drag turbulence generation rate.
Basic sub-grid obstacle drag model. Details supplied by J Puttock 2/7/06.
Definition: basic.H:95
virtual tmp< volSymmTensorField > Dcu() const
Return the momentum drag coefficient.
TypeName("basic")
Runtime type information.
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.