34 template<
class CloudType>
43 this->owner().
name() +
":collisionDensity",
58 this->owner().
name() +
":collisionDensityRate",
65 (collisionDensity_ - collisionDensity0_)
66 /(this->owner().
mesh().time().value() - time0_)
70 collisionDensity0_ == collisionDensity_;
71 time0_ = this->owner().mesh().time().value();
77 template<
class CloudType>
86 minSpeed_(dict.lookupOrDefault<scalar>(
"minSpeed", -1)),
89 this->owner().mesh().boundary(),
90 volScalarField::Internal::null(),
95 this->owner().mesh().boundary(),
96 volScalarField::Internal::null(),
99 time0_(this->owner().mesh().time().value())
101 collisionDensity_ == 0;
102 collisionDensity0_ == 0;
106 this->owner().
name() +
":collisionDensity",
108 this->owner().
mesh(),
122 template<
class CloudType>
129 minSpeed_(ppm.minSpeed_),
132 volScalarField::Internal::null(),
133 ppm.collisionDensity_
137 volScalarField::Internal::null(),
138 ppm.collisionDensity0_
146 template<
class CloudType>
153 template<
class CloudType>
162 const label patchFacei = p.face() - pp.
start();
165 this->owner().patchData(p, pp, nw, Up);
167 const scalar speed = (p.U() - Up) & nw;
168 if (speed > minSpeed_)
170 collisionDensity_[
patchi][patchFacei] +=
171 1/this->owner().mesh().magSf().boundaryField()[
patchi][patchFacei];
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimArea
bool typeHeaderOk(const bool checkType=true)
Read header (uses typeFilePath to find file) and check header.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const dimensionSet dimless
Operations on lists of strings.
void write()
Write post-processing info.
Various functions to operate on Lists.
virtual ~PatchCollisionDensity()
Destructor.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
A class for handling words, derived from string.
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
word name(const complex &)
Return a string representation of a complex.
Function object which generates fields of the number and rate of collisions per unit area on all patc...
label index() const
Return the index of this patch in the boundaryMesh.
label start() const
Return start label of this patch in the polyMesh face list.
virtual bool write(const bool write=true) const
Write using setting from DB.
PatchCollisionDensity(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Templated base class for dsmc cloud.
Templated cloud function object base class.