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
72 if (patchIDs_[i] == globalPatchi)
82 template<
class CloudType>
99 template<
class CloudType>
104 const word& modelName
110 p_(this->coeffDict().getScalar(
"p")),
111 psi_(this->coeffDict().
template getOrDefault<scalar>(
"psi", 2.0)),
112 K_(this->coeffDict().
template getOrDefault<scalar>(
"K", 2.0))
117 this->coeffDict().
template get<wordRes>(
"patches")
128 <<
"Cannot find any patch names matching " <<
re
142 template<
class CloudType>
150 patchIDs_(pe.patchIDs_),
159 template<
class CloudType>
162 const typename parcelType::trackingData& td
169 template<
class CloudType>
177 const label patchi = pp.
index();
179 const label localPatchi = applyToPatch(patchi);
181 if (localPatchi != -1)
187 this->owner().patchData(
p, pp, nw, Up);
198 const scalar magU =
mag(
U);
204 const scalar coeff =
p.nParticle()*
p.mass()*
sqr(magU)/(p_*psi_*K_);
206 const label patchFacei = pp.
whichFace(
p.face());
207 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.
#define forAll(list, i)
Loop across all elements in list.
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.
word name(const complex &c)
Return string representation of complex.
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.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
errorManip< error > abort(error &err)
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
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.
const dimensionSet dimVolume(pow3(dimLength))
ParticleErosion(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.
label index() const
The index of this patch in the boundaryMesh.
dimensionedScalar cos(const dimensionedScalar &ds)