[yt-dev] Question about vorticity and divergence plots

Matthew Turk matthewturk at gmail.com
Thu Mar 13 12:04:07 PDT 2014


Hi Jia-Hung,

I spent some time looking at this today, and I believe I have a
solution.  I'm not terribly keen on it, though.  The problem is the
HydroMethod check in the DivV definition.  Currently, it checks if
HydroMethod == 2, in which case it uses the field-centering that is
appropriate for GAMER data.  Otherwise, it doesn't.

The quick fix, I think, is to change the line:

if data.pf["HydroMethod"] == 2:

to

if data.pf["HydroMethod"] in (2, "gamer"):

This got me good plots.  In the 3.0 branch, we have largely changed
this completely, and it is worth investigating if we can port your new
frontend there.  If so, it will be simpler to ensure correct behavior
in the future.

-Matt

On Wed, Mar 12, 2014 at 10:59 AM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi Jia-Hung,
>
> Yes, I received it, and it's the fourth item in my box today.
>
> (If anybody else wants to take a look, I would appreciate it.)
>
> -Matt
>
> On Wed, Mar 12, 2014 at 10:58 AM, 吳佳鴻 <r00222055 at ntu.edu.tw> wrote:
>> Hi Matt,
>>
>>
>>
>> I already sent an email which has the subject “About YT Divergence and
>> Vorticity Plots from Jia-hung” to your gmail account.
>>
>> In the email, it includes my data and my several frontend files.
>>
>> Any suggestion is welcome and thank you in advance for the help.
>>
>>
>>
>> Sincerely,
>>
>> -Jia-Hung
>>
>>
>>
>>
>>
>> -----------------Previous-------------------------------------------
>>
>> Hi Jia-Hung,
>>
>>
>>
>> Interesting.  With cell-centered data, it ought to produce correct results.
>>
>>
>>
>> Would you be able to send me a small sample dataset (off-list) and I
>>
>> can take a look?  Or feel free to stop by our hangout at 11AM Eastern
>>
>> and I can try it out there.
>>
>>
>>
>> -Matt
>>
>>
>>
>> On Wed, Mar 5, 2014 at 1:31 PM, 吳佳鴻 <r00222055 at ntu.edu.tw> wrote:
>>
>>> Hi Matt,
>>
>>>
>>
>>>
>>
>>>
>>
>>> I am sorry that somehow my mailbox could not receive the mail
>>> successfully,
>>
>>> so I copy and paste the previous discussion at the bottom of this email.
>>> I
>>
>>> think my data is cell-centered, and I give YT my velocity field in the
>>> name
>>
>>> of ["velx", "vely", "velz"].  Is there anything wrong?
>>
>>>
>>
>>>
>>
>>>
>>
>>> Jia-Hung
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>> --------------------------------------previous
>>
>>> ------------------------------------------
>>
>>>
>>
>>> Hi Jia-Hung,
>>
>>>
>>
>>>
>>
>>>
>>
>>> Are values stored as face-centered or cell-centered in your output?
>>
>>>
>>
>>>
>>
>>>
>>
>>> -Matt
>>
>>>
>>
>>>
>>
>>>
>>
>>> On Wed, Mar 5, 2014 at 5:21 AM, 吳佳鴻 <r00222055 at ntu.edu.tw> wrote:
>>
>>>
>>
>>>> Dear all,
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> I’m new to YT. I encountered a problem when trying to plot the
>>
>>>
>>
>>>> divergence and vorticity of a velocity field with an octree data
>>
>>>
>>
>>>> structure similar to FLASH.
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> I put a cylindrically symmetric velocity field into YT. So far I could
>>
>>>
>>
>>>> get Velocity Magnitude Plot correctly and the Velocity vector looks
>>
>>>
>>
>>>> also fine (see the attachment). However, the VorticityMagnitude and
>>
>>>
>>
>>>> DivV plots have a offset toward the top right corner. I was wondering
>>
>>>> where I did it wrong.
>>
>>>
>>
>>>> Any suggestion will be welcome, and thanks for the help in advance.
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> Sincerely,
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> Jia-Hung
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>>
>>
>>>
>>
>>>> _______________________________________________
>>
>>>
>>
>>>> yt-dev mailing list
>>
>>>
>>
>>>> yt-dev at lists.spacepope.org
>>
>>>
>>
>>>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>>
>>
>>>>
>>
>>>
>>
>>> _______________________________________________
>>
>>>
>>
>>> yt-dev mailing list
>>
>>>
>>
>>> yt-dev at lists.spacepope.org
>>
>>>
>>
>>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>> _______________________________________________
>>
>>> yt-dev mailing list
>>
>>> yt-dev at lists.spacepope.org
>>
>>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>



More information about the yt-dev mailing list