Physics Builder Design > Using Coordinate Systems > Transformation Between Coordinate Systems

Transformation Between Coordinate Systems
All spatial vectors and matrices can transform as tensors when an operation involves two tensors defined in different coordinate systems. Consider the following example
or in Einstein summation notation
where subscripts indicate covariant indices and superscripts indicate contravariant indices. The type of index determines how a tensor transforms to a different coordinate system. A non-orthonormal coordinate system has two sets of base vectors, the covariant and contravariant base. A covariant tensor component use contravariant base vectors and a contravariant tensor component use covariant base vectors. For all orthonormal systems these two set of base vectors are identical. Now assume that Di is given in a different coordinate system that ni. To compute Dn properly, Di first have to be transformed as a contravariant tensor
where xi is the i:th coordinate for the desired system, and ui is the i:th coordinate for the original system. To separate tensor indices, they also include the coordinate name. If the tensor was covariant, the transformation would become
These transformation are used whenever there exist several systems in an expression or variable assignment. The most common example is when you use an input coordinate system for your user inputs that differs from the base vector system in which the variables are stored. A material tensor from the material library, for example, can undergo a rotation to align its z-axis with the y-axis in the tensor variable used in the model. A coordinate system for rotation is always orthonormal, so in this case it does not matter if the tensors are covariant or contravariant.
Another situation when a variable might undergo an automatic conversion is if you try to perform a scalar dot product between to tensor of the same type — for example, two covariant tensors
The expression parser performs a raise-index operation on Dj before taking the dot product. This is essentially a multiplication with the contravariant metric tensor, gij. The metric tensor is the identity matrix for all orthonormal systems.
Reference
1. G. B. Arfken, H. J. Weber, Mathematical Methods for Physicists, Academic Press, 1995.