[FLASH-USERS] Trying to plot in FLASH with jupyter notebook and pyplot

Adam Reyes adam.reyes at rochester.edu
Wed May 31 23:14:58 EDT 2023


Hi,

Yt works well as an alternative to visit for plotting FLASH output. You
should check out their documentation for more information on the
capabilities. The thread you linked looks to be specifically about some
possibly outdated scripts that are included with the FLASH source code. Here
<https://github.com/acreyes/FlashSummer/blob/main/plot_sedov.ipynb> is a
python notebook that shows one way to get the density plot you're
interested in using yt.

In your python script you're only plotting a single block ( the first index
of var), which is probably the root block. Each of these blocks is by
default 8x8x8 cells and is the reason for the apparently low resolution
color maps you're getting. You can read more about how the Grid unit in
FLASH organizes blocks in the usersguide
<https://flash.rochester.edu/site/flashcode/user_support/flash4_ug_4p7/node59.html#SECTION05163200000000000000>
.

*************************************************************************
Adam Reyes

Code Group Leader, Flash Center for Computational Science
Research Scientist, Dept. of Physics and Astronomy
University of Rochester
River Campus: Bausch and Lomb Hall, 369
500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
Email adam.reyes at rochester.edu
Web https://flash.rochester.edu
 (he / him / his)

*************************************************************************

On Wed, May 31, 2023 at 6:30 PM Sharma, Divyanshu Raj <sharma22 at llnl.gov>
wrote:

> Hi,
>
>
>
> I am trying to plot in python in the jupyter notebook by taking the Sedov
> files from my run (specifically the sedov_hdf5_chk_0000 to 0005) but there
> is no easy way to do it so far, the best way I found was using this code I
> found online, but I am getting low fidelity model. I want to get a model
> like when I use visit. I have attached the visit visualization and my code
> and my visualization below. I head ‘yt’ could be imported from a thread,
> but that thread ended with no progress as seen here.
> https://flash.rochester.edu/pipermail/flash-users/2021-June/003555.html
>
>
>
> Visit:
>
>
>
> Python code and visualization:
>
>
>
>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
>
> For list info, including unsubscribe:
> https://flash.rochester.edu/mailman/listinfo/flash-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230531/36e6e1a2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 178959 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230531/36e6e1a2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 179625 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230531/36e6e1a2/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 35039 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230531/36e6e1a2/attachment-0002.png>


More information about the flash-users mailing list