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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::ParticleErosion
29
30Group
31 grpLagrangianIntermediateFunctionObjects
32
33Description
34 Creates particle erosion field, Q
35
36SourceFiles
37 ParticleErosion.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef ParticleErosion_H
42#define ParticleErosion_H
43
44#include "CloudFunctionObject.H"
45#include "volFields.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class ParticleErosion Declaration
54\*---------------------------------------------------------------------------*/
55
56template<class CloudType>
58:
59 public CloudFunctionObject<CloudType>
60{
61 // Private Data
62
63 // Typedefs
64
65 //- Convenience typedef for parcel type
66 typedef typename CloudType::parcelType parcelType;
67
68
69 //- Particle erosion field
71
72 //- List of patch indices to post-process
73 labelList patchIDs_;
74
75 //- Plastic flow stress - typical metal value = 2.7 GPa
76 scalar p_;
77
78 //- Ratio between depth of contact and length of cut - default=2
79 scalar psi_;
80
81 //- Ratio of normal and tangential forces - default=2
82 scalar K_;
83
84
85protected:
86
87 // Protected Member Functions
88
89 //- Create|read|reset the Q field
90 void resetQ();
91
92 //- Returns local patchi if patch is in patchIds_ list
93 label applyToPatch(const label globalPatchi) const;
94
95 //- Write post-processing info
96 virtual void write();
97
98
99public:
100
101 //- Runtime type information
102 TypeName("particleErosion");
103
104
105 // Constructors
106
107 //- Construct from dictionary
109 (
110 const dictionary& dict,
112 const word& modelName
113 );
114
115 //- Construct copy
117
118 //- Construct and return a clone
120 {
122 (
124 );
125 }
126
127
128 //- Destructor
129 virtual ~ParticleErosion() = default;
130
131
132 // Member Functions
133
134 // Evaluation
135
136 //- Pre-evolve hook
137 virtual void preEvolve
138 (
139 const typename parcelType::trackingData& td
140 );
141
142 //- Post-patch hook
143 virtual void postPatch
144 (
145 const parcelType& p,
146 const polyPatch& pp,
147 bool& keepParticle
148 );
149};
150
151
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154} // End namespace Foam
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158#ifdef NoRepository
159 #include "ParticleErosion.C"
160#endif
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164#endif
165
166// ************************************************************************* //
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Creates particle erosion field, Q.
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
virtual ~ParticleErosion()=default
Destructor.
label applyToPatch(const label globalPatchi) const
Returns local patchi if patch is in patchIds_ list.
virtual void write()
Write post-processing info.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
void resetQ()
Create|read|reset the Q field.
TypeName("particleErosion")
Runtime type information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73