mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Corrected lagrangian function object postPatch normal dir - mantis #580
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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, pp.whichFace(p.face()));
|
td.cloud().functions().postPatch(p, pp, trackFraction, tetIs);
|
||||||
|
|
||||||
// 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))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,8 +107,9 @@ template<class CloudType>
|
|||||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType&,
|
const typename CloudType::parcelType&,
|
||||||
const label,
|
const polyPatch&,
|
||||||
const label
|
const scalar,
|
||||||
|
const tetIndices&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -141,8 +141,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& testIs
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- Post-face hook
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -146,13 +146,14 @@ 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 polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
this->operator[](i).postPatch(p, patchI, patchFaceI);
|
this->operator[](i).postPatch(p, pp, trackFraction, tetIs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -121,8 +121,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
const typename CloudType::parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Post-face hook
|
//- Post-face hook
|
||||||
|
|||||||
@ -166,29 +166,32 @@ template<class CloudType>
|
|||||||
void Foam::ParticleErosion<CloudType>::postPatch
|
void Foam::ParticleErosion<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label patchI = pp.index();
|
||||||
|
|
||||||
const label localPatchI = applyToPatch(patchI);
|
const label localPatchI = applyToPatch(patchI);
|
||||||
|
|
||||||
if (localPatchI != -1)
|
if (localPatchI != -1)
|
||||||
{
|
{
|
||||||
const fvMesh& mesh = this->owner().mesh();
|
vector nw;
|
||||||
|
vector Up;
|
||||||
|
|
||||||
// patch-normal direction
|
// patch-normal direction
|
||||||
vector nw = p.currentTetIndices().faceTri(mesh).normal();
|
this->owner().patchData(p, pp, trackFraction, tetIs, nw, Up);
|
||||||
|
|
||||||
// particle direction of travel
|
// particle velocity reletive to patch
|
||||||
const vector& U = p.U();
|
const vector& U = p.U() - Up;
|
||||||
|
|
||||||
// quick reject if particle travelling away from the patch
|
// quick reject if particle travelling away from the patch
|
||||||
if ((-nw & U) < 0)
|
if ((nw & U) < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nw /= mag(nw);
|
|
||||||
const scalar magU = mag(U);
|
const scalar magU = mag(U);
|
||||||
const vector Udir = U/magU;
|
const vector Udir = U/magU;
|
||||||
|
|
||||||
@ -197,6 +200,7 @@ void Foam::ParticleErosion<CloudType>::postPatch
|
|||||||
|
|
||||||
const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_);
|
const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_);
|
||||||
|
|
||||||
|
const label patchFaceI = pp.whichFace(p.face());
|
||||||
scalar& Q = QPtr_->boundaryField()[patchI][patchFaceI];
|
scalar& Q = QPtr_->boundaryField()[patchI][patchFaceI];
|
||||||
if (tan(alpha) < K_/6.0)
|
if (tan(alpha) < K_/6.0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -126,8 +126,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -218,11 +218,14 @@ template<class CloudType>
|
|||||||
void Foam::PatchPostProcessing<CloudType>::postPatch
|
void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label
|
const scalar,
|
||||||
|
const tetIndices& tetIs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const label patchI = pp.index();
|
||||||
const label localPatchI = applyToPatch(patchI);
|
const label localPatchI = applyToPatch(patchI);
|
||||||
|
|
||||||
if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
|
if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
|
||||||
{
|
{
|
||||||
times_[localPatchI].append(this->owner().time().value());
|
times_[localPatchI].append(this->owner().time().value());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -127,8 +127,9 @@ public:
|
|||||||
virtual void postPatch
|
virtual void postPatch
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const label patchI,
|
const polyPatch& pp,
|
||||||
const label patchFaceI
|
const scalar trackFraction,
|
||||||
|
const tetIndices& tetIs
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -306,8 +306,9 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
|||||||
this->owner().functions().postPatch
|
this->owner().functions().postPatch
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
patchI,
|
mesh.boundaryMesh()[patchI],
|
||||||
patchFaceI
|
1.0,
|
||||||
|
p.currentTetIndices()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user