ParticleErosion.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::ParticleErosion
26 
27 Description
28  Function object to create a field of eroded volume, Q, on a specified list
29  of patches. The volume is calculated by the model of Finnie et al. The
30  implementation follows the description given by the review of Yadav et al.
31 
32  References:
33  \verbatim
34  I Finnie, A Levy, D H McFadden
35  "Fundamental Mechanisms of the Erosive Wear of Ductile Metals by Solid
36  Particles"
37  ASTM STP664, 1979, pages 36-58
38  \endverbatim
39 
40  \verbatim
41  I Finnie and D H McFadden
42  "On the Velocity Dependence of the Erosion of Ductile Metal by Solid
43  Particle at Low Angles of Incidence"
44  Wear, 1978, volume 48, pages 181-190
45  \endverbatim
46 
47  \verbatim
48  G Yadav, S Tiwari, A Rajput, R Jatola, M L Jain
49  "A Review: Erosion Wear Models"
50  Emerging Trends in Mechanical Engineering, 2016, volume 1, pages 150-154
51  \endverbatim
52 
53 Usage
54  \table
55  Property | Description | Req'd? | Default
56  patches | The patches on which to calculate Q | yes |
57  p | Plastic flow stress | yes |
58  psi | Ratio between depth of contact and length of cut | no | 2
59  K | Ratio of normal and tangential force | no | 2
60  \endtable
61 
62  Example:
63  \verbatim
64  <functionName>
65  {
66  type particleErosion;
67  patches (wall1 wall2);
68  p 2.7e9;
69  }
70  \endverbatim
71 
72 SourceFiles
73  ParticleErosion.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef ParticleErosion_H
78 #define ParticleErosion_H
79 
80 #include "CloudFunctionObject.H"
81 #include "volFields.H"
82 
83 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 
85 namespace Foam
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class ParticleErosion Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 template<class CloudType>
93 class ParticleErosion
94 :
95  public CloudFunctionObject<CloudType>
96 {
97  // Private Data
98 
99  // Typedefs
100 
101  //- Convenience typedef for parcel type
102  typedef typename CloudType::parcelType parcelType;
103 
104 
105  //- Particle eroded volume field
106  autoPtr<volScalarField> QPtr_;
107 
108  //- List of patch indices to post-process
109  labelList patchIDs_;
110 
111  //- Plastic flow stress
112  scalar p_;
113 
114  //- Ratio between depth of contact and length of cut. Default 2.
115  scalar psi_;
116 
117  //- Ratio of normal and tangential forces. Default 2.
118  scalar K_;
119 
120 
121 protected:
122 
123  // Protected Member Functions
124 
125  //- Returns local patchi if patch is in patchIds_ list
126  label applyToPatch(const label globalPatchi) const;
127 
128  //- Write post-processing info
129  virtual void write();
130 
131 
132 public:
133 
134  //- Runtime type information
135  TypeName("particleErosion");
136 
137 
138  // Constructors
139 
140  //- Construct from dictionary
142  (
143  const dictionary& dict,
144  CloudType& owner,
145  const word& modelName
146  );
147 
148  //- Construct copy
150 
151  //- Construct and return a clone
153  {
155  (
156  new ParticleErosion<CloudType>(*this)
157  );
158  }
159 
160 
161  //- Destructor
162  virtual ~ParticleErosion();
163 
164 
165  // Member Functions
166 
167  // Evaluation
168 
169  //- Pre-evolve hook
170  virtual void preEvolve();
171 
172  //- Post-patch hook
173  virtual void postPatch
174  (
175  const parcelType& p,
176  const polyPatch& pp,
177  bool& keepParticle
178  );
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #ifdef NoRepository
189  #include "ParticleErosion.C"
190 #endif
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Function object to create a field of eroded volume, Q, on a specified list of patches. The volume is calculated by the model of Finnie et al. The implementation follows the description given by the review of Yadav et al.
virtual void preEvolve()
Pre-evolve hook.
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
virtual ~ParticleErosion()
Destructor.
const CloudType & owner() const
Return const access to the owner cloud.
A class for handling words, derived from string.
Definition: word.H:59
virtual void write()
Write post-processing info.
List< label > labelList
A List of labels.
Definition: labelList.H:56
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:215
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
label applyToPatch(const label globalPatchi) const
Returns local patchi if patch is in patchIds_ list.
volScalarField & p
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
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.
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
TypeName("particleErosion")
Runtime type information.