fluid particle position export #275
Replies: 2 comments
-
update: I use fluid.getPostion() to print the position of each fluid particle, but it seems that it can only print the init position. How can I get the particle positions of all simulation timesteps? |
Beta Was this translation helpful? Give feedback.
-
You can export any attribute of a particle by defining "particleAttributes" in the scene file or in the scene configuration. In a simulation you can print the attributes by selecting particles and press "i" (info). I would recommend to export the particle data to VTK files and import them to ParaView. Here you can also get the attribute info for each particle. If you want to do it in Python, take a look at the script "callbacks.py" and add your code to "def time_step_callback():". Then in each simulation step the particle positions are printed. "getPosition" gives you the current position. Maybe your code is only executed before the simulation. Hope that helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
when I use 'partrio exporter' to export the .bgeo file, which kind information of the fluid particle will be export? the position or velocity (relative or absolute)
If I want to get the position message, what should I do, is there any method to directly read the position of all fluid particles?
I also tried fluid.getPosition(0) in custom_scene.py , but it seems that no result to print

Beta Was this translation helpful? Give feedback.
All reactions