33 template<
class CloudType>
38 ejectedParcelType_(0),
40 diameterParcelPatch_(0),
42 nParcelsTransferred_(0),
47 template<
class CloudType>
59 this->typeDict().lookupOrDefault(
"ejectedParcelType", -1)
62 diameterParcelPatch_(0),
64 nParcelsTransferred_(0),
69 template<
class CloudType>
77 ejectedParcelType_(sfm.ejectedParcelType_),
78 massParcelPatch_(sfm.massParcelPatch_),
79 diameterParcelPatch_(sfm.diameterParcelPatch_),
80 deltaFilmPatch_(sfm.deltaFilmPatch_),
81 nParcelsTransferred_(sfm.nParcelsTransferred_),
82 nParcelsInjected_(sfm.nParcelsInjected_)
88 template<
class CloudType>
95 template<
class CloudType>
96 template<
class TrackCloudType>
101 const labelList& filmPatches = this->filmPatches();
103 forAll(filmPatches, filmi)
105 const label filmPatchi = filmPatches[filmi];
110 const labelList& injectorCellsPatch = pbm[filmPatchi].faceCells();
113 cacheFilmFields(filmi);
119 label nLocateBoundaryHits = 0;
121 if (massParcelPatch_.size())
123 forAll(injectorCellsPatch, j)
125 if (massParcelPatch_[j] > 0)
127 const label celli = injectorCellsPatch[j];
131 diameterParcelPatch_[j],
148 cloud.setParcelThermoProperties(*pPtr);
150 setParcelProperties(*pPtr, j);
152 if (pPtr->nParticle() > 0.001)
155 cloud.checkParcelProperties(*pPtr, -1);
158 cloud.addParticle(pPtr);
172 if (nLocateBoundaryHits != 0)
175 <<
"Injection by surface film model for cloud "
176 << this->owner().name()
177 <<
" on patch " << pbm[filmPatchi].
name()
178 <<
" did not accurately locate " << nLocateBoundaryHits
179 <<
" particles" <<
endl;
185 template<
class CloudType>
189 this->
template getModelProperty<label>(
"nParcelsTransferred");
192 this->
template getModelProperty<label>(
"nParcelsInjected");
200 os <<
" Parcels absorbed into film = " << nTransTotal <<
nl
201 <<
" New film detached parcels = " << nInjectTotal <<
endl;
203 if (this->writeTime())
205 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
206 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
207 nParcelsTransferred_ = 0;
208 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.
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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 & poly() const
Return reference to polyMesh.
Mesh object that implements searches within the local cells and faces.
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
const polyBoundaryMesh & boundary() const
Return boundary mesh.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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)
void offset(label &lst, const label o)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.