30 template<
class CloudType>
33 const label globalPatchI
38 if (patchIDs_[i] == globalPatchI)
48 template<
class CloudType>
57 FatalErrorIn(
"void Foam::ParticleErosion<CloudType>::write()")
65 template<
class CloudType>
77 psi_(this->coeffDict().
template lookupOrDefault<scalar>(
"psi", 2.0)),
78 K_(this->coeffDict().
template lookupOrDefault<scalar>(
"K", 2.0))
80 const wordList allPatchNames = owner.mesh().boundaryMesh().names();
92 "Foam::ParticleErosion<CloudType>::ParticleErosion" 97 ) <<
"Cannot find any patch names matching " << patchName[i]
101 uniquePatchIDs.
insert(patchIDs);
104 patchIDs_ = uniquePatchIDs.
toc();
111 template<
class CloudType>
119 patchIDs_(pe.patchIDs_),
128 template<
class CloudType>
135 template<
class CloudType>
140 QPtr_->internalField() = 0.0;
152 this->owner().
name() +
"Q",
155 IOobject::READ_IF_PRESENT,
166 template<
class CloudType>
171 const scalar trackFraction,
178 const label localPatchI = applyToPatch(patchI);
180 if (localPatchI != -1)
186 this->owner().patchData(p, pp, trackFraction, tetIs, nw, Up);
197 const scalar magU =
mag(U);
198 const vector Udir = U/magU;
203 const scalar coeff = p.nParticle()*p.mass()*
sqr(magU)/(p_*psi_*K_);
206 scalar&
Q = QPtr_->boundaryField()[patchI][patchFaceI];
207 if (
tan(alpha) < K_/6.0)
209 Q += coeff*(
sin(2.0*alpha) - 6.0/K_*
sqr(
sin(alpha)));
213 Q += coeff*(K_*
sqr(
cos(alpha))/6.0);
Mesh data needed to do the Finite Volume discretisation.
virtual void postPatch(const parcelType &p, const polyPatch &pp, const scalar trackFraction, const tetIndices &tetIs, bool &keepParticle)
Post-patch hook.
dimensioned< scalar > mag(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
bool empty() const
Return true if the UList is empty (ie, size() is zero).
label index() const
Return the index of this patch in the boundaryMesh.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A patch is a list of labels that address the faces in the global face list.
const Time & time() const
Return the top-level database.
Ostream & endl(Ostream &os)
Add newline and flush stream.
stressControl lookup("compactNormalStress") >> compactNormalStress
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
label applyToPatch(const label globalPatchI) const
Returns local patchI if patch is in patchIds_ list.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar cos(const dimensionedScalar &ds)
virtual ~ParticleErosion()
Destructor.
dimensionedScalar acos(const dimensionedScalar &ds)
List< Key > toc() const
Return the table of contents.
virtual void write()
Write post-processing info.
errorManip< error > abort(error &err)
dimensionedScalar tan(const dimensionedScalar &ds)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
#define forAllReverse(list, i)
const dimensionSet dimVolume(pow3(dimLength))
virtual void preEvolve()
Pre-evolve hook.
Templated base class for dsmc cloud.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Templated cloud function object base class.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
This function object calculates and outputs the second invariant of the velocity gradient tensor [1/s...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
label whichFace(const label l) const
Return label of face in patch from global face label.
Creates particle erosion field, Q.
dimensionedScalar sin(const dimensionedScalar &ds)
bool insert(const Key &key)
Insert a new entry.