34 template<
class CloudType>
39 QPtr_->primitiveFieldRef() = 0.0;
51 this->owner().
name() +
"Q",
52 mesh.time().timeName(),
54 IOobject::READ_IF_PRESENT,
65 template<
class CloudType>
68 const label globalPatchi
71 return patchIDs_.find(globalPatchi);
75 template<
class CloudType>
92 template<
class CloudType>
103 p_(this->coeffDict().getScalar(
"p")),
104 psi_(this->coeffDict().template getOrDefault<scalar>(
"psi", 2.0)),
105 K_(this->coeffDict().template getOrDefault<scalar>(
"K", 2.0))
110 this->
coeffDict().
template get<wordRes>(
"patches")
121 <<
"Cannot find any patch names matching " 135 template<
class CloudType>
143 patchIDs_(pe.patchIDs_),
152 template<
class CloudType>
155 const typename parcelType::trackingData&
td 162 template<
class CloudType>
167 const typename parcelType::trackingData&
td 170 const label patchi =
pp.index();
172 const label localPatchi = applyToPatch(patchi);
174 if (localPatchi != -1)
180 this->owner().patchData(
p,
pp, nw, Up);
191 const scalar magU =
mag(
U);
197 const scalar coeff =
p.nParticle()*
p.mass()*
sqr(magU)/(p_*psi_*K_);
199 const label patchFacei =
pp.whichFace(
p.face());
200 scalar& Q = QPtr_->boundaryFieldRef()[patchi][patchFacei];
void resetQ()
Create|read|reset the Q field.
dimensionedScalar acos(const dimensionedScalar &ds)
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.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Creates particle erosion field, Q.
virtual bool postPatch(const parcelType &p, const polyPatch &pp, const typename parcelType::trackingData &td)
Post-patch hook.
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 expressions::valueTypeCode::INVALID.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
static labelList matching(const wordRe &select, const UList< StringType > &input, const bool invert=false)
Determine the list indices for all matches.
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 applyToPatch(const label globalPatchi) const
Returns local patchi if patch is in patchIds_ list.
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.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)