Turbulence in a box.
taylorgreen.mp4
This package is in active development, and breaking changes are expected. Install the latest version with
using Pkg
Pkg.add("https://github.com/agdestein/Turbulox.jl")
You solve the incompressible Navier-Stokes equations with the following rules:
- The domain is always a cube
$\Omega = [0,1]^d$ with$d \in { 2, 3}$ . Side length:$L = 1$ . - Annoying boundary conditions are forbidden (periodic box only).
- The flow is incompressible.
- The grid is uniform and staggered.
- There is no pressure 🥵.
- Single process, single GPU. Nowadays you can fit
$1000^3$ ++ grid points on a single H100.
You get to choose:
- The resolution
$n^d$ - The viscosity
$\nu$ (but don't make it too large!) - The dimension
$d$ - The discretization order of accuracy
$o \in {2, 4, 6, \dots}$ - Body force
$f$
🧙 Plug in your turbulence closure 🪄. Compete.
Todo:
- Leaderboard
The equations:
Discretization: Fully conservative combination of central difference stencils from Morinishi et al.
Disretization orders:
- Second order
- Fourth order
- Sixth order
- Eighth order
- Tenth order
Goodies:
- The velocity gradient and its waste products
- Invariants
- Turbulence statistics and scale numbers
- Spectra
- Energy
- Reference slope
$C_K \epsilon^{2/3} k^{-5/3}$
Closure models:
- All the classics
- Smagorinsky
- Gradient model (Clark)
- Vreman
- Verstappen
-
$\sigma$ -model
- Nice interface for plugging in new ones
Differentiability
- Enzyme-compatibility
Data-generation
- Add batch dimension and loop over it in kernels (maybe)
- Data-consistency: Export commutator errors and sub-filter tensors consistent with how they appear in the discrete equations