33template<
class CloudType>
50template<
class CloudType>
58 TFilmPatch_(sfm.TFilmPatch_),
59 CpFilmPatch_(sfm.CpFilmPatch_)
65template<
class CloudType>
66template<
class filmType>
77 DebugInfo<<
"Parcel " <<
p.origId() <<
" absorbInteraction" <<
endl;
80 const vector& nf =
pp.faceNormals()[facei];
83 const vector& Up = this->owner().U().boundaryField()[
pp.index()][facei];
104 this->nParcelsTransferred()++;
108 keepParticle =
false;
112template<
class CloudType>
120 const label patchi =
pp.index();
121 const label meshFacei =
p.face();
122 const label facei =
pp.whichFace(meshFacei);
124 this->initFilmModels();
127 if (this->filmModel_ && this->filmModel_->isRegionPatch(patchi))
129 auto& film = *(this->filmModel_);
131 switch (this->interactionType_)
135 this->bounceInteraction(
p,
pp, facei, keepParticle);
142 const scalar m =
p.nParticle()*
p.mass();
144 this->absorbInteraction
145 (film,
p,
pp, facei, m, keepParticle);
153 const scalar pc = thermo_.thermo().p()[
p.cell()];
156 const scalar
mu = liq.
mu(pc,
p.T());
160 this->deltaFilmPatch_[patchi][facei] < this->deltaWet_
165 this->drySplashInteraction
166 (film,
sigma,
mu,
p,
pp, facei, keepParticle);
170 this->wetSplashInteraction
171 (film,
sigma,
mu,
p,
pp, facei, keepParticle);
180 <<
"Unknown interaction type enumeration"
191 for (areaFilm& film : this->areaFilms_)
193 const label filmFacei
195 film.isRegionPatch(patchi)
196 ? film.regionMesh().whichFace(meshFacei)
206 switch (this->interactionType_)
210 this->bounceInteraction(
p,
pp, facei, keepParticle);
217 const scalar m =
p.nParticle()*
p.mass();
219 this->absorbInteraction
221 film,
p,
pp, facei, m, keepParticle
229 const scalar pc = thermo_.thermo().p()[
p.cell()];
231 const scalar
sigma = liq.sigma(pc,
p.
T());
232 const scalar
mu = liq.mu(pc,
p.
T());
236 film.h()[filmFacei] < this->deltaWet_
241 this->drySplashInteraction
242 (film,
sigma,
mu,
p,
pp, facei, keepParticle);
246 this->wetSplashInteraction
247 (film,
sigma,
mu,
p,
pp, facei, keepParticle);
256 <<
"Unknown interaction type enumeration"
270template<
class CloudType>
273 const label filmPatchi,
274 const label primaryPatchi,
286 filmModel.
toPrimary(filmPatchi, TFilmPatch_);
293template<
class CloudType>
309template<
class CloudType>
313 const label filmFacei
324template<
class CloudType>
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const CloudType & owner() const
Return const access to the owner cloud.
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field).
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Kinematic parcel surface film model.
virtual void cacheFilmFields(const areaFilm &film)
Cache the film fields in preparation for injection.
void wetSplashInteraction(filmType &, const scalar sigma, const scalar mu, parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with wetted surface.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
void drySplashInteraction(filmType &, const scalar sigma, const scalar mu, const parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle)
Parcel interaction with dry surface.
KinematicSurfaceFilm(const dictionary &dict, CloudType &owner, const word &type=typeName, bool initThermo=true)
Construct from components.
void bounceInteraction(parcelType &p, const polyPatch &pp, const label facei, bool &keepParticle) const
Bounce parcel (flip parcel normal velocity).
@ splashBai
Bai splash model.
scalar deltaWet_
Film thickness beyond which patch is assumed to be wet.
interactionType interactionType_
Interaction type enumeration.
virtual void info()
Write surface film info.
UPtrList< areaFilm > areaFilms_
UPointers to area films.
regionFilm * filmModel_
Pointer to filmModel.
void initFilmModels()
Initialise pointers of films.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
label nParcelsTransferred() const noexcept
The number of parcels transferred to the film model.
scalar totalMassTransferred() const noexcept
The total mass transferred.
Field< scalarField > deltaFilmPatch_
Film height of all film patches / patch face.
Thermo parcel surface film model.
virtual void setParcelProperties(parcelType &p, const label filmFacei) const
Set the individual parcel properties.
void absorbInteraction(filmType &, const parcelType &p, const polyPatch &pp, const label facei, const scalar mass, bool &keepParticle)
Absorb parcel into film.
scalarField CpFilmPatch_
Film specific heat capacity / patch face.
regionModels::areaSurfaceFilmModels::liquidFilmBase areaFilm
virtual void cacheFilmFields(const label filmPatchi, const label primaryPatchi, const regionFilm &)
Cache the film fields in preparation for injection.
ThermoSurfaceFilm(const dictionary &dict, CloudType &owner)
Construct from components.
virtual void info()
Write surface film info.
scalarField TFilmPatch_
Film temperature / patch face.
const SLGThermo & thermo_
Reference to the cloud thermo package.
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
virtual bool transferParcel(parcelType &p, const polyPatch &pp, bool &keepParticle)
Transfer parcel from cloud to surface film.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
The thermophysical properties of a liquid.
virtual scalar mu(scalar p, scalar T) const =0
Liquid viscosity [Pa s].
virtual scalar sigma(scalar p, scalar T) const =0
Surface tension [N/m].
Registry of regIOobjects.
A patch is a list of labels that address the faces in the global face list.
virtual const areaScalarField & Cp() const =0
Access const reference Cp.
virtual const areaScalarField & Tf() const =0
Access const reference Tf.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
Base class for surface film models.
virtual const volScalarField & Ts() const =0
Return the film surface temperature [K].
virtual const volScalarField & Cp() const =0
Return the film specific heat capacity [J/kg/K].
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInfo
Report an information message using Foam::Info.
DSMCCloud< dsmcParcel > CloudType
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)