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

Add usage to readme.md

parent 6ac915e5
No related branches found
No related tags found
No related merge requests found
Pipeline #52471 passed
......@@ -3,7 +3,7 @@
pyTurbulence is a Python package for generating synthetic compressible turbulent fields for Direct Numerical Simulation (DNS) based on the method of Ristorcelli and Blaisdell. This package provides tools to generate velocity, pressure, and thermodynamic fields, as well as to compute and plot the energy spectrum of the generated turbulence.
TODO:
- add dilatational velocity fluctuations
- Add dilatational velocity fluctuations
## Features
......@@ -16,7 +16,22 @@ TODO:
To install the package, navigate to the root directory of the project and run:
''' pip install . '''
```sh
pip install .
```
## Usage
To use the code from the `example.py` script, follow these steps:
1. **Navigate to the Project Directory**: Open a terminal and navigate to the root directory of the project.
2. **Run the Example Script**: Execute the `example.py` script to generate synthetic turbulence data and save the results.
```sh
python pyTurbulence/example.py
```
3. **View the Results**: The results will be saved in the `results` directory. This includes the generated data files (`u.dat`, `v.dat`, `w.dat`, `p.dat`, `T.dat`), a log file (`log.txt`), and a plot of the energy spectrum (`spectrum.png`).
## License
......@@ -26,6 +41,6 @@ This project is licensed under the MIT License. See the LICENSE file for details
- Ristorcelli, J. R., & Blaisdell, G. A. (1997). Consistent initial conditions for the DNS of compressible turbulence. Journal of Computational Physics, 140(2), 427-466.
- Sagaut, P. (2018). Homogeneous Turbulence Dynamics. Springer.
- Tony Saad, Derek Cline, Rob Stoll, and James C. Sutherland. “Scalable Tools for Generating Synthetic Isotropic Turbulence with Arbitrary Spectra”. ,http://dx.doi.org/10.2514/1.J055230. (available online: Aug 25, 2016).
- Tony Saad, Derek Cline, Rob Stoll, and James C. Sutherland. “Scalable Tools for Generating Synthetic Isotropic Turbulence with Arbitrary Spectra”. http://dx.doi.org/10.2514/1.J055230. (available online: Aug 25, 2016).
- Saad, T., & Sutherland, J. C. (2016). Comment on “Diffusion by a random velocity field” [Phys. Fluids 13, 22 (1970)]. Physics of Fluids (1994-Present), 28(11), 119101. https://doi.org/10.1063/1.4968528.
- Austin Richards, Tony Saad, and James C. Sutherland. “A Fast Turbulence Generator using Graphics Processing Units”, 2018 Fluid Dynamics Conference, AIAA AVIATION Forum, (AIAA 2018-3559). https://doi.org/10.2514/6.2018-3559.
\ No newline at end of file
......@@ -11,11 +11,11 @@ def main():
# Parameters
params = {
"nbModes": 256,
"nbModes": 512,
"Mt": 0.23,
"Pressure": 1.0,
"Temperature": 1.0,
"k0": 8.0,
"k0": 12.0,
"domain_size": (2. * np.pi, 2. * np.pi, 2. * np.pi),
"domain_resolution": (64, 64, 64),
"seed": 42,
......
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