FLASH => PIConGPU
To begin, the following dependencies are required:
- argparse, os, numpy, scipy, yt
- openPMD-api
-
go to the wished folder
-
Execute the python script in a shell.
usage: flash2openpmd.py [-h] -input_file INPUT_FILE [-nx_flash NX_FLASH] [-ny_flash NY_FLASH] [-xmin XMIN]
[-ymin YMIN] [-xmax XMAX] [-ymax YMAX] [-dens_cutoff] [-dens_limit DENS_LIMIT] -output_file
OUTPUT_FILE
Convert FLASH output files to openPMD format.
options:
-h, --help show this help message and exit
-input_file INPUT_FILE
Path to the FLASH output file.
-nx_pic NX_PIC Resolution in x-direction of the OpenPMD output file.
-ny_pic NY_PIC Resolution in y-direction of the OpenPMD output file.
-xmin XMIN Minimum x boundary of the OpenPMD output file.
-ymin YMIN Minimum y boundary of the OpenPMD output file.
-xmax XMAX Maximum x boundary of the OpenPMD output file.
-ymax YMAX Maximum y boundary of the OpenPMD output file.
-dens_cutoff Apply density cutoff.
-dens_limit DENS_LIMIT
Density limit for cutoff.
-output_file OUTPUT_FILE
Output filename for openPMD data.
At the moment, the code only transpose the density, electric temperature, ion temperature an radiation temperature to the openpmd. If you are interested in other value you need to modify the read4Flash and write2openpmd functions to add them to the final output.
For the right formatting of dimension and units, take into account that FLASH is in cgs. From the unit dimension table, use the OpenPMD-format documentation