[FLASH-USERS] How to put other variables into the output files

Ryan Farber rjfarber at umich.edu
Mon Apr 22 01:11:16 EDT 2019


Hi Zhang,

I'm cc'ing flash-users in case others find this helpful in the future.
To add a variable to your simulation, add a line to the "Config" file in
your problem directory. For example,
VARIABLE diff

Then, wherever you set the diffusion coefficient, you can set the value of
DIFF_VAR in solnData (or whatever you decide to call the output of
Grid_getBlkPtr) in the usual way. For example, see how DENS_VAR etc. are
set in Simulation_initBlock of the Sedov test problem.
(Something like solnData(DIFF_VAR,i,j,k) = diff_coeff)

Best,
--------
Ryan


On Sun, Apr 21, 2019 at 7:30 PM zdy0903 <zdy0903 at stu.xjtu.edu.cn> wrote:

> Hi Ryan
>
>
>   Thanks for your reply. I use the latest version, FLASH4.6, but it still
> doesn't work in "*plt_cnt*" output files. However, there is information
> of conduction in checkpoint files. It seems that the variables in
> "flash.h" will present in checkpoint files.
>
>   If one variable is *not included* in "flash.h", and it is calculated in
> one sub-unit in the simulation. what should I do to add this variable to
> flash.h (UNK_VARS) and make it accessible in output files. For example, if
> I want to check the information of diff_coeff (the diffusion coefficient
> for conduction) in output files. What should I do?  (I don't have to check
> diff_coeff. I just make an example)
>
>   Thank you very much!
>
>
> Zhang
>
>
> -----原始邮件-----
> *发件人:*"Ryan Farber" <rjfarber at umich.edu>
> *发送时间:*2019-04-22 05:05:13 (星期一)
> *收件人:* zdy0903 <zdy0903 at stu.xjtu.edu.cn>
> *抄送:* "flash-users at flash.uchicago.edu" <flash-users at flash.uchicago.edu>
> *主题:* Re: [FLASH-USERS] How to put other variables into the output files
>
> Hi Zhang,
>
> I've also found that only the first 9 "plot_var_"s are put in FLASH
> "*plt_cnt*" output files (but checkpoint files contain all variables).
> I'm not sure if this is intended behavior or if it's been fixed in later
> versions (I'm using FLASH4.2.2). What version of FLASH are you using?
>
> If you also cannot access "cond" from the checkpoint file, then you can
> check Flash.h (in the object directory) for the name of the variables your
> simulation is following.
>
> Also, since you mentioned using VISIT I wanted to mention that yt is
> another great option for FLASH analysis and visualization:
>
> http://yt-project.org
>
> Best,
> --------
> Ryan
>
>
> On Sun, Apr 21, 2019 at 5:44 AM zdy0903 <zdy0903 at stu.xjtu.edu.cn> wrote:
>
>> Hi!
>>
>>   Usually, the output files of FLASH are the database of some variables
>> like "dens", "temp", "pres". We can check it by importing the database to
>> VISIT. However, what should I do if I want to put other variables into
>> the database of output files. For example, if I want to see the *thermal
>> conduction data* in LaserSlab simulation during the entire process, what
>> should I do?
>>
>>   It seems that there is a plot options in flash.par just like
>>
>> ### Plot Options ###
>> plotFileNumber       = 0
>> plotFileIntervalStep = 100
>> plotFileIntervalTime = 0.01e-09
>> plot_var_1           = "dens"
>> plot_var_2           = "depo"
>> plot_var_3           = "tele"
>> plot_var_4           = "tion"
>> plot_var_5           = "trad"
>> plot_var_6           = "ye  "
>> plot_var_7           = "sumy"
>> plot_var_8           = "cham"
>> plot_var_9           = "targ"
>>   I set a new plot_var_10 = "cond".(conduction) But it seems that it does
>> not work? What else should I do?
>>
>>   Thank you very much!
>>
>>
>> Zhang
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20190421/a8c644e2/attachment.htm>


More information about the flash-users mailing list