[yt-users] calculate the Mdot in yt.

Nathan Goldbaum nathan12343 at gmail.com
Fri May 19 10:18:01 PDT 2017


I've issued a pull request which I hope will fix the issues that were
brought up in this thread:

https://github.com/yt-project/yt/pull/1409

Kazem, if you apply that pull request locally then I think it should fix
your issues. Please let us know if you need a hand compiling a version of
yt from git with that fix applied.

One last note: the isocontour algorithm yt uses, marching cubes, needs data
that bracket the chosen isocontour value. That means that if you create a
sphere data object and then ask yt to create an isocontour from that sphere
data object at the radius of the sphere, you will not get the results you
expect. To generate a valid isosurface, yt needs field values both above
and below the field value, but the sphere data object will only return
values smaller than its own radius.

In practice, that means you shouldn't generate isocontours like this:

   sp = ds.sphere(ds.domain_center, (0.5, 'code_length')
   surface = ds.surface(sp, 'radius', (0.5, 'code_length'))

But instead should do something like this:

   ad = ds.all_data()
   surface = ds.surface(ad, 'radius', (0.5, 'code_length'))

Note that I didn't necessarily need to use `ds.all_data()` there, I could
have used a sphere with a sufficiently large radius as to capture all of
the bracketing radius values we need to generate the isosurface correctly.
Using ds.all_data() just ensures that we will select all of the data we
need no matter what.

Unfortunately I'm not sure there's a way yt can detect that you are in this
situation and print a useful error or warning.

I hope that clears things up :)

-Nathan

On Fri, May 19, 2017 at 9:53 AM, Britton Smith <brittonsmith at gmail.com>
wrote:

> Hi Kazem, Nathan,
>
> I've opened two separate issues for this, the one Nathan linked to above
> and this one:
> https://github.com/yt-project/yt/issues/1407
>
> Issue #1406 is just that the surface value and surface fields are never
> verified to be in the same units.  That should be trivial to fix.  Issue
> #1407 gets at the real problem, which is that surfaces made with the radius
> field are almost always empty.  I say almost because as I was trying to
> recreate this issue this morning, I happened to make one that had some
> values.  However, if I twiddle things just a little, the size is again
> zero, which seems incorrect to me.
>
> Anyway, keep an eye on those issues and we will post updates there as
> we're able.
>
> Britton
>
> On Fri, May 19, 2017 at 7:38 AM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> Ah, it looks like Britton filed an issue while I was writing that e-mail:
>>
>> https://github.com/yt-project/yt/issues/1406
>>
>> On Fri, May 19, 2017 at 9:36 AM, Nathan Goldbaum <nathan12343 at gmail.com>
>> wrote:
>>
>>> Hi Kazem,
>>>
>>> Sorry, I'm not quite sure what you were asking, I haven't actually done
>>> anything to help out here yet. As Britton said there is likely a bug that
>>> needs to be fixed. I asked him for a runnable test script I could use to
>>> debug the issue. If you feel like it, you could create a runnable test
>>> script as well and then file an issue on github:
>>>
>>> https://github.com/yt-project/yt/issues/new
>>>
>>> There are a number of public test datasets you can use in your script at
>>> yt-project.org/data. Using a public dataset is important because it
>>> ensures anyone will be able to reproduce the issue you're seeing (sometimes
>>> problems depend on the exact type of data you are looking at).
>>>
>>> Hopefully once we have an example to debug with one of us will be able
>>> to come up with a bugfix you can apply to your local yt installation and
>>> that others can use once the next yt release goes out.
>>>
>>> -Nathan
>>>
>>> On Fri, May 19, 2017 at 7:25 AM, Kazem Ardaneh <kazem.arrdaneh at gmail.com
>>> > wrote:
>>>
>>>> *Hi Nathan, *
>>>>
>>>> *Could you kindly let me know how do you define:*
>>>>
>>>> *1. sphere (sph object),*
>>>> *2. surface (Surface structure)*
>>>>
>>>> *It seems me you defined in code unit.*
>>>>
>>>>
>>>> Best Regards,
>>>>
>>>> kazem
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170519/bfae5cd7/attachment-0001.htm>


More information about the yt-users mailing list