CBE 6333, R. Levicky 1 Orthogonal Curvilinear Coordinates Introduction. Rectangular Cartesian coordinates are convenient when solving problems in which the geometry of a problem is well described by the coordinates,, and. For example, in Fig. 1, the geometry of the flow is easily described by saying that it occurs in the direction, with the velocity v = v 1 δ 1 being zero at the boundaries = 0 and = d (i.e. no-slip boundary condition). But what about the flow in Fig. 2? Here, the flow could be described by stating that it occurs in the θ direction, with v θ equal to zero at r = r 1 and to ω r 2 at r = r 2. Such a description uses cylindrical, not Cartesian, coordinates. It is not necessary to use cylindrical coordinates, but their use does simplify the description (and mathematical solution) of a problem like the one in Fig. 2. If instead the flow in Figure 2 is described in Cartesian coordinates, the description becomes more convoluted and may go as follows: the components v 1 and v 2 of the velocity v 1 δ 1 + v 2 δ 2 add so as to make a fluid element travel in a circle, with both components equal to zero at ( 2 + 2 ) 1/2 = r 1 and obeying the condition v 1 2 + v 2 2 = ω 2 r 2 2 at ( 2 + 2 ) 1/2 = r 2. This description is correct, but solving a problem possessing a cylindrical geometry using Cartesian coordinates will be much more cumbersome. v1( x2) d Figure 1. Flow between two flat plates. r2 r 1 Figure 2. Circular flow in an annulus. The outer wall of the annulus is rotating with an angular velocity ω. ω v θ ( r) For geometries as in Fig. 2, proper use of "orthogonal curvilinear coordinates" can simplify the solution to the problem. What are orthogonal curvilinear coordinates? The most familiar examples (there are many others) are cylindrical and spherical coordinates as illustrated in Figures 3 and 4. The cylindrical and spherical coordinate systems are termed "curvilinear" because some of the coordinates change along curves. For instance, in cylindrical coordinates, θ changes along a curve that can be thought of as forming a circle about the origin. The Cartesian coordinate system is not curvilinear since all of the coordinates change along straight lines. The curve along which one coordinate changes while the other coordinates remain fixed is a coordinate curve for that coordinate. Coordinate curves for θ in the cylindrical coordinate system describe circles around the origin, while those for r are lines that radiate outward from the origin. Two coordinate curves for θ and one for r are shown in Figure 3. Coordinate curves for θ in the spherical geometry (Figure 4) describe semicircles (0 < θ < 180 o ), while those for φ describe circles about the origin. In addition to being curvilinear, the cylindrical and spherical coordinate systems are also "orthogonal" because coordinate curves corresponding to different coordinates are perpendicular to one another. For example, in cylindrical coordinates, the coordinate
CBE 6333, R. Levicky 2 curves for r are perpendicular to those for θ and. The coordinate curves for θ are perpendicular to those for r and, etc. Clearly, the Cartesian coordinate system is also orthogonal. r r Figure 3. Cylindrical coordinates. The Figure 4. Spherical coordinates. The coordinates are r, θ and. coordinates are r, θ and φ. Unit basis vectors are defined at each point in the coordinate system as sketched in Figures 5 and 6. In general, the direction of a basis vector changes with position. In cylindrical coordinates, both δ r and δ θ change direction with position as illustrated in Fig 5, while the direction of δ x3 is independent of position. In the spherical coordinate system, all three basis vectors δ r, δ θ and δ φ change direction with position. The magnitudes of the basis vectors do not change, since by definition the length of a basis vector is always unity. Figure 5. Basis vectors for the cylindrical coordinate system. Figure 6. Basis vectors for the spherical coordinate system. n important fact to recall: the length s of an arc on a circle is given by the product of the circle's radius r and the angle ζ (ζ is in radians) through which the arc sweeps; s = rζ, see Figure 7. This relation, especially in its differential form ds = r dζ, will be useful in the following discussion.
CBE 6333, R. Levicky 3 Figure 7. Transformation of Coordinates. The coordinates of a point in space, expressed in terms of two different coordinate systems, can be related by transformation of coordinates equations. Let's say the first coordinate system employs q 1, q 2, and q 3 as coordinates, and the second employs,, and. Then the transformation of coordinates equations have the general form and = (q 1, q 2, q 3 ) = (q 1, q 2, q 3 ) = (q 1, q 2, q 3 ) (1) q 1 = q 1 (,, ) q 2 = q 2 (,, ) q 3 = q 3 (,, ) (2) For example, if,, and are the Cartesian coordinates and q 1, q 2, and q 3 are the cylindrical coordinates r, θ, and z, then and = r cosθ = r sinθ = (3) r = ( 2 + 2 ) 1/2 θ = tan -1 ( / ) = (4) Equations 3 and 4 are the transformation of coordinates equations between the Cartesian and the cylindrical coordinate systems. For spherical coordinates, the transformation equations are and = r sinθ cosφ = r sinθ sinφ = r cosθ (5) r = ( 2 + 2 + 2 ) 1/2 θ = cos -1 ( / ( 2 + 2 + 2 ) 1/2 ) φ = tan -1 ( / ) (6) Basis Vectors. The basis vectors possess unit magnitude and point along the direction of coordinate curves as illustrated in Figures 5 and 6. Because the Cartesian basis vectors are constant in direction as well as magnitude, expressing curvilinear basis vectors in terms of the Cartesian ones can simplify mathematical derivations in some instances. Therefore, it is desired to derive expressions for the
CBE 6333, R. Levicky 4 curvilinear basis vectors in terms of the Cartesian basis. To begin, we first define the position p of a point in space in terms of a Cartesian coordinate system: p = (q 1, q 2, q 3 ) δ 1 + (q 1, q 2, q 3 ) δ 2 + (q 1, q 2, q 3 ) δ 3 (6b) Expressions for the Cartesian coordinates x i in expression 6b in terms of the cylindrical coordinates are given by equations 3; for the spherical coordinate system, by equations 5. unit basis vector δ i in the direction of the coordinate q i can be expressed as p δ i = q i p q i (7) 1/2 p p p where = is the magnitude of the vector p. Note that the vector p is q i q i q i q i q i tangent to (i.e. points along) the coordinate curve for q i (Figure 8). The division by the magnitude p scales the vector p p to unit magnitude; thus, is often referred to as the "scale factor" h i. q i q i q i The result of equation (7) is a unit basis vector whose direction points along the coordinate curve for q i and whose length is normalized to unity by dividing by p ; in other words, this is the unit basis q i vector corresponding to the coordinate q i. Figure 8 Equation (7) works trivially for the Cartesian coordinate system. In the Cartesian system, p = δ 1 + δ 2 + δ 3 so that, for example, δ 1 = ( p/ ) / ( p/ ) = δ 1 / (δ 1 δ 1 ) 1/2 = δ 1 / 1 = δ 1. Here, the scale factor h 1 = (δ 1 δ 1 ) 1/2 = 1. What about the cylindrical coordinate system? In the cylindrical system, using equations (3) Then, p = r cosθ δ 1 + r sinθ δ 2 + δ 3 (8)
CBE 6333, R. Levicky 5 δ r = ( p/ r) / ( p/ r) = (cosθ δ 1 + sinθ δ 2 ) / [(cosθ δ 1 + sinθ δ 2 ) (cosθ δ 1 + sinθ δ 2 )] 1/2 = (cosθ δ 1 + sinθ δ 2 ) / [cos 2 θ + sin 2 θ] 1/2 δ r = cosθ δ 1 + sinθ δ 2 (9) Note that the scale factor h r = [(cosθ δ x + sinθ δ y ) (cosθ δ x + sinθ δ y )] 1/2 = [cos 2 θ + sin 2 θ] 1/2 = 1. Similarly, δ θ = ( p/ θ) / ( p/ θ) = (- r sinθ δ 1 + r cosθ δ 2 ) / [(- r sinθ δ 1 + r cosθ δ 2 ) (- r sinθ δ 1 + r cosθ δ 2 )] 1/2 = (- r sinθ δ 1 + r cosθ δ 2 ) / [r 2 sin 2 θ + r 2 cos 2 θ] 1/2 = (- r sinθ δ 1 + r cosθ δ 2 ) / [r 2 (sin 2 θ + cos 2 θ)] 1/2 = (- r sinθ δ 1 + r cosθ δ 2 ) / r δ θ = - sinθ δ 1 + cosθ δ 2 (10) Note that the scale factor h θ = ( p/ θ) = r. To summarize, for the cylindrical coordinate system δ r = cosθ δ 1 + sinθ δ 2 δ θ = - sinθ δ 1 + cosθ δ 2 δ x3 = δ 3 (11) h r = 1 h θ = r h x3 = 1 (12) By similar procedures it can be shown that for the spherical coordinate system, δ r = sinθ cos φ δ 1 + sinθ sin φ δ 2 + cosθ δ 3 δ θ = cosθ cos φ δ 1 + cosθ sin φ δ 2 - sinθ δ 3 δ φ = - sin φ δ 1 + cos φ δ 2 (13) h r = 1 h θ = r h φ = r sinθ (14) From expressions 11 and 13 it should be clear that the direction of δ r and δ θ in the cylindrical system, and the direction of all three basis vectors in the spherical coordinate system, changes with position. Expressions 11 and 13 are the desired equations that express the curvilinear basis vectors in terms of their Cartesian counterparts. How do we apply these equations? For instance, an angular velocity v = v θ δ θ expressed in the cylindrical coordinate system can be converted to v = - v θ sinθ δ 1 + v θ cosθ δ 2 by using equation 11 for δ θ. If the expression θ = tan -1 ( / ) is also substituted (see equations 4), the velocity will then be purely expressed in terms of Cartesian coordinate variables and basis vectors.
CBE 6333, R. Levicky 6 Length, rea and Volume Elements. For a set of orthogonal curvilinear coordinates q 1, q 2 and q 3, with corresponding scaling factors h 1, h 2, and h 3, a differential displacement in position dp is given by (note the use of the summation convention) dp = h 1 dq 1 δ 1 + h 2 dq 2 δ 2 + h 3 dq 3 δ 3 = h i dq i δ i (15) For the Cartesian coordinate system, all of the scale factors equal one, and equation (15) becomes dp = d δ 1 + d δ 2 + d δ 3 (16) as seen previously. For the cylindrical coordinate system, using equations (12) for the scale factors, dp = dr δ r + r dθ δ θ + d δ x3 (17) Why are the scale factors h i needed in equation 15 for dp? Earlier, it was mentioned (Figure 7) that the length of an arc on the circumference of a circle is equal to the product of the central angle that spans the arc times the radius of the circle on whose circumference the arc lies. Therefore, the distance that is traversed when θ changes by an infinitesimal amount dθ is equal to rdθ (Figure 9). Since dp expresses a change in distance, rdθ must be used in equation 17 rather than just simply dθ (dθ is a change in angular position, and is not a distance). The distance corresponding to differential changes in the various coordinates is: Figure 9. n object initially at position p is displaced by rdθ δ θ to a final position p + rdθ δ θ. dθ rdθ rdθ Table I. Coordinate System Coordinate Distance corresponding to an infinitesimal change in coordinate Cartesian d d d Cylindrical r dr θ rdθ d
CBE 6333, R. Levicky 7 Spherical r dr θ rdθ φ r sinθ dφ The volume dv of an infinitesimal volume element is obtained as usual; i.e. it is given by the product of the lengths of the three sides defining the length, depth and width of the element. Each of the three sides of the volume element is taken to lie along one of the coordinate directions. Note that the sides are assured to be mutually orthogonal since only orthogonal coordinate systems are being considered. In general dv = h 1 h 2 h 3 dq 1 dq 2 dq 3 (18) For the Cartesian, cylindrical and spherical systems, equation 18 evaluates to Table II. Coordinate System dv Cartesian d d d (19a) Cylindrical dr rdθ d = r dr dθ d (19b) Spherical dr rdθ rsinθ dφ = r 2 sinθ dr dθ dφ (19c) By similar reasoning, the area d of an infinitesimal area element is given by the product of the lengths of its sides. For instance, a differential area element in the Cartesian - plane is d = d d. differential area element in the θ- cylindrical surface is r dθ d (Figure 10). differential area element in the θ-φ spherical surface is r 2 sinθ dθ dφ, etc. d d dθ d rdθ d = dx1dx2 d = rdθdx 3 Figure 10. Derivatives of Basis Vectors with Respect to Coordinate Variables. s pointed out earlier (Figures 5 and 6), in general the direction of a basis vector can change from point to point. If a change in coordinate position can cause a change in the direction of a basis vector, that means that the basis vector must have a nonzero derivative with respect to at least some of the
CBE 6333, R. Levicky 8 coordinate variables q i. For example, in the cylindrical coordinate system the basis vectors can be written (equations 11) δ r = cosθ δ 1 + sinθ δ 2 δ θ = - sinθ δ 1 + cosθ δ 2 δ 3 = δ 3 (11) The derivative of δ r with respect to θ then becomes δ r / θ = - sinθ δ 1 + cosθ δ 2 = δ θ. Therefore, the derivative δ r / θ is nonzero. By similar calculations, it can be shown (you should verify these equations by directly considering expressions 11 above): δ r / r = 0 δ r / θ = δ θ δ r / = 0 δ θ / r = 0 δ θ / θ = - δ r δ θ / = 0 δ x3 / r = 0 δ x3 / θ = 0 δ x3 / = 0 (20) For the spherical coordinate system, the basis vectors are given by equations 13 δ r = sinθ cos φ δ 1 + sinθ sin φ δ 2 + cosθ δ 3 δ θ = cosθ cos φ δ 1 + cosθ sin φ δ 2 - sinθ δ 3 δ φ = - sin φ δ 1 + cos φ δ 2 (13) The derivatives of the basis vectors for the spherical coordinate system become δ r / r = 0 δ r / θ = δ θ δ r / φ = sinθ δ φ δ θ / r = 0 δ θ / θ = - δ r δ θ / φ = cosθ δ φ δ φ / r = 0 δ φ / θ = 0 δ φ / φ = - sinθ δ r - cosθ δ θ (21) Each of these expressions can be derived from equations 13. Gradient, Divergence and Curl. The gradient operator takes the derivative of a quantity with respect to a change in position. In orthogonal curvilinear coordinates q 1, q 2 and q 3, the operator is (note that the scaling factors h i in the denominator ensure that a derivative is being taken with respect to distance) 1 1 1 = δ 1 + δ 2 + δ 3 h1 q1 h2 q2 h3 q3 1 1 1 Cartesian = δ1 + δ2 + δ 1 1 1 x2 1 x3 (22) (23a)
CBE 6333, R. Levicky 9 1 1 1 Cylindrical = δ r + δ + δ 1 r θ r θ x3 1 x3 (23b) 1 1 1 Spherical = δ r + δθ + δφ 1 r r θ r sin θ φ (23c) The divergence of a vector, written, can be calculated using the definition of the gradient. For the cylindrical coordinate system, = r (r, θ, )δ r + θ ( r, θ, )δ θ + x3 (r, θ, )δ x3 1 and = δ r + δ δ r θ + r θ x3 x [ r (r, θ, )δ r + θ ( r, θ, )δ θ + x3 (r, θ, )δ x3 ] 3 = δ r ( / r) [ r (r, θ, )δ r + θ ( r, θ, )δ θ + x3 (r, θ, )δ x3 ] + δ θ 1/r ( / θ)[ r (r, θ, )δ r + θ ( r, θ, )δ θ + x3 (r, θ, )δ x3 ] + δ x3 ( / ) [ r (r, θ, )δ r + θ ( r, θ, )δ θ + x3 (r, θ, )δ x3 ] Using the product rule for differentiation = δ r (δ r r / r + r δ r / r + δ θ θ / r + θ δ θ / r + δ x3 x3 / r + x3 δ x3 / r) + δ θ 1/r (δ r r / θ + r δ r / θ + δ θ θ / θ + θ δ θ / θ + δ x3 x3 / θ + x3 δ x3 / θ) + δ x3 (δ r r / + r δ r / + δ θ θ / + θ δ θ / + δ x3 x3 / + x3 δ x3 / ) Substituting equations 20 for the derivatives of the basis vectors yields = δ r (δ r r / r + δ θ θ / r + δ x3 x3 / r) + δ θ 1/r (δ r r / θ + r δ θ + δ θ θ / θ - θ δ r + δ x3 x3 / θ ) + δ x3 (δ r r / + δ θ θ / + δ x3 x3 / ) Performing the dot products (remembering that δ i δ j = δ ij since the basis vectors are mutually orthogonal) = r / r + r /r + 1/r θ / θ + x3 / (24) Expression 24 is the divergence of an arbitrary vector in cylindrical coordinates. n analogous approach could be used to derive in spherical or Cartesian coordinates. The results are = 1 / + 2 / + 3 / (Cartesian) (25a)
CBE 6333, R. Levicky 10 = r / r + r /r + 1/r θ / θ + x3 / (cylindrical) (25b) = r / r + 2 r /r + 1/r θ / θ + cosθ θ /(r sinθ) + 1/(r sinθ) φ / φ (spherical) (25c) It can be shown that, for an orthogonal curvilinear system, the divergence can be written as = 1 h1h 2h3 ( h2h3 1 ) + ( h1h 3 2 ) + ( h1h 2 3 ) (26) q1 q2 q3 where the h i are the scale factors for the chosen coordinate system (i.e. equations 12 and 14) and q i are the coordinate variables. Equation 26 will work for any orthogonal curvilinear coordinate system, and will reproduce equations 25a through 25c if the appropriate h i and q i are substituted into it. Expressions for the curl of a vector could be derived using a similar approach to that used in deriving equation 24 for. Here, we simply write the final general formula for, = 1 h1h 2h3 h δ h 1 3 3 h 2 2 h δ h 2 1 1 h 3 3 h δ h 3 2 2 h 1 1 ( ) ( ) + q q 2 ( ) ( ) + q q 3 ( ) ( q q 1 ) 2 3 3 1 1 2 (27) Equation 27 can be used to write out in the coordinate system of interest, provided that the coordinate system is orthogonal curvilinear. Concluding Remarks. Some of the above expressions, even if written in simplified form, are rather cumbersome. Fortunately, most of the equations needed for fluid dynamics have already been written down for the coordinate systems of greatest interest, i.e. the Cartesian, cylindrical, and spherical systems. Therefore, it will not be necessary to apply the above equations to express the Navier-Stokes equations in spherical coordinates, for example. The desired expressions can be found in virtually any text on transport phenomena.