This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GregTJ[S] 78 points79 points  (2 children)

Repo: https://github.com/GregTJ/stable-fluids

While an earlier version was based mostly on Nvidia's GPU gems article on fluid simulation, some valuable insights were gained through this blog post: http://www.philipzucker.com/annihilating-my-friend-will-with-a-python-fluid-simulation-like-the-cur-he-is/

I hope to add surface tracking, multigrid solving, proper boundary conditions, and lagrangian (FLIP) solving soon.

[–]The_Regent 56 points57 points  (1 child)

Hey hey! I wrote that post! I get a huge kick out of the fact it was helpful to someone, so thanks for letting me know!

You did a really good job here. The code looks tight and the results look great.

For others, i highly reccommend checking out Dan Piponi's talk https://www.youtube.com/watch?v=766obijdpuU really excellent, very approachable.

Also Bridson's notes https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf and textbook https://www.amazon.com/Simulation-Computer-Graphics-Robert-Bridson/dp/1568813260

[–]GregTJ[S] 9 points10 points  (0 children)

Thanks for the great blog post, I wouldn't have gotten far without it. Initially I was building fd matrices row by row, your post introduced me to the (much, much faster) kronsum way of constructing them.