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 =
|
typename TrackData::cloudType::parcelType& p =
|
||||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
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);
|
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||||
|
|
||||||
// Invoke post-processing model
|
// Invoke post-processing model
|
||||||
td.cloud().functions().postPatch(p, patchI);
|
td.cloud().functions().postPatch(p, patchI, pp.whichFace(p.face()));
|
||||||
|
|
||||||
// Invoke surface film model
|
// Invoke surface film model
|
||||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||||
|
|||||||
@ -107,6 +107,7 @@ template<class CloudType>
|
|||||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType&,
|
const typename CloudType::parcelType&,
|
||||||
|
const label,
|
||||||
const label
|
const label
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -117,7 +118,8 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObject<CloudType>::postFace
|
void Foam::CloudFunctionObject<CloudType>::postFace
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType&
|
const typename CloudType::parcelType&,
|
||||||
|
const label
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|||||||
@ -141,11 +141,16 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI
|
const label patchI,
|
||||||
|
const label patchFaceI
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- 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
|
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI
|
const label patchI,
|
||||||
|
const label patchFaceI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
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>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObjectList<CloudType>::postFace
|
void Foam::CloudFunctionObjectList<CloudType>::postFace
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p
|
const typename CloudType::parcelType& p,
|
||||||
|
const label faceI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
this->operator[](i).postFace(p);
|
this->operator[](i).postFace(p, faceI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,11 +121,16 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI
|
const label patchI,
|
||||||
|
const label patchFaceI
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- 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 * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::FacePostProcessing<CloudType>::postPatch
|
void Foam::FacePostProcessing<CloudType>::postFace
|
||||||
(
|
(
|
||||||
const parcelType&,
|
const parcelType& p,
|
||||||
const label
|
const label faceI
|
||||||
)
|
)
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
|
||||||
void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p)
|
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -384,13 +379,13 @@ void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p)
|
|||||||
|| this->owner().solution().transient()
|
|| this->owner().solution().transient()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label zoneI = -1;
|
label zoneId = -1;
|
||||||
label faceI = -1;
|
label faceId = -1;
|
||||||
applyToFace(p.face(), zoneI, faceI);
|
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
|
// Evaluation
|
||||||
|
|
||||||
//- Post-patch hook
|
|
||||||
virtual void postPatch(const parcelType& p, const label patchI);
|
|
||||||
|
|
||||||
//- Post-face hook
|
//- 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>
|
template<class CloudType>
|
||||||
void Foam::ParticleTracks<CloudType>::postPatch(const parcelType&, const label)
|
void Foam::ParticleTracks<CloudType>::postFace
|
||||||
{}
|
(
|
||||||
|
const parcelType& p,
|
||||||
|
const label
|
||||||
template<class CloudType>
|
)
|
||||||
void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -126,7 +125,11 @@ void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"Foam::ParticleTracks<CloudType>::postFace(const parcelType&)"
|
"Foam::ParticleTracks<CloudType>::postFace"
|
||||||
|
"("
|
||||||
|
"const parcelType&, "
|
||||||
|
"const label"
|
||||||
|
")"
|
||||||
)<< "Cloud storage not allocated" << abort(FatalError);
|
)<< "Cloud storage not allocated" << abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -139,11 +139,12 @@ public:
|
|||||||
//- Pre-evolve hook
|
//- Pre-evolve hook
|
||||||
virtual void preEvolve();
|
virtual void preEvolve();
|
||||||
|
|
||||||
//- Post-patch hook
|
|
||||||
virtual void postPatch(const parcelType& p, const label patchI);
|
|
||||||
|
|
||||||
//- Post-face hook
|
//- 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
|
void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI
|
const label patchI,
|
||||||
|
const label
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const label localPatchI = applyToPatch(patchI);
|
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
|
// Evaluation
|
||||||
|
|
||||||
//- Post-patch hook
|
//- Post-patch hook
|
||||||
virtual void postPatch(const parcelType& p, const label patchI);
|
virtual void postPatch
|
||||||
|
(
|
||||||
//- Post-face hook
|
const parcelType& p,
|
||||||
virtual void postFace(const parcelType& p);
|
const label patchI,
|
||||||
|
const label patchFaceI
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -128,7 +128,7 @@ void Foam::PairCollision<CloudType>::realReferredInteraction()
|
|||||||
const labelListList& ril = il_.ril();
|
const labelListList& ril = il_.ril();
|
||||||
|
|
||||||
List<IDLList<typename CloudType::parcelType> >& referredParticles =
|
List<IDLList<typename CloudType::parcelType> >& referredParticles =
|
||||||
il_.referredParticles();
|
il_.referredParticles();
|
||||||
|
|
||||||
List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
|
List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
|
||||||
this->owner().cellOccupancy();
|
this->owner().cellOccupancy();
|
||||||
@ -137,7 +137,7 @@ void Foam::PairCollision<CloudType>::realReferredInteraction()
|
|||||||
forAll(ril, refCellI)
|
forAll(ril, refCellI)
|
||||||
{
|
{
|
||||||
IDLList<typename CloudType::parcelType>& refCellRefParticles =
|
IDLList<typename CloudType::parcelType>& refCellRefParticles =
|
||||||
referredParticles[refCellI];
|
referredParticles[refCellI];
|
||||||
|
|
||||||
const labelList& realCells = ril[refCellI];
|
const labelList& realCells = ril[refCellI];
|
||||||
|
|
||||||
@ -260,6 +260,7 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
U.boundaryField()[patchI][patchFaceI]
|
U.boundaryField()[patchI][patchFaceI]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
bool particleHit = false;
|
||||||
if (normalAlignment > cosPhiMinFlatWall)
|
if (normalAlignment > cosPhiMinFlatWall)
|
||||||
{
|
{
|
||||||
// Guard against a flat interaction being
|
// Guard against a flat interaction being
|
||||||
@ -284,6 +285,8 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
);
|
);
|
||||||
|
|
||||||
flatSiteData.append(wSD);
|
flatSiteData.append(wSD);
|
||||||
|
|
||||||
|
particleHit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -293,7 +296,20 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
otherSiteDistances.append(nearest.distance());
|
otherSiteDistances.append(nearest.distance());
|
||||||
|
|
||||||
otherSiteData.append(wSD);
|
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]
|
il_.referredWallData()[refWallFaceI]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
bool particleHit = false;
|
||||||
if (normalAlignment > cosPhiMinFlatWall)
|
if (normalAlignment > cosPhiMinFlatWall)
|
||||||
{
|
{
|
||||||
// Guard against a flat interaction being
|
// Guard against a flat interaction being
|
||||||
@ -357,6 +374,8 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
);
|
);
|
||||||
|
|
||||||
flatSiteData.append(wSD);
|
flatSiteData.append(wSD);
|
||||||
|
|
||||||
|
particleHit = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -366,6 +385,14 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
otherSiteDistances.append(nearest.distance());
|
otherSiteDistances.append(nearest.distance());
|
||||||
|
|
||||||
otherSiteData.append(wSD);
|
otherSiteData.append(wSD);
|
||||||
|
|
||||||
|
particleHit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (particleHit)
|
||||||
|
{
|
||||||
|
// TODO: call cloud function objects for referred
|
||||||
|
// wall particle interactions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user