Writing a Turbulence Simulation in Julia
Most engineering fluid simulations in Computational Fluid Dynamics are turbulent. Turbulence is a difficult phenomenon caused by the non-linearity in the Navier-Stokes Equations. Yet, it is also beautiful to look at. Let's code a simple solver in Julia: https://github.com/Ceyron/machine-lea... The approach we are using is based on the Stable Fluids Algorithm by Jos Stam, which you might have seen in one of other videos on the channel: An implementation of the classical Stable Fluids in Python using NumPy • Stable Fluids implemented in Python/NumPy A modification of the solver using the FFT on Periodic Domains in Julia: • Stable Fluids using the FFT in Julia | Flu... An extension of the FFT Julia solver to 3D: • Extending the Stable Fluids Algorithm with... A Kolmogorov Flow is defined by a stratified forcing that creates fluid motion in layerwise opposing directions. These layers yield high shear stresses at the interfaces that lead to a breakup into turbulence at a certain point. From there on, the fluid behaves according to isotropic turbulence. The setup and the color scale is inspired by this amazing paper: https://www.pnas.org/doi/10.1073/pnas... ------- 📝 : Check out the GitHub Repository of the channel, where I upload all the handwritten notes and source-code files (contributions are very welcome): https://github.com/Ceyron/machine-lea... 📢 : Follow me on LinkedIn or Twitter for updates on the channel and other cool Machine Learning & Simulation stuff: / felix-koehler and / felix_m_koehler 💸 : If you want to support my work on the channel, you can become a Patreon here: / mlsim ------- Timestamps: 00:00 Intro 01:21 Kolmogorov Flow Simulation 02:50 Details for the Stable Fluids Simulation 04:01 Hint on FFMPEG 04:17 Imports 04:51 Defining Constants 06:20 Creating the Mesh 08:51 Preparing the wavenumbers 12:51 Pre-Computing the Diffusion Decay 13:32 Pre-Computing normalized wavenumbers 14:43 Pre-Computing the forcing array 15:37 Pre-Allocate Arrays 17:54 Prepare the time loop 18:17 (1) Apply Forces 18:35 (2) Backtrace on streamline 21:00 (2) Interpolate with backtraced coordinates 23:20 (3) First Stabilization 24:12 (4.1) Transform into Fourier Domain 24:38 (4.2) Diffusion in Fourier Domain 25:31 (4.3) Compute Pressure by Divergence in Fourier Domain 26:24 (4.4) Project Velocities to Incompressibility 26:56 (4.5) Transform back to Spatial Domain 28:16 (5) Another Stabilization 28:17 (6) Advance in time 28:52 Computing Curl in Fourier Domain 29:55 Prepare the visualization with Plots.jl 33:33 Curl Intensification 34:45 Bug Fixing 37:33 Simulation is running 39:09 Creating a Movie with FFMPEG 40:18 Discussing the Simulation movie 41:08 Correcting the force application 41:58 Feel free to contribute 42:26 Outro

3D Pseudo-Spectral Navier-Stokes Solver in Julia

Coding Adventure: Simulating Smoke

Turbulence is Everywhere! Examples of Turbulence and Canonical Flows

Turbulent Flow is MORE Awesome Than Laminar Flow

Simulating Pipe Flow on a Staggered Grid in Python | with Inflow & Outflow

Coding Adventure: Simulating Fluids

Julia: to Lisp or not to Lisp?

WaterLily.jl: Real-time fluid simulation in pure Julia | Gabriel Weymouth | JuliaCon2021

What Is Turbulence? Turbulent Fluid Dynamics are Everywhere

God Says:"TAKE THIS MESSAGE SERIOUSLY, BECAUSE ONLY YOU ARE SEEING IT"/God Message Now/God Message

Live flow simulation tutorial with Waterlily.jl and Makie.jl

From Mesh Generation to Adaptive Simulation: A Journey in Julia | Andrew Winters | JuliaCon 2022

The Professor Who Taught People How To Think (1962)

Machine Learning for Computational Fluid Dynamics

Yann LeCun: World Models: Enabling the next AI revolution

Fourier Neural Operators (FNO) in JAX

Everything you need to know about the Lattice Boltzmann Method (LBM) for CFD Simulation

MIT Just Revealed the AI Bubble's Fatal Flaw

