Ngô Quốc Anh

January 27, 2010

Maple: tensor Package

Filed under: Nghiên Cứu Khoa Học, Riemannian geometry — Ngô Quốc Anh @ 17:52

The tensor package (tensor) contains commands that deal with tensors, their operations, and their use in General Relativity both in the natural basis and in a moving frame.

The following is a list of available commands.

act apply an operation on the elements of a tensor, spin or curvature table
antisymmetrize fully antisymmetrize tensor
change_basis change basis
Christoffel1 Christoffel symbols of the first kind
Christoffel2 Christoffel symbols of the second kind
commutator commutator of two vectors
compare compare two tensors, spin or curvature tables
conj complex conjugation
connexF connection coefficients for a rigid frame
contract contract indices
convertNP convert connection or Riemann tensor to the NP formalism
cov_diff covariant differentiation
create create a tensor object
d1metric first partial derivatives of the metric
d2metric second partial derivatives of the metric
directional_diff directional derivative
display_allGR display the objects used in General Relativity
displayGR display one object used in General Relativity
dual perform the dual operation on the indices of a tensor
Einstein Einstein tensor
entermetric facility for the input of metric tensor components
exterior_diff exterior differentiation
exterior_prod exterior product
frame compute the frame that brings the metric to the diagonal signature metric
geodesic_eqns Euler-Lagrange equations for geodesic curves
get_char get the character (covariant/contravariant) of an object
get_compts get the components of an object
get_rank get the rank of an object
invars invariants of the Riemann curvature tensor (General Relativity)
invert inverse of a second rank tensor
Jacobian Jacobian of a coordinate transformation
Killing_eqns Killing’s equation (related to symmetries of the space)
Levi_Civita Levi-Civita pseudo-tensors
Lie_diff Lie derivative with respect to a vector
lin_com linear combination of tensor objects
lower lower indices
npcurve Newmann-Penrose curvature component in Debever formalism (G.R.)
npspin Newmann-Penrose spin component in Debever formalism (G.R.)
partial_diff partial derivative of a tensor
permute_indices permutation of indices
petrov classification of polynomials of degree 4
prod inner and outer tensor product
raise raise indices
Ricci Ricci tensor
Ricciscalar Ricci scalar
Riemann Riemann tensor
RiemannF Riemann curvature tensor in a rigid frame
symmetrize fully symmetrize a tensor
tensorsGR compute the objects used in General Relativity
transform Change coordinates systems
Weyl Weyl tensor

Example.

1. Define the coordinate variables and the covariant Schwarzchild metric tensor components

> with(tensor):
coord := [t, r, th, ph]:
g_compts := array(symmetric,sparse, 1..4, 1..4):
g_compts[1,1] := 1-2*m/r:
g_compts[2,2]:= -1/g_compts[1,1]:
g_compts[3,3] := -r^2:
g_compts[4,4] := -r^2*sin(th)^2:
g := create( [-1,-1], eval(g_compts));

2. Now compute all of the quantities necessary to compute the Einstein tensor

> ginv := invert( g, ‘detg’ ):
D1g:=d1metric( g, coord ): D2g:=d2metric( D1g, coord ):
Cf1 := Christoffel1 ( D1g ):
RMN := Riemann( ginv, D2g, Cf1 ):
RICCI := Ricci( ginv, RMN ):
RS := Ricciscalar( ginv, RICCI ):

3. Compute the Einstein tensor

> Estn := Einstein( g, RICCI, RS );

Here is the picture

Resource: http://www.maplesoft.com/support/help/category.aspx?cid=1102

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: