Go to the documentation of this file.
37 template<
class CloudType>
42 ejectedParcelType_(0),
44 diameterParcelPatch_(0),
48 nParcelsTransferred_(0),
53 template<
class CloudType>
65 this->coeffDict().getOrDefault(
"ejectedParcelType", -1)
68 diameterParcelPatch_(0),
72 nParcelsTransferred_(0),
77 template<
class CloudType>
98 template<
class CloudType>
105 template<
class CloudType>
106 template<
class TrackCloudType>
116 this->owner().
mesh().
time().objectRegistry::template lookupObject
119 "surfaceFilmProperties"
135 const label filmPatchi = filmPatches[i];
136 const label primaryPatchi = primaryPatches[i];
138 const labelList& injectorCellsPatch = pbm[primaryPatchi].faceCells();
140 cacheFilmFields(filmPatchi, primaryPatchi, filmModel);
144 const scalarField& magSf =
mesh.magSf().boundaryField()[primaryPatchi];
146 forAll(injectorCellsPatch, j)
148 if (diameterParcelPatch_[j] > 0)
150 const label celli = injectorCellsPatch[j];
152 const scalar offset =
155 diameterParcelPatch_[j],
156 deltaFilmPatch_[primaryPatchi][j]
158 const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j];
165 cloud.setParcelThermoProperties(*pPtr, 0.0);
167 setParcelProperties(*pPtr, j);
169 if (pPtr->nParticle() > 0.001)
173 cloud.checkParcelProperties(*pPtr, 0.0,
false);
176 cloud.addParticle(pPtr);
191 template<
class CloudType>
194 const label filmPatchi,
195 const label primaryPatchi,
200 filmModel.
toPrimary(filmPatchi, massParcelPatch_);
202 diameterParcelPatch_ =
207 filmModel.
toPrimary(filmPatchi, UFilmPatch_);
210 filmModel.
toPrimary(filmPatchi, rhoFilmPatch_);
212 deltaFilmPatch_[primaryPatchi] =
214 filmModel.
toPrimary(filmPatchi, deltaFilmPatch_[primaryPatchi]);
218 template<
class CloudType>
222 const label filmFacei
227 p.d() = diameterParcelPatch_[filmFacei];
228 p.U() = UFilmPatch_[filmFacei];
229 p.rho() = rhoFilmPatch_[filmFacei];
231 p.nParticle() = massParcelPatch_[filmFacei]/
p.rho()/vol;
233 if (ejectedParcelType_ >= 0)
235 p.typeId() = ejectedParcelType_;
240 template<
class CloudType>
244 this->
template getModelProperty<label>(
"nParcelsTransferred");
247 this->
template getModelProperty<label>(
"nParcelsInjected");
255 os <<
" Surface film:" <<
nl
256 <<
" - parcels absorbed = " << nTransTotal <<
nl
257 <<
" - parcels ejected = " << nInjectTotal <<
endl;
259 if (this->writeTime())
261 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
262 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
263 nParcelsTransferred_ = 0;
264 nParcelsInjected_ = 0;
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmRegionModel &)
Cache the film fields in preparation for injection.
A class for handling words, derived from Foam::string.
Switch active() const
Return the active flag.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
const dimensionedVector & g_
Gravitational acceleration constant.
Different types of constants.
scalarListList deltaFilmPatch_
Film height of all film patches / patch face.
virtual const volScalarField & delta() const =0
Return the film thickness [m].
scalarList massParcelPatch_
Parcel mass / patch face.
Base class for cloud sub-models.
label nParcelsTransferred_
Number of parcels transferred to the film model.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~SurfaceFilmModel()
Destructor.
label nParcelsInjected_
Number of parcels injected from the film model.
#define forAll(list, i)
Loop across all elements in list.
virtual const volScalarField & cloudDiameterTrans() const =0
Return the parcel diameters originating from film.
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > ::parcelType parcelType
Convenience typedef to the cloud's parcel type.
virtual const volScalarField & cloudMassTrans() const =0
Return the film mass available for transfer.
Base class for surface film models.
dimensionedScalar pow3(const dimensionedScalar &ds)
Templated wall surface film model class.
const fvMesh & mesh() const
Return reference to the mesh.
void inject(TrackCloudType &cloud)
Inject parcels into the cloud.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Templated base class for dsmc cloud.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalarList diameterParcelPatch_
Parcel diameter / patch face.
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
Mesh data needed to do the Finite Volume discretisation.
const uniformDimensionedVectorField & g
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
scalarList rhoFilmPatch_
Film density / patch face.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
A cloud is a registry collection of lagrangian particles.
constexpr scalar pi(M_PI)
virtual void info(Ostream &os)
Write surface film info to stream.
label ejectedParcelType_
Ejected parcel type label - id assigned to identify parcel for.
const Time & time() const
Return the top-level database.
List< vector > UFilmPatch_
Film velocity / patch face.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
SurfaceFilmModel(CloudType &owner)
Construct null from owner.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
dimensionedScalar pos(const dimensionedScalar &ds)