30 template<
class CloudType>
40 this->wordToInteractionType(this->coeffDict().lookup(
"type"))
54 <<
"Unknown patch interaction type "
55 << this->
coeffDict().template lookup<word>(
"type")
56 <<
". Valid types are:"
65 e_ = this->
coeffDict().template lookupOrDefault<scalar>(
"e", 1);
66 mu_ = this->
coeffDict().template lookupOrDefault<scalar>(
"mu", 0);
77 template<
class CloudType>
84 interactionType_(pim.interactionType_),
87 nEscape_(pim.nEscape_),
88 massEscape_(pim.massEscape_),
90 massStick_(pim.massStick_)
96 template<
class CloudType>
103 template<
class CloudType>
111 if (!isA<wallPolyPatch>(pp))
116 switch (interactionType_)
125 keepParticle =
false;
129 massEscape_ +=
p.mass()*
p.nParticle();
150 this->owner().patchData(
p, pp, nw, Up);
155 const scalar Un =
p.U() & nw;
156 const vector Ut =
p.U() - Un*nw;
160 p.U() -= (1 + e_)*Un*nw;
179 template<
class CloudType>
182 label npe0 = this->
template getBaseProperty<scalar>(
"nEscape");
185 scalar mpe0 = this->
template getBaseProperty<scalar>(
"massEscape");
188 label nps0 = this->
template getBaseProperty<scalar>(
"nStick");
191 scalar mps0 = this->
template getBaseProperty<scalar>(
"massStick");
194 os <<
" Parcel fate (number, mass)" <<
nl
195 <<
" - escape = " << npe <<
", " << mpe <<
nl
196 <<
" - stick = " << nps <<
", " << mps <<
nl;
198 if (this->writeTime())
200 this->setModelProperty(
"nEscape", npe);
201 this->setModelProperty(
"massEscape", mpe);
202 this->setModelProperty(
"nStick", nps);
203 this->setModelProperty(
"massStick", mps);
Templated base class for dsmc cloud.
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,...
Templated patch interaction model class.
virtual void info(Ostream &os)
Write patch interaction info to stream.
StandardWallInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
scalar mu_
Restitution coefficient.
scalar e_
Elasticity coefficient.
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Apply velocity correction.
virtual ~StandardWallInteraction()
Destructor.
PatchInteractionModel< CloudType >::interactionType interactionType_
Interaction type.
A cloud is a collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A patch is a list of labels that address the faces in the global face list.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)