36 template<
class CloudType>
39 "rebound",
"stick",
"escape" 45 template<
class CloudType>
48 this->
writeHeader(os,
"Particle patch interaction");
49 this->writeHeaderValue(
os,
"Model", this->modelType());
51 this->writeCommented(
os,
"Time");
52 this->writeTabbed(
os,
"escapedParcels");
53 this->writeTabbed(
os,
"escapedMass");
59 template<
class CloudType>
62 const interactionType& itEnum
98 template<
class CloudType>
105 if (itWord ==
"none")
109 if (itWord ==
"rebound")
113 else if (itWord ==
"stick")
117 else if (itWord ==
"escape")
130 template<
class CloudType>
137 functionObjects::writeFile(owner, this->localPath(), typeName, false),
145 template<
class CloudType>
154 functionObjects::writeFile
162 UName_(this->coeffDict().template getOrDefault<
word>(
"U",
"U")),
165 Urmax_(this->coeffDict().template getOrDefault<scalar>(
"UrMax", 0))
169 template<
class CloudType>
176 functionObjects::writeFile(pim),
178 escapedParcels_(pim.escapedParcels_),
179 escapedMass_(pim.escapedMass_),
186 template<
class CloudType>
193 template<
class CloudType>
200 template<
class CloudType>
206 escapedMass_ += mass;
211 template<
class CloudType>
216 template<
class CloudType>
221 const label escapedParcels0 =
222 this->
template getBaseProperty<label>(
"escapedParcels");
223 const label escapedParcelsTotal =
226 const scalar escapedMass0 =
227 this->
template getBaseProperty<scalar>(
"escapedMass");
228 const scalar escapedMassTotal =
231 Log_<<
" Parcel fate: system (number, mass)" <<
nl 232 <<
" - escape = " << escapedParcelsTotal
233 <<
", " << escapedMassTotal <<
endl;
235 if (!this->writtenHeader_)
237 this->writeFileHeader(this->file());
238 this->writtenHeader_ =
true;
239 this->file() <<
endl;
242 this->writeCurrentTime(this->file());
244 <<
tab << escapedParcelsTotal <<
tab << escapedMassTotal;
247 if (this->writeTime())
249 this->setBaseProperty(
"escapedParcels", escapedParcelsTotal);
252 this->setBaseProperty(
"escapedMass", escapedMassTotal);
PatchInteractionModel(CloudType &owner)
Construct null from owner.
static word interactionTypeToWord(const interactionType &itEnum)
Convert interaction result to word.
static void writeHeader(Ostream &os, const word &fieldName)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char tab
The tab '\t' character(0x09)
virtual void addToEscapedParcels(const scalar mass)
Add to escaped parcels.
Base class for cloud sub-models.
virtual void info()
Write patch interaction info.
Templated patch interaction model class.
const dimensionedScalar e
Elementary charge.
#define Log_
Report write to Foam::Info if the class log switch is true.
A class for handling words, derived from Foam::string.
const scalar & Urmax() const
Return Urmax.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const word & UName() const
Return name of velocity field.
return returnReduce(nRefine-oldNRefine, sumOp< label >())
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual void postEvolve()
Post-evolve hook.
Templated base class for dsmc cloud.
static interactionType wordToInteractionType(const word &itWord)
Convert word to interaction result.