I love it! The “3D” demo is particularly impressive. Can you do something with just a single line? I’m thinking of a GPU-accelerated status line animation.
Are they very different in terms of compute? Looks like Burgers saves maybe a couple of FMA per cell. I’m pretty sure you can get away with Navier Stokes on a CPU. (Depends on the resolution, of course, but the examples here are relatively low res.)
Yeah Navier stokes accounts for continuity over Burgers' which elevates you from what might be conventional game-dev like water to ANSYS grade CFD. Although, realistic CFD has its tradeoffs too. Solvers like LF, HLLE, and HLLC all offer computation vs. realism tradeoffs. LF is branchless, but struggles with certain sonic/supersonic shock wave characteristics (which one would see in compressible flow only anyway). For incompressible flow I'd expect the final visual realism to be in the order of Burgers -> LF -> HLLE -> HLLC [1]. The vast majority of the industry enjoys HLLC for mechanical/civil engineering, but I'm often fascinated by just how much one can cheat to get realistic incompressible/compressible flow. You can even further hamstring Burgers' and be left with something resembling the wave equation [2], which is the absolute cheapest "CFD" available.
Oh that reminded me, in terms of cheating, you can use curl of a noise field to get completely fake incompressible flow. I used this in a Siggraph course once, and in some shots for a CG movie, but Bridson made it useful and way better by showing how to make it flow around objects. https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph2007-cu...
The main issue with it is that computing curl of a noise field is a ton more compute than Navier stokes. :P
Yes, this appears to use Stam's Stable Fluids algorithm. Look for the phrases "semi-Lagrangian advection" and "pressure correction" to see the important functions. The 3d version seems to use trilinear interpolation, which is pretty diffusive.
Realtime 3D webgpu fluid https://bercon.github.io/incendium/
I love it! The “3D” demo is particularly impressive. Can you do something with just a single line? I’m thinking of a GPU-accelerated status line animation.
Curious if you can get away with Burgers on a CPU: https://youtu.be/oxzfY-hPt2k
Are they very different in terms of compute? Looks like Burgers saves maybe a couple of FMA per cell. I’m pretty sure you can get away with Navier Stokes on a CPU. (Depends on the resolution, of course, but the examples here are relatively low res.)
Yeah Navier stokes accounts for continuity over Burgers' which elevates you from what might be conventional game-dev like water to ANSYS grade CFD. Although, realistic CFD has its tradeoffs too. Solvers like LF, HLLE, and HLLC all offer computation vs. realism tradeoffs. LF is branchless, but struggles with certain sonic/supersonic shock wave characteristics (which one would see in compressible flow only anyway). For incompressible flow I'd expect the final visual realism to be in the order of Burgers -> LF -> HLLE -> HLLC [1]. The vast majority of the industry enjoys HLLC for mechanical/civil engineering, but I'm often fascinated by just how much one can cheat to get realistic incompressible/compressible flow. You can even further hamstring Burgers' and be left with something resembling the wave equation [2], which is the absolute cheapest "CFD" available.
[1] https://en.wikipedia.org/wiki/Riemann_solver
[2] https://en.wikipedia.org/wiki/Wave_equation
Oh that reminded me, in terms of cheating, you can use curl of a noise field to get completely fake incompressible flow. I used this in a Siggraph course once, and in some shots for a CG movie, but Bridson made it useful and way better by showing how to make it flow around objects. https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph2007-cu...
The main issue with it is that computing curl of a noise field is a ton more compute than Navier stokes. :P
Very cool. Thanks for the link. I like to print physical copies of neat finds like this, and will be doing just that
https://play.google.com/store/apps/details?id=org.telegram.m...
This is really awesome. Nice work!
This is why I come here
Cool!
Jos Stem style?
Yes, this appears to use Stam's Stable Fluids algorithm. Look for the phrases "semi-Lagrangian advection" and "pressure correction" to see the important functions. The 3d version seems to use trilinear interpolation, which is pretty diffusive.