33template<
class CloudType>
38 QPtr_->primitiveFieldRef() = 0.0;
50 this->owner().
name() +
"Q",
51 mesh.time().timeName(),
53 IOobject::READ_IF_PRESENT,
64template<
class CloudType>
67 const label globalPatchi
70 return patchIDs_.find(globalPatchi);
74template<
class CloudType>
91template<
class CloudType>
102 p_(this->coeffDict().getScalar(
"p")),
103 psi_(this->coeffDict().template getOrDefault<scalar>(
"psi", 2.0)),
104 K_(this->coeffDict().template getOrDefault<scalar>(
"K", 2.0))
109 this->
coeffDict().
template get<wordRes>(
"patches")
120 <<
"Cannot find any patch names matching " << re
134template<
class CloudType>
142 patchIDs_(pe.patchIDs_),
151template<
class CloudType>
161template<
class CloudType>
169 const label patchi = pp.
index();
171 const label localPatchi = applyToPatch(patchi);
173 if (localPatchi != -1)
179 this->owner().patchData(
p, pp, nw, Up);
190 const scalar magU =
mag(
U);
194 const scalar
alpha = mathematical::piByTwo -
acos(nw & Udir);
196 const scalar coeff =
p.nParticle()*
p.mass()*
sqr(magU)/(p_*psi_*K_);
198 const label patchFacei = pp.
whichFace(
p.face());
199 scalar& Q = QPtr_->boundaryFieldRef()[patchi][patchFacei];
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
const fvMesh & mesh() const
Return reference to the mesh.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Creates particle erosion field, Q.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
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.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Class used to pass data into container.
Mesh data needed to do the Finite Volume discretisation.
label index() const noexcept
The index of this patch in the boundaryMesh.
wordList names() const
Return a list of patch names.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label whichFace(const label l) const
Return label of face in patch from global face label.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensionedScalar tan(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sin(const dimensionedScalar &ds)
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
wordList patchNames(nPatches)