# Summary of Tensors in Macsyma

Tensor analysis, with Riemannian (and more general affine) connections, is the "absolute differential calculus" which is valid in all coordinate systems on differentiable manifolds. It is often the most powerful way to state and solve problems in many branches of continuum mechanics, including solid mechanics, fluid mechanics, electrodynamics, and general relativity.

Macsyma has five main (vector and) tensor packages:

ITENSOR
package for indicial tensor computations
CTENSOR
package for component tensor computations
ATENSOR
package for tensor algebras, including Clifford algebras, symplectic algebras, exterior algebras, universal tensor algebras and other tensor algebras.
CARTAN
package for exterior calculus of differential forms
VECT
package for vector calculus.
For a demonstration of CTENSOR, ITENSOR and other packages working together to automate tensor calculus, do DEMO(TENS_PDE);.

Macsyma's dot operator "." can be used to construct tensor algebras, as in ATENSOR. Do DEMO(DOTOPERATOR); for a demonstration.

Macsyma has facilities for user to define their own OPERATORS, which can be used to define tensor algebras, Lie algebras, etc. Do DEMO(OPERATORS); for a demonstration.

## ITENSOR

ITENSOR - The indicial tensor computation package. Indicial tensor computation means performing tensor computations while treating tensors as indexed symbols whose components are not assigned specific values. Tensor operations such as covariant differentiation, curvature computations, and tensor contraction can be carried out at this level.

ITENSOR includes coordinate derivatives, covariant derivatives (and curvature), Lie derivatives, exterior derivatives, extrinsic derivatives, and variational derivatives of tensor expressions.

ITENSOR includes frame fields, affine torsion and conformal nonmetricity. It has extensive facilities for expressing information about tensor contractions and symmetries, and a range of commands for simplifying indicial tensor expressions.

For demonstrations, do

```DEMO(ITENSOR);   (general demonstration)
DEMO(ITENSOR1);  (basic Riemannian geometry)
DEMO(ITENSOR2);  (elastic strain)
DEMO(ITENSOR3);  (general relativity, weak field approximation)
DEMO(ITENSOR4);  (general relativity, div(Einstein)=0)
DEMO(ITENSOR5);  (Riemannian geometry, spaces of constant curvature)
DEMO(ITENSOR6);  (general relativity, a curvature invariant)
DEMO(ITENSIMP);  compares various ITENSOR simplication commands
DEMO(IVARY);     variational derivatives of tensor expressions.
```
Do DEMO(TENS_PDE); for a demonstration of ITENSOR working with CTENSOR, the component tensor package, to manipulate tensor partial differential equations.

## CTENSOR

CTENSOR - The component tensor computation package. Component tensor computation means that the individual components of tensors have values which are mathematical expressions involving local coordinates and other variables. The tensors are represented as arrays or matrices. Tensor operations like covariant differentiation and index contraction are carried out at the component level.

CTENSOR includes frame fields, affine torsion and conformal nonmetricity. CTENSOR computes various curvature tensors.

For on-line demonstrations, do

``` DEMO(CTENSOR);     General relativity, Schwarzschild solution
DEMO(CTENSOR1);    Elasticity theory
DEMO(C2SPHERE);    Riemannian geometry of a 2-sphere
DEMO(KERR_NEWMAN); General relativity, Kerr-Newman solution
DEMO(ROB_WALKER);  General relativity, Robertson-Walker cosmology
DEMO(TENS_PDE);    Fluid mechanics and finite difference generation
DEMO(COORDSYS);    Generating equations in curvilinear coordinates.
```
For writing tensor differential equations in specific coordinate systems, see CT_COORDS.

## ATENSOR

ATENSOR - A library package for computing with various multilinear tensor algebras, using basis-independent, or basis-dependent notation. The types of algebras provided (determined by the option variable ALG_TYPE) include:
• universal tensor algebras,
• symmetric tensor algebras,
• Grassmann (antisymmetric) algebras,
• Clifford algebras,
• symplectic algebras,
• Lie enveloping algebras.
The function INIT_ATENSOR(algebratype,optional_dimensions) provides an easy way to define the most common types of tensor algebras. It also sets up special cases of the general algebras given above, such as the quaternions and the Pauli and Dirac algebras.

## CARTAN

CARTAN - The exterior calculus package. The exterior calculus of differential forms is a basic tool of differential geometry developed by Elie Cartan and has important applications in the theory of partial differential equations. The present implementation is due to F.B. Estabrook and H.D. Wahlquist.

CARTAN performs exterior products, exterior derivatives, Lie derivatives, and contraction of vectorfields and differential forms.

## VECT

VECT - The vector analysis package. VECT can combine and simplify symbolic expressions including dot products and cross products, together with the gradient, divergence, curl, and Laplacian operators. The distribution of these operators over sums or products is under user control, as are various other expansions, including expansion into components in any specific orthogonal coordinate systems. There is also a capability for deriving the scalar or vector potential of a field.

Do DEMO(VECT); and DEMO(VECT_PDE); for demonstrations.

The library file VECT_ORTH contains definitions of various orthogonal curvilinear coordinate systems, in a form usable by the VECT package. CT_COORDSYS defines coordinate systems for the CTENSOR package.

The CARTAN package for exterior calculus also contains some vector calculus operations. See CARTAN for more information.

Warning: The VECT package declares "." to be a commutative operator. In order to restore "." to its usual status as the noncommutative matrix multiplication operation, do REMOVE(".",COMMUTATIVE); when done with the VECT package.

Special Purpose Systems

webmaster@can.nl