Go to the documentation of this file.
30 template<
class CloudType>
40 this->wordToInteractionType(this->coeffDict().
lookup(
"type"))
49 switch (interactionType_)
53 const word interactionTypeName(this->coeffDict().
lookup(
"type"));
56 <<
"Unknown interaction result type "
57 << interactionTypeName
58 <<
". Valid selections are:" << this->interactionTypeNames_
65 e_ = this->coeffDict().lookupOrDefault(
"e", 1.0);
66 mu_ = this->coeffDict().lookupOrDefault(
"mu", 0.0);
77 template<
class CloudType>
96 template<
class CloudType>
103 template<
class CloudType>
109 const scalar trackFraction,
115 bool& active =
p.active();
117 if (isA<wallPolyPatch>(pp))
119 switch (interactionType_)
123 keepParticle =
false;
127 massEscape_ +=
p.nParticle()*
p.mass();
136 massStick_ +=
p.nParticle()*
p.mass();
147 this->owner().patchData(
p, pp, trackFraction, tetIs,
nw, Up);
157 U -= (1.0 + e_)*Un*
nw;
170 <<
"Unknown interaction type "
171 << this->interactionTypeToWord(interactionType_)
172 <<
"(" << interactionType_ <<
")" <<
endl
184 template<
class CloudType>
189 label npe0 = this->
template getModelProperty<scalar>(
"nEscape");
192 scalar mpe0 = this->
template getModelProperty<scalar>(
"massEscape");
195 label nps0 = this->
template getModelProperty<scalar>(
"nStick");
198 scalar mps0 = this->
template getModelProperty<scalar>(
"massStick");
201 os <<
" Parcel fate: walls (number, mass)" <<
nl
202 <<
" - escape = " << npe <<
", " << mpe <<
nl
203 <<
" - stick = " << nps <<
", " << mps <<
nl;
205 if (this->outputTime())
207 this->setModelProperty(
"nEscape", npe);
210 this->setModelProperty(
"massEscape", mpe);
213 this->setModelProperty(
"nStick", nps);
216 this->setModelProperty(
"massStick", mps);
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle, const scalar trackFraction, const tetIndices &tetIs)
Apply velocity correction.
A class for handling words, derived from string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Wall interaction model. Three choices:
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~StandardWallInteraction()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void info(Ostream &os)
Write patch interaction info to stream.
A patch is a list of labels that address the faces in the global face list.
Templated base class for dsmc cloud.
label nEscape_
Number of parcels escaped.
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar massStick_
Mass of parcels stuck to patches.
errorManip< error > abort(error &err)
scalar e_
Elasticity coefficient.
errorManipArg< error, int > exit(error &err, const int errNo=1)
PatchInteractionModel< CloudType >::interactionType interactionType_
Interaction type.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
A cloud is a collection of lagrangian particles.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label nStick_
Number of parcels stuck to patches.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
scalar massEscape_
Mass of parcels escaped.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
StandardWallInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
stressControl lookup("compactNormalStress") >> compactNormalStress
scalar mu_
Restitution coefficient.