Vector differential calculus
Calculus involving vectors is discussed in this section. We will focus on differentiation of scalar and vector fields first and then move to integration. You should be familiar with the contents of Topic A1 from this set of notes as well as the algebraic operations involving scalar and vector fields. In this section we will study the following three derivatives:
- Gradient of a scalar field;
- Divergence of a vector field;
- Curl of a vector field;
- Gradient of a vector field. Before we move on to discuss the definitions listed above, let us review the derivatives of vector functions of a scalar. Suppose we are given the position of a particle as a function of time, as:
where and are the component functions and they depend on a single variable, . In order to obtain the velocity vector, i.e. , we simply differentiate each component function separately:
Example 2.1 Consider the following position vector given as a function of time, . Determine the velocity vector, .
Solution To determine the velocity vector, we differentiate each component function with respect to time, :
This is very similar to ordinary differential calculus and therefore most of the facts we know about derivatives of vector functions still hold. Considering two vectors, and , we have the following rules:
Recall that while the dot product is commutative, the cross product is not commutative. It is therefore important to respect the order of the factors in the cross products.
Del operator
The Del operator, denoted by , is the vector differential operator. We have seen this before in the definition of the gradient (Eq. (1.12) in A1 notes). Let us first define the Del operator in cartesian, cylindrical and spherical coordinates.
Definition 2.1 The Del operator is defined in cartesian coordinates, as:
In cylindrical coordinates ,
In spherical coordinates ,
Note that the term 'operator' implies that only has meaning when it acts upon another quantity (e.g. a scalar or a vector field).
Note that and are the unit vectors in cartesian coordinates which may be used as alternative notation to and , respectively.
The following transformations are useful in taking us from cartesian to cylindrical coordinates, to :
There are similar formulae to take us from cartesian to spherical coordinates, to :
Gradient of a scalar field
Recall that a scalar field is represented by a scalar function of a vector, say which we can write as to emphasise that depends on the three coordinates of the vector . A scalar field is therefore a function of space; it associates a real number with every position in some space. A scalar field can also be visualised in terms of the level surfaces on which the scalar field is constant (see also Topic A1). We denote the gradient of a scalar field using the Del operator, i.e. . Alternatively, the Del operator is written as .
Definition 2.2 The gradient of a scalar field, is a vector field that gives the direction and magnitude of the greatest space rate of change of . In the cartesian coordinate system, the gradient of is defined as:
The vector satisfies the following two conditions:
(a) The gradient of the scalar field is a vector field defined by Eq. (2.7), with direction normal (i.e. perpendicular) to the level surface at a point in the direction of increasing ;
(b) The gradient of has a magnitude equal to the rate of change of in the abovementioned direction and the magnitude of the greatest rate of change of is given by the magnitude of the gradient vector, i.e.
These two results are proved as follows:
(a) Consider a surface in three-dimensional space on which where is a constant. Now, consider an infinitesimal change in position from to . This results in a small change in the value of the surface from to . We have:
Now, suppose that and lie on the same surface ; then such that . Now, since lies in the surface and generally , then this implies that is perpendicular to any vector lying in the surface and hence it is normal to the surface. (b) We have shown that the vector is perpendicular to the surface, now we want to show that it has the correct magnitude. To prove the second result, we use Eq. (2.9) together with , where is the unit normal to the level surface (i.e. it is parallel to ) and is a distance measured along the normal. We consider again the two points and . Now, suppose that the two points lie on different but neighbouring surfaces; we have:
Since and are parallel, then and . Also, since , Eq. (2.10) becomes:
This implies that the rate of change takes its maximum value when it is measured in the direction of the normal to the level surface of constant and it is equal to . Further, using Eq. (2.7) and the definition of the mangnitude of the gradient, we can rewrite Eq. (2.11) as:
Directional derivative
The rate of change of a scalar function of position differs depending on the direction in which one travels. Think of walking in different directions on a steep hill. The steepest direction is perpendicular to the contour lines which represent lines of constant height. There is only one direction in the threedimensional space which will give the fastest way down the hill and this is given by . Using the result of Eq. (2.7), i.e. , the gradient may be used to find the rate of change of in any direction. Suppose that where is the distance measured along a unit vector . Following Eq. (2.10), we can show that the rate of change of is given by,
Equation (2.13) is called the directional derivative of which can also be expressed as:
where is the angle between and the unit vector, .
The gradient has many important applications such as determing the rates of change of functions in any direction. In the next example, we apply these ideas to a temperature field in a room; recall that this is a scalar field since the temperature is a scalar quantity.
Example 2.2 The temperature in a room depends on the position vector, i.e. . Suppose that the temperature is given by the following function, . Determine the direction and magnitude of the greatest rate of change in temperature at the point .
Solution We know that the direction of the greatest rate of change at the point is given by the gradient of the field, evaluated at that point. So, the first step is to determine the gradient of :
At the point , the gradient is given by:
This implies that the greatest rate of change is in the positive (i.e. ) direction. Finally, the magnitute of the greatest rate of change at the point is given by the magnitude of the gradient in Eq. (2.16):
The divergence of a vector field
This section introduces the first of two ways of differentiating a vector field, namely, the divergence. The second way is the curl discussed in Subsec. 2.2.4, For both these quantities we will use the Del operator which can operate on the vector field via the dot product, giving the divergence, or via the cross product, giving the curl. Definition 2.3 Let , with and differentiable. The divergence of is defined to be:
Equation (2.18) gives the following:
Note that the divergence of a vector field is a scalar. A physical interpretation of the divergence may be given with a fluid example. Consider the velocity field of a flowing fluid, (this may be air, water, etc) then represents the net rate of change of the mass of the fluid flowing from the point per unit volume. The value of may also be thought of as the net rate at which the material is expanding away from the point . If then the velocity field is termed 'incompressible'. The latter implies that the material density remains constant within an infinitesimal volume that moves with the fluid velocity. For a more geometrical interpretation of div, we may think of the divergence of a vector field as the scalar quantity that represents the extent to which a point is a source or sink. Suppose again we have a vector field that represents the velocity of a fluid (say, air) at every point in a room. If the air were heated at one point, the air around it would expand outwards. The velocity vectors would point away from this point giving a positive divergence and the point is a source - see Fig. 2.1(a). If the air were cooled at a point, the air would contract, causing the velocity vectors to point towards the point, causing a negative divergence and the point is a sink - see Fig. 2.11(b). The magnitude of the divergence represents how fast the air is moving towards or away from that point.
(a)
(b)
Figure 2.1: Geometric interpretation of div; (a) 'source' or expansion and (b) 'sink' or compression.
Example 2.3 Consider a vector field given by , where is the position vector, i.e. . Find the divergence of the vector field .
Solution Using Eq. (2.18), we have:
The curl of a vector field
The curl of a vector field is a vector. As mentioned in the previous section, this is defined via the cross product as given in the box below. Definition 2.4 Let , with and differentiable. The curl of is:
Equation (2.20c) gives the following:
Suppose again that is the velocity field of a flowing fluid. Then represents the tendency of particles to rotate (locally) near a point . This is known as the vorticity of the flow. The direction of represents the axis of rotation and the magnitude of is the rate of rotation or angular frequency of the rotation. Finally, if , then the fluid is termed 'irrotational'.
Example 2.4 Given the vector field , find .
Solution From the definition in Eq. (2.20c), we have:
Using Eq. (2.21),
Laplacian of a scalar field
We introduce here the Laplacian operator, denoted by which occurs in many physical settings in wave motion and heat conduction. We will encounter this later in the course when we deal with the analytic solution of partial differential equations (see Topic B2).
Definition 2.5 Suppose we have a scalar field, that is twice differentiable. We know that the gradient of is a vector field given by [see Eq. [2.7)]. The Laplacian operator, is defined by taking the divergence of thus obtaining another scalar field:
The equation is known as Laplace's equation (see Topic B2) where, by definition, if then, is said to be harmonic. Finally, note that the Laplace operator is also denoted by .
Repeated operations and product rules
It is necessary to discuss some repeated operations of the Del operator on various fields. It is important to note that only some of these operations can be defined. In general, we have the following rules:
- GRADIENT: scalar function vector field;
- DIVERGENCE: vector field scalar function;
- CURL: vector field (another) vector field.
The above imply that the following single operations on a vector field, and a scalar field, violate the above rules and the expressions are therefore not meaningful:
- We cannot take the divergence of a scalar field, i.e. div ;
- We cannot take the curl of a scalar field, i.e. .
We can define the following double operations: 1. The gradient of the divergence of a vector field, :
- The divergence of the gradient of a scalar field, (see Subsec. 2.2.5) :
- The curl of the gradient of a scalar field, :
- The divergence of the curl of a vector field, :
- The curl of the curl of a vector field, :
Notes:
(a) In Eq. (2.23), cannot be simplified further;
(b) In Eq. (2.27), is the Laplacian operator acting on a vector quantity, :
where and are the components of .
We can also write down product rules. In what follows, and are scalar fields and and are vector fields.
We can also define and . Note: it is important to know how to derive the relations given by Eqs. (2.24)-(2.32).
Finally, we can define the gradient of a vector as follows:
You will encounter quantities such as this in your Fluid Mech. 2 module in which the vector in question will correspond to the velocity field. The gradient of the velocity will be related to the rate of deformation of a fluid following the application of stress. These concepts will be used in the derivation of the equations governing the flow dynamics: the Navier-Stokes equations.