![]() | 1 | initial version |
If you type
E.spherical_frame?
you get Return the orthonormal vector frame associated with spherical coordinates.
So f_spher = E.spherical_frame()
is an orthonormal frame; it is therefore correct to get diag(1,1,1) for the metric components in that frame. What you want is the coordinate frame (∂/∂r,∂/∂θ,∂/∂ϕ). You get the latter via c_spher.frame()
. Hence the metric components you are expecting are returned by
g[c_spher.frame(),:]
The link between the two vector frames is displayed by
for v in f_spher:
show(v.display(c_spher.frame()))
er=∂∂r eθ=1r∂∂θ eϕ=1rsin(θ)∂∂ϕ
![]() | 2 | No.2 Revision |
If you type
E.spherical_frame?
you get Return the orthonormal vector frame associated with spherical coordinates.
So f_spher = E.spherical_frame()
is an orthonormal frame; it is therefore correct to get diag(1,1,1) for the metric components in that frame. What you want is the coordinate frame (∂/∂r,∂/∂θ,∂/∂ϕ). You get the latter via c_spher.frame()
. Hence the metric components you are expecting are returned by
g[c_spher.frame(),:]
The link between the two vector frames is displayed by
for v in f_spher:
show(v.display(c_spher.frame()))
er=∂∂r eθ=1r∂∂θ eϕ=1rsin(θ)∂∂ϕ
PS: you might take a look at this tutorial notebook, and more generaly to the tutorial about vector calculus in Euclidean spaces.