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 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];
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void resetQ()
Create|read|reset the Q field.
dimensionedScalar acos(const dimensionedScalar &ds)
label whichFace(const label facei) const noexcept
Return label of face in patch from global face label.
labelList findMatchingStrings(const UnaryMatchPredicate &matcher, const UList< StringType > &input, const bool invert=false)
Extract list indices for all matches.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionedScalar re
Classical electron radius: default SI units: [m].
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
Creates particle erosion field, Q.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const CloudType & owner() const
Return const access to the owner cloud.
const dimensionSet dimVolume(pow3(dimLength))
dimensionedScalar cos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
wordList names() const
Return a list of patch names.
wordList patchNames(nPatches)
A List of wordRe with additional matching capabilities.
virtual void write()
Write post-processing info.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
constexpr scalar piByTwo(0.5 *M_PI)
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
errorManip< error > abort(error &err)
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
dimensionedScalar sin(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const fvMesh & mesh() const
Return reference to the mesh.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
label index() const noexcept
The index of this patch in the boundaryMesh.
label applyToPatch(const label globalPatchi) const
Returns local patchi if patch is in patchIds_ list.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
A patch is a list of labels that address the faces in the global face list.
dimensionedScalar tan(const dimensionedScalar &ds)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
Templated base class for dsmc cloud.
Templated cloud function object base class.
static constexpr const zero Zero
Global zero (0)