[yt-users] Creating Field to calculate enclosed mass

Nathan Goldbaum nathan12343 at gmail.com
Wed Jul 6 08:31:47 PDT 2016


Hi Rajika,

As you've discovered, it's not possible (as far as I'm aware, anyway) to do
something like this with yt's field system, which assumes all fields can be
calculated locally or by taking into account data that are at most a few
zones away in any direction.

Usually whenever I'm looking for something like this I end up using a
profile object, which has options for cumulatively summing profiled data.

Can you describe a little bit more what you want to do with this field?

-Nathan

On Mon, Jul 4, 2016 at 6:26 PM, Rajika Kuruwita <rajikakuruwita at gmail.com>
wrote:

> Hi yt users,
>
> I've been using yt for a few years, and I know how to simple fields, but
> I'm wondering if someone has created a field that calculates enclosed mass
> at all cells (so, I guess the mass in a sphere centred on the centre of the
> simulation domain, or centre of mass). I've tried to think of a few ways of
> doing this, but all require iterating over all cells, and that's not very
> efficient. If anyone has an suggestions or can help, that would be great!
>
> Regards,
> Rajika.
>
> _______________________________________________
> 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/20160706/bb7c0ad1/attachment.htm>


More information about the yt-users mailing list