Ask Your Question
1

metric to christoffel symbols yielding overflow

asked 2020-09-23 21:56:09 +0200

drwbia gravatar image

updated 2020-09-24 02:45:39 +0200

slelievre gravatar image

In a Sage 9.1 Jupyter notebook I tried the following SageManifolds commands

M = Manifold(4, 'M', structure='Lorentzian')

Mani.<t,X,rh,ph> = M.chart(r"t X:(-oo,+oo) rh:(0,+oo):\rho ph:(0,2*pi):\phi")

B = function('B')(X,rh,ph)
d_Ph_X = function('d_Ph_X')(X,rh,ph)
d_Ph_rh = function('d_Ph_rh')(X,rh,ph)
d_Ph_ph = function('d_Ph_ph')(X,rh,ph)

g = M.metric()

g[0,0] = (-1+B**2*  ((d_Ph_X/B**2)**2 +(d_Ph_rh/B**2)**2 +((1/rh*d_Ph_ph/B**2)**2     )))

g[1,1] = B**2
g[2,2] = B**2
g[3,3] = rh**2*B**2

g[0,1] = B**2*(d_Ph_X/B**2)
g[0,2] = B**2*( d_Ph_rh/B**2)
g[0,3] = B**2*( d_Ph_ph/B**2)

g.christoffel_symbols_display()

The last line makes the notebook overflow... i really don't understand why.

the computation, even if it is rather tedious, seems straightforward to me...

Any idea? Any help would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-24 11:25:59 +0200

eric_g gravatar image

You should simplify $g_{00}$ in the input, via

g[0,0] = (-1+B**2*  ((d_Ph_X/B**2)**2 +(d_Ph_rh/B**2)**2 +((1/rh*d_Ph_ph/B**2)**2     ))).simplify_full()

Then it works: the Christoffel symbols are displayed in 2 min on my computer.

edit flag offensive delete link more

Comments

thx a lot for your time/insight! actually it did not work on my computer with sage 9.1 and it did work on the 1st attempt with sage 8.9, something really is different with 9.1 i guess... by the way using sage 8.9 also enabled me to retrieve all my .sws which were completely impossible to load on sage 9.1... life is strange sometimes ;) --> i now am a happy sage 8.9 user

drwbia gravatar imagedrwbia ( 2020-09-25 19:54:26 +0200 )edit

For me, it works well with Sage 9.1. Maybe something is weird with your Sage 9.1 install? How did you install it?

eric_g gravatar imageeric_g ( 2020-09-25 21:41:05 +0200 )edit

Regarding the .sws issue: you should take the opportunity of having a running Sage 8.9 to convert all your *.sws files to *.ipynb (Jupyter format). See this post.

eric_g gravatar imageeric_g ( 2020-09-25 21:45:39 +0200 )edit

@eric_g --> I installed it via conda


conda install mamba -c conda-forge # installs mamba


mamba create -n sage sage -c conda-forge # replaces "conda create..."


indeed you're right about the converting process that i should follow, thx I just found out that doing what you said indeed enabled the computation on my computer. without any modification of the memory available for sage. However a rather small modification of this metric does not work even with simplify_full, whereas it does with sage 8.9 (yielding "unreasonably" long expressions ^^)

drwbia gravatar imagedrwbia ( 2020-09-26 18:22:41 +0200 )edit

B = function('B')(X,rh)

d_Ph_X = function('d_Ph_X')(X,rh,ph)

d_Ph_rh = function('d_Ph_rh')(X,rh,ph)

d_Ph_ph = function('d_Ph_ph')(X,rh,ph)

P = function('P')(t)

g = M.metric()

g[0,0] = (-1+B2* ((P+d_Ph_X/B2)2 +(d_Ph_rh/B2)2 +((1/rhd_Ph_ph/B2)*2 ))).simplify_full()

g[1,1] = (B**2).simplify_full()

g[2,2] = (B**2).simplify_full()

g[3,3] = (rh2*B2).simplify_full()

g[0,1] = (B2*(P+d_Ph_X/B2)).simplify_full()

g[0,2] = (B2*( d_Ph_rh/B2)).simplify_full

g[0,2] = (B2*( d_Ph_rh/B2)).simplify_full()

g[0,3] = (B2*( d_Ph_ph/B2)).simplify_full()

g.display()

g.christoffel_symbols_display()

drwbia gravatar imagedrwbia ( 2020-09-26 20:05:34 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-09-23 21:56:09 +0200

Seen: 340 times

Last updated: Sep 24 '20