r/FastLED • u/StefanPetrick • Apr 25 '26
Share_something 1st Attempt Of A Real Fluid Simulation
https://youtu.be/g0Uy4rAUF48I followed u/sutaburosu’s advice and had a look at the Navier–Stokes equations. I got a little demo working, and I already like the output quality.
I doubt this will ever run on an ESP32 with a reasonable frame rate, but a guesstimate of the required resources indicates that it could be possible on a Teensy 4. We will see if this is true.
edit:
For everyone interested, here is an in depths explanation of the underlying concept https://www.youtube.com/watch?v=Q78wvrQ9xsU
Here the Wiki article: https://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations
Fascinating fun fact: This system of partial differential equations was named after Claude-Louis Navier and George Gabriel Stokes, who developed them over a few decades of progressive work, from 1822 (Navier) to 1842–1850 (Stokes).
4
u/StefanPetrick Apr 26 '26
Today I got the model to behave a bit more stable - allowing for more parameter modulation without exploding instantly.
2nd version: https://www.youtube.com/watch?v=aJ-RtgNGR8E
I can't wait to see this on u/Fluffy-Wishbone-3497 HD108 matrix. The level of detail this simulation produces is really cool. I'll DM you when we have evolved the current model into something an ESP32/Teensy can handle.
4
u/ewowi Apr 25 '26
Impressive !!
3
u/ewowi Apr 25 '26
Stefan, where does this run on ? Wasm = PC I assume ? Still need to dive in it, but can it drive LEDs ?
I am just wondering if we could get FastLED running in raspberry Pi 3, 4 or 5, that would open possibilities for more complex effects 🙂
2
u/StefanPetrick Apr 25 '26
This current version of the 64x64 solver needs approximately 220 kB of RAM, without the frame buffer.
2
u/StefanPetrick Apr 29 '26
Animated FastLED letters
https://www.youtube.com/watch?v=F8zbY3ktDLU
2
u/chemdoc77 Apr 25 '26
Hi u/StefanPetrick - AWESOME!!!! Have you considered creating a smokey kaleidoscope simulation?
2
u/Witchazeljb Apr 25 '26
Super WOW!
1
u/StefanPetrick May 04 '26
2nd attempt + code: https://www.youtube.com/watch?v=HnLxdPEh7y0
1
u/StefanPetrick May 04 '26
It's getting slowly better: https://youtu.be/sVP6vqMrSXw
3
u/[deleted] Apr 25 '26
[removed] — view removed comment