Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…in internal line
  • Loading branch information...
commit 400dc23c1c23cad7b45609a1f945ed21b5fdecd5 1 parent fcb3ae6
andy authored
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/lagrangian/basic/Particle/ParticleI.H
View
20 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;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.