top | item 45044442

Show HN: An ncurses CUDA-based fluid simulation

97 points| goosethe | 6 months ago |github.com

I just think they're neat

12 comments

order

clbrmbr|6 months ago

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.

glouwbug|6 months ago

Curious if you can get away with Burgers on a CPU: https://youtu.be/oxzfY-hPt2k

dahart|6 months ago

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.)

shoknawe|6 months ago

This is really awesome. Nice work!

dboon|6 months ago

This is why I come here

lagrange77|6 months ago

Cool!

Jos Stem style?

markstock|6 months ago

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.