Ask Your Question
1

Coordinate charts, functions of one coordinate as bounds of another(?)

asked 2021-04-02 16:43:28 +0200

Bubbz gravatar image

updated 2021-04-03 16:46:21 +0200

slelievre gravatar image

I have a Manifold (4,M) and its coordinate chart defined as:

M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
X.<t,r,th,ph> = M.chart(r"t r:(0,+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")

which gives:

sage: X.coord_range()
t: (-oo, +oo); r: (0, +oo); th: (0, pi); ph: [0, 2*pi] (periodic)

What i am trying to do, unsuccessfully so far, is to pass a function of θ as the lower bound of my r coordinates domain.

Let's say that i have an r(th) function r(th) = th^2 + 0.2. It does work if i insert it directly in the range as

X.<t,r,th,ph> = M.chart(r"t r:(th^2+0.2,+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")

but for more complex functions of r, th, this is not really an option. I have an (r, th) surface that needs to serve as my r domain, which unfortunately cannot be solved for r in order to use this.

So, I need to figure out one of these two to solve the problem i currently have:

(i) somehow use a callable function in the lower r bound, for example

X.<t,r,th,ph> = M.chart(r"t r:(K(th),+oo) th:(0,π):\theta ph:(0,2*π):periodic\phi")

which when i try i get a

TypeError: unable to simplify to float approximation

or

(ii) use a chart function of sort to restrict the r variable with a surface (r, th) and keep the other 3 restrictions as they are.

Thanks in advance!

Update 1: surface i need to pass as a restriction in addition to r>2.

f(r, th) = 0.16*sin(th)^4/r^2 - 1/256*(0.12*r^7*log(r - 2) - 30*r^6*(0.016*log(r - 2) - 0.008) + 2*r^5*(0.24*log(r - 2) - 8.36) + 32.32*r^4 + 0.16*r^3 - (0.36*r^7*log(r - 2) - 90*r^6*(0.016*log(r - 2) - 0.008) + 90*r^5*(0.016*log(r - 2) - 0.024) + 0.96*r^4 + 0.48*r^3 + 1.92*r^2 - 45*(0.008*r^7 - 0.032*r^6 + 0.032*r^5)*log(r) + 0.64*r - 3.84)*cos(th)^2 + 0.64*r^2 - 15*(0.008*r^7 - 0.032*r^6 + 0.032*r^5)*log(r) + 0.64*r - 1.28)*(0.12*r^6*log(r - 2) + 0.24*r^5 - 2*r^4*(0.12*log(r - 2) - 8.12) - 0.16*r^3 - 3*(0.12*r^6*log(r - 2) + 0.24*r^5 - 30*r^4*(0.008*log(r - 2) - 0.008) - 0.16*r^3 - 15*(0.008*r^6 - 0.016*r^4)*log(r) + 0.64*r + 1.28)*cos(th)^2 - 15*(0.008*r^6 - 0.016*r^4)*log(r) + 0.64*r + 1.28)*sin(th)^2/r^7
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-04-02 19:28:15 +0200

eric_g gravatar image

Use the chart method add_restrictions (type X.add_restrictions? for the documentation). On your example, this gives:

sage: M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')                       
sage: X.<t,r,th,ph> = M.chart(r"t r:(0,+inf) th:(0,pi):\theta ph:(0,2*pi):periodic\phi")            
sage: X.add_restrictions(r < th^2+0.52)

The condition r < th^2 + 0.52 is not shown by X.coord_range() (maybe it should?), but one can check that it has been taken into account:

sage: X.valid_coordinates(0, 1, pi/2, pi)                                                           
True
sage: X.valid_coordinates(0, 4, pi/2, pi)                                                           
False
sage: p = M((0, 4, pi/2, pi))                                                                       
ValueError                                Traceback (most recent call last)
...
ValueError: the coordinates (0, 4, 1/2*pi, pi) are not valid on the Chart (M, (t, r, th, ph))
edit flag offensive delete link more

Comments

Thanks for your answer! I'm sorry if I wasn't clear, r=th^2+0.52 was just an example and it does actually work with your way. I am trying to restrict my chart with an r(th) surface that cannot be solved for 'r' .

Bubbz gravatar imageBubbz ( 2021-04-02 19:57:33 +0200 )edit

Could you provide a concrete example of your function r(th)? X.add_restrictions(r>R(th)) should work for any function R(th).

eric_g gravatar imageeric_g ( 2021-04-02 21:30:20 +0200 )edit

I've added on the original post, one of the surfaces (r,th) that i need to pass somehow as a restriction for r. I've tried everything i could think of to solve it for r=r(th) but that seems not possible.

Bubbz gravatar imageBubbz ( 2021-04-02 22:38:11 +0200 )edit

It could work if in X.add_restrictions(r>R(th)) , R(th) can somehow be a callable function(?). That way i should be able to numerically approach a radius r for each th while integrating my geodesic. I've tried though and it just throws a RuntimeError: unsuccessful integration, step leads outside chart domain. I'm sorry if I managed to confuse you, I've been trying for months now to integrate geodesics to a horizon of R(th) radius with no luck .

Bubbz gravatar imageBubbz ( 2021-04-04 12:27:46 +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

1 follower

Stats

Asked: 2021-04-02 16:43:28 +0200

Seen: 62 times

Last updated: Apr 03