[FLASH-USERS] [EXT] Fwd: plot_var variable

Thibault Goudal thibault.goudal at u-bordeaux.fr
Wed Aug 26 11:37:43 EDT 2020


Many Thanks guys for the ideas. 

I'm writing my own numerical diagnostics with python so yt is definitely a very usefull module in order to build the numerical mesh. 
With yt or not, to build the x position by keeping a decent chk output frequency (pretty heavy), I try to construct the variable from others that I can print in plt outputs. 
I don't really know from which variables i could build x. 

I've just posted a request on the yt user list. 
People usually answer by keeping in mind a plot solution. In our case, it is just saving a spatial position at a given time. 



De: "Ji, Suoqing" <suoqing at caltech.edu> 
À: "Eddie Hansen" <ehansen at pas.rochester.edu> 
Cc: "Thibault Goudal" <thibault.goudal at u-bordeaux.fr>, "flash-users" <flash-users at flash.uchicago.edu> 
Envoyé: Mercredi 26 Août 2020 16:22:14 
Objet: Re: [FLASH-USERS] [EXT] Fwd: plot_var variable 

Hi Thibault, 

Just want to add that the coordinate information is not usually stored as grid-based variables. A lthough you can still do this by creating your own variables to store coordinates in source codes, there’s no need to do so, since it can be reconstructed from block information in the HDF outputs. 

In addition to Eddie’s solutions, you can also use yt ( [ http://www.yt-project.org/ | www.yt-project.org ] ) which does the reconstruction for you, and you can just use coordinates as grid-based-like variables (e.g., plot coordinate values directly or evaluate some function of coordinates). 

Best wishes, 
— 
Suoqing Ji 
Sherman Fairchild Fellow 
TAPIR & Walter Burke Institute for Theoretical Physics 
California Institute of Technology 
[ http://www.tapir.caltech.edu/~suoqing | http://www.tapir.caltech.edu/~suoqing ] 




On Aug 26, 2020, at 6:55 AM, Eddie Hansen < [ mailto:ehansen at pas.rochester.edu | ehansen at pas.rochester.edu ] > wrote: 

Hi Thibault, 

I'm not sure if it can be put into a plot variable, but if you're using Visit, there is a way to define an expression for each coordinate. In Visit, go to Controls->Expressions, then click 'New'. Set the type to 'Scalar Mesh Variable', and name it whatever you want (I call mine 'xpos' for example). Then in the Definition box, enter: 

recenter(array_decompose(coord(amr_mesh),0),"zonal") 

This should give you the x-position of the center of each cell. For y-position, use '1' instead of '0' in the coord array, and 2 for z-position. 

On Wed, Aug 26, 2020 at 8:23 AM Thibault Goudal < [ mailto:thibault.goudal at u-bordeaux.fr | thibault.goudal at u-bordeaux.fr ] > wrote: 

BQ_BEGIN

Hi dear Flash users! 

I am looking for a solution to print the (flash,x) spatial variable into a plot_var in the flash.par. 
This variable is included in the chk but it seems that writing plot_var_1 = 'x ' in the .par doens't work. 
I checked in the Flash.h but this variable doesn't exist. 

Is there a way to print this variable in the plt outputs? 

Thanks! 



-- 
Thibault Goudal 
PhD Student CEA 
CELIA CNRS UMR5107 laboratory 
+33664160842 
[ mailto:thibault.goudal at u-bordeaux.fr | thibault.goudal at u-bordeaux.fr ] 






-- 
Eddie Hansen, PhD 
Postdoctoral Associate 
University of Rochester 
607-341-6126 | Flash Center 

BQ_END



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200826/5a155bb2/attachment.htm>


More information about the flash-users mailing list