← Back to team overview

yade-users team mailing list archive

Re: Sheltering Implementation (force reduction based on relative position)

 

> I am looking for a way to reduce the force applied to a particle based
> on its position relative to other particles.  I am using python
> scripting for my code, and I do not know how to reference a particle's
> position or velocity in python.  Is there an engine already in Yade that
> could accomplish a force reduction based on relative particle positions?
> If not, do you know how I could create one in python or C++?  I am
> currently using the InterpolatingDirectedForceEngine to apply a time
> series of force magnitudes (read from text file) to particles.

A particle position can be found like O.bodies[4].phys.pos (which is
actually a shorthand for O.bodies[4].phys['se3'][0:3]), and I think you
already know how to apply force. The best would be to add this to you
own engine that would derive from InterpolatingDirectedForceEngine. I am
not sure what is the exact algorithm that you need.

Vaclav





Follow ups

References