FLASH => openPMD (ELI-NP, Romania)
src/- core scripts:flash2openpmd.py(library + CLI),gui.py,launch.pysrc/output/- example output images and a sample converted openPMD filelib/python/- shared plotting code (plotting.py)misc/-environment.ymlconda environment specData/- sample FLASH input
misc/environment.yml defines the flash2openpmd conda environment
(numpy, scipy, matplotlib, yt, openpmd-api, and pytorch for optional GPU
acceleration). Create it with:
conda env create -f misc/environment.yml
or just run python src/launch.py, which checks for the environment and
offers to create it for you (and self-heals the HDF5/h5py version-mismatch
issue that can occur between yt's conda hdf5 build and the pip-installed
openpmd-api wheel).
Two ways to run a conversion:
- CLI:
python src/flash2openpmd.py <run_directory> <filename> [options]. Shows a preview plot before writing by default; pass-y/--yesto skip the confirmation prompt,--no-previewto skip the plot, and--device cudato accelerate the cylindrical-geometry rotation on GPU (falls back to CPU automatically if CUDA isn't usable). Run with--helpfor the full option list. - GUI:
python src/launch.py(orpython src/gui.pyif the environment is already active) opens a window to pick the run directory/file, set parameters, preview the plot, and only write to openPMD after confirming.
The converted file has the extension .h5 with custom name
Simulation output from FLASH code.

The openPMD output after 6 level refinement in both X and Y directions.
PIConGPU simulation by using the profile converted from FLASH. The figure shows the electron density profile duing the interaction with the rising edge of the laser main pulse.
The output from cylindrical geometry simulation is rotated by 360 degree around its axis of symmetry to obtain 3D Cartesian geometry array.
The GUI lets you pick the run directory/file, set conversion parameters, preview the plot, and only writes to openPMD after confirming.






