## 1 Introduction

This article provides information on tensor mathematics, relevant to ﬂuid dynamics and computational ﬂuid dynamics (CFD). It describes scalars and vectors and typical algebraic vector operations. It follows with second rank tensors, their algebraic operations, symmetry, skewness and tensor invariants such as trace and determinant. It brieﬂy discusses higher rank tensors before describing co-ordinate system and change of axis. Tensor calculus is introduced, along with derivative operators such as div, grad, curl and Laplacian. The ﬁnal section covers the integral theorems of Gauss and Stokes, with a physical representation of div and curl, and scalar and vector potentials.

## 2 Scalars and Vectors

A scalar is any physical property which can be represented by a single real number in some chosen unit system, e.g. pressure (), temperature () and density (). Scalars are denoted by single letters in italics, e.g. , , . The standard scalar operations must be performed using consistent units of measurement; in particular, addition, subtraction and equality are only physically meaningful for scalars of the same dimensional units.

A vector is an entity which is represented by both magnitude and direction. In its most general form an -dimensional vector  can be denoted by scalar components corresponding to coordinate axes . For continuum mechanics, where we deal with 3 dimensional (Euclidian) space, the vector relates to a general set of axes ; representing in a rectangular Cartesian system (see Section 5.1) or and in cylindrical and spherical polar coordinates. The index notation presents the same vector as  () in which corresponds to each of the coordinate axes. The list of indices () is usually omitted in mathematical text since it is implied by the form of the equation in which it is written. In this article the tensor notation will generally be used in which a vector or tensor (see Section 3) is represented by letters in bold face, e.g. . The beneﬁts of this notation are that: it does not imply anything about the coordinate system; it therefore promotes the concept of a vector as a entity with direction and magnitude rather than a group of three scalars; and, it is more compact.

The magnitude, or modulus of a vector  or is denoted by and in respective notations. Vectors of unit magnitude are referred to as unit vectors. It is assumed that the reader is familiar with the basic operations of multiplication of a vector and scalar and vector addition and subtraction, which are both commutative and associative. The next three sections describe the remaining vector and tensor operations required in continuum mechanics.

### 2.1 The scalar product of two vectors

The scalar product of two vectors and is deﬁned as

 (1)

The following behaviour is observed:

 (2)
 (3)
 (4)

The geometrical representation of the scalar product is as depicted by the shaded area in ﬁgure 1:

The scalar product is invariant under a transformation of axes since it is deﬁned by the magnitudes of the two vectors and the angle between them. The concept of invariance is important to continuum mechanics and can be discussed further once the the ideas of change of axes have been described mathematically in Section 5.

### 2.2 The vector product of two vectors

The vector product of a vector with is deﬁned as

 (5)

where the permutation symbol

 (6)

where the even permutations are 123, 231 and 312 and the odd permutations are 132, 213 and 321. The following behaviour is observed:

 (7)
 (8)
 (9)

The geometrical representation of the vector product can be illustrated by deﬁning  and  to lie in the plane of a rectangular coordinate system , and . The vector product is then which can be seen in ﬁgure 2 to follow the direction of the axis. Therefore, the vector product represents a normal vector of magnitude equal to the area of a parallelogram described by vectors  and . The direction of the normal vector follows the convention of a set of right handed axes as deﬁned in Section 5.1.

The Kronecker delta is another useful symbol to shorten equations in index notation. It is deﬁned by

 (10)

It is sometimes useful to know the identity to help to manipulate vector equations:

 (11)

## 3 Second Rank Tensors

A second rank tensor is deﬁned here as a linear vector function, i.e. it is a function which associates an argument vector to another vector. A vector is itself a ﬁrst rank tensor and a scalar is a tensor of rank zero. Higher rank tensors are discussed brieﬂy later but for the mostpart we deal with second rank tensors which are often be simply referred to as tensors.

The tensor acts as a linear vector function as follows:

 (12)

An -dimensional second rank tensor, T or has components which can be expressed in a array corresponding to axes as:

 (13)

The components for which are often referred to as the diagonal components, and those for can be referred to as the oﬀ-diagonal components. The use of the array notation should be used sparingly since it can makes the algebra unwieldy and the notation becomes almost unmanageable for tensors of rank higher than two. For the remainder of this chapter, the 3-dimensional tensor with 9 components will be used to present tensor algebra in array notation:

 (14)

