mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Initialization for area and single layer films for lagrangian
This commit is contained in:
@ -130,11 +130,13 @@ Foam::vector Foam::KinematicSurfaceFilm<CloudType>::splashDirection
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::KinematicSurfaceFilm<CloudType>::init(bool binitThermo)
|
||||
void Foam::KinematicSurfaceFilm<CloudType>::initFilmModels()
|
||||
{
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
|
||||
// set up filmModel pointer
|
||||
if (!filmModel_)
|
||||
{
|
||||
filmModel_ =
|
||||
const_cast<regionFilm*>
|
||||
(
|
||||
@ -146,8 +148,10 @@ void Foam::KinematicSurfaceFilm<CloudType>::init(bool binitThermo)
|
||||
"surfaceFilmProperties"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (areaFilms_.size() == 0)
|
||||
{
|
||||
// set up areaFilms
|
||||
const wordList names =
|
||||
mesh.time().objectRegistry::template
|
||||
@ -168,9 +172,14 @@ void Foam::KinematicSurfaceFilm<CloudType>::init(bool binitThermo)
|
||||
areaFilms_.append(&film);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initiate thermo ref for filmModel
|
||||
if (filmModel_ && binitThermo)
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::KinematicSurfaceFilm<CloudType>::init(bool binitThermo)
|
||||
{
|
||||
if (binitThermo)
|
||||
{
|
||||
this->coeffDict().readEntry("pRef", pRef_);
|
||||
this->coeffDict().readEntry("TRef", TRef_);
|
||||
@ -569,9 +578,8 @@ Foam::KinematicSurfaceFilm<CloudType>::KinematicSurfaceFilm
|
||||
this->coeffDict().readEntry("Adry", Adry_);
|
||||
this->coeffDict().readEntry("Awet", Awet_);
|
||||
this->coeffDict().readEntry("Cf", Cf_);
|
||||
}
|
||||
|
||||
init(initThermo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -596,7 +604,10 @@ Foam::KinematicSurfaceFilm<CloudType>::KinematicSurfaceFilm
|
||||
Cf_(sfm.Cf_),
|
||||
nParcelsSplashed_(sfm.nParcelsSplashed_)
|
||||
{
|
||||
if (interactionType_ == itSplashBai)
|
||||
{
|
||||
init(initThermo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -614,8 +625,12 @@ bool Foam::KinematicSurfaceFilm<CloudType>::transferParcel
|
||||
|
||||
bool bInteraction(false);
|
||||
|
||||
initFilmModels();
|
||||
|
||||
// Check the singleLayer film models
|
||||
if (filmModel_ && filmModel_->isRegionPatch(patchi))
|
||||
if (filmModel_)
|
||||
{
|
||||
if (filmModel_->isRegionPatch(patchi))
|
||||
{
|
||||
const label facei = pp.whichFace(p.face());
|
||||
|
||||
@ -668,6 +683,7 @@ bool Foam::KinematicSurfaceFilm<CloudType>::transferParcel
|
||||
// Transfer parcel/parcel interactions complete
|
||||
bInteraction = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (areaFilm& film : areaFilms_)
|
||||
|
||||
@ -192,9 +192,12 @@ protected:
|
||||
const vector& nf
|
||||
) const;
|
||||
|
||||
//- Initialise pointers of films
|
||||
//- Initialise thermo
|
||||
void init(bool binitThermo);
|
||||
|
||||
//- Initialise pointers of films
|
||||
void initFilmModels();
|
||||
|
||||
|
||||
// Injection from sheet (ejection) helper functions
|
||||
|
||||
|
||||
@ -72,10 +72,14 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
||||
{
|
||||
const label patchi = pp.index();
|
||||
|
||||
this->initFilmModels();
|
||||
|
||||
bool bInteraction(false);
|
||||
|
||||
// Check the singleLayer film models
|
||||
if (this->filmModel_ && this->filmModel_->isRegionPatch(patchi))
|
||||
if (this->filmModel_)
|
||||
{
|
||||
if (this->filmModel_->isRegionPatch(patchi))
|
||||
{
|
||||
const label facei = pp.whichFace(p.face());
|
||||
|
||||
@ -130,10 +134,10 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel
|
||||
// Transfer parcel/parcel interactions complete
|
||||
bInteraction = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (areaFilm& film : this->areaFilms_)
|
||||
{
|
||||
|
||||
if (patchi == film.patchID())
|
||||
{
|
||||
const label facei = pp.whichFace(p.face());
|
||||
|
||||
@ -272,9 +272,8 @@ scalar liquidFilmBase::CourantNumber() const
|
||||
reduce(CoNum, maxOp<scalar>());
|
||||
reduce(velMag, maxOp<scalar>());
|
||||
|
||||
Info<< "Film Courant Number: "
|
||||
<< " max: " << CoNum
|
||||
<< " Film velocity magnitude: (h)" << velMag << endl;
|
||||
Info<< "Max film Courant Number: " << CoNum
|
||||
<< " Film velocity magnitude: " << velMag << endl;
|
||||
|
||||
return CoNum;
|
||||
}
|
||||
|
||||
@ -304,13 +304,13 @@ const volScalarField& liquidFilmModel::cloudMassTrans() const
|
||||
return cloudMassTrans_;
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& liquidFilmModel::cloudDiameterTrans() const
|
||||
{
|
||||
return cloudDiameterTrans_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void liquidFilmModel::preEvolveRegion()
|
||||
{
|
||||
liquidFilmBase::preEvolveRegion();
|
||||
@ -359,17 +359,16 @@ void liquidFilmModel::info()
|
||||
|
||||
const DimensionedField<scalar, areaMesh>& sf = regionMesh().S();
|
||||
|
||||
Info<< indent << "min/max(mag(Uf)) = " << gMin(mag(Uf_.field())) << ", "
|
||||
Info<< indent << "min/max(mag(Uf)) = "
|
||||
<< gMin(mag(Uf_.field())) << ", "
|
||||
<< gMax(mag(Uf_.field())) << nl
|
||||
<< indent << "min/max(delta) = " << gMin(h_.field()) << ", " << gMax(h_.field()) << nl
|
||||
<< indent << "min/max(delta) = "
|
||||
<< gMin(h_.field()) << ", " << gMax(h_.field()) << nl
|
||||
<< indent << "coverage = "
|
||||
<< gSum(alpha()().field()*mag(sf.field()))/gSum(mag(sf.field())) << nl
|
||||
<< indent << "total mass = "
|
||||
<< gSum(availableMass_) << nl;
|
||||
|
||||
|
||||
Info<< indent << CourantNumber() << endl;
|
||||
|
||||
injection_.info(Info);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user