Ask Your Question
2

How do you construct a vector field of a 4-dimensional manifold from the components of a 3-dimensional vector field?

asked 2024-05-31 16:34:09 +0200

CModera gravatar image

updated 2024-05-31 22:46:24 +0200

eric_g gravatar image

Hello, I'm doing a 3-dimensional curl calculation (the electric field from the magnetic field, for example) which I'd like to use to define a vector field (the Faraday tensor). To do this I define two manifolds, one with 4 dim and one with 3 dim (the same without the time dimension). Unfortunately, I can't extract the components of my 3-dim calculation to inject it into 4-dim. Here's my simplified code where I just define a vector field in 3D (F) that I'd like to inject into another in 4D (G):

M = Manifold(4, 'M')
N = Manifold(3, 'N', ambient=M)
CM.<t,x,y,z> = M.chart()
CN.<x,y,z> = N.chart()

t = var('t')
phi = N.continuous_map(M, {(CN,CM): [t,x, y, z]})
phi_inv = M.continuous_map(N, {(CM, CN): [x, y, z]})
phi_inv_t = M.scalar_field({CM: t})
N.set_embedding(phi, inverse=phi_inv, var=t, t_inverse={t: phi_inv_t})

F = N.vector_field('F')
Fx, Fy, Fz = function('F_x')(x,y,z), function('F_y')(x,y,z), function('F_z')(x,y,z)
F[0] = Fx
F[1] = Fy
F[2] = Fz

G = M.vector_field('G')
G[0] = t
G[1] = F[0]
G[2] = F[1]
G[3] = F[2]
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2024-05-31 22:59:20 +0200

eric_g gravatar image

updated 2024-05-31 23:08:10 +0200

Simply replace

G[1] = F[0]
G[2] = F[1]
G[3] = F[2]

by

G[1] = F[0].expr()
G[2] = F[1].expr()
G[3] = F[2].expr()

The reason is that F[0] returns a chart function based on the chart CN, which is not suited for initializing the chart function G[1], which is based on the chart CM. On the contrary F[0].expr() returns the symbolic expression of the chart function F[0] and this is a valid input for G[1].

With the above change, G.display() yields

G = t ∂/∂t + F_x(x, y, z) ∂/∂x + F_y(x, y, z) ∂/∂y + F_z(x, y, z) ∂/∂z
edit flag offensive delete link more

Comments

Thanks for your help., it works! It was obvious finally...

CModera gravatar imageCModera ( 2024-06-01 18:50:14 +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: 2024-05-31 16:34:09 +0200

Seen: 183 times

Last updated: May 31