AMReX-Combustion / PeleLMeX

An adaptive mesh hydrodynamics simulation code for low Mach number reacting flows without level sub-cycling.
https://amrex-combustion.github.io/PeleLMeX/
BSD 3-Clause "New" or "Revised" License
28 stars 40 forks source link

Reading plt files using self-made python script? #288

Closed bazharz closed 9 months ago

bazharz commented 11 months ago

I would like to perform post-processing in Python without going through PeleAnalysis.

Firstly, is this possible? If yes, I would like to know if it's possible to read the files, for instance, to create an animation of the movement of my maximum Heat Release within the domain if we can achieve up to 10 levels of AMR.

nickwimer commented 11 months ago

Hi @bazharz,

Yes, for post-processing in Python I would recommend using YT (https://yt-project.org). I have a collection of scripts for various post-processing using YT here: https://github.com/nickwimer/ytScripts. I started to reorganize the main branch recently and haven't quite finished, so let me know what you need and I can push some updates to make it easier for you. For standard 2D sliced images for visualization, check out the quick_vis/slice_plot.py script. All of these routines are fully parallelized so you should be able to quickly visualize all of your time outputs for making a movie and then stitch them together using ffmpeg or the like.

Let me know if you run into any issues. If they are PeleLMeX specific you can respond here or if they are specific to issues with the ytScripts repo, you can open up an issue over there.

Thanks, Nick

marchdf commented 11 months ago

You could also look into py-amrex: https://github.com/AMReX-Codes/pyamrex

nickwimer commented 9 months ago

Going to close this. Let us know if you run into any other issues.