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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -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, pp.whichFace(p.face()));
|
||||
td.cloud().functions().postPatch(p, pp, trackFraction, tetIs);
|
||||
|
||||
// Invoke surface film model
|
||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,8 +107,9 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label,
|
||||
const label
|
||||
const polyPatch&,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -141,8 +141,9 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& testIs
|
||||
);
|
||||
|
||||
//- Post-face hook
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -146,13 +146,14 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
)
|
||||
{
|
||||
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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -121,8 +121,9 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
);
|
||||
|
||||
//- Post-face hook
|
||||
|
||||
@ -166,29 +166,32 @@ template<class CloudType>
|
||||
void Foam::ParticleErosion<CloudType>::postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
)
|
||||
{
|
||||
const label patchI = pp.index();
|
||||
|
||||
const label localPatchI = applyToPatch(patchI);
|
||||
|
||||
if (localPatchI != -1)
|
||||
{
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
vector nw;
|
||||
vector Up;
|
||||
|
||||
// patch-normal direction
|
||||
vector nw = p.currentTetIndices().faceTri(mesh).normal();
|
||||
this->owner().patchData(p, pp, trackFraction, tetIs, nw, Up);
|
||||
|
||||
// particle direction of travel
|
||||
const vector& U = p.U();
|
||||
// particle velocity reletive to patch
|
||||
const vector& U = p.U() - Up;
|
||||
|
||||
// quick reject if particle travelling away from the patch
|
||||
if ((-nw & U) < 0)
|
||||
if ((nw & U) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
nw /= mag(nw);
|
||||
const scalar magU = mag(U);
|
||||
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 label patchFaceI = pp.whichFace(p.face());
|
||||
scalar& Q = QPtr_->boundaryField()[patchI][patchFaceI];
|
||||
if (tan(alpha) < K_/6.0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -126,8 +126,9 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -218,11 +218,14 @@ template<class CloudType>
|
||||
void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI,
|
||||
const label
|
||||
const polyPatch& pp,
|
||||
const scalar,
|
||||
const tetIndices& tetIs
|
||||
)
|
||||
{
|
||||
const label patchI = pp.index();
|
||||
const label localPatchI = applyToPatch(patchI);
|
||||
|
||||
if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
|
||||
{
|
||||
times_[localPatchI].append(this->owner().time().value());
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -127,8 +127,9 @@ public:
|
||||
virtual void postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const label patchI,
|
||||
const label patchFaceI
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -306,8 +306,9 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
this->owner().functions().postPatch
|
||||
(
|
||||
p,
|
||||
patchI,
|
||||
patchFaceI
|
||||
mesh.boundaryMesh()[patchI],
|
||||
1.0,
|
||||
p.currentTetIndices()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user