[yt-dev] yt & Enzo w. Zeus
Matthew Turk
matthewturk at gmail.com
Fri Feb 24 17:11:04 PST 2012
Hi Elizabeth,
(Welcome to yt-dev!)
On Fri, Feb 24, 2012 at 8:00 PM, Elizabeth Tasker
<tasker at astro1.sci.hokudai.ac.jp> wrote:
> Hi,
>
> I wanted to discuss a possibly more consistent way of dealing with
> velocities in yt when analysing a simulation with Enzo's Zeus hydro
> scheme (HydroMethod = 2).
>
> Because Zeus' velocities are face-centred, not cell centred, there is
> a half-cell off-set that the routines in yt sometimes allow for and
> sometimes do not. For instance, the DivV does allow for Zeus' off-set
> but the calculation of the SpecificAngularMomentum does not. I often
> hit this problem when examining objects with yt. Either I have to
> pretend Zeus has cell-centred velocities or write a new routine which
> is a nuisance.
Yes, this is problematic, and I don't like it either.
>
> I was wondering if we could introduce a universal field that
> cell-centred Zeus' velocities. I think it would look like this:
>
> http://paste.yt-project.org/show/2192/
>
> But, I have three questions:
>
> (1) Does the scheme (using the slice(None, -1, None) for arrays) work
> if "data" is not a continuous region, e.g. a collection of cells made
> through extract_region?
The insertion of ValidateSpatial ensures that the data[] fed in will
always be 3D.
>
> (2) Could this be implemented such that, if you were using Zeus, the
> universal fields "x-velocity", "y-velocity" and "z-velocity" were
> over-written by these new definitions? (If that was done throughout
> yt, then other references to Zeus in routines like DivV would have to
> be removed. This is probably still easier than adding in new ones
> everywhere).
I have to think about this. I would very, very much like it to be the
case, but it may require some thought and care. Let's sync up on IRC
and test it out. We should incorporate this functionality, and other
functionality like it, to ensure fidelity of results.
This also argues for the idea of having a set of field names that are
largely distinct from field names on disk, and that may only
coincidentally overlap. As it stands, right now we do a lot of checks
like "if field in field_list" which checks a name against another
name, but we'd instead want to compare against some external set of
keys.
>
> (3) Is it possible for me to do that on my own local version? e.g. can
> I put field definitions in a folder to over-write the default yt ones?
Yes, ~/.yt/my_plugins.py will be executed at startup.
-Matt
>
> Thanks~
>
> Elizabeth
> _______________________________________________
> 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