32 template<
class CloudType>
37 ejectedParcelType_(0),
39 diameterParcelPatch_(0),
41 nParcelsTransferred_(0),
46 template<
class CloudType>
58 this->coeffDict().lookupOrDefault(
"ejectedParcelType", -1)
61 diameterParcelPatch_(0),
63 nParcelsTransferred_(0),
68 template<
class CloudType>
76 ejectedParcelType_(sfm.ejectedParcelType_),
77 massParcelPatch_(sfm.massParcelPatch_),
78 diameterParcelPatch_(sfm.diameterParcelPatch_),
79 deltaFilmPatch_(sfm.deltaFilmPatch_),
80 nParcelsTransferred_(sfm.nParcelsTransferred_),
81 nParcelsInjected_(sfm.nParcelsInjected_)
87 template<
class CloudType>
94 template<
class CloudType>
95 template<
class TrackCloudType>
98 const labelList& filmPatches = this->filmPatches();
100 forAll(filmPatches, filmi)
102 const label filmPatchi = filmPatches[filmi];
107 const labelList& injectorCellsPatch = pbm[filmPatchi].faceCells();
110 cacheFilmFields(filmi);
116 label nLocateBoundaryHits = 0;
118 if (massParcelPatch_.size())
120 forAll(injectorCellsPatch, j)
122 if (massParcelPatch_[j] > 0)
124 const label celli = injectorCellsPatch[j];
128 diameterParcelPatch_[j],
138 this->owner().pMesh(),
145 cloud.setParcelThermoProperties(*pPtr);
147 setParcelProperties(*pPtr, j);
149 if (pPtr->nParticle() > 0.001)
152 cloud.checkParcelProperties(*pPtr, -1);
155 cloud.addParticle(pPtr);
169 if (nLocateBoundaryHits != 0)
172 <<
"Injection by surface film model for cloud "
173 << this->owner().name()
174 <<
" on patch " << pbm[filmPatchi].
name()
175 <<
" did not accurately locate " << nLocateBoundaryHits
176 <<
" particles" <<
endl;
182 template<
class CloudType>
186 this->
template getModelProperty<label>(
"nParcelsTransferred");
189 this->
template getModelProperty<label>(
"nParcelsInjected");
197 os <<
" Parcels absorbed into film = " << nTransTotal <<
nl
198 <<
" New film detached parcels = " << nInjectTotal <<
endl;
200 if (this->writeTime())
202 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
203 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
204 nParcelsTransferred_ = 0;
205 nParcelsInjected_ = 0;
#define forAll(list, i)
Loop across all elements in list.
Base class for cloud sub-models.
Templated base class for dsmc cloud.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const
Return name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Templated wall surface film model class.
void inject(TrackCloudType &cloud)
Inject parcels into the cloud.
virtual void info(Ostream &os)
Write surface film info to stream.
virtual ~SurfaceFilmModel()
Destructor.
SurfaceFilmModel(CloudType &owner)
Construct null from owner.
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel 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....
Mesh data needed to do the Finite Volume discretisation.
const volVectorField & C() const
Return cell centres.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
const polyMesh & mesh() const
Return reference to polyMesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A class for handling words, derived from string.
#define WarningInFunction
Report a warning using Foam::Warning.
dimensionedScalar pos(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void offset(label &lst, const label o)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.