FreeFOAM The Cross-Platform CFD Toolkit
StandardWallInteraction.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) 2008-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::StandardWallInteraction
26 
27 Description
28  Wall interaction model. Three choices:
29  - rebound - optionally specify elasticity and resitution coefficients
30  - stick - particles assigined zero velocity
31  - escape - remove particle from the domain
32 
33  Example usage:
34 
35  StandardWallInteractionCoeffs
36  {
37  type rebound; // stick, escape
38  e 1; // optional - elasticity coeff
39  mu 0; // optional - restitution coeff
40  }
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef StandardWallInteraction_H
45 #define StandardWallInteraction_H
46 
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 /*---------------------------------------------------------------------------*\
54  Class StandardWallInteraction Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class CloudType>
59 :
60  public PatchInteractionModel<CloudType>
61 {
62 protected:
63 
64  // Protected data
65 
66  //- Interaction type
69 
70  //- Elasticity coefficient
71  scalar e_;
72 
73  //- Restitution coefficient
74  scalar mu_;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("StandardWallInteraction");
81 
82 
83  // Constructors
84 
85  //- Construct from dictionary
86  StandardWallInteraction(const dictionary& dict, CloudType& cloud);
87 
88 
89  //- Destructor
90  virtual ~StandardWallInteraction();
91 
92 
93  // Member Functions
94 
95  //- Flag to indicate whether model activates patch interaction model
96  virtual bool active() const;
97 
98  //- Apply velocity correction
99  // Returns true if particle remains in same cell
100  virtual bool correct
101  (
102  const polyPatch& pp,
103  const label faceId,
104  bool& keepParticle,
105  bool& active,
106  vector& U
107  ) const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #ifdef NoRepository
118 # include "StandardWallInteraction.C"
119 #endif
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************ vim: set sw=4 sts=4 et: ************************ //