Skip to content

ComputationalRadiationPhysics/PIConGPUfromFLASH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conversion tool to generate PIConGPU initial state from FLASH outputs

FLASH => PIConGPU

QuickStart

To begin, the following dependencies are required:

Dependencies:

  • argparse, os, numpy, scipy, yt
  • openPMD-api

Running the conversion:

  • go to the wished folder

  • Execute the python script in a shell.

FLASH to openpmd:

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.

Modfications to make yourself

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

About

Scripts for generating PIConGPU inputs from FLASH outputs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published