[FLASH-USERS] How to call MagneticResistivity
Ryan Farber
rjfarber at umich.edu
Tue Apr 23 17:49:15 EDT 2019
Hi Zhang,
Interestingly, it looks like MagneticResistivity can actually refer to two
different subroutines. According to my MagneticResistivity_interface.F90
there exists both "subroutine MagneticResistivity" as well as "subroutine
MagneticResistivity_fullState inside of "interface MagneticResistivity".
hy_uhd_getFaceFlux.F90 does "call MagneticResistivity(U(:,i,j,k),
magResist(i,j,k))" which refers to MagneticResistivity_fullState.
On the other hand, calling MagneticResistivity.F90 should take the form
"call MagneticResistivity(a,b,c,d)" where a, b, and d are type real and c
is type real, dimension(NSPECIES). Note that If you pass a real in for c
that is not dimension(NSPECIES) one receives the error you reported.
So, I'm guessing the issue is that your call statement doesn't match the
dimensions (or possibly) type that is expected by the subroutine. Note that
MagneticResistivity_fullState expects inputs of real, dimension(NUNK_VARS),
real, and (optionally) real.
Best,
--------
Ryan
On Tue, Apr 23, 2019 at 1:34 AM zdy0903 <zdy0903 at stu.xjtu.edu.cn> wrote:
> Hi
>
> I am trying to updata the variable of resistivity and met a problem :
>
> the Hydro unit can call the magneticresistivity subroutine
>
> However the Eos_wrapped and init_Block subroutine can't use the magneticresistivity
> subroutine
>
> with this call* "**use MagneticResistivity_interface, **ONLY :
> MagneticResistivity**"* at the first part of subroutine
>
>
> After make, it display: *"**Error: There is no specific subroutine for
> the generic ‘magneticresistivity’**"*
>
> I wonder how to exactly call the other unit's subroutine for example the
> *MagneticResistivity* in
> physics/materialProperties/MagneticResistivity/MagneticResistivityMain
>
> -----原始邮件-----
> *发件人:*"Ryan Farber" <rjfarber at umich.edu>
> *发送时间:*2019-04-22 23:34:25 (星期一)
> *收件人:* zdy0903 <zdy0903 at stu.xjtu.edu.cn>
> *抄送:* flash-users <flash-users at flash.uchicago.edu>
> *主题:* Re: Re: Re: [FLASH-USERS] How to put other variables into the
> output files
>
> Hi Zhang,
>
> I haven't actually used the conduction sub-unit before but if you do
> grep -in "diff_coeff" *.F90
> in the object directory then you should see all the places where
> diff_coeff appears. Anywhere where it's value changes (so, something like
> diff_coeff = blah) you'll also presumably want to update
> solnData(DIFF_VAR,i,j,k) [replace i,j,k with the loop variables if other
> variable names are used].
>
> Best,
> --------
> Ryan
>
>
> On Mon, Apr 22, 2019 at 5:49 AM zdy0903 <zdy0903 at stu.xjtu.edu.cn> wrote:
>
>> Hi!
>>
>>
>> I tried as your reply says. However, it doesn't work. It do add the
>> "diff" variable to the flash.h, but it the variable diff keeps zeros during
>> the process.
>>
>> It seems that the "diff" is not connected to the real "diff_coeff" in
>> conduction sub-unit. If I am not mistaken, the init_block only represent
>> the initial data of variable. How can we let the "diff" correspond to the "diff_coeff"
>> during the whole process?
>>
>>
>> Thank you very much!
>>
>>
>> Zhang
>>
>>
>> -----原始邮件-----
>> *发件人:*"Ryan Farber" <rjfarber at umich.edu>
>> *发送时间:*2019-04-22 13:11:16 (星期一)
>> *收件人:* zdy0903 <zdy0903 at stu.xjtu.edu.cn>
>> *抄送:* flash-users <flash-users at flash.uchicago.edu>
>> *主题:* Re: Re: [FLASH-USERS] How to put other variables into the output
>> files
>>
>> 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/20190423/8c3ce420/attachment-0001.htm>
More information about the flash-users
mailing list