37 template<
class CloudType>
40 const scalarField z(this->owner().mesh().nCells(), 0);
46 this->owner().
name() +
":numberCollisionDensity",
47 this->owner().mesh().time().
name(),
53 numberCollisionDensity_
61 this->owner().
name() +
":numberCollisionDensityRate",
62 this->owner().mesh().time().
name(),
68 (numberCollisionDensity_ - numberCollisionDensity0_)
69 /(this->owner().mesh().time().value() - time0_)
77 this->owner().
name() +
":massCollisionDensity",
78 this->owner().mesh().time().
name(),
92 this->owner().
name() +
":massCollisionDensityRate",
93 this->owner().mesh().time().
name(),
99 (massCollisionDensity_ - massCollisionDensity0_)
100 /(this->owner().mesh().time().value() - time0_)
104 numberCollisionDensity0_ == numberCollisionDensity_;
105 massCollisionDensity0_ == massCollisionDensity_;
106 time0_ = this->owner().mesh().time().value();
112 template<
class CloudType>
117 const word& modelName
121 minSpeed_(
dict.lookupOrDefault<scalar>(
"minSpeed", -1)),
122 numberCollisionDensity_
128 numberCollisionDensity0_
134 massCollisionDensity_
140 massCollisionDensity0_
146 time0_(this->owner().mesh().time().value())
148 numberCollisionDensity_ == 0;
149 numberCollisionDensity0_ == 0;
150 massCollisionDensity_ == 0;
151 massCollisionDensity0_ == 0;
155 this->
owner().
name() +
":numberCollisionDensity",
157 this->
owner().mesh(),
169 numberCollisionDensity_ == numberCollisionDensity.
boundaryField();
170 numberCollisionDensity0_ == numberCollisionDensity.
boundaryField();
175 this->
owner().
name() +
":massCollisionDensity",
177 this->
owner().mesh(),
189 massCollisionDensity_ == massCollisionDensity.
boundaryField();
190 massCollisionDensity0_ == massCollisionDensity.
boundaryField();
195 template<
class CloudType>
202 minSpeed_(ppm.minSpeed_),
203 numberCollisionDensity_
206 ppm.numberCollisionDensity_
208 numberCollisionDensity0_
211 ppm.numberCollisionDensity0_
213 massCollisionDensity_
216 ppm.massCollisionDensity_
218 massCollisionDensity0_
221 ppm.massCollisionDensity0_
229 template<
class CloudType>
236 template<
class CloudType>
247 if (isA<nonConformalFvPatch>(fvp))
251 numberCollisionDensity_[
patchi].map
253 numberCollisionDensity_[
patchi],
256 numberCollisionDensity0_[
patchi].map
258 numberCollisionDensity0_[
patchi],
261 massCollisionDensity_[
patchi].map
263 massCollisionDensity_[
patchi],
266 massCollisionDensity0_[
patchi].map
268 massCollisionDensity0_[
patchi],
272 numberCollisionDensity_[
patchi] == 0;
273 numberCollisionDensity0_[
patchi] == 0;
274 massCollisionDensity_[
patchi] == 0;
275 massCollisionDensity0_[
patchi] == 0;
282 template<
class CloudType>
286 if (!
p.onBoundaryFace(mesh))
return;
295 this->owner().patchData(
p, pp, nw, Up);
297 const scalar speed = (
p.U() - Up) & nw;
299 if (speed > minSpeed_)
302 this->owner().mesh().magSf().boundaryField()[
patchi][patchFacei];
304 numberCollisionDensity_[
patchi][patchFacei] +=
306 massCollisionDensity_[
patchi][patchFacei] +=
307 p.nParticle()*
p.mass()/magSf;
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Function object which generates fields of the number and mass and rates thereof of collisions per uni...
PatchCollisionDensity(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual ~PatchCollisionDensity()
Destructor.
virtual void preFace(const parcelType &p)
Pre-face hook.
void write()
Write post-processing info.
virtual void preEvolve()
Pre-evolve hook.
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const polyMesh & mesh() const
Return reference to polyMesh.
bool conformal() const
Return whether the fvMesh is conformal with the polyMesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual label size() const
Return size.
label index() const
Return the index of this patch in the boundaryMesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
label start() const
Return start label of this patch in the polyMesh face list.
Mapper which sets the field size. It does not actually map values.
Templated form of IOobject providing type information for file reading and header type checking.
bool headerOk()
Read header (uses typeGlobalFile to find file) and check.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimTime
VolField< scalar > volScalarField
const dimensionSet dimMass
const dimensionSet dimArea
faceListList boundary(nPatches)
Operations on lists of strings.