StandardWallInteraction.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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::StandardWallInteraction
26 
27 Description
28  Wall interaction model.
29 
30  Three choices:
31  - rebound - optionally specify elasticity and restitution coefficients
32  - stick - particles assigned zero velocity
33  - escape - remove particle from the domain
34 
35  Example usage:
36  \verbatim
37  StandardWallInteractionCoeffs
38  {
39  type rebound; // stick, escape
40  e 1; // optional - elasticity coeff
41  mu 0; // optional - restitution coeff
42  }
43  \endverbatim
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef StandardWallInteraction_H
48 #define StandardWallInteraction_H
49 
50 #include "PatchInteractionModel.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 /*---------------------------------------------------------------------------*\
57  Class StandardWallInteraction Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class CloudType>
62 :
63  public PatchInteractionModel<CloudType>
64 {
65 protected:
66 
67  // Protected data
68 
69  //- Interaction type
72 
73  //- Elasticity coefficient
74  scalar e_;
75 
76  //- Restitution coefficient
77  scalar mu_;
78 
79 
80  // Counters for particle fates
81 
82  //- Number of parcels escaped
84 
85  //- Mass of parcels escaped
86  scalar massEscape_;
87 
88  //- Number of parcels stuck to patches
89  label nStick_;
90 
91  //- Mass of parcels stuck to patches
92  scalar massStick_;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("standardWallInteraction");
99 
100 
101  // Constructors
102 
103  //- Construct from dictionary
105 
106  //- Construct copy from owner cloud and patch interaction model
108 
109  //- Construct and return a clone using supplied owner cloud
111  {
113  (
115  );
116  }
117 
118 
119  //- Destructor
120  virtual ~StandardWallInteraction();
121 
122 
123  // Member Functions
124 
125  //- Apply velocity correction
126  // Returns true if particle remains in same cell
127  virtual bool correct
128  (
129  typename CloudType::parcelType& p,
130  const polyPatch& pp,
131  bool& keepParticle
132  );
133 
134 
135  // I-O
136 
137  //- Write patch interaction info to stream
138  virtual void info(Ostream& os);
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
149  #include "StandardWallInteraction.C"
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
scalar mu_
Restitution coefficient.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Apply velocity correction.
virtual autoPtr< PatchInteractionModel< CloudType > > clone() const
Construct and return a clone using supplied owner cloud.
virtual ~StandardWallInteraction()
Destructor.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
Templated patch interaction model class.
PatchInteractionModel< CloudType >::interactionType interactionType_
Interaction type.
scalar massEscape_
Mass of parcels escaped.
A cloud is a collection of lagrangian particles.
Definition: cloud.H:51
label nStick_
Number of parcels stuck to patches.
scalar e_
Elasticity coefficient.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:218
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void info(Ostream &os)
Write patch interaction info to stream.
scalar massStick_
Mass of parcels stuck to patches.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
StandardWallInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
TypeName("standardWallInteraction")
Runtime type information.
volScalarField & p
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.
label nEscape_
Number of parcels escaped.