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);
75 template<
class CloudType>
94 template<
class CloudType>
101 template<
class CloudType>
111 bool& moving = p.moving();
113 if (isA<wallPolyPatch>(pp))
115 switch (interactionType_)
123 keepParticle =
false;
127 massEscape_ += p.mass()*p.nParticle();
146 this->owner().patchData(p, pp, nw, Up);
156 U -= (1.0 + e_)*Un*nw;
169 <<
"Unknown interaction type " 170 << this->interactionTypeToWord(interactionType_)
171 <<
"(" << interactionType_ <<
")" <<
endl 183 template<
class CloudType>
186 label npe0 = this->
template getBaseProperty<scalar>(
"nEscape");
189 scalar mpe0 = this->
template getBaseProperty<scalar>(
"massEscape");
192 label nps0 = this->
template getBaseProperty<scalar>(
"nStick");
195 scalar mps0 = this->
template getBaseProperty<scalar>(
"massStick");
198 os <<
" Parcel fate (number, mass)" <<
nl 199 <<
" - escape = " << npe <<
", " << mpe <<
nl 200 <<
" - stick = " << nps <<
", " << mps <<
nl;
202 if (this->writeTime())
204 this->setModelProperty(
"nEscape", npe);
205 this->setModelProperty(
"massEscape", mpe);
206 this->setModelProperty(
"nStick", nps);
207 this->setModelProperty(
"massStick", mps);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalar mu_
Restitution coefficient.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Apply velocity correction.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~StandardWallInteraction()
Destructor.
Templated patch interaction model class.
PatchInteractionModel< CloudType >::interactionType interactionType_
Interaction type.
scalar massEscape_
Mass of parcels escaped.
stressControl lookup("compactNormalStress") >> compactNormalStress
A class for handling words, derived from string.
label nStick_
Number of parcels stuck to patches.
errorManip< error > abort(error &err)
scalar e_
Elasticity coefficient.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void info(Ostream &os)
Write patch interaction info to stream.
scalar massStick_
Mass of parcels stuck to patches.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
StandardWallInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
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.