Commit 8137bec8 authored by graham's avatar graham
Browse files

Check patch type to be wall before moving face reference point.

parent 1f341194
......@@ -193,18 +193,24 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
// move reference point for wall
if (!cloud_.internalFace(facei))
{
const vector& C = mesh.cellCentres()[celli_];
scalar CCf = mag((C - Cf) & Sf);
// check if distance between cell centre and face centre
// is larger than wallImpactDistance
if
(
CCf
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
)
label patchi = mesh.boundaryMesh().whichPatch(facei);
const polyPatch& patch = mesh.boundaryMesh()[patchi];
if (isA<wallPolyPatch>(patch))
{
Cf -= static_cast<const ParticleType&>(*this)
.wallImpactDistance(Sf)*Sf;
const vector& C = mesh.cellCentres()[celli_];
scalar CCf = mag((C - Cf) & Sf);
// check if distance between cell centre and face centre
// is larger than wallImpactDistance
if
(
CCf
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
)
{
Cf -= static_cast<const ParticleType&>(*this)
.wallImpactDistance(Sf)*Sf;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment