36template<
class CloudType>
39 "rebound",
"stick",
"escape"
45template<
class CloudType>
49 this->writeHeaderValue(
os,
"Model", this->modelType());
51 this->writeCommented(
os,
"Time");
52 this->writeTabbed(
os,
"escapedParcels");
59template<
class CloudType>
62 const interactionType& itEnum
98template<
class CloudType>
105 if (itWord ==
"none")
109 if (itWord ==
"rebound")
113 else if (itWord ==
"stick")
117 else if (itWord ==
"escape")
130template<
class CloudType>
136 CloudSubModelBase<CloudType>(owner),
137 functionObjects::writeFile(owner, this->localPath(), typeName, false),
145template<
class CloudType>
169template<
class CloudType>
178 escapedParcels_(pim.escapedParcels_),
179 escapedMass_(pim.escapedMass_),
186template<
class CloudType>
193template<
class CloudType>
200template<
class CloudType>
211template<
class CloudType>
216template<
class CloudType>
221 const label escapedParcels0 =
222 this->
template getBaseProperty<label>(
"escapedParcels");
223 const label escapedParcelsTotal =
226 const scalar escapedMass0 =
228 const scalar escapedMassTotal =
231 Log_<<
" Parcel fate: system (number, mass)" <<
nl
232 <<
" - escape = " << escapedParcelsTotal
233 <<
", " << escapedMassTotal <<
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);
Base class for cloud sub-models.
virtual fileName localPath() const
Output directory.
const CloudType & owner() const
Return const access to the owner cloud.
virtual void info()
Write to info.
CloudSubModelBase(CloudType &owner)
Construct null from owner cloud.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Templated patch interaction model class.
virtual void postEvolve()
Post-evolve hook.
const scalar & Urmax() const
Return Urmax.
static wordList interactionTypeNames_
PatchInteractionModel(CloudType &owner)
Construct null from owner.
scalar escapedMass_
Mass of parcels escaped.
label escapedParcels_
Number of parcels escaped.
virtual void addToEscapedParcels(const scalar mass)
Add to escaped parcels.
const word & UName() const
Return name of velocity field.
virtual void info()
Write patch interaction info.
static interactionType wordToInteractionType(const word &itWord)
Convert word to interaction result.
virtual void writeFileHeader(Ostream &os)
Output file header information.
const word UName_
Name of velocity field - default = "U".
static word interactionTypeToWord(const interactionType &itEnum)
Convert interaction result to word.
scalar Urmax_
Maximum relative U with patch for particle to be removed.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
bool writtenHeader_
Flag to identify whether the header has been written.
virtual OFstream & file()
Return access to the file (if only 1).
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
Type getBaseProperty(const word &entryName, const Type &defaultValue=Type(Zero)) const
Retrieve generic property from the base model.
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelType() const
Return const access to the sub-model type.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
return returnReduce(nRefine-oldNRefine, sumOp< label >())
#define Log_
Report write to Foam::Info if the class log switch is true.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
List< word > wordList
List of word.
DSMCCloud< dsmcParcel > CloudType
static void writeHeader(Ostream &os, const word &fieldName)
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).
constexpr char tab
The tab '\t' character(0x09).