Replies: 3 comments
-
I think the easiest way to realize this, would be to use a Python script. You can build SPlisHSPlasH with embedded Python and then the system will call your script in each simulation step. |
Beta Was this translation helpful? Give feedback.
-
I saw the AnimatedBody_2D.json example which uses the AnimatedBody_2D.py, but this script deals with the motion of the entire boundary:
Is it possible to access the individual particles on the boundary? |
Beta Was this translation helpful? Give feedback.
-
Since you use Akinci boundary handling, you can call all the following commands for the boundary object:
So you can e.g. get/set the positions. However, note that if you move particles relative to each other, the precomputed volumes are not correct anymore. Moreover, note that doing operations on thousands of particles in Python can slow down the simulation. One way to avoid a performance loss is to extend the Python binding by a function that exactly does what you need. |
Beta Was this translation helpful? Give feedback.
-
Hi , I was wondering if it's possible to prescribe the displacement of individual particles (i.e. x,y,z position) over time. I am trying to simulate peristaltic contractions of a wall.
Beta Was this translation helpful? Give feedback.
All reactions