ENGI 5432 1.5 1.5 Conversions between Coordinate Systems Page 1-32 Conversions between Coordinate Systems In general, the conversion of a vector F Fx ˆi Fy ˆj Fz kˆ from Cartesian coordinates (x, y, z) to another orthonormal coordinate system (u, v, w) in 3 (where “orthonormal” means that the new basis vectors aˆ u , aˆ v , aˆ w are mutually orthogonal and of unit length) is given by F F ˆi F ˆj F kˆ F aˆ F aˆ F aˆ . x y z u u v v w w However, Fu F aˆ u Fx ˆi Fy ˆj Fz kˆ aˆ u ˆi aˆ u Fx ˆj aˆ u Fy kˆ aˆ u Fz . Fv and Fw are defined similarly in terms of the Cartesian components Fx , Fy , Fz . In matrix form ˆi aˆ u ˆj aˆ u kˆ aˆ u F Fu x F ˆi aˆ ˆ ˆ v j aˆ v k aˆ v Fy . v ˆ ˆ ˆ Fw ˆ ˆ F ˆ i a w j a w k a w z The matrices on the right hand side of the equation will contain a mixture of expressions in the new (u, v, w ) and old (x, y, z ) coordinates. This needs to be converted into a set of expressions in (u, v, w ) only. Example 1.5.1 Express the vector F = y i x j + z k in cylindrical polar coordinates. x y plane: coordinates x y plane: basis vectors x cos ˆi ˆ ˆi y sin ˆj ˆ 11 cos sin 2 z z kˆ ˆ 11 cos 2 0 ˆ cos cos ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-33 Example 1.5.1 (continued) ˆi ˆ 11 cos sin ** 2 ˆi kˆ 0 ˆj ˆ 11 cos cos ˆj kˆ 0 kˆ ˆ 11 cos 2 0 kˆ kˆ 1 The coefficient conversion matrix from Cartesian to cylindrical polar is therefore cos sin 0 sin cos 0 0 0 1 Letting c cos , s sin : F y ˆi x ˆj z kˆ s ˆi c ˆj z kˆ Fpolar c s s c 0 c s 0 s 0 s c 0 c s s c c 0 0 0 1 z 0 0 z z Therefore F y ˆi x ˆj z kˆ ˆ z kˆ ** This result can be obtained from the trigonometric identity cos A B cos A cos B sin A sin B Setting A 2 and B , cos 2 cos 2 cos sin 2 sin 0 1 sin ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-34 We can also generate the coordinate transformation matrix from Cartesian coordinates (x, y, z ) to spherical polar coordinates (r, , ). [ is the declination (angle down from the north pole, 0 ) and is the azimuth (angle around the equator 0 2 ).] [Vertical] Plane containing z-axis and radial vector r : z r cos The projection of the radial vector r r rˆ onto the plane z = r cos has length r sin The angle between r̂ and k̂ is kˆ rˆ cos The angle between ˆ and k̂ is 2 kˆ ˆ cos 2 sin [Horizontal] Plane z = r cos : The projection of r rˆ onto the x axis ( î ) is x r sin cos r rˆ ˆi ˆi rˆ sin cos r = x, y, z r sin cos , r sin sin , r cos . The projection of r rˆ onto the y axis ( ĵ ) is y r sin sin r rˆ ˆj ˆj rˆ sin sin ˆj ˆ cos The angle between ˆ and ĵ is The angle between ˆ and î is 2 ˆi ˆ cos 2 sin The remaining three entries in the coordinate conversion matrix can be found in a similar way. ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-35 The conversion matrix from Cartesian to spherical polar coordinates is then ˆi rˆ ˆj rˆ kˆ rˆ sin cos ˆi ˆ ˆj ˆ kˆ ˆ cos cos ˆ ˆ ˆ ˆ ˆ ˆ sin i j k sin sin cos sin cos cos sin 0 Example 1.5.2 Convert F y ˆi x ˆj to spherical polar coordinates. Let c1 cos , s1 sin , c2 cos , s2 sin y rs1s2 , x rs1c2 Fr s1c2 F F c1c2 F s2 s1s2 c1s2 c2 c1 r s1s2 s1 r s1c2 0 0 r s 2 c s s c 0 1 2 2 2 2 r s1c1 c2 s2 s2 c2 0 r s 2 2 1 r s1 s2 c2 Therefore F r sin ˆ Expressions for the gradient, divergence, curl and Laplacian operators in any orthonormal coordinate system will follow in section 1.7. ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-36 Summary for Coordinate Conversion: To convert a vector expressed in Cartesian components vx ˆi v y ˆj vz kˆ into the equivalent vector expressed in cylindrical polar coordinates v ˆ v ˆ v kˆ , express the Cartesian components vx, vy, vz in terms of , , z using x = cos , y = sin , z z = z ; then evaluate v cos sin 0 vx v sin cos 0 v y vz 0 0 1 vz Use the inverse matrix to transform back to Cartesian coordinates: vx cos sin 0 v v sin cos 0 v y vz 0 0 1 vz To convert a vector expressed in Cartesian components vx ˆi v y ˆj vz kˆ into the equivalent vector expressed in spherical polar coordinates v rˆ v ˆ v ˆ , express the r Cartesian components vx, vy, vz in terms of r, , using x r sin cos , y r sin sin , z r cos ; then evaluate vr sin cos v cos cos v sin sin sin cos sin cos cos sin 0 vx v y vz Use the inverse matrix to transform back to Cartesian coordinates: vx sin cos cos cos sin vr v sin sin cos sin cos v y vz cos sin 0 v Note that, in both cases, the transformation matrix A is orthogonal, so that A1 = AT. This is generally true for transformations between orthonormal coordinate systems. ENGI 5432 1.6 1.6 Basis Vectors in Other Coordinate Systems Page 1-37 Basis Vectors in Other Coordinate Systems In the Cartesian coordinate system, all three basis vectors are absolute constants: d ˆ d ˆ d ˆ i j k 0 dt dt dt The derivative of a vector is then straightforward to calculate: d df df df f1 ˆi f 2 ˆj f 3 kˆ ˆi 1 ˆj 2 kˆ 3 dt dt dt dt But many non-Cartesian basis vectors are not constant. Cylindrical Polar: ˆ cos ˆi sin ˆj ˆ sin ˆi cos ˆj kˆ kˆ Let v dv dt then ˆ sin ˆi cos ˆj ˆ ˆ cos ˆi sin ˆj ˆ kˆ 0 Therefore if a vector F is described in cylindrical polar coordinates F F ˆ F ˆ Fz kˆ , then F F ˆ F ˆ F ˆ F ˆ Fz kˆ 0 F F ˆ F F ˆ Fz kˆ ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-38 In particular, the displacement vector is r t t ˆ 0 ˆ z t kˆ , so that the velocity vector is dr d d ˆ dz ˆ v ˆ k dt dt dt dt Example 1.6.1 Find the velocity and acceleration in cylindrical polar coordinates for a particle travelling along the helix x = 3 cos 2t , y = 3 sin 2t , z = t . Cylindrical polar coordinates: x cos , y 2 x 2 y 2 , tan x 2 9cos2 2t 9sin 2 2t 9 tan 3sin 2t tan 2t 3cos 2t 3 2t z t v y sin , zz 0 2 z 1 dr 0 ˆ 3 2 ˆ 1kˆ 6ˆ kˆ dt [The velocity has no radial component – the helix remains the same distance from the z axis at all times.] a dv 6ˆ kˆ 6 ˆ 0 12 ˆ dt [The acceleration vector points directly at the z axis at all times.] ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-39 Spherical Polar Coordinates Vertical plane containing z-axis and radial vector r : rˆ sin cos ˆi sin sin ˆj cos kˆ ˆ cos cos ˆi cos sin ˆj sin kˆ Equatorial plane ( 0 ): [ sin ˆ is the projection of r̂ onto the equatorial plane.] ˆ sin ˆi cos ˆj [This reproduces the three rows of the coordinate conversion matrix in section 1.5.] d rˆ d d ˆ cos cos sin sin i dt dt dt d d ˆ d ˆ cos sin sin cos j sin k dt dt dt d rˆ d ˆ d ˆ sin dt dt dt d ˆ d sin cos cos sin dt dt d sin sin cos cos dt dˆ d d ˆ rˆ cos dt dt dt d ˆ i dt d ˆ d ˆ j cos k dt dt ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-40 Spherical Polar Coordinates (continued) d ˆ d ˆ d ˆ cos i sin j dt dt dt But sin rˆ cos ˆ sin 2 cos ˆi sin 2 sin ˆj sin cos cos 2 cos ˆi cos 2 sin ˆj sin cos cos ˆi sin ˆj kˆ kˆ d ˆ d sin rˆ cos ˆ dt dt In particular, the displacement vector is r r rˆ , so that the velocity vector is dr dr d rˆ dr d ˆ d v rˆ r rˆ r ˆ sin dt dt dt dt dt dt dr d ˆ d ˆ v rˆ r r sin dt dt dt It can be shown that the acceleration vector in the spherical polar coordinate system is d 2r d 2 d 2 2 dv a 2 r sin rˆ dt dt dt dt 2 1 d 2 d r d r sin 2 ˆ r dt dt 2 dt 1 d 2 d 2 ˆ sin r r sin dt dt d 2x ˆ d 2 y ˆ d 2z ˆ i j 2k ! Compare this to the Cartesian equivalent a dt 2 dt 2 dt ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-41 Example 1.6.2 Find the velocity vector v for a particle whose displacement vector r, in spherical polar coordinates, is given by r = 4, = t , = 2t , (0 < t < ) . r 4 , t , 2t dr 0, dt d 1, dt d 2 dt dr d ˆ d ˆ rˆ r r sin dt dt dt 0 rˆ 4 1 ˆ 4 sin t 2 ˆ v v t 4 ˆ 8sin t ˆ [This describes a path spiralling around a sphere of radius 4, from pole to pole.] Summary: Cylindrical Polar: d d ˆ ˆ dt dt d ˆ d ˆ dt dt d ˆ k 0 dt r ˆ z kˆ v ˆ ˆ z eˆ z Spherical Polar: d rˆ d ˆ d ˆ sin dt dt dt d ˆ d d ˆ rˆ cos dt dt dt d ˆ d sin rˆ cos ˆ dt dt r r rˆ v r rˆ r ˆ r sin ˆ ENGI 5432 1.7 1.7 Gradient Operator in Other Coordinate Systems Page 1-42 Gradient Operator in Other Coordinate Systems For any orthogonal curvilinear coordinate system (u1, u2, u3) in 3, 1 r the unit tangent vectors along the curvilinear axes are eˆ i Ti , hi ui r . ui where the scale factors hi The displacement vector r can then be written as r u1eˆ 1 u 2eˆ 2 u3eˆ 3 , where the unit vectors ê i form an orthonormal basis for 3. 0 eˆ i eˆ j ij 1 i j i j [ ij is the “Kronecker delta”.] The differential displacement vector dr is (by the Chain Rule) r r r dr du1 du2 du3 h1 du1 eˆ1 h2 du2 eˆ 2 h3 du3 eˆ 3 u1 u2 u3 and the differential arc length ds is 2 2 2 ds 2 dr dr h1 du1 h2 du2 h3 du3 The element of volume dV is x, y, z du1du 2 du3 u1 , u 2 , u3 dV h1h2 h3 du1du 2 du3 Gradient operator Gradient Divergence x u1 x u 2 x u 3 y u1 y u 2 y u 3 z u1 z du1du 2 du 3 u 2 z u 3 eˆ eˆ1 eˆ 2 3 h1 u1 h2 u2 h3 u3 eˆ V eˆ V eˆ V V 1 2 3 h1 u1 h2 u2 h3 u3 F 1 h2 h3 f1 h3 h1 f 2 h1 h2 f3 h1 h2 h3 u1 u2 u3 ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems F Curl Laplacian 2V 1 h1 h2 h3 1 h1 h2 h3 h1 eˆ1 u1 h2 eˆ 2 u2 h3 eˆ 3 u3 h1 f1 h2 f 2 h3 f3 Page 1-43 h2 h3 V h3 h1 V h1 h2 V u1 h1 u1 u2 h2 u2 u3 h3 u3 Cartesian: hx = hy = hz = 1 . Cylindrical polar: h hz 1 , h . Spherical polar: hr 1, h r , h r sin . The familiar expressions then follow for the Cartesian coordinate system. In cylindrical polar coordinates, naming the three basis vectors as ˆ , ˆ, kˆ , we have: r ˆ 0ˆ z kˆ , 0, z The relationship to the Cartesian coordinate system is x cos , y sin , z z 2 x 2 y 2 , tan One scale factor is r h 2 2 x y z 2 2 2 cos sin z cos 2 sin 2 0 1 In a similar way, we can confirm that h 2 and hz 1 . y x ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-44 In cylindrical polar coordinates, dV h h hz d d dz d d dz ds 2 h d h d 2 ˆ F f F 2V 2 hz dz d d dz 2 2 2 2 ˆ kˆ z V ˆ V ˆ V V kˆ z 1 f 11 f 1 f z 1 1 z 1 f fz 1 f z ˆ ˆ kˆ 1 1 f f z fz 1 1 1 V 1 2V 1 V 2 11 V 1 V z 1 z 1 2V 2V 2 2 z 2 All of the above are undefined on the z-axis ( = 0), where there is a coordinate singularity. However, by taking the limit as 0 , we may obtain well-defined values for some or all of the above expressions. ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-45 Example 1.7.1 Given that the gradient operator in a general curvilinear coordinate system is eˆ eˆ eˆ 1 2 3 , why isn’t the divergence of h2 u2 h3 u3 h1 u1 1 F1 1 F2 1 F3 F F1 eˆ 1 F2 eˆ 2 F3 eˆ 3 equal, in general, to ? h2 u2 h3 u3 h1 u1 The quick answer is that the differential operators operate not just on the components F1 , F2 , F3 , but also on the basis vectors eˆ1 , eˆ 2 , eˆ 3 . In most orthonormal coordinate systems, these basis vectors are not constant. The divergence therefore contains additional terms. e1 e e 2 3 F1e1 F2e 2 F3e3 h u h u h u 2 2 3 3 1 1 e1 e1 F1 F1 e e e F F e e e F F e e1 1 2 1 1 1 e2 1 3 1 1 1 e3 1 u1 h2 u2 h2 u2 h3 u3 h3 u3 h1 u1 h1 e1 e2 F2 F2 e e e e1 2 2 2 h1 u1 h1 u1 h2 e1 e3 F3 F3 e e e e1 3 2 3 h1 u1 h1 u1 h2 F2 F2 e e e F F e e 2 2 3 2 2 2 e3 2 u2 h2 u2 h3 u3 h3 u3 F3 F3 e e e F F e e 2 3 3 3 3 3 e3 3 = u2 h2 u2 h3 u3 h3 u3 1 F1 F1 e F e F e e1 1 1 e2 1 1 e3 1 u1 h2 u2 h3 u3 h1 u1 h1 F2 e 1 F2 F2 e F e e1 2 e2 2 2 e3 2 u1 h2 u2 h2 u2 h3 u3 h1 F3 e F e 1 F3 F3 e e1 3 3 e2 3 e3 3 u1 h2 u2 h3 u3 h3 u3 h1 For Cartesian coordinates, all derivatives of any basis vector are zero, which leaves the familiar Cartesian expression for the divergence. But for most non-Cartesian coordinate systems, at least some of these partial derivatives are not zero. More complicated expressions for the divergence therefore arise. ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-46 Example 1.7.1 (continued) For cylindrical polar coordinates, we have 1 F F ˆ F ˆ ˆ F ˆ ˆ ˆ k 1 1 z 1 F ˆ 1 F F ˆ ˆ F ˆ ˆ ˆ k 1 z 1 Fz kˆ Fz ˆ kˆ 1 Fz Fz ˆ kˆ k ˆ 1 z 1 z 1 But none of the basis vectors varies with or z * and the basis vector k̂ is absolutely constant. Therefore the divergence becomes 1 F F ˆ 0 ˆ 0 1 1 F F ˆ 1 Fz 0 0 0 0 ˆ 0 1 z F F F ˆ ˆ ˆ ˆ But ˆ ˆ and ˆ ˆ F F ˆ ˆ ˆ ˆ 0 So we recover the cylindrical polar form for the divergence, div F * F F 1 F Fz z As shown here, the basis vectors ̂ and ˆ clearly vary with but do not change with . k is an absolute constant. ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-47 In spherical polar coordinates, naming the three basis vectors as rˆ , ˆ, ˆ, we have: r r rˆ 0ˆ 0 ˆ r , 0, 0 The relationship to the Cartesian coordinate system is x r sin cos , y r sin sin , z r cos . One of the scale factors is r h 2 2 x y z 2 2 2 r sin cos r sin sin r cos r cos cos 2 r cos sin r sin 2 2 2 r cos2 cos2 sin 2 sin 2 r cos2 sin 2 r In a similar way, we can confirm that hr 1 and h r sin . dV 1 r r sin dr d d r 2 sin dr d d ds 2 1 dr r d r sin d dr 2 r 2 d 2 r 2 sin 2 d 2 2 2 2 rˆ ˆ ˆ 1 r r r sin V rˆ V ˆ V ˆ V r r r sin r r sin f r sin 1 f 1 r f 1 r 1 r r sin r r 2 fr f sin f 1 sin 2 r r r sin r fr 2 1 f cot 1 f fr f r r r r r sin F ENGI 5432 F 1.7 Gradient Operator in Other Coordinate Systems 1 r sin 2 1 V 2 r sin 2 rˆ r fr r ˆ r f r sin ˆ r sin f r 2 sin V r sin V r V r r r sin r 1 1 2 V sin r 2 r sin r r 2V 2 V 1 2V r 2 r r r 2 2 Page 1-48 V 1 V sin sin cot V 1 2V r 2 r 2 sin 2 2 All of the above are undefined on the z-axis (sin = 0), where there is a coordinate singularity. However, by taking the limit as sin 0 , we may obtain well-defined values for some or all of the above expressions. ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-49 Example 1.7.2 A vector field has the equation, in cylindrical polar coordinates (, , z), k k F n eˆ n ˆ Find the divergence of F and the value of n for which the divergence vanishes for all 0. In cylindrical polar coordinates, div F F F Fz 1 F z F k n , F Fz 0 div F kn n1 k n and clearly div F 0 when F k 0 0 k 1 n n1 n 1. ˆ is therefore a source-free field everywhere except on the z axis. ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Example 1.7.3 In spherical polar coordinates, F r , , f cot rˆ 2 f ˆ g r , ˆ , where f () is any differentiable function of only and g (r, ) is any differentiable function of r and only. Find the divergence of F. Fr f cot , F 2 f , F g r, For spherical polar coordinates, r 2 Fr F sin F 1 sin ∇F 2 r r r sin r r 2 f cot 2sin f g r , 1 sin ∇F 2 r r r sin r 2 f cot r 2 f sin 2 r r r sin 0 2 f cot 2 f cot 0 r r everywhere (except possibly on the z axis, where r sin 0 ). Page 1-50 ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-51 Example 1.7.4 Find curl sin ˆ ˆ , where , are the two angular coordinates in the standard spherical polar coordinate system. F 1 r sin 2 1 r sin 2 F rˆ r fr r ˆ r f r sin ˆ r sin f 2r sin cos 0 rˆ 1 r sin 2 rˆ r 0 r ˆ r sin r sin ˆ r sin 2 r 0 sin 2 ˆ r sin sin 0 ˆ 1 2 cos rˆ sin ˆ sin ˆ r ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-52 Central Force Law If a potential function V(x, y, z), (due solely to a point source at the origin) depends only on the distance r from the origin, then the functional form of the potential can be deduced. Using spherical polar coordinates: V (r, , ) = f (r) 1 d df d2 f 2 df 2V 2 r 2 2 r dr dr dr r dr But, in any regions not containing any sources of the vector field, the divergence of the vector field F V (and therefore the Laplacian of the associated potential function V) must be zero. Therefore, for all r 0, d2 f 2 df 0 2 dr r dr Solve this ODE by reduction of order: Let y df dr then df y Br 2 dr f dy 2 y 0 dr r dy dr 2 y r ln y 2 ln r C ln Br 2 Br 1 A 1 V r , , A B r OR (a much faster solution!) 2V 0 dV B dr r 2 1 d 2 dV r r 2 dr dr 0 V A B r r2 dV B dr r 0 ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-53 Gravity is an example of a central force law, for which the potential function must be of B the form V r , , A . The zero point for the potential is usually set at infinity: r B lim V lim A A 0 r r r The force per unit mass due to gravity from a point mass M at the origin is F V GM rˆ r2 But, in spherical polar coordinates, V rˆ V ˆ V ˆ V dV B rˆ rˆ 2 r r r sin dr r GM B 2 2 r r B GM Therefore the gravitational potential function is V r GM r The electrostatic potential function is similar, with a different constant of proportionality. END OF CHAPTER 1