mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated lagrangian intermediate cloud function objects
This commit is contained in:
@ -339,7 +339,7 @@ void Foam::KinematicParcel<ParcelType>::hitFace(TrackData& td)
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
td.cloud().functions().postFace(p);
|
||||
td.cloud().functions().postFace(p, p.face());
|
||||
}
|
||||
|
||||
|
||||
@ -363,7 +363,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
// Invoke post-processing model
|
||||
td.cloud().functions().postPatch(p, patchI);
|
||||
td.cloud().functions().postPatch(p, patchI, pp.whichFace(p.face()));
|
||||
|
||||
// Invoke surface film model
|
||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||
|
||||
@ -107,6 +107,7 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label,
|
||||
const label
|
||||
)
|
||||
{
|
||||
@ -117,7 +118,8 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType&
|
||||
const typename CloudType::parcelType&,
|
||||
const label
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
|
||||
@ -141,11 +141,16 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
);
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace(const typename CloudType::parcelType& p);
|
||||
virtual void postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label faceI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -146,12 +146,13 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postPatch(p, patchI);
|
||||
this->operator[](i).postPatch(p, patchI, patchFaceI);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,12 +160,13 @@ void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p
|
||||
const typename CloudType::parcelType& p,
|
||||
const label faceI
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postFace(p);
|
||||
this->operator[](i).postFace(p, faceI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -121,11 +121,16 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
);
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace(const typename CloudType::parcelType& p);
|
||||
virtual void postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label faceI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -367,16 +367,11 @@ Foam::FacePostProcessing<CloudType>::~FacePostProcessing()
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::FacePostProcessing<CloudType>::postPatch
|
||||
void Foam::FacePostProcessing<CloudType>::postFace
|
||||
(
|
||||
const parcelType&,
|
||||
const label
|
||||
const parcelType& p,
|
||||
const label faceI
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -384,13 +379,13 @@ void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p)
|
||||
|| this->owner().solution().transient()
|
||||
)
|
||||
{
|
||||
label zoneI = -1;
|
||||
label faceI = -1;
|
||||
applyToFace(p.face(), zoneI, faceI);
|
||||
label zoneId = -1;
|
||||
label faceId = -1;
|
||||
applyToFace(faceI, zoneId, faceId);
|
||||
|
||||
if ((zoneI != -1) && (faceI != -1))
|
||||
if ((zoneId != -1) && (faceId != -1))
|
||||
{
|
||||
mass_[zoneI][faceI] += p.mass()*p.nParticle();
|
||||
mass_[zoneId][faceId] += p.mass()*p.nParticle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,11 +161,12 @@ public:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Post-patch hook
|
||||
virtual void postPatch(const parcelType& p, const label patchI);
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace(const parcelType& p);
|
||||
virtual void postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label faceI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -109,12 +109,11 @@ void Foam::ParticleTracks<CloudType>::preEvolve()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ParticleTracks<CloudType>::postPatch(const parcelType&, const label)
|
||||
{}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
||||
void Foam::ParticleTracks<CloudType>::postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label
|
||||
)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -126,7 +125,11 @@ void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::ParticleTracks<CloudType>::postFace(const parcelType&)"
|
||||
"Foam::ParticleTracks<CloudType>::postFace"
|
||||
"("
|
||||
"const parcelType&, "
|
||||
"const label"
|
||||
")"
|
||||
)<< "Cloud storage not allocated" << abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -139,11 +139,12 @@ public:
|
||||
//- Pre-evolve hook
|
||||
virtual void preEvolve();
|
||||
|
||||
//- Post-patch hook
|
||||
virtual void postPatch(const parcelType& p, const label patchI);
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace(const parcelType& p);
|
||||
virtual void postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label faceI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -196,7 +196,8 @@ template<class CloudType>
|
||||
void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI
|
||||
const label patchI,
|
||||
const label
|
||||
)
|
||||
{
|
||||
const label localPatchI = applyToPatch(patchI);
|
||||
@ -210,9 +211,4 @@ void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::PatchPostProcessing<CloudType>::postFace(const parcelType&)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -121,10 +121,12 @@ public:
|
||||
// Evaluation
|
||||
|
||||
//- Post-patch hook
|
||||
virtual void postPatch(const parcelType& p, const label patchI);
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace(const parcelType& p);
|
||||
virtual void postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -260,6 +260,7 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
U.boundaryField()[patchI][patchFaceI]
|
||||
);
|
||||
|
||||
bool particleHit = false;
|
||||
if (normalAlignment > cosPhiMinFlatWall)
|
||||
{
|
||||
// Guard against a flat interaction being
|
||||
@ -284,6 +285,8 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
);
|
||||
|
||||
flatSiteData.append(wSD);
|
||||
|
||||
particleHit = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -293,6 +296,19 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
otherSiteDistances.append(nearest.distance());
|
||||
|
||||
otherSiteData.append(wSD);
|
||||
|
||||
particleHit = true;
|
||||
}
|
||||
|
||||
if (particleHit)
|
||||
{
|
||||
this->owner().functions().postFace(p, realFaceI);
|
||||
this->owner().functions().postPatch
|
||||
(
|
||||
p,
|
||||
patchI,
|
||||
patchFaceI
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -333,6 +349,7 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
il_.referredWallData()[refWallFaceI]
|
||||
);
|
||||
|
||||
bool particleHit = false;
|
||||
if (normalAlignment > cosPhiMinFlatWall)
|
||||
{
|
||||
// Guard against a flat interaction being
|
||||
@ -357,6 +374,8 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
);
|
||||
|
||||
flatSiteData.append(wSD);
|
||||
|
||||
particleHit = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -366,6 +385,14 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
otherSiteDistances.append(nearest.distance());
|
||||
|
||||
otherSiteData.append(wSD);
|
||||
|
||||
particleHit = false;
|
||||
}
|
||||
|
||||
if (particleHit)
|
||||
{
|
||||
// TODO: call cloud function objects for referred
|
||||
// wall particle interactions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user