Go to the documentation of this file.
33 template<
class CloudType>
38 QPtr_->primitiveFieldRef() = 0.0;
50 this->owner().
name() +
"Q",
51 mesh.time().timeName(),
53 IOobject::READ_IF_PRESENT,
64 template<
class CloudType>
67 const label globalPatchi
70 return patchIDs_.find(globalPatchi);
74 template<
class CloudType>
91 template<
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
127 patchIDs_ = uniqIds.sortedToc();
134 template<
class CloudType>
142 patchIDs_(pe.patchIDs_),
151 template<
class CloudType>
154 const typename parcelType::trackingData& td
161 template<
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);
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];
Defines the attributes of an object for which implicit objectRegistry management is supported,...
dimensionedScalar tan(const dimensionedScalar &ds)
A class for handling words, derived from Foam::string.
label applyToPatch(const label globalPatchi) const
Returns local patchi if patch is in patchIds_ list.
static constexpr const zero Zero
Global zero (0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar sin(const dimensionedScalar &ds)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void write()
Write post-processing info.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
wordList names() const
Return a list of patch names.
const fvMesh & mesh() const
Return reference to the mesh.
A patch is a list of labels that address the faces in the global face list.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
wordList patchNames(nPatches)
Templated base class for dsmc cloud.
const dimensionedScalar re
Classical electron radius: default SI units: [m].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
label index() const noexcept
The index of this patch in the boundaryMesh.
errorManip< error > abort(error &err)
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
constexpr scalar piByTwo(0.5 *M_PI)
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
#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.
Templated cloud function object base class.
dimensionedScalar acos(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void resetQ()
Create|read|reset the Q field.
A List of wordRe with additional matching capabilities.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const dimensionSet dimVolume(pow3(dimLength))
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensionedScalar cos(const dimensionedScalar &ds)