Skip to content
Snippets Groups Projects
Commit 3ac0f054 authored by Amaury Bilocq's avatar Amaury Bilocq
Browse files

Init doc folder - add pictures to readme

parent 62a8e008
No related branches found
No related tags found
No related merge requests found
Pipeline #52472 passed
......@@ -5,6 +5,8 @@ pyTurbulence is a Python package for generating synthetic compressible turbulent
TODO:
- Add dilatational velocity fluctuations
![alt text](image.png) ![alt text](image-1.png)
## Features
- Generate solenoidal velocity fields using the method of Rogallo.
......
import numpy as np
from pyTurbulence.syntheticTurbulence import compute_solenoidal_velocities, compute_solenoidal_pressure, compute_thermodynamic_fields
from pyTurbulence.spectrum import compute_tke_spectrum, plot_spectrum, energy_spectrum
from pyTurbulence.plot3D import plot3D
import time
import os
......@@ -44,11 +45,15 @@ def solve(params, results_dir):
start = time.time()
knyquist, wave_numbers, tke_spectrum = compute_tke_spectrum(u, v, w, domain_size[0], domain_size[1], domain_size[2])
real_spectrum = energy_spectrum(spectrum, wave_numbers, urms, k0)
spectrum_path = os.path.join(results_dir, "spectrum.png")
spectrum_path = os.path.join(results_dir, "spectrum.pdf")
plot_spectrum(wmax, wave_numbers, tke_spectrum, real_spectrum=real_spectrum, save_path=spectrum_path)
end = time.time()
spectrum_time = end - start
# Plot the 3D fields
# plot3D(u, domain_size, domain_resolution, name="u")
# Save the data
start = time.time()
u.tofile(os.path.join(results_dir, "u.dat"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment