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>
108 !this->owner().
mesh().time().objectRegistry::template foundObject
111 "surfaceFilmProperties" 120 this->owner().mesh().time().objectRegistry::template lookupObject
123 "surfaceFilmProperties" 134 const label filmPatchi = filmPatches[i];
135 const label primaryPatchi = primaryPatches[i];
137 const labelList& injectorCellsPatch = pbm[primaryPatchi].faceCells();
139 cacheFilmFields(filmPatchi, primaryPatchi, filmModel);
145 forAll(injectorCellsPatch, j)
147 if (diameterParcelPatch_[j] > 0)
149 const label celli = injectorCellsPatch[j];
151 const scalar offset =
154 diameterParcelPatch_[j],
155 deltaFilmPatch_[primaryPatchi][j]
157 const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j];
161 new parcelType(this->owner().pMesh(), pos, celli);
164 cloud.setParcelThermoProperties(*pPtr, 0.0);
166 setParcelProperties(*pPtr, j);
168 if (pPtr->nParticle() > 0.001)
172 cloud.checkParcelProperties(*pPtr, 0.0,
false);
175 cloud.addParticle(pPtr);
190 template<
class CloudType>
193 const label filmPatchi,
194 const label primaryPatchi,
199 filmModel.
toPrimary(filmPatchi, massParcelPatch_);
201 diameterParcelPatch_ =
206 filmModel.
toPrimary(filmPatchi, UFilmPatch_);
209 filmModel.
toPrimary(filmPatchi, rhoFilmPatch_);
211 deltaFilmPatch_[primaryPatchi] =
213 filmModel.
toPrimary(filmPatchi, deltaFilmPatch_[primaryPatchi]);
217 template<
class CloudType>
221 const label filmFacei
226 p.d() = diameterParcelPatch_[filmFacei];
227 p.U() = UFilmPatch_[filmFacei];
228 p.rho() = rhoFilmPatch_[filmFacei];
230 p.nParticle() = massParcelPatch_[filmFacei]/p.rho()/vol;
232 if (ejectedParcelType_ >= 0)
234 p.typeId() = ejectedParcelType_;
239 template<
class CloudType>
243 this->
template getModelProperty<label>(
"nParcelsTransferred");
246 this->
template getModelProperty<label>(
"nParcelsInjected");
254 os <<
" Parcels absorbed into film = " << nTransTotal <<
nl 255 <<
" New film detached parcels = " << nInjectTotal <<
endl;
257 if (this->writeTime())
259 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
260 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
261 nParcelsTransferred_ = 0;
262 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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Base class for surface film models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
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/m^3].
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.
virtual const volVectorField & U() const =0
Return the film velocity [m/s].
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::MomentumCloud< CloudType > ::parcelType parcelType
Convenience typedef to the cloud's parcel type.
Mesh data needed to do the Finite Volume discretisation.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
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.
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.
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.