Nabla Logo programmer
  Advanced Search
  
  Send us a comment/query
 
  Back to main web site
 
  OpenFOAM guides
  - User guide
  - Programmer’s guide
 
  Index
 
  Changes from OpenFOAM 2.2 to 2.3
 
  Trademarks in the guides
  ©2000-2007 Nabla Ltd.

1.2 Tensors

The term tensor describes an entity that belongs to a particular space and obeys certain mathematical rules. Briefly, tensors are represented by a set of component values relating to a set of unit base vectors; in OpenFOAM the unit base vectors ix  \special {t4ht=, iy  \special {t4ht= and iz  \special {t4ht= are aligned with the right-handed rectangular Cartesian axes x  \special {t4ht=, y  \special {t4ht= and z  \special {t4ht= respectively. The base vectors are therefore orthogonal, i.e. at right-angles to one another. Every tensor has the following attributes:

Dimension
d  \special {t4ht= of the particular space to which they belong, i.e. d = 3  \special {t4ht= in OpenFOAM;
Rank
An integer r >  0  \special {t4ht=, such that the number of component values     r
= d  \special {t4ht=.

While OpenFOAM 2.x is set to 3 dimensions, it offers tensors of ranks 0 to 3 as standard while being written in such a way to allow this basic set of ranks to be extended indefinitely. Tensors of rank 0 and 1, better known as scalars and vectors, should be familiar to readers; tensors of rank 2 and 3 may not be so familiar. For completeness all ranks of tensor offered as standard in OpenFOAM 2.x are reviewed below.

Rank 0 ‘scalar’
Any property which can be represented by a single real number, denoted by characters in italics, e.g. mass m  \special {t4ht=, volume V  \special {t4ht=, pressure p  \special {t4ht= and viscosity m  \special {t4ht=.
Rank 1 ‘vector’
An entity which can be represented physically by both magnitude and direction. In component form, the vector a = (a1,a2,a3)  \special {t4ht= relates to a set of Cartesian axes x,y,z  \special {t4ht= respectively. The index notation presents the same vector as ai  \special {t4ht=i = 1,2,3  \special {t4ht=, although the list of indices i = 1,2, 3  \special {t4ht= will be omitted in this book, as it is intuitive since we are always dealing with 3 dimensions.
Rank 2 ‘tensor’
or second rank tensor, T  \special {t4ht= has 9 components which can be expressed in array notation as:
          (  T11  T12  T13 )

T =  Tij =   T21  T22  T23
             T31  T32  T33
      \special {t4ht=
(1.1)

The components Tij  \special {t4ht= are now represented using 2 indices since r = 2  \special {t4ht= and the list of indices i,j = 1,2,3  \special {t4ht= is omitted as before. The components for which i = j  \special {t4ht= are referred to as the diagonal components, and those for which i /= j  \special {t4ht= are referred to as the off-diagonal components. The transpose of T  \special {t4ht= is produced by exchanging components across the diagonal such that

            (                )
  T            T11  T21  T31
T   = Tji =    T12  T22  T32
               T13  T23  T33
      \special {t4ht=
(1.2)

Note: a rank 2 tensor is often colloquially termed ‘tensor’ since the occurrence of higher order tensors is fairly rare.

Symmetric rank 2
The term ‘symmetric’ refers to components being symmetric about the diagonal, i.e. Tij = Tji  \special {t4ht=. In this case, there are only 6 independent components since T   = T
  12     21   \special {t4ht=, T   = T
  13     31   \special {t4ht= and T   = T
 23    32   \special {t4ht=. OpenFOAM distinguishes between symmetric and non-symmetric tensors to save memory by storing 6 components rather than 9 if the tensor is symmetric. Most tensors encountered in continuum mechanics are symmetric.
Rank 3
has 27 components and is represented in index notation as Pijk  \special {t4ht= which is too long to represent in array notation as in Equation 1.1.
Symmetric rank 3
Symmetry of a rank 3 tensor is defined in OpenFOAM to mean that Pijk = Pikj = Pjik = Pjki = Pkij = Pkji  \special {t4ht= and therefore has 10 independent components. More specifically, it is formed by the outer product of 3 identical vectors, where the outer product operation is described in Section  1.3.4.

1.2.1 Tensor notation

This is a book on computational continuum mechanics that deals with problems involving complex PDEs in 3 spatial dimensions and in time. It is vital from the beginning to adopt a notation for the equations which is compact yet unambiguous. To make the equations easy to follow, we must use a notation that encapsulates the idea of a tensor as an entity in the own right, rather than a list of scalar components. Additionally, any tensor operation should be perceived as an operation on the entire tensor entity rather than a series of operations on its components.

Consequently, in this book the tensor notation is preferred in which any tensor of rank 1 and above, i.e. all tensors other than scalars, are represented by letters in bold face, e.g. a  \special {t4ht=. This actively promotes the concept of a tensor as a entity in its own right since it is denoted by a single symbol, and it is also extremely compact. The potential drawback is that the rank of a bold face symbol is not immediately apparent, although it is clearly not zero. However, in practice this presents no real problem since we are aware of the property each symbol represents and therefore intuitively know its rank, e.g. we know velocity U  \special {t4ht= is a tensor of rank 1  \special {t4ht=.

A further, more fundamental idea regarding the choice of notation is that the mathematical representation of a tensor should not change depending on our coordinate system, i.e. the vector a  \special {t4ht=is the same vector irrespective of where we view it from. The tensor notation supports this concept as it implies nothing about the coordinate system. However, other notations, e.g. a
 i  \special {t4ht=, expose the individual components of the tensor which naturally implies the choice of coordinate system. The unsatisfactory consequence of this is that the tensor is then represented by a set of values which are not unique -- they depend on the coordinate system.

That said, the index notation, introduced in Section  1.2, is adopted from time to time in this book mainly to expand tensor operations into the constituent components. When using the index notation, we adopt the summation convention which states that whenever the same letter subscript occurs twice in a term, the that subscript is to be given all values, i.e. 1,2,3  \special {t4ht=, and the results added together, e.g.

        3
a b =   sum  a b =  a b + a b  + a b
 i i       i i    1 1   2 2    3 3
       i=1
\special {t4ht=
(1.3)

In the remainder of the book the symbol  sum  \special {t4ht= is omitted since the repeated subscript indicates the summation.