36template<
class CloudType>
50 if (Pstream::master())
53 mkDir(this->writeTimeDir());
61 this->writeTimeDir()/(
type() +
'_' + zoneName +
".dat")
66 <<
"# Source : " <<
type() <<
nl
67 <<
"# Face zone : " << zoneName <<
nl
69 <<
"# Area : " << totArea <<
nl
70 <<
"# Time" <<
tab <<
"nParcels" <<
tab <<
"mass" <<
endl;
78template<
class CloudType>
84 Info<< this->modelName() <<
" output:" <<
nl;
91 const word& zoneName = fzm[faceZoneIDs_[i]].
name();
96 Info<<
" faceZone " << zoneName
97 <<
": removed " << zoneNParcels
98 <<
" parcels with mass " << zoneMass
106template<
class CloudType>
114 List<label> allZoneNParcels(faceZoneIDs_.size(), 0);
121 if (outputFilePtr_.set(i))
126 << allZoneMass[i] <<
endl;
141 this->setModelProperty(
"mass", allZoneMass);
142 this->setModelProperty(
"nParcels", allZoneNParcels);
148template<
class CloudType>
153 const word& modelName
160 typeId_(this->coeffDict().template getOrDefault<label>(
"parcelType", -1)),
161 log_(this->coeffDict().getBool(
"log")),
162 resetOnWrite_(this->coeffDict().getBool(
"resetOnWrite")),
163 resetOnStart_(this->coeffDict().getBool(
"resetOnStart")),
177 outputFilePtr_.setSize(faceZoneNames.
size());
186 const word& zoneName = faceZoneNames[i];
197 scalar totArea = 0.0;
198 for (label facei : fz)
202 totArea += magSf[facei];
207 label patchi = pbm.
patchID()[bFacei];
213 || refCast<const coupledPolyPatch>(pp).owner()
223 makeLogFile(zoneName, i,
nFaces, totArea);
231template<
class CloudType>
238 faceZoneIDs_(rpf.faceZoneIDs_),
239 nParcels_(rpf.nParcels_),
241 typeId_(rpf.typeId_),
243 resetOnWrite_(rpf.resetOnWrite_),
244 resetOnStart_(rpf.resetOnStart_),
251template<
class CloudType>
258 if ((typeId_ >= 0) && (
p.typeId() != typeId_))
267 || this->owner().
solution().transient()
274 const faceZone& fz = fzm[faceZoneIDs_[i]];
278 mass_[i] +=
p.mass()*
p.nParticle();
279 keepParticle =
false;
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
const fvMesh & mesh() const
Return reference to the mesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const noexcept
Return the object name.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
void setSize(const label n)
Alias for resize()
void append(const T &val)
Append an element at the end of the list.
virtual void postEvolve()
Post-evolve hook.
Output to file stream, using an OSstream.
Removes parcels that hit user-specified face zone faces.
void write()
Write post-processing info.
virtual void postFace(const parcelType &p, bool &keepParticle)
Post-face hook.
The TAB Method for Numerical Calculation of Spray Droplet Breakup.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
bool found(const T &val, label pos=0) const
True if the value if found in the list.
void size(const label n)
Older name for setAddressableSize.
label findZoneID(const word &zoneName) const
Find zone index by name, return -1 if not found.
const MeshType & mesh() const noexcept
Return the mesh reference.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Class used to pass data into container.
A subset of mesh faces organised as a primitive patch.
Mesh data needed to do the Finite Volume discretisation.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
const labelList & patchID() const
Per boundary face label the patch index.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label whichFace(const label l) const
Return label of face in patch from global face label.
label nInternalFaces() const noexcept
Number of internal faces.
Lookup type of boundary radiation properties.
Selector class for relaxation factors, solver type and solution.
splitCell * master() const
bool getModelProperty(const word &entryName, Type &value) const
Retrieve generic property from the sub-model.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
const labelIOList & zoneIDs
#define DebugInfo
Report an information message using Foam::Info.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static Ostream & output(Ostream &os, const IntRange< T > &range)
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
constexpr char nl
The newline '\n' character (0x0a)
constexpr char tab
The tab '\t' character(0x09)
#define forAll(list, i)
Loop across all elements in list.