34 template<
class CloudType>
39 ejectedParcelType_(0),
41 diameterParcelPatch_(0),
45 nParcelsTransferred_(0),
50 template<
class CloudType>
62 this->coeffDict().lookupOrDefault(
"ejectedParcelType", -1)
65 diameterParcelPatch_(0),
68 deltaFilmPatch_(owner.mesh().boundary().size()),
69 nParcelsTransferred_(0),
74 template<
class CloudType>
95 template<
class CloudType>
102 template<
class CloudType>
103 template<
class TrackCloudType>
113 this->owner().mesh().time().objectRegistry::template lookupObject
116 "surfaceFilmProperties" 132 const label filmPatchi = filmPatches[i];
133 const label primaryPatchi = primaryPatches[i];
135 const labelList& injectorCellsPatch = pbm[primaryPatchi].faceCells();
137 cacheFilmFields(filmPatchi, primaryPatchi, filmModel);
143 forAll(injectorCellsPatch, j)
145 if (diameterParcelPatch_[j] > 0)
147 const label celli = injectorCellsPatch[j];
149 const scalar offset =
152 diameterParcelPatch_[j],
153 deltaFilmPatch_[primaryPatchi][j]
155 const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j];
159 new parcelType(this->owner().pMesh(), pos, celli);
162 cloud.setParcelThermoProperties(*pPtr, 0.0);
164 setParcelProperties(*pPtr, j);
166 if (pPtr->nParticle() > 0.001)
170 cloud.checkParcelProperties(*pPtr, 0.0,
false);
173 cloud.addParticle(pPtr);
188 template<
class CloudType>
191 const label filmPatchi,
192 const label primaryPatchi,
197 filmModel.
toPrimary(filmPatchi, massParcelPatch_);
199 diameterParcelPatch_ =
204 filmModel.
toPrimary(filmPatchi, UFilmPatch_);
207 filmModel.
toPrimary(filmPatchi, rhoFilmPatch_);
209 deltaFilmPatch_[primaryPatchi] =
211 filmModel.
toPrimary(filmPatchi, deltaFilmPatch_[primaryPatchi]);
215 template<
class CloudType>
219 const label filmFacei
224 p.d() = diameterParcelPatch_[filmFacei];
225 p.U() = UFilmPatch_[filmFacei];
226 p.rho() = rhoFilmPatch_[filmFacei];
228 p.nParticle() = massParcelPatch_[filmFacei]/p.rho()/vol;
230 if (ejectedParcelType_ >= 0)
232 p.typeId() = ejectedParcelType_;
237 template<
class CloudType>
241 this->
template getModelProperty<label>(
"nParcelsTransferred");
244 this->
template getModelProperty<label>(
"nParcelsInjected");
252 os <<
" Parcels absorbed into film = " << nTransTotal <<
nl 253 <<
" New film detached parcels = " << nInjectTotal <<
endl;
255 if (this->writeTime())
257 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
258 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
259 nParcelsTransferred_ = 0;
260 nParcelsInjected_ = 0;
virtual void info(Ostream &os)
Write surface film info to stream.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
Base class for surface film models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label nParcelsInjected_
Number of parcels injected from the film model.
Base class for cloud sub-models.
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
dimensionedScalar pos(const dimensionedScalar &ds)
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
scalarListList deltaFilmPatch_
Film height of all film patches / patch face.
A class for handling words, derived from string.
A cloud is a collection of lagrangian particles.
virtual const volScalarField & delta() const =0
Return the film thickness [m].
void inject(TrackCloudType &cloud)
Inject parcels into the cloud.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
List< vector > UFilmPatch_
Film velocity / patch face.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
virtual ~SurfaceFilmModel()
Destructor.
dimensionedScalar pow3(const dimensionedScalar &ds)
Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > ::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Mesh data needed to do the Finite Volume discretisation.
scalarList diameterParcelPatch_
Parcel diameter / patch face.
label nParcelsTransferred_
Number of parcels transferred to the film model.
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmRegionModel &)
Cache the film fields in preparation for injection.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
scalarList rhoFilmPatch_
Film density / patch face.
SurfaceFilmModel(CloudType &owner)
Construct null from owner.
const volVectorField & C() const
Return cell centres as volVectorField.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
const dimensionedVector & g
Templated base class for dsmc cloud.
label ejectedParcelType_
Ejected parcel type label - id assigned to identify parcel for.
const dimensionedVector & g_
Gravitational acceleration constant.
const Switch & active() const
Return the active flag.
virtual const volScalarField & cloudDiameterTrans() const =0
Return the parcel diameters originating from film.
virtual const volScalarField & cloudMassTrans() const =0
Return the film mass available for transfer.
scalarList massParcelPatch_
Parcel mass / patch face.