Computing geodesics for 4D manifold

asked 2021-05-27 14:50:36 +0200

AlexSok gravatar image

Hi! I want to compute geodesic trajectory for following metric:

import time
comput_time0 = time.perf_counter()
M0 = M.open_subset('M_0', r'\mathcal{M}_0' )

    X.<ta,r,x,y> = M0.chart(r'ta:\tau r:(0,+oo):r y:(0,+oo):y z:(0,+oo):z')
    print(X); X
    R3 = Manifold(3, 'R^3', latex_name=r'\mathbb{R}^3')
    X3.<r,y,z> = R3.chart()
    to_R3 = M.diff_map(R3, {(X, X3): [1, 
                                      1, 1]})
    to_R3.display()
    g = M.metric()

    g[0,0], g[1,1] = -(r**6-1)*r**2, (r**13)*(r**6-1)**(-1)
    g[2,2], g[3,3] = r**2, r**2
    g.display()

But when I'm trying to compute geodesics with this code:

p0 = M.point((0, 1, pi/2, 1e-12), name='p_0')
v0 = M.tangent_space(p0)((1.297513, 0,1, 0.0640625), name='v_0')
v0.display()
s = var('s')
geod = M0.integrated_geodesic(g, (s, 0, 100), v0, across_charts=True)
sol = geod.solve()  # numerical integration

I only obtain error unable to convert Chart (M_0, (ta, r, y, z)) to a symbolic expression. How could I solve this issue? I could not find any information about this error in the Internet. I'm working with SageManifolds/SageMath.

edit retag flag offensive close merge delete

Comments

1

Hi ! If you define across_charts=True you need to use geod.solve_across_charts instead of geod.solve. But I don't think that this is the only issue. From what I can see your initial point is placed at $r=0$, where you metric is not defined.

Can you try to apply the first change a move your starting point and see if it helps ? Note the your $1/r^{13}$ can also potentially cause numerical problems.

Florentin Jaffredo gravatar imageFlorentin Jaffredo ( 2021-05-31 19:15:04 +0200 )edit