We learn how to build nVidia GPU-based (super)computers, network and program them for HPC (High Performance Computing) using CUDA C language. We apply all this to do some astrophysical simulations related to forming planetary systems.

Wednesday, June 16, 2010

[from Josh] r.. (..=double derivative) in r,theta,phi coord system

The coord system I use along with r.. in spherical coords. I'm nearly positive that I'm accurate since it was very messy in the rough but I think I caught everything and simplified as far as can be done.

[from James] Comparing what you've got here to what's in B&T, it looks almost right except that your sines should be cosines and vice-versa. I think it started on page 2, equation 13, where the cosine should be a sine. It's also possible that B&T is wrong, but the book's website doesn't have an errata.

[James again] Ah, your phi goes from +pi/2 to -pi/2 relative to the x-axis, whereas B&T's is from 0 to pi relative to the z-axis. That probably explains the sine/cosine discrepancy.

[from James] Comparing what you've got here to what's in B&T, it looks almost right except that your sines should be cosines and vice-versa. I think it started on page 2, equation 13, where the cosine should be a sine. It's also possible that B&T is wrong, but the book's website doesn't have an errata.

ReplyDelete[James again] Ah, your phi goes from +pi/2 to -pi/2 relative to the x-axis, whereas B&T's is from 0 to pi relative to the z-axis. That probably explains the sine/cosine discrepancy.

ReplyDelete[from Josh] Yes it is due to my coords sytem which is easier to use with a computer.

ReplyDelete