[yt-users] Angular momentum sign error?

Matthew Turk matthewturk at gmail.com
Thu Nov 8 06:58:04 PST 2012


Hi Elizabeth,

I think you're right, and Britton and I went over it to double check.
I believe this should not have caused any issues as the L_vec is
typically only used in analysis to get an axis (or to calculate the
*Total* angular momentum) so this shouldn't be too big of an issue.
But please do issue a pull request for this.

Thanks for catching this!

-Matt

PS Initially I had to check how obtain_rvec worked to make sure it was
also correct, and I believe it is.

On Thu, Nov 8, 2012 at 4:00 AM, Elizabeth Tasker
<tasker at astro1.sci.hokudai.ac.jp> wrote:
> Hi everyone,
>
> I think there is a small error in the angular momentum calculation.
>
> Below, L is calculated as:
>
> L = velocity x radius
>
> def _SpecificAngularMomentumX(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return yv*rv[2,:] - zv*rv[1,:]
> def _SpecificAngularMomentumY(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return -(xv*rv[2,:] - zv*rv[0,:])
> def _SpecificAngularMomentumZ(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return xv*rv[1,:] - yv*rv[0,:]
>
>
> but it should be:
>
> L = radius x velocity
>
> This leads to a sign error (and gives me a whole load of retrograde GMCs!)
>
>
> def _SpecificAngularMomentumX(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return  zv*rv[1,:] -  yv*rv[2,:]
> def _SpecificAngularMomentumY(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return -(zv*rv[0,:] - xv*rv[2,:])
> def _SpecificAngularMomentumZ(field, data):
>     xv, yv, zv = obtain_velocities(data)
>     rv = obtain_rvec(data)
>     return yv*rv[0,:] - xv*rv[1,:]
>
>
> Does that look right?
>
>
> Elizabeth
>
>
>
>
> ------------------------------------------------------
> Elizabeth TASKER
> Assistant Professor
>
> Physics Department, Faculty of Science
> Hokkaido University
>
> Sapporo, Japan
>
> tasker at astro1.sci.hokudai.ac.jp
> http://astro3.sci.hokudai.ac.jp/~tasker/
> ------------------------------------------------------
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list