<div dir="ltr">In lieu of a documentation referral, here's a minimal snippet that uses yt to populate a dictionary with specified fields from a plt file. It makes use of covering_grid which is helpful for AMR problems. <div><br></div><div>Apologies to the yt community for willfully ignoring all sorts of nice built-in features for making these sorts of plots. </div><div><br></div><div>~~~~~~~~~~~~~~~~~~~~~</div><div><br></div><div>import yt<br>import matplotlib.pyplot as plt<br><br>def get_yt_data_1d(filename):<br><br> j_idx = 0<br> k_idx = 0<br> fields_list = ["r", "z", "dens", "pres", "temp"]<br><br> data_yt = yt.load(filename)<br> data_yt_map = data_yt.covering_grid(<br> level=0, left_edge=[0, 0.0, 0.0], dims=data_yt.domain_dimensions<br> )<br><br> data_dict = {}<br> for f in fields_list:<br> data_dict[f] = data_yt_map[f][:,j_idx,k_idx]<br> return data_dict<br><br>filename = 'flash_hdf5_plt_cnt_0001'<br><br>data_dict = get_yt_data_1d(filename)<br><br>plt.figure()<br><br>plt.plot(data_dict["r"], data_dict["dens"])<br>plt.xlabel('radius [cm]')<br>plt.ylabel('dens [g/cm^3]')<br>plt.tight_layout()<br>plt.show()</div><div><br></div><div>~~~~~~~~~~~~~~~~~~~~~~<br><div><br></div></div><div>Best,</div><div>Lee</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 6, 2023 at 9:13 AM Blackman David <<a href="mailto:david.blackman@eli-beams.eu" target="_blank">david.blackman@eli-beams.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Actually to add to the previous question, is there any simple documentation on how to process these files? The flash documentation doesn't provide a particularly straightforward answer. The yt-project is a reasonable choice. I am planning to run a large quantity
of flash simulations coupled with PIC simulations. For this purpose I would need to write some sort of automated script to generate a cartesian or cylindrical grid. The yt-project seems like a good place to start, but a simple understanding of how to reconstructed
the flash grid into an array of co-ordinates of vertices would be helpful.<br>
</div>
<div id="m_-2656614869873143005m_8397886327022139639appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-2656614869873143005m_8397886327022139639divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> flash-users <<a href="mailto:flash-users-bounces@flash.rochester.edu" target="_blank">flash-users-bounces@flash.rochester.edu</a>> on behalf of Leland Ellison <lee@pacificfusion.energy><br>
<b>Sent:</b> 06 October 2023 17:42<br>
<b>To:</b> Ryan Farber <<a href="mailto:rjfarber@umich.edu" target="_blank">rjfarber@umich.edu</a>><br>
<b>Cc:</b> <a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a> <<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a>><br>
<b>Subject:</b> Re: [FLASH-USERS] output files: Getting started guide?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Another good option for visualizing FLASH output is VisIt:
<div><a href="https://visit-dav.github.io/visit-website/index.html" target="_blank">https://visit-dav.github.io/visit-website/index.html</a><br>
</div>
<div><br>
</div>
<div>One hiccup you might encounter is an error when attempting to open FLASH files using the default VisIt settings. You can remedy this with either:</div>
<div>(i) In the Open File menu, look for the "Open file as type" box and choose: FLASH (If this fails, try restarting VisIt. Once the above error happens it seems to perpetually fail even if you specify the file type.)</div>
<div>(ii) If you're launching VisIt from the command line, add the argument: -assume_format FLASH</div>
<div><br>
</div>
<div>Best,</div>
<div>Lee</div>
</div>
<br>
<div>
<div dir="ltr">On Fri, Oct 6, 2023 at 6:27 AM Ryan Farber <<a href="mailto:rjfarber@umich.edu" target="_blank">rjfarber@umich.edu</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi Joe,
<div><br>
</div>
<div>8x8 refers to the number of cells per block.</div>
<div>The 53 probably refers to the number of blocks.</div>
<div>Additional details might be in the FLASH user guide.</div>
<div><br>
</div>
<div>I'd recommend just using yt. yt is for analysis as well as visualization.</div>
<div><br>
</div>
<div>Best,</div>
<div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">--------
<div>Ryan</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Thu, Oct 5, 2023 at 8:05 PM Joe Frisch <<a href="mailto:joseffrisch@google.com" target="_blank">joseffrisch@google.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Just getting started with FLASH just got the sedov code (with the default parameters) to run, trying to understand the output files. For example there is a hdf5 output file sedov_hdf5_plt_cnt_0000
<div><br>
</div>
<div>That contains grid data in 'coordinates" which has 53 x,y,z locations</div>
<div><br>
</div>
<div>There is also "pres' (presumably pressure) , 'temp" (presumably temperature) and desdata. </div>
<div><br>
</div>
<div>Those objects are 4-dimensional: [53,1,8,8] </div>
<div>where is that defined / described? </div>
<div>The 53 presumably maps onto the 53 plot coordinates. But 8X8?? Those seem to be either initial or final state, but not in a pattern I can decypher</div>
<div><br>
</div>
<div>Is the plot file format , or more specifically the fields in the plot file defined somewhere? </div>
<div><br>
</div>
<div>Maybe this is the wrong approach and I should just use yt? does yt provide access to all the data for analysis or is it just a plotting tool? </div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</blockquote>
</div>
</div>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</div></blockquote></div>