ct_coords SciMax Toolbox ctaylor

SciMax Toolbox >> ct_coordsys

ct_coordsys

Maxima Function

Calling Sequence

ct_coordsys (coordinate_system, extra_arg)
ct_coordsys(coordinate_system)

Description

Sets up a predefined coordinate system and metric. The argument coordinate_system can be one of the following symbols:

SYMBOL             Dim Coordinates     Description/comments
------------------------------------------------------------------
cartesian2d           2  [x,y]             Cartesian 2D coordinate
                                           system
polar                 2  [r,phi]           Polar coordinate system
elliptic              2  [u,v]             Elliptic coord. system
confocalelliptic      2  [u,v]             Confocal elliptic
                                           coordinates
bipolar               2  [u,v]             Bipolar coord. system
parabolic             2  [u,v]             Parabolic coord. system
cartesian3d           3  [x,y,z]           Cartesian 3D coordinate
                                           system
polarcylindrical      3  [r,theta,z]       Polar 2D with
                                           cylindrical z
ellipticcylindrical   3  [u,v,z]           Elliptic 2D with
                                           cylindrical z
confocalellipsoidal   3  [u,v,w]           Confocal ellipsoidal
bipolarcylindrical    3  [u,v,z]           Bipolar 2D with
                                           cylindrical z
paraboliccylindrical  3  [u,v,z]           Parabolic 2D with
                                           cylindrical z
paraboloidal          3  [u,v,phi]         Paraboloidal coords.
conical               3  [u,v,w]           Conical coordinates
toroidal              3  [u,v,phi]         Toroidal coordinates
spherical             3  [r,theta,phi]     Spherical coord. system
oblatespheroidal      3  [u,v,phi]         Oblate spheroidal
                                           coordinates
oblatespheroidalsqrt  3  [u,v,phi]
prolatespheroidal     3  [u,v,phi]         Prolate spheroidal
                                           coordinates
prolatespheroidalsqrt 3  [u,v,phi]
ellipsoidal           3  [r,theta,phi]     Ellipsoidal coordinates
cartesian4d           4  [x,y,z,t]         Cartesian 4D coordinate
                                           system
spherical4d           4  [r,theta,eta,phi] Spherical 4D coordinate
                                           system
exteriorschwarzschild 4  [t,r,theta,phi]   Schwarzschild metric
interiorschwarzschild 4  [t,z,u,v]         Interior Schwarzschild
                                           metric
kerr_newman           4  [t,r,theta,phi]   Charged axially
                                           symmetric metric

coordinate_system can also be a list of transformation functions, followed by a list containing the coordinate variables. For instance, you can specify a spherical metric as follows:

(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) ct_coordsys([r*cos(theta)*cos(phi),r*cos(theta)*sin(phi),
      r*sin(theta),[r,theta,phi]]);
(%o2)                                done
(%i3) lg:trigsimp(lg);
                           [ 1  0         0        ]
                           [                       ]
                           [     2                 ]
(%o3)                      [ 0  r         0        ]
                           [                       ]
                           [         2    2        ]
                           [ 0  0   r  cos (theta) ]
(%i4) ct_coords;
(%o4)                           [r, theta, phi]
(%i5) dim;
(%o5)                                  3

Transformation functions can also be used when cframe_flag is true:

(%i1) load(ctensor);
(%o1)       /share/tensor/ctensor.mac
(%i2) cframe_flag:true;
(%o2)                                true
(%i3) ct_coordsys([r*cos(theta)*cos(phi),r*cos(theta)*sin(phi),
      r*sin(theta),[r,theta,phi]]);
(%o3)                                done
(%i4) fri;
(%o4)
 [cos(phi)cos(theta) -cos(phi) r sin(theta) -sin(phi) r cos(theta)]
 [                                                                ]
 [sin(phi)cos(theta) -sin(phi) r sin(theta)  cos(phi) r cos(theta)]
 [                                                                ]
 [    sin(theta)           r cos(theta)                0          ]
(%i5) cmetric();
(%o5)                                false
(%i6) lg:trigsimp(lg);
                           [ 1  0         0        ]
                           [                       ]
                           [     2                 ]
(%o6)                      [ 0  r         0        ]
                           [                       ]
                           [         2    2        ]
                           [ 0  0   r  cos (theta) ]

The optional argument extra_arg can be any one of the following:

cylindrical tells ct_coordsys to attach an additional cylindrical coordinate.

minkowski tells ct_coordsys to attach an additional coordinate with negative metric signature.

all tells ct_coordsys to call cmetric and christof(false) after setting up the metric.

If the global variable verbose is set to true, ct_coordsys displays the values of dim, ct_coords, and either lg or lfg and fri, depending on the value of cframe_flag.

ct_coords SciMax Toolbox ctaylor