Fluid simulator
Posted: Sun Jun 27, 2010 7:11 pm
Hello, everyone!
I'm not sure if this counts as Algodoo related, but I'll post it anyway.
Ever since I discovered Phun two years ago, I've been fascinated by phsysics computer simulations. It was Phun that inspired me to code my own simulations and it's also thanks to Phun that I discovered Smoothed Particle Hydrodynamics.
Today, I'd like to share a few fluid demos I made using Smoothed Particle Hydrodynamics. It's of course not as fancy as Algodoo and neither that feature-rich, but it's fun to play with. It features multiple fluids and soft bodies interacting with each other. The soft bodies still need a bit of work, because water particles tend to get stuck in the soft bodies, resulting in strange 'jumpy' behaviour, but other than that it runs more or less stable.
Screenshot:
Download: Link
Controls: Press Key 1 oder Key 2 to switch between the two demos. The first one features an emitter and a soft body. Space turns the emitter on/off (ADVICE: Turn the emitter off at max. 7500 particles, or the simulation starts to get laggy). Left mouse click spawns new soft bodies, right click spawns obstacles.
The second doesn't have any special controls and only shows three fluids interacting (red: very heavy; blue: heavy; green: light).
There is also a 3D (and multithreaded) version:
Download: Link
Controls: Arrow keys turn the container, allowing interaction with the fluid (since the gravitation always points downward). As for the thread count, enter the amount of cores on your CPU for optimal performance (but not more than 8). Other numbers will work too, just not as fast.
The 3D version spawned a side-project, namely an offline raytracer, that I'm working on here and then (Youtube video).
Nothing of this would have been possible without Phun and I just wanted to thank Mr. Ernerfeldt for creating it. I hope you enjoy these demos.
I'm not sure if this counts as Algodoo related, but I'll post it anyway.
Ever since I discovered Phun two years ago, I've been fascinated by phsysics computer simulations. It was Phun that inspired me to code my own simulations and it's also thanks to Phun that I discovered Smoothed Particle Hydrodynamics.
Today, I'd like to share a few fluid demos I made using Smoothed Particle Hydrodynamics. It's of course not as fancy as Algodoo and neither that feature-rich, but it's fun to play with. It features multiple fluids and soft bodies interacting with each other. The soft bodies still need a bit of work, because water particles tend to get stuck in the soft bodies, resulting in strange 'jumpy' behaviour, but other than that it runs more or less stable.
Screenshot:
Download: Link
Controls: Press Key 1 oder Key 2 to switch between the two demos. The first one features an emitter and a soft body. Space turns the emitter on/off (ADVICE: Turn the emitter off at max. 7500 particles, or the simulation starts to get laggy). Left mouse click spawns new soft bodies, right click spawns obstacles.
The second doesn't have any special controls and only shows three fluids interacting (red: very heavy; blue: heavy; green: light).
There is also a 3D (and multithreaded) version:
Download: Link
Controls: Arrow keys turn the container, allowing interaction with the fluid (since the gravitation always points downward). As for the thread count, enter the amount of cores on your CPU for optimal performance (but not more than 8). Other numbers will work too, just not as fast.
The 3D version spawned a side-project, namely an offline raytracer, that I'm working on here and then (Youtube video).
Nothing of this would have been possible without Phun and I just wanted to thank Mr. Ernerfeldt for creating it. I hope you enjoy these demos.