### 3.1 The single dot product

Equation (12) can be written in tensor notation as a single dot product operation pairing one geometric vector to another (expanding the vector in a column for convenience)

 (15)

If we now deﬁne the tensor to be the transpose of , , as , then:

 (16)

The identity tensor  is deﬁned by the requirement that

 (17)

and therefore:

 (18)

### 3.2 Symmetric and skew (antisymmetric) tensors

A tensor is said to be symmetric if its components are symmetric, i.e. . A skew or antisymmetric tensor has which intuitively implies that . Every second rank tensor can be represented by symmetric and skew parts by

 (19)

A symmetric or skew tensor remains symmetric or skew under a transformation of axes, i.e. symmetry and skew-symmetry are intrinsic properties of a tensor, being independent of the coordinate system in which they are represented.

### 3.3 The scalar product of two tensors

The scalar product of two tensors is denoted by which can be evaluated as the sum of the nine products of the tensor components

 (20)

The ‘’ notation is used by some authors to deﬁne another scalar product which is denoted here by

 (21)

Of course, there is no need to distinguish between the two deﬁnitions of scalar product if either of the tensors is symmetrical.

### 3.4 The tensor product of two vectors

The tensor product of two vectors, denoted by (sometimes denoted ), is deﬁned by the requirement that for all and produces a tensor whose components are evaluated as:

 (22)

### 3.5 The tensor product of two tensors

The tensor product of two tensors combines two operations and so that is performed ﬁrst, i.e. for all . It is denoted by and produces a tensor whose components are evaluated as:

 (23)

The product is only commutative is both tensors are symmetric since

 (24)

### 3.6 The trace of a tensor

The trace of a tensor is a scalar invariant function of the tensor, denoted by

 (25)

### 3.7 The determinant of a tensor

The determinant of a tensor is also a scalar invariant function of the tensor denoted by

 (26)

## 4 Higher Rank Tensors

In Section 3.4 an operation was deﬁned for the product of two vectors which produced a second rank tensor. Tensors of higher rank than two can be formed by the product of more than two vectors, e.g. a third rank tensor , a fourth rank tensor . If one of the tensor products is replaced by a scalar () product of two vectors, the resulting tensor is two ranks less than the original. For example, is a second rank tensor since the product in brackets is a scalar quantity. Similarly if a scalar () product of two tensors is substituted as in , the resulting tensor is four ranks less than the original. The process of reducing the rank of a tensor by a scalar product is known as contraction. The dot notation indicates the level of contraction and can be extended to tensors of any rank. In continuum mechanics tensors of rank greater than two are rare. The most common tensor operations to be found in continuum mechanics other than those in Sections 2 and 3 are:

a vector product of a vector and second rank tensor to produce a third rank tensor whose components are

 (27)

a scalar product of a vector and third rank tensor to produce a second rank tensor whose components are

 (28)

a scalar () product of a fourth rank tensor and a second rank tensor to produce a second rank tensor whose components are

 (29)

## 5 Coordinate System and Change of Axes

The base of reference for the physical quantities in continuum mechanics is the coordinate system in which we are working. The components of a tensor can change if the coordinate system undergoes a transformation. We must ﬁrst investigate the properties of a set of axes in order to formulate rules for coordinate transformation.

### 5.1 Cartesian coordinates

We will conﬁne our coordinate description to a set of right-handed rectangular cartesian axes as shown in ﬁgure 3. This system of axes is constructed by deﬁning an origin from which three lines are drawn at right angles to each other, termed the , and axes. This notation is preferred to the well-known as it relates better to the transformation equations. A right-handed set of axes is deﬁned such that to an observer looking down the axis, the arc from a point on the axis to a point on the axis is in a clockwise sense.

We can deﬁne a position vector from the origin of a set of rectangular coordinates which makes the angles , , with the , and axes respectively. The directional cosines are then deﬁned as , , . The respective directional cosines can be expressed in index notation as or simply:

 (30)

### 5.2 Rotation of axes

Consider two right-handed sets of axes with the same origin, labelled and as shown in ﬁgure 4.

The sets of axes can be brought into coincidence by a rotation of axes. The directional cosines of relative to can be used to express in terms of : the directional cosines of relative to are expressed as , and respectively; those of and are , , and , , . The transformation can be summarised as:

 (31)

The matrix transformation can be expressed in a more compact form by deﬁning the group of directional cosines as a tensor . A coordinate in the axes can then be represented in the axes as:

 (32)

Components of the transformation tensor L must satisfy certain conditions since they are deﬁned by two right-handed sets of axes. Since the axes are mutually perpendicular:

 (33)

and since the sums of squares of directional cosines are unity:

 (34)

Equations (33 and (34) describe the orthonormality conditions which can be expressed in a more compact form:

 (35)

The transformation matrix must satisfy one further requirement which ensures that both the sets of axes are right-handed. It is:

 (36)

## 6 Tensor Calculus

This chapter has so far dealt with the algebra of tensors at a point. Tensors (of any rank) in continuum mechanics vary with space and time and are therefore tensor ﬁelds. Consequently we have to deal with derivatives of tensors in both space and time. The subject of time derivatives warrants a longer discussion in the context of kinematics, but here we simply introduce the concept of a total time derivative of a tensor ﬁeld denoted by . If we take a position vector of a particle of material at time the velocity  is given by:

 (37)

The time derivatives of other tensors are deﬁned in the same way. The familiar rules of a derivative of a product hold equally for two or more tensors as for scalar quantities. However, it is important to stress that since some operations, such as vector product () are non-commutative, it is important to preserve the order of operations, e.g.:

 (38)

If a scalar ﬁeld is deﬁned and continuously diﬀerentiable then the gradient of , is a vector

 (39)

Here we introduce the nabla vector operator , represented in index notation as :

 (40)

The nabla operator operates on the quantity to the right of it and as before the rules of a derivative of a product still hold. Otherwise the nabla operator behaves like any other vector in an algebraic operation. When working in index notation, the use of has advantages over other notations since it represents the nabla operator as any other vector.

The derivative of in the direction of the unit vector  is given by:

 (41)

where is the angle between and . Assuming , is a maximum when . Therefore the vector follows the direction in which increases most rapidly with a magnitude .

The gradient can operate on any rank tensor to produce a tensor one rank higher. For example, the gradient of a vector is a tensor

 (42)

By the same deﬁnition as Equation (41):

 (43)

The physical representation of the gradient of vector represent the maximum rate of change of the individual components of the vector.

### 6.2 Divergence

If a vector ﬁeld is deﬁned and continuously diﬀerentiable then the divergence of , is a scalar

 (44)

If and represent the divergence operator and vector under a rotation to new axes , then by Equation (32),

 (45)

since is independent of and by the orthonormality condition (Equation (35)). The divergence of a vector ﬁeld is therefore a scalar invariant.

The divergence can operate a tensor of rank 1 or above to produce a tensor one rank lower. For example the divergence of a second rank tensor T is a vector (expanding the vector in a column for convenience)

 (46)

The physical representation of divergence is discussed in Section 7 and is central to the understanding of continuum mechanics.

### 6.3 Curl

If a vector ﬁeld is deﬁned and continuously diﬀerentiable then the curl of , is a vector

 (47)

Curl can operate on any tensor of rank one and higher to produce a tensor of the same rank. For example the curl of a second rank tensor T is a second rank tensor

 (48)
As with divergence, the physical representation of curl is discussed in Section 7 and has important signiﬁcance in continuum mechanics.

### 6.4 Laplacian

The Laplacian is a scalar operator deﬁned by . It can be deduced that the laplacian is a scalar invariant operator since it is the scalar product of two vectors, both the nabla operator. The laplacian of a scalar ﬁeld is the scalar:

 (49)

### 6.5 Useful tensor identities

Several identities are listed below which can be veriﬁed by under the assumption that all the relevant derivatives exist and are continuous. The identities are expressed for scalar , vector  and (second rank) tensor

 (50)

## 7 Integral Theorems

In the preceding sections we dealt with the behaviour of tensors at a point and its representation of a tensor ﬁeld. However, it is also necessary to consider the behaviour of tensors over ﬁnite regions of space in order to derive many of the equations of continuum mechanics. The derivations rely on some integral theorems which are presented here without derivation in their most general forms which are independent of the choice of coordinate system. The theorems relate line , surface and volume integrals which are merely generalisations of the deﬁnite, double and triple integrals. For example, in the deﬁnite integral

 (51)

we integrate along the -axis between and and the integrand is a function deﬁned at each point between and . In a line integral we integrate over a curve in space and the integrand is deﬁned at all points along . In the following theorems it is assumed that the curves and surfaces are piecewise smooth, i.e. they consist of a ﬁnite number of smooth curves and surfaces respectively.

### 7.1 Gauss’s theorem

Gauss’s theorem relates the integral over an arbitrary volume of space to the integral over the surface bounding the volume. The generalised Gauss’s theorem takes the form

 (52)

where is the unit normal vector to the and can represent any scalar, vector and tensor ﬁeld which is deﬁned and continuously diﬀerentiable throughout . The star notation is introduced to represent any product, i.e. scalar , vector , tensor . The star ‘’ can therefore be replaced by either a ‘’, a ‘’ or nothing and the volume integral will contain a , or respectively.

### 7.2 Stokes’s theorem

Stokes’s theorem relates the integral over a closed curve (represented by ) in space to the integral over a portion of an orientable surface in space bounded by the curve. Stokes’s theorem applied to a vector  is

 (53)

where is the unit tangent vector along the curve.

### 7.3 Physical representation of divergence and curl

Take a closed surface bounding a volume and consider the integral

 (54)

If  is directed away from the enclosed volume, and the ﬁeld  is diverging from . if  is directed towards it, and the ﬁeld is converging towards . In general, may take positive or negative values around and the sign of will indicate whether the ﬁeld is convergent or divergent. If we collapse our volume to a single point , the sign of represents whether the ﬁeld in the neighborhood of is divergent or convergent and its magnitude represent the strength of divergence or convergence.

In the context of continuum mechanics, in a motion of an incompressible medium the net ﬂow through a volume of material must be zero, i.e. the net ﬂux of velocity  across the surface bounding the volume must be zero. Therefore,

 (55)

and by vanishing to a point, it can be concluded that the condition for incompressibility is that at all points.

In order to understand the physical signiﬁcance of , we take an arbitrary circular disk bounded by the closed curve and centred at a point . The disc is oriented with its normal axis in the direction of at as shown in ﬁgure 5. If we consider

 (56)

Since and are in the same direction . This indicates that the ﬁeld in the neighbourhood of is either rotating, when , or irrotational when . The condition for an irrotational ﬁeld  must be . In continuum mechanics, ﬂows are termed irrotational when .

### 7.4 Scalar and vector potentials

One of the relationships in Eqn. (50) is . It can be shown that if a vector ﬁeld deﬁned in a (singly connected) region is such that , then a scalar potential ﬁeld exists such that .

We deﬁne two scalar potentials, and such that and let . It can be seen that which means must be independent of the coordinate system, i.e. . This shows that the scalar potential is unique apart from an additive constant.

A generalisation of the statement given at the end of Section 7.3 is that any vector ﬁeld for which is said to be irrotational. For such a ﬁeld the line integral between two points and

 (57)

is independent of the path of integration and is said to be conservative. The scalar potential is used in many areas of continuum mechanics. It is often adopted to reduce the complexity of a problem by reducing a vector ﬁeld to a scalar ﬁeld although, in doing this, we are making the assumption that that the ﬁeld is irrotational.

Another of the relationships in Eqn. (50) is . It can be shown that if a vector ﬁeld deﬁned in a (singly connected) region is such that , then a vector potential ﬁeld exists such that .

We deﬁne two scalar potentials, and such that and let . It can be seen that which means a scalar ﬁeld exists such that . This shows that the vector potential is unique apart from an addition of the gradient of an arbitrary scalar ﬁeld. A vector ﬁeld which satisﬁes is said to be solenoidal.

Helmholtz’s theorem combines vector and scalar potentials in the statement that any continuously diﬀerentiable vector ﬁeld can be decomposed into the sum of a irrotational scalar ﬁeld and a solenoidal vector ﬁeld ,

 (58)

The regions of a ﬁeld where are often termed sources of , and regions where are called vortices of .

Tensor Mathematics for CFD