Skip to content

flow-zone/4D-Turbulence-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4D Kolmogorov Turbulence

A Python implementation of the turbulence synthesis algorithm from Jos Stam's "Turbulent Wind Fields for Gaseous Phenomena". Generates temporally correlated 2D or 3D homogenous turbulent velocity fields that are periodic in space and time. This implementation also features additions from "A General Animation Framework for Gaseous Phenomena" including optional Gaussian spatial or fractal temporal correlation.

Usage

Use example scripts to generate gifs below. Tunable parameters include:

  • Nx,Ny,Nz - Velocity field size
  • Nt - Number of fields to generate
  • spatial_correlation - fractal or gaussian
  • temporal_correlation - fractal or gaussian
  • sigma_spatial - Parameter for spatial correlation
  • sigma_temporal - Parameter for temporal correlation
  • k_inertial - Minimum percentage of maximum wavenumber to begin turbulence generation.

fractal spatial correlation and gaussian temporal correlation are the standard settings from the original paper. Increasing k_inertial has the effect of restricting the average eddy size and is a sensitive parameter beyond near zero values.

Velocity fields with parameters Nx, Ny, Nz, Nt are generated with array dimensions [Ny, Nx, Nz,Nt]. Thus, 0th and 1st dimensions correspond to rows (Ny) and columns (Nx) and the last dimension always corresponds to the temporal dimension (Nt). Velocity component directions correspond to the indexing convention respectively.

Examples

The examples below show the 3D case of velocity magnitude and vorticity field evolution for the two spatial correlation options. For the 4D case, a slice through the animated volume can be visualised in the code or the velocity fields can be exported to ParaView or Blender for volume visualisation.

Fractal Turbulence

Gaussian Turbulence

License

This project is licensed under the MIT License.

About

The turbulence synthesis algorithm from "Turbulent Wind Fields for Gaseous Phenomena".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages