This README provides step-by-step guidance for running the Decaying Isotropic Turbulence (DIT) case using the CaLES solver.
Here, we present results computed using LES with the Smagorinsky model as the subgrid-scale model. Simulations are performed with a grid resolution of N = 32, using Smagorinsky model constant Cs = 0.18. The figure below shows the result :
Use TurboGenPY to generate the initial turbulence field.
Command:
python example.py -n 64 -m 5000 --output-n: grid resolution (e.g., 64³)-m: number of modes (e.g., 5000)--output: flag to write the result
This will generate initial velocity components (u_cbc.txt, v_cbc.txt, w_cbc.txt).
Use the initial field files to generate a restart binary file (fld.bin) for CaLES.
Command:
python write_restart_dit.pyEnsure that u_cbc.txt, v_cbc.txt, and w_cbc.txt are present in the working directory.
Run the CaLES solver using the provided input.nml and generated fld.bin.
Monitor and compare the results at the nondimensional time steps:
t = 0.284t = 0.665
Post-process the velocity field to compute the turbulent kinetic energy (TKE) spectrum.
- Extract velocity components from the binary field:
python read_restart_dit.pyThis will generate:
u.txt,v.txt,w.txt: velocity distributions
- Compute the energy spectrum:
python example_tkespec.pyThis script will use tkespec.py to compute the TKE spectrum from the velocity fields and save it to:
tkespec.txt
The DNS and LES calculations follow the same workflow. The only differences lie in the configuration of the SGS (subgrid-scale) model and wall modeling.
Additionally, DNS simulations require at least a 512-point grid to avoid energy pile-up and ensure numerical stability.

