https://github.com/agdestein/turbulox.jl
Turbulence in a box
https://github.com/agdestein/turbulox.jl
closure-modeling direct-numerical-simulation finite-difference gpu high-order julia large-eddy-simulation staggered-grid tensors turbulence
Last synced: about 1 month ago
JSON representation
Turbulence in a box
- Host: GitHub
- URL: https://github.com/agdestein/turbulox.jl
- Owner: agdestein
- License: mit
- Created: 2025-01-20T23:40:07.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T15:30:54.000Z (2 months ago)
- Last Synced: 2025-04-14T16:44:55.071Z (2 months ago)
- Topics: closure-modeling, direct-numerical-simulation, finite-difference, gpu, high-order, julia, large-eddy-simulation, staggered-grid, tensors, turbulence
- Language: Julia
- Homepage: https://agdestein.github.io/Turbulox.jl/
- Size: 778 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌪️ Turbulox
[](https://agdestein.github.io/Turbulox.jl/stable/)
[](https://agdestein.github.io/Turbulox.jl/dev/)
[](https://github.com/agdestein/Turbulox.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/agdestein/Turbulox.jl)
[](https://github.com/JuliaTesting/Aqua.jl)Turbulence in a box.
https://github.com/user-attachments/assets/74ba86ac-cd78-49e1-ae14-87705c0b044c
## 🚀 Installation
This package is in active development, and breaking changes are expected.
Install the latest version with```julia
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.](https://www.sciencedirect.com/science/article/pii/S0021999198959629)## 🫣 Outlook
Disretization orders:
- [x] Second order
- [x] Fourth order
- [x] Sixth order
- [x] Eighth order
- [x] Tenth order
Goodies:
- [x] The velocity gradient and its waste products
- [x] Invariants
- [x] Turbulence statistics and scale numbers
- [x] Spectra
- [x] Energy
- [ ] Reference slope $C_K \epsilon^{2/3} k^{-5/3}$Closure models:
- [ ] All the classics
- [x] Smagorinsky
- [x] Gradient model (Clark)
- [x] Vreman
- [x] Verstappen
- [x] $\sigma$-model
- [ ] Nice interface for plugging in new onesDifferentiability
- [ ] 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