ParticleErosion.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-2013 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  Creates particle erosion field, Q
29 
30 SourceFiles
31  ParticleErosion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ParticleErosion_H
36 #define ParticleErosion_H
37 
38 #include "CloudFunctionObject.H"
39 #include "volFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class ParticleErosion Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class CloudType>
51 class ParticleErosion
52 :
53  public CloudFunctionObject<CloudType>
54 {
55  // Private Data
56 
57  // Typedefs
58 
59  //- Convenience typedef for parcel type
60  typedef typename CloudType::parcelType parcelType;
61 
62 
63  //- Particle erosion field
65 
66  //- List of patch indices to post-process
68 
69  //- Plastic flow stress - typical metal value = 2.7 GPa
70  scalar p_;
71 
72  //- Ratio between depth of contact and length of cut - default=2
73  scalar psi_;
74 
75  //- Ratio of normal and tangential forces - default=2
76  scalar K_;
77 
78 
79 protected:
80 
81  // Protected Member Functions
82 
83  //- Returns local patchI if patch is in patchIds_ list
84  label applyToPatch(const label globalPatchI) const;
85 
86  //- Write post-processing info
87  virtual void write();
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("particleErosion");
94 
95 
96  // Constructors
97 
98  //- Construct from dictionary
100  (
101  const dictionary& dict,
102  CloudType& owner,
103  const word& modelName
104  );
105 
106  //- Construct copy
108 
109  //- Construct and return a clone
111  {
113  (
114  new ParticleErosion<CloudType>(*this)
115  );
116  }
117 
118 
119  //- Destructor
120  virtual ~ParticleErosion();
121 
122 
123  // Member Functions
124 
125  // Evaluation
126 
127  //- Pre-evolve hook
128  virtual void preEvolve();
129 
130  //- Post-patch hook
131  virtual void postPatch
132  (
133  const parcelType& p,
134  const polyPatch& pp,
135  const scalar trackFraction,
136  const tetIndices& tetIs,
137  bool& keepParticle
138  );
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #ifdef NoRepository
149 # include "ParticleErosion.C"
150 #endif
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
volFields.H
Foam::ParticleErosion::K_
scalar K_
Ratio of normal and tangential forces - default=2.
Definition: ParticleErosion.H:75
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::ParticleErosion::applyToPatch
label applyToPatch(const label globalPatchI) const
Returns local patchI if patch is in patchIds_ list.
Definition: ParticleErosion.C:32
Foam::ParticleErosion::QPtr_
autoPtr< volScalarField > QPtr_
Particle erosion field.
Definition: ParticleErosion.H:63
Foam::ParticleErosion::clone
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: ParticleErosion.H:109
Foam::ParticleErosion::TypeName
TypeName("particleErosion")
Runtime type information.
Foam::ParticleErosion::~ParticleErosion
virtual ~ParticleErosion()
Destructor.
Definition: ParticleErosion.C:123
Foam::ParticleErosion::p_
scalar p_
Plastic flow stress - typical metal value = 2.7 GPa.
Definition: ParticleErosion.H:69
Foam::CloudSubModelBase::owner
const CloudType & owner() const
Return const access to the owner cloud.
Definition: CloudSubModelBase.C:103
Foam::ParticleErosion::write
virtual void write()
Write post-processing info.
Definition: ParticleErosion.C:49
Foam::subModelBase::modelName
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
Foam::ParticleErosion::parcelType
CloudType::parcelType parcelType
Convenience typedef for parcel type.
Definition: ParticleErosion.H:59
CloudFunctionObject.H
Foam::ParticleErosion::preEvolve
virtual void preEvolve()
Pre-evolve hook.
Definition: ParticleErosion.C:130
Foam::label
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
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::ParticleErosion::patchIDs_
labelList patchIDs_
List of patch indices to post-process.
Definition: ParticleErosion.H:66
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::tetIndices
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
Definition: tetIndices.H:73
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::ParticleErosion::postPatch
virtual void postPatch(const parcelType &p, const polyPatch &pp, const scalar trackFraction, const tetIndices &tetIs, bool &keepParticle)
Post-patch hook.
Definition: ParticleErosion.C:162
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::CloudFunctionObject
Templated cloud function object base class.
Definition: CloudFunctionObject.H:56
Foam::ParticleErosion
Creates particle erosion field, Q.
Definition: ParticleErosion.H:50
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
Foam::ParticleErosion::ParticleErosion
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Definition: ParticleErosion.C:67
ParticleErosion.C
Foam::ParticleErosion::psi_
scalar psi_
Ratio between depth of contact and length of cut - default=2.
Definition: ParticleErosion.H:72