Skip to main content
AmigoFish

Coding Adventure: Simulating Smoke

From Sebastian Lague · · 41 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.

If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.

Watch on YouTube

Not rated yet

Description

My attempt at coding a grid-based fluid simulation to try and achieve some smoky effects!

Support my work (and get early access to new videos and source code) on Patreon: https://www.patreon.com/SebastianLague

Source Code: https://github.com/SebLague/Smoke-Simulation

Resources and References: Fluid notes: https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf Ten-minute physics: https://www.youtube.com/watch?v=iKAVRgIrUOU My other fluid videos: https://youtube.com/playlist?list=PLFt_AvWsXl0dJrPelwdVSMVC_MDTYPJWn&si=Z5cOCDSI1aS4fe_C Sound wave simulation: https://www.youtube.com/watch?v=iA6wRgwl7k0 Music: https://raw.githubusercontent.com/SebLague/Misc-Project-Info/refs/heads/main/Coding-Adventures/Smoke

Chapters 00:00 Intro 00:50 Navier-Stokes Equations 02:00 Divergence 05:09 Solving for Pressure 08:26 Gauss-Seidel Iteration 10:36 Solid Cells 12:26 Velocity Interpolation 15:15 Advection (with derivatives) 18:37 Semi-Lagrangian Advection 22:12 Testing 23:43 Successive Over-Relaxation 25:16 Visualizing Speed 26:32 Smoke Map 28:14 Parallel Pressure Solving 31:13 Vortex Shedding 35:48 A Few Little Experiments 37:55 Temperature 39:17 Final Smoke Experiments 40:38 Outro

Back to Sebastian Lague · Report a problem