Skip to content

agdestein/Turbulox.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌪️ Turbulox

Stable Dev Build Status Coverage Aqua

Turbulence in a box.

taylorgreen.mp4

🚀 Installation

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

👮 The rules

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$

⚔️ The battle

🧙 Plug in your turbulence closure 🪄. Compete.

Todo:

  • Leaderboard

📚 Down to business

The equations:

$$\partial_j u_j = 0$$

$$\partial_t u_i + \partial_j (u_i u_j) = -\partial_i p + \nu \partial_{jj} u_i + f_i$$

Discretization: Fully conservative combination of central difference stencils from Morinishi et al.

🫣 Outlook

Disretization orders:

  • Second order
  • Fourth order
  • Sixth order
  • Eighth order
  • Tenth order

Convergence Timing

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