Go to the documentation of this file.
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),
69 nParcelsTransferred_(0),
74 template<
class CloudType>
95 template<
class CloudType>
102 template<
class CloudType>
103 template<
class TrackData>
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);
141 const scalarField& magSf =
mesh.magSf().boundaryField()[primaryPatchI];
143 forAll(injectorCellsPatch, j)
145 if (diameterParcelPatch_[j] > 0)
147 const label cellI = injectorCellsPatch[j];
155 const label tetPtI = 1;
159 const scalar offset =
162 diameterParcelPatch_[j],
163 deltaFilmPatch_[primaryPatchI][j]
165 const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j];
171 this->owner().pMesh(),
179 td.cloud().setParcelThermoProperties(*pPtr, 0.0);
181 setParcelProperties(*pPtr, j);
183 if (pPtr->nParticle() > 0.001)
187 td.cloud().checkParcelProperties(*pPtr, 0.0,
false);
190 td.cloud().addParticle(pPtr);
205 template<
class CloudType>
208 const label filmPatchI,
209 const label primaryPatchI,
214 filmModel.
toPrimary(filmPatchI, massParcelPatch_);
216 diameterParcelPatch_ =
221 filmModel.
toPrimary(filmPatchI, UFilmPatch_);
224 filmModel.
toPrimary(filmPatchI, rhoFilmPatch_);
226 deltaFilmPatch_[primaryPatchI] =
228 filmModel.
toPrimary(filmPatchI, deltaFilmPatch_[primaryPatchI]);
232 template<
class CloudType>
236 const label filmFaceI
241 p.d() = diameterParcelPatch_[filmFaceI];
242 p.U() = UFilmPatch_[filmFaceI];
243 p.rho() = rhoFilmPatch_[filmFaceI];
245 p.nParticle() = massParcelPatch_[filmFaceI]/
p.rho()/vol;
247 if (ejectedParcelType_ >= 0)
249 p.typeId() = ejectedParcelType_;
254 template<
class CloudType>
258 this->
template getModelProperty<label>(
"nParcelsTransferred");
261 this->
template getModelProperty<label>(
"nParcelsInjected");
269 os <<
" Surface film:" <<
nl
270 <<
" - parcels absorbed = " << nTransTotal <<
nl
271 <<
" - parcels ejected = " << nInjectTotal <<
endl;
273 if (this->outputTime())
275 this->setModelProperty(
"nParcelsTransferred", nTransTotal);
276 this->setModelProperty(
"nParcelsInjected", nInjectTotal);
277 nParcelsTransferred_ = 0;
278 nParcelsInjected_ = 0;
const Switch & active() const
Return the active flag.
A class for handling words, derived from string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
const dimensionedVector & g_
Gravitational acceleration constant.
scalarListList deltaFilmPatch_
Film height of all film patches / patch face.
const cellList & cells() const
scalarList massParcelPatch_
Parcel mass / patch face.
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Base class for cloud sub-models.
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
label nParcelsTransferred_
Number of parcels transferred to the film model.
const dimensionedVector & g
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & delta() const =0
Return the film thickness [m].
void inject(TrackData &td)
Inject parcels into the cloud.
virtual ~SurfaceFilmModel()
Destructor.
label nParcelsInjected_
Number of parcels injected from the film model.
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
CloudType::parcelType parcelType
Convenience typedef to the cloud's parcel type.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
dimensionedScalar pow3(const dimensionedScalar &ds)
const fvMesh & mesh() const
Return refernce to the mesh.
Templated base class for dsmc cloud.
virtual const volScalarField & cloudMassTrans() const =0
Return the film mass available for transfer.
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalarList diameterParcelPatch_
Parcel diameter / patch face.
virtual const volScalarField & cloudDiameterTrans() const =0
Return the parcel diameters originating from film.
Mesh data needed to do the Finite Volume discretisation.
const labelList & primaryPatchIDs() const
Return the list of patch IDs on the primary region coupled.
scalarList rhoFilmPatch_
Film density / patch face.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void cacheFilmFields(const label filmPatchI, const label primaryPatchI, const regionModels::surfaceFilmModels::surfaceFilmModel &filmModel)
Cache the film fields in preparation for injection.
label size() const
Return the number of elements in the PtrList.
void toPrimary(const label regionPatchI, List< Type > ®ionField) const
Convert a local region field to the primary region.
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.
Base class for surface film models.
virtual void setParcelProperties(parcelType &p, const label filmFaceI) const
Set the individual parcel properties.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
SurfaceFilmModel(CloudType &owner)
Construct null from owner.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const labelList & intCoupledPatchIDs() const
Return the list of patch IDs internally coupled with the.
dimensionedScalar pos(const dimensionedScalar &ds)