I have implemented a SymPy program that can calculate the Riemann curvature
tensor for a given curve element. However, I am encountering problems
solving for the case when the curve element is the surface of a sphere
\begin{align}
ds^2 = r^2d\theta^2 + r^2 \sin^2\theta d\phi^2
\end{align}
This is obviously a 2D curve element, so the non-zero elements of the
metric become
\begin{align}
g_{11} = r^2, \qquad g_{22} = r^2 \sin^2\theta.
\end{align}
The entries of metric are clearly a function of two variables $r$ and
$\theta$. But the way I have created the program it treats them according
to their differentials $d\theta$ and $d\phi$. Since $dr$ is 'zero', my
metric is computed as
\begin{align}
\begin{bmatrix}
0 &0 &0\\
0 &r^2 &0\\
0 &0 &r^2 \sin^2\theta
\end{bmatrix}.
\end{align}
The way I have coded my implementation is by asking the user for the metric
defined as a matrix. If the matrix is 2D, then I use $u$,$v$ to represent
the coordinates. Which in the 2D case assign $r$ as $u$ and $\theta$ as
$v$. For 3D (with metric above), the additional value $\phi$ is assigned
$w$.
Does anyone see my dilemma here? For 3D, I am basically trying to calculate
the Riemann tensor for a metric with the determinant equal to zero. And for
2D, the $\phi$ component does not even exist.
This element is important for me to test my code as this generates a
non-zero Riemann curvature tensor. I would really appreciate any
suggestions how I can handle this case and thereby improve my code....which
fails completely for this case.
(I posted the exact post at physics on stackexchange :
http://physics.stackexchange.com/questions/212541/finding-the-riemann-tensor-for-the-surface-of-a-sphere-with-sympy-diffgeom#212541
, and they gently directed my here. I have posted the code on pastebin :
http://pastebin.com/DPxW38L0 - the problem lies in the way I have defined
the constructor for Riemann class)
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/93be477e-8729-48dd-8edf-237c6d527495%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.