Go to the documentation of this file.
30 template<
class CloudType>
33 const label globalPatchI
38 if (patchIDs_[i] == globalPatchI)
48 template<
class CloudType>
65 template<
class CloudType>
77 psi_(this->coeffDict().
template lookupOrDefault<scalar>(
"psi", 2.0)),
78 K_(this->coeffDict().
template lookupOrDefault<scalar>(
"K", 2.0))
91 <<
"Cannot find any patch names matching " << patchName[i]
95 uniquePatchIDs.
insert(patchIDs);
98 patchIDs_ = uniquePatchIDs.
toc();
105 template<
class CloudType>
122 template<
class CloudType>
129 template<
class CloudType>
134 QPtr_->internalField() = 0.0;
146 this->owner().
name() +
"Q",
147 mesh.time().timeName(),
149 IOobject::READ_IF_PRESENT,
160 template<
class CloudType>
165 const scalar trackFraction,
172 const label localPatchI = applyToPatch(patchI);
174 if (localPatchI != -1)
180 this->owner().patchData(
p, pp, trackFraction, tetIs,
nw, Up);
191 const scalar magU =
mag(
U);
197 const scalar
coeff =
p.nParticle()*
p.mass()*
sqr(magU)/(p_*psi_*K_);
200 scalar&
Q = QPtr_->boundaryField()[patchI][patchFaceI];
scalar K_
Ratio of normal and tangential forces - default=2.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dimensionedScalar tan(const dimensionedScalar &ds)
A class for handling words, derived from string.
label applyToPatch(const label globalPatchI) const
Returns local patchI if patch is in patchIds_ list.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
virtual ~ParticleErosion()
Destructor.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar p_
Plastic flow stress - typical metal value = 2.7 GPa.
virtual void write()
Write post-processing info.
dimensioned< scalar > mag(const dimensioned< Type > &)
CloudType::parcelType parcelType
Convenience typedef for parcel type.
wordList names() const
Return a list of patch names.
This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s...
virtual void preEvolve()
Pre-evolve hook.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const fvMesh & mesh() const
Return refernce to the mesh.
A patch is a list of labels that address the faces in the global face list.
labelList patchIDs_
List of patch indices to post-process.
Templated base class for dsmc cloud.
A list of keyword definitions, which are a keyword followed by any number of values (e....
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label whichFace(const label l) const
Return label of face in patch from global face label.
virtual void postPatch(const parcelType &p, const polyPatch &pp, const scalar trackFraction, const tetIndices &tetIs, bool &keepParticle)
Post-patch hook.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Templated cloud function object base class.
dimensionedScalar acos(const dimensionedScalar &ds)
bool insert(const Key &key)
Insert a new entry.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
Creates particle erosion field, Q.
const dimensionSet dimVolume(pow3(dimLength))
Generic GeometricField class.
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.
label index() const
Return the index of this patch in the boundaryMesh.
word name(const complex &)
Return a string representation of a complex.
stressControl lookup("compactNormalStress") >> compactNormalStress
scalar psi_
Ratio between depth of contact and length of cut - default=2.
dimensionedScalar cos(const dimensionedScalar &ds)