- IX.B.1 Components of vectors and tensors
- IX.B.1.1 Vectors in a Cartesian coordinate system
- IX.B.1.2 Order 2 tensor in a Cartesian coordinate system
- IX.B.1.3 Cylindrical and spherical coordinate systems

- IX.B.2 Transformation of components

- IX.B.3 Rotation of a coordinate system
- IX.B.4 Modification of coordinate systems
- IX.B.4.1 Local coordinate systems
- IX.B.4.2 Global coordinate systems
- IX.B.4.3 Projected coordinate systems
- IX.B.4.4 Local coordinate systems of CQUAD4 elements
- IX.B.4.5 Local coordinate systems of 3D elements

- IX.B.5 Coordinate systems and laminate properties

IX.B Coordinate system transformations

The modification of coordinate system into which the components of vectorial or tensorial results are expressed is a common operation performed when post-processing finite element results. To perform the transformation some vectorial and tensorial calculation is necessary. One gives in this Appendix, a summary of theoretical background necessary to understand the operations performed with FeResPost.

IX.B.1 Components of vectors and tensors

When performing tensorial calculations, or post-processing results, one manipulates 1D or 2D arrays of real values corresponding to the components of vectors or tensors in a specified coordinate system. Higher order tensors also exist, but they are not manipulated in FeResPost and we do not present the theory for tensor order larger than 2.

IX.B.1.1 Vectors in a Cartesian coordinate system

A vectorial force
**
**
can be expressed by its components
in the Cartesian coordinate system
**
**
characterized by its origin
and
its three unit length mutually orthogonal vectors
**
**
,
**
**
and
**
**
. Then the vector
**
**
corresponds to:

In the rest of the text the components of a vector

IX.B.1.2 Order 2 tensor in a Cartesian coordinate system

A Cauchy stress tensor
**
**
is characterized by its components
in the Cartesian coordinate system
**
**
. (One uses
the same notations as in
section IX.B.1.1).

The nine quantities

IX.B.1.3 Cylindrical and spherical coordinate systems

In sections IX.B.1.1 and IX.B.1.2, one presented vector and tensor components in Cartesian coordinate systems. The same definition is also worthy in curvilinear coordinate systems. However, the director vectors depend on the point on which the vector or tensor is attached. Conventionally, one decides that the director vectors are chosen tangent to the coordinate lines and are of unit length.

For example, for a cylindrical coordinate system, the position
**
**
of a
point depends on three coordinates
,
and
. So one has:

Then three tangent vectors

Finally, the three tangent vectors are normalized as follows:

This process to define base vectors at any point can be generalized to all curvilinear coordinate systems. However, the cylindrical and spherical coordinate systems have a peculiarity: at a given point, the three base vectors

The orthogonality property of the coordinate systems one uses in FeResPost simplifies the transformation of components from one coordinate system to another. Indeed such transformations reduce to transformations between Cartesian coordinate systems. There is only one difficulty in this process: to calculate the base vectors at every point.

IX.B.2 Transformation of components

One considers only the peculiar case of two Cartesian coordinate systems with the same origin. In section IX.B.1.3, one showed that even for cylindrical and spherical coordinate systems it is possible to reduce the complexity of the problem to a transformation of the components between two Cartesian coordinate systems.

IX.B.2.1 Transformation of vector components

One considers a vectors
**
**
with components expressed in two
Cartesian coordinate systems with base vectors
**
**
and
**
**
respectively. So one has:

In the last expression we introduce the notations and for the components of vector

It is possible to decompose the vectors
**
**
as a linear
combination of vectors
**
**
:

The coefficients are easily calculated. Indeed, the scalar multiplication of the previous equality by

or finally:

By a similar calculation, it is possible to identify the relations between
the components of vector
**
**
expressed in the two coordinate systems:

Finally, one sees that the relation between base vectors and vector components are the same:

That's the reason why the transformation is called a covariant transformation. One also says that or are covariant components of vector

The matrix is orthogonal: and the reverse relation for vector components is:

IX.B.2.2 Transformation of tensor components

Similarly to what has been done for vectors in section
IX.B.2.1, one derives transformations
of the components of tensors. One considers the components of tensor
**
**
in two coordinate systems:

Using the same definition of transformation matrix as in section IX.B.2.1, one writes:

Then, the substitution of the two expressions in the equations defining components gives:

The last expression allows us to extract a relation involving only the components of tensors, and not the base vectors:

Here again, one recognizes a classical matricial expression:

IX.B.3 Rotation of a coordinate system

A transformation of coordinate systems commonly done is a rotation of the coordinate system around a specified axis passing through the origin of the coordinate system. The resulting coordinate system has the same origin, but its base vectors are modified. A classical use of this operation corresponds to the transformation of vector or tensor results in material, ply or element axes of 2D elements.

For example, let
**
**
be a unit vector defining the rotation axis and
the rotation angle. Then the three transformed base vectors
are given by:

In particular, if

IX.B.4 Modification of coordinate systems

One gives here additional information on the modification of coordinate systems with Result method ``modifyRefCoordSys''. When developing the various transformations possible with this function, one tried to keep as much as possible, the correspondence with Patran (Patran 90) transformations. Sometimes, this process has been partially done by trials and guesses until an agreement was found.

In the rest of the section, one gives the information allowing the user to determine exactly the operations that are performed on finite element entities and coordinate systems to defined the transformed coordinate system. One makes the distinction between local, global and projected coordinate systems.

IX.B.4.1 Local coordinate systems

Several types of local coordinate systems may be defined, and the operations performed to define the coordinate system depend on the case:

- The ``elemIJK'' coordinate system definitions may be found in Patran User Manual. It is also common to the element coordinate systems of most finite element programs. Usually, it is defined with the three first definition nodes of the element. Direction X corresponds to the vector from node 1 to node 3. Direction Y is determined from the position of node 3.
- The ``plyCS'' coordinate system is obtained on surfacic elements with ``PCOMP'' or ``PCOMPG'' properties by rotating the local material coordinate system with the appropriate angle around its axis Z. For other elements, the ''plyCS'' coordinate system is identical to the material coordinate system.
- The ``matCS'' coordinate system definition depends on the type of
element:
- For 0D elements, no material coordinate system exists.
- For 1D elements, the material coordinate system corresponds the element coordinate systems (i.e. Nastran element coordinate system).
- For 2D elements, the material coordinate system can be defined
by two methods:
- If the material coordinate system is defined by an integer, this
integer corresponds to the index of the coordinate system defined
in the DataBase. Then the new coordinate system as follows:
- The First vector of the coordinate system is extracted.
- It is projected on the XY plane defined by the Nastran element coordinate system. This gives the vector X of the local material Cartesian coordinate system.
- The Vector Z of the local material Cartesian coordinate system is identical to the vector Z of Nastran element coordinate system.

- if the material coordinate system is defined by a real
argument, the value corresponds to a rotation angle
. Then the
local material Cartesian coordinate system is defined as follows:
- One first builds the IJK Cartesian coordinate system.
- Then the vector X of IJK coordinate system is rotated by an angle around axis of IJK coordinate system.
- This rotated vector s projected on the XY plane defined by the Nastran element coordinate system. This gives the vector X of the local material Cartesian coordinate system.
- The Vector Z of the local material Cartesian coordinate system is identical to the vector Z of Nastran element coordinate system.

- If the material coordinate system is defined by an integer, this
integer corresponds to the index of the coordinate system defined
in the DataBase. Then the new coordinate system as follows:
- For 3D elements, the material coordinate is generally identified by an integer in the ``PSOLID'' card. It is then retrieved from the DataBase. If no material coordinate system is specified in the ``PSOLID'' card, then the material coordinate system corresponds to the Nastran element coordinate system.

- The ``nodeCS'' coordinate system corresponds to the node analysis coordinate system. See Nastran reference guide for more information.
- The ``elemCS'' coordinate system corresponds to the Nastran local coordinate system. See Nastran reference guide for more information. Note that the construction of Nastran local coordinate system for CQUAD and 3D elements is complicated. (See sections IX.B.4.4 and IX.B.4.5 for more information.)

IX.B.4.2 Global coordinate systems

Global coordinate systems correspond to CoordSys objects. However one makes the distinction between:

- The basic coordinate system identified with integer 0.
- Coordinate systems which have a correspondence in the DataBase from which they have been or may be extracted. Those coordinate systems are identified with an integer larger than 0.
- Other user defined coordinate systems which have no correspondence in the DataBase. They are identified with integer -2000.

IX.B.4.3 Projected coordinate systems

The projected coordinate system is a local Cartesian coordinate system the definition of which depends on the type of element:

- For 0D elements, no coordinate system is build.
- For 1D and 3D elements, the Nastran element coordinate system is returned.
- For 2D elements, the projection makes sense. The coordinate
system is build as follows:
- The Z vector is the normal to the surface of the 2D element. For a CTRIA3, the vector Z is constant on the element. But for a CQUAD4 the nodes of which are not co-planar, the vector Z depends on the location on the element.
- The direction vector is projected on a plane perpendicular to Z and defines direction X. Note that the direction vector is associated to a coordinate system which may be curvilinear.

IX.B.4.4 Local coordinate systems of CQUAD4 elements

For CQUAD4 Nastran elements, the origin of the element coordinate system is defined to be the intersection of straight lines AC and BD( A, B, C, and D being the corners of the element). As long as the four defining nodes are co-planar, this definition is sufficient. But otherwise, the two straight lines do not intersection, and a generalization of the definition of the origin has to be found. We decide that the origin of the coordinate system shall be the point closest to the two straight lines AC and BD.

The two straight lines can be defined with corresponding parameterized equations:

So, one has to find the parameters and that minimize

where

The square of the norm defined above depends on parameters and and is given by:

This function must be stationary at the optimum point. Therefore its first derivatives wrt and must be zero:

This leads to a system of two linear equations with the two unknowns and :

These two equations may be rewritten as follows:

Or simply

This equation simply means that the vector connecting the two optimum points is perpendicular to both lines AC and BD. Finally, after resolution of the system of equations and various substitutions, on finds the origin of coordinate system at:

IX.B.4.5 Local coordinate systems of 3D elements

In Nastran, for 3D elements, the definition of the local element coordinate system is a little tricky, and it is not easy to interpret the information found in the reference manuals. One provides here the interpretation that has been used to build the coordinate systems of 3D elements in FeResPost.

The first step of the local element construction is to build three vectors R, S and T related to the geometry of the element. The way those three vectors are constructed depends on the 3D element that is being constructed. Then the R, S and T vectors are used to build a local Cartesian coordinate system. In Nastran Quick Reference Guide [Sof04b], on gives the following explanation for the CTETRA element:

The element coordinate system is chosen as close as possible to the R, S, and T vectors and points in the same general direction. (Mathematically speaking, the coordinate system is computed in such a way that, if the R, S, and T vectors are described in the element coordinate system, a 3x3 positive definite symmetric matrix would be produced.)In FeResPost, one makes the assumption that this information is also true for the other 3D elements CHEXA and CPENTA. One gives here the mathematical development that leads us to the definition of local coordinate system.

First, let us introduce the notations:
**
**
,
**
**
,
**
**
. So the element coordinate system is
**
**
and the three vectors R, S and T are denoted
**
**
. Then one defines
with matrix
**
**
corresponding to the description of vectors
**
**
on the base
**
**
. One has:

The above statement is equivalent to state that matrix must be symmetric. So the problem reduces to ``find three base vectors

Note also that this condition makes us think to the polar decomposition theorem that states that a positive definite tensor can be decomposed in the product of an orthogonal tensor and a pure symmetric positive definite tensor. This means that any deformation of a continuum medium can be decomposed in a rigid rotation and a pure deformation. One is actually interested in the rigid rotation that can be expressed by its rotation vector (see section IX.B.3). So considering an initial set of base vectors

This set of equations is non linear in the primary unknowns and one solves them by a Newton-Raphson in which successive approximations of the three vectors

Substituting the two previous expressions in (IX.B.2), one obtains successively:

This last expression allows to derive three independent linear equations, with three unknowns . The Newton-Raphson algorithm used looks as follows:

- Determine a first estimate of the three vectors
- Then one iterates until convergence: One assumes convergence if .

IX.B.5 Coordinate systems and laminate properties

Vectorial and tensorial components of Results are sometimes expressed in coordinate systems related to material properties. Of course, this is also the case when laminated properties are attributed to the elements. Then, three different coordinate systems can be used: ``plyCS'', ``lamCS'' and ``matCS''.

When vectorial or tensorial Results on composite elements are imported, they are expressed:

- In ``plyCS'' coordinate system if the values are associated to a laminate ply (layerId>0).
- In ``lamCS'' coordinate system for Nastran Results when the values are not associated to a ply (layerId<=0).
- In ``matCS'' coordinate system for Samcef Results when the values are not associated to a ply (layerId<=0).

When one modifies the reference coordinate system of a Result, the components are actually modified according to the rules presented in Table IX.B.1.

Software | Prop. type | layerId | ``matCS'' | ``lamCS'' | ``plyCS'' |

Nastran | homogenous | <0 | ``matCS'' | ``matCS'' | ``matCS'' |

Samcef | homogenous | <0 | ``matCS'' | ``matCS'' | ``matCS'' |

Nastran | homogenous | >0 | -- | -- | -- |

Samcef | homogenous | >0 | -- | -- | -- |

Nastran | laminate | <0 | ``lamCS'' | ``lamCS'' | ``lamCS'' |

Samcef | laminate | <0 | ``matCS'' | ``lamCS'' | ``lamCS'' |

Nastran | laminate | >0 | ``lamCS'' | ``lamCS'' | ``plyCS'' |

Samcef | laminate | >0 | ``matCS'' | ``lamCS'' | ``plyCS'' |