Permalink
Browse files

ENH: Added interim fix for wall impact distance - already re-written …

…in internal line
  • Loading branch information...
andy
andy committed Aug 20, 2010
1 parent fcb3ae6 commit 400dc23c1c23cad7b45609a1f945ed21b5fdecd5
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/lagrangian/basic/Particle/ParticleI.H
@@ -58,8 +58,14 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
)
{
- Cf -= static_cast<const ParticleType&>(*this)
- .wallImpactDistance(Sf)*Sf;
+ label patchi = patch(facei);
+ const polyPatch& patch = mesh.boundaryMesh()[patchi];
+
+ if (isA<wallPolyPatch>(patch))
+ {
+ Cf -= static_cast<const ParticleType&>(*this)
+ .wallImpactDistance(Sf)*Sf;
+ }
}
}
@@ -202,8 +208,14 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
)
{
- Cf -= static_cast<const ParticleType&>(*this)
- .wallImpactDistance(Sf)*Sf;
+ label patchi = patch(facei);
+ const polyPatch& patch = mesh.boundaryMesh()[patchi];
+
+ if (isA<wallPolyPatch>(patch))
+ {
+ Cf -= static_cast<const ParticleType&>(*this)
+ .wallImpactDistance(Sf)*Sf;
+ }
}
}

0 comments on commit 400dc23

Please sign in to comment.