Hasegawa-Wakatani turbulence simulations with Jax
For more details, check out the wiki
spectral_2D.mp4
- Install the package
git clone https://github.com/Yakumoo/hasegawa_wakatani.git
pip install hasegawa_wakatani # add the -e flag if you want to edit the source code
- Create your
.yaml
file with the model and the parameters. For example:
hasegawa_wakatani_pspectral_2d:
grid_size: 682
tf: 100
video_length: 20
- Run the python script:
python -m hasegawa_wakatani path_to_yaml_file.yaml
It will create a .zarr
file and plot the simulation in the same folder as the yaml file
For example, this command will create a workspace/compare_1d
directory where the simulation and the plots are saved:
python -m hasegawa_wakatani compare_1d
hasegawa_mima_pspectral_2d
: Hasegawa-Mima equation with pseudo-spectral method in 2D with forcing/injectionhasegawa_wakatani_pspectral_3d
: Pseudo-spectral method in 3D (periodic)hasegawa_wakatani_pspectral_2d
: Pseudo-spectral method in 2D (periodic)hasegawa_wakatani_pspectral_1d
: Pseudo-spectral method with a single poloïdal mode, it useshasegawa_wakatani_pspectral_2d
hasegawa_wakatani_findiff_2d
: Finite-difference method in 2D (periodic, Dirichlet, Neumann)hasegawa_wakatani_findiff_1d
: Finite-difference method with a single poloïdal mode (and forcing)
compare_1d
: Run the pseudo-spectral and the finite-difference simulations using the same parameters then plotcompare_1d_params
: Runcompare_1d
with differents values ofC
andκ