tum-pbs / PhiFlow

A differentiable PDE solving framework for machine learning
MIT License
1.43k stars 193 forks source link

Question about Lagrangian Fluid Simulation #77

Closed arjun-mani closed 2 years ago

arjun-mani commented 2 years ago

Hi all,

Thanks for creating this great framework, the differentiability opens up so many possibilities! I am currently working on some control tasks where Lagrangian fluid simulation makes more sense. I know PhiFlow is a Eulerian fluid simulation, but I was wondering whether it can be somehow used for doing Lagrangian simulation. (I'm a bit new to fluid mechanics so I'm not 100% sure if this makes sense as something to do). I would really appreciate your insight. Given your familiarity with the field, I would either way appreciate any ideas on whether differentiable Lagrangian fluid simulation is possible. Or any other frameworks you know of (I know there is some work on learned simulators, but differentiable physics is naturally more robust.) Thanks very much!

Sincerely, Arjun

holl- commented 2 years ago

Have a look at the FLIP demo which uses particles. There is currently no efficient way to handle neighbor search for particles but we are working on it. If you don't need more than say 20k particles, you can compute the full distance matrix. See the solar system demo for simple particle-particle interactions.

holl- commented 2 years ago

I'm closing the issue for now. If you have further questions, feel free to open it again.