Transforming a vector in spherical coordinates

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 4K views
SupernerdSven
Messages
19
Reaction score
0
I've got a Green's function in which all the impulses are on the line from the north pole to the origin (polar angle θ=0) and terminating with a point impulse at the north pole. I've found its gradient at a field point, and I want to rotate everything to a new coordinate system with the source line at arbitrary θ and azimuthal angle Ω. What I've done is:
1. Find the angle ψ between the field point and the source.
2. Use ψ in the formula which returns the gradient for a source on the line to the north pole. Note that since the basis vectors use the north pole as a reference location, this effectively has the source's location as a reference location.
3. Since the result of step 2 is the field in terms of the basis vectors the source's location, I next transform the basis vectors to a coordinate system in which the source is not necessarily on the line through the north pole.

For the angle between the field point and and the source I found:
ψ = arccos(sin(θfield)*sin(θsource)*cos(Ωfieldsource)+cos(θfield)*cos(θsource))

The r-component is unchanged. Calling the vector B, and with ψ being the polar coordinate in its old source-based coordinate system, the θ component becomes:
-(Bψ/(rfield*sin(ψ)))*(sin(θsource)*cos(θfield)*cos(Ωfieldsource)-cos(θsource)*sin(θfield))

However, when I tested it for θsource=0 (so it should reproduce the original result) I had a different answer than before. I had trouble finding a reference. Can you help me find my error, or help me find a reference which uses the same method I can compare this to?
 
Physics news on Phys.org