Notes on Curvilinear Coordinates∗ Jay R. Walton Fall 2014 1 Introduction These notes contain a brief introduction to working with curvilinear coordinates in RN . The vector notation x = (x1 , . . . , xN )T is used to denote a Curvilinear Coordinate System on a region D ⊂ RN which is defined through a one-to-one, smooth, mapping z = ẑ(x) z = ẑ(·) : B ⊂ RN −→ D ⊂ RN . (1) The function ẑ(x) assigns the position z ∈ D of the point z with curvilinear coordinate x. The inverse mapping to the assignment function is denoted by x̂(z). By definition, it must satisfy x̂(ẑ(x)) = x and ẑ(x̂(z)) = z. (2) To each point z with curviliner coordinate x, one constructs a Local Basis consisting of the vectors {g1 , . . . , gN } defined through gk := ∂xk ẑ(x) = z,k (x). (3) 0 < det[Dx ẑ(x)]. (4) It is natural to assume Let {g1 , . . . , gN } denote the reciprocal basis (dual basis) to {g1 , . . . , gN }. It follows from (??) that gk (x) = ∇z x̂k (ẑ(x)). (5) To see this, consider the following calculation. I = = = = ∗ Dx (x̂(ẑ(x))) Dz x̂(ẑ(x))Dx ẑ(x) by the Chain Rule by the definition of matrix multiplication ∇z x̂j (z) · ∂xk ẑ(x) j ∇z x̂ (z) · gk (x) . c 2014 by J. R. Walton. All rights reserved. Copyright 1 2 Covariant and Contravariant Coordinates A vector field w(x) then has both a contravariant and covariant coordinate representation. Specifically, w(x) = wk (x)gk (x) = wk (x)gk (x) with contravariant coordinates [wk (x)] and covariant coordinates [wk (x)]. Similarly, a second order tensor field T (x) ∈ T 2 has the multiple component representations T (x) = T kl (x)gk (x) ⊗ gl (x) = Tlk (x)gk (x) ⊗ gl (x) = Tkl (x)gk (x) ⊗ gl (x). [T kl ] gives the pure contravariant representation of T , [Tkl ] the pure covariant representation and [Tlk ] the mixed representation. Example. The identity tensor I ∈ T 2 has the following representations I = g kl (x)gk (x) ⊗ gl (x) = glk (x)gk (x) ⊗ gl (x) = gkl (x)gk (x) ⊗ gl (x) with g kl = gk · gl , glk = gk · gl = δlk and gkl = gk · gl . (6) The tensors [g kl ], [glk ] and [gkl ] are called the contravariant, mixed and covariant components of the Metric Tensor I, respectively. Thus, one sees that unless the local basis {g1 , . . . , gN } is an orthonormal basis, only the mixed component matrix representation for the identity tensor has the customary form. The reader should verify the following useful identities. gk = g kl gl and gk = gkl gl . Therefore, the matrices [g kl ] and [gkl ] can be used to transform between covariant and contravariant component representations of tensors of all orders. For example, let w(x) be a vector field defined on D. Then, w(x) = wk (x)gk (x) = wk gkl gl = wl (x)gl (x) with wl (x) = wk (x)gkl (x). Similarly, one sees that wl (x) = wk (x)g kl (x). Examples. Let {i1 , i2 , i3 } denote the natural orthonormal basis for R3 . Polar Coordinates. The Polar Coordinate system for R2 is defined by x = (x1 , x2 ) = (r, θ) with ẑ = r cos(θ)i1 + r sin(θ)i2 . The local basis becomes {g1 , g2 } with g1 (θ) = cos(θ)i1 + sin(θ)i2 and g2 = −r sin(θ)i1 + r cos(θ)i2 . 2 For this example, it is useful to introduce the local orthonormal basis {j1 (θ), j2 (θ)} j1 (θ) := cos(θ)i1 + sin(θ)i2 and j2 (θ) := − sin(θ)i1 + cos(θ)i2 . (7) With this notation, one then has g1 (θ) = j1 (θ) and g2 (r, θ) = rj2 (θ). The reader should now construct the local reciprocal basis. Cylindrical Coordinates. The Cylindrical Coordinate system for R3 is defined by x = (x1 , x2 , x3 ) = (r, θ, z) with ẑ = r cos(θ)i1 + r sin(θ)i2 + zi3 . The local basis becomes g1 (θ) = cos(θ)i1 + sin(θ)i2 , g2 (r, θ) = −r sin(θ)i1 + r cos(θ)i2 and g3 = i3 . (8) Again it proves useful to introduce the local orthonormal basis {j1 , j2 , j3 } with j1 and j2 as in (??) and j3 := i3 . One then has g1 (θ) = j1 (θ), g2 (r, θ) = rj2 (θ) and g3 = j3 . (9) The reader should again construct the corresponding reciprocal basis. Spherical Coordinates. The Spherical Coordinate system for R3 is defined by x = (x1 , x2 , x3 ) = (ρ, θ, φ) with ẑ = ρ cos(θ) sin(φ)i1 + ρ sin(θ) sin(φ)i2 + ρ cos(φ)i3 . The local basis becomes g1 (θ, φ) = cos(θ) sin(φ)i1 + sin(θ) sin(φ)i2 + cos(φ)i3 g2 (ρ, θ) = −ρ sin(θ) sin(φ)i1 + ρ cos(θ) sin(φ)i2 g3 (ρ, θ, φ) = ρ cos(θ) cos(φ)i1 + ρ sin(θ) cos(φ)i2 − ρ sin(φ)i3 . (10) There is also a useful local orthonormal basis for the spherical coordinate system given by k1 (θ, φ) := cos(θ) sin(φ)i1 + sin(θ) sin(φ)i2 + cos(φ)i3 k2 (θ) := − sin(θ)i1 + cos(θ)i2 k3 (θ, φ) := cos(θ) cos(φ)i1 + sin(θ) cos(φ)i2 − sin(φ)i3 (11) with respect to which g1 (θ, φ) = k1 (θ, φ), g2 (ρ, θ, φ) = ρ sin(φ)k2 (θ) and g3 (ρ, θ, φ) = ρk3 (θ, φ). (12) The reader should verify that the local basis (??) is indeed orthonormal and construct from (??) the reciprocal base vectors {g1 , g2 , g3 }. 3 3 Differential Operators This section derives component formulas for various differential operators applied to tensors represented through a curvilinear coordinate system. First one considers the partial differential operator ∂xk . For any tensor Φ(x), it is useful to employ the subscript notation for partial differentiation ∂xm Φ(x) = Φ,m for m = 1, . . . , N . Consider first a vector field with covariant and contravariant forms w = w k gk = w k g k . One then has for the contravariant form k w,m = w,m gk + wk gk,m . (13) It is now necessary to express the vector gk,m in covariant and contravariant component forms. To that end, one has gk,m = Γpkm gp = Γkmp gp (14) where the Christoffel Symbols Γpkm and Γkmp are given by Γpkm = gk,m · gp and Γkmp = gk,m · gp . Substitution of (??) into (??) yields k w,m = w|m gk k where the Covariant Derivative w|m of the contravariant components of w is defined by k k w|m := w,m + wp Γkpm . (15) For the covariant form of w, one has k w,m = wk,m gk + wk g,m . (16) k k g,m = (g,m · gp )gp (17) p g,m · gk = −g rs grk Γpsm = −δks Γpsm = −Γpkm . (18) Next one writes and then shows that Substitution of (??,??) into (??) yields w,m = wk,m gk − wp Γpkm gk = wk|m gk (19) where the Covariant Derivative wp|m of the covariant components of w is defined by wk|m := wk,m − wp Γpkm . 4 (20) The derivation of (??) follows from the formula (which the reader should verify) g,lpk (x) = −g pr (x)Γkrl (x) − g kr (x)Γprl (x) (21) and the observation that p g,m · gk = = = = = (g pr gr ),m · gk pr (g,m gr + g pr gr,m ) · gk pr g,m grk + g pr gsk Γsrm −g ps grk Γrsm − g rs grk Γpsm + g pr gsk Γsrm −g rs grk Γpsm = −δks Γpsm = −Γpkm . In similar fashion, one can derive formulae for partial differentiation of second order tensors. For example, given the pure contravariant representation of the second order tensor field T (x) T = T kl gk ⊗ gl , one can show that kl T,m = T,m gk ⊗ gl + T kl gk,m ⊗ gl + T kl gk ⊗ gl,m pq = T|m gp ⊗ gq pq where the Covariant Derivative T|m of the contravariant components of the second order tensor T is defined by pq pq T|m := T,m + T jq Γpjm + T pj Γqjm . Analogous formulae can be derived for pure covariant and mixed representations of the second order tensor T . Gradient. To compute the gradient operator with respect to the curvilinear coordinate formulation given previously, one can proceed as follows. Let φ(z(x)) = φ̃(x) be a scalar field. Then one has ∇z φ = ∂zk φek = ∂xj φ̃(x)∂zk x̃j ek = ∂xj φ̃(x)gj = φ̃,j (x)gj (x) where {e1 , . . . , eN } is the natural orthonormal basis for RN . Therefore, one sees that for scalar fields the gradient in curvilinear coordinates becomes ∇ = gj (x)∂xj . (22) To compute the gradient of a vector field, it proves useful to consider first the special cases ∇gk (x) and ∇gk (x). For the former case, one shows that ∇gk (x) = = = = ∂zj gk (x) ⊗ ej (gk,m (x)∂zj x̃m ) ⊗ ej gk,m (x) ⊗ (∂zj x̃m ej ) Γpkm (x)gp (x) ⊗ gm (x). 5 (23) Similarly, one computes ∇gk (x) = ∇ g kp (x)gp (x) = g kp (x)∇gp (x) + gp (x) ⊗ ∇g kp (x) kp (x)gm (x)) = g kr (x)Γprm (x)gp (x) ⊗ gm (x) + gp (x) ⊗ (g,m = −g pr (x)Γkrm (x)gp (x) ⊗ gm (x) = −Γkpm (x)gp (x) ⊗ gm (x). (24) For a vector field expressed in terms of its contravariant coordinate functions, v(z̃(x)) = ṽ(x) = ṽ k (x)gk (x), one computes the gradient as follows. ∇v(x) = gk ⊗ ∇ṽ k (x) + ṽ k (x)∇gk (x) = gk (x) ⊗ gj (x)ṽ,jk (x) + ṽ k (x)Γpkm (x)gp (x) ⊗ gm (x) p = ṽ,m (x) + ṽ k (x)Γpkm (x) gp (x) ⊗ gm (x) p = ṽ|m gp (x) ⊗ gm (x) = (∂xj ṽ(x)) ⊗ gj (x). (25) (26) (27) Thus, ones sees from (??) that the gradient of a vector field has the customary component form with covariant differentiation of contravariant components replacing ordinary partial differentiation. On the other hand, if the vector field is expressed with respect to its covariant coordinates, v(z̃(x)) = ṽ(x) = ṽk (x)gk (x), the gradient is conveniently calculated as follows. ∇v(x) = ṽk (x)∇gk (x) + gk (x) ⊗ ∇ṽk (x) = −ṽk (x)Γkpm (x)gp (x) ⊗ gm (x) + ṽp,m (x)gp (x) ⊗ gm (x) = ṽk|m (x)gk (x) ⊗ gm (x) (28) where the covariant derivative ṽk|m of the covariant components of v is given by (??) . Divergence. The divergence of a vector field is now easily computed from the results (??) and (??). Specifically, in terms of the contravariant coordinates for ṽ(x), one has from (??) and (??) that Div(ṽ(x)) = tr (∇ṽ(x)) p = (ṽ,m (x) + ṽ k (x)Γpkm (x))gp (x) · gm (x) m = ṽ,m (x) + ṽ k (x)Γm km (x). (29) On the other hand, in terms of the covariant coordinates for ṽ(x), one obtains from (??) and (??) that Div(ṽ(x)) = g kn (x) [ṽk,n (x) − ṽr (x)Γrkn (x)] . (30) It follows from (??), that km Div(gk (x)) = tr(∇gk (x)) = g km (x)gm,n (x) · gn (x) + g,m (x) km = g km (x)Γnmn (x) + g,m (x) = −g mn (x)Γknm (x), 6 (31) while from (??), one sees that Div(gk (x)) = tr(∇gk (x)) = Γm km (x). (32) It is also useful to derive formulas for the divergence of second order tensor fields, T̃ (x). For example, suppose T̃ (x) has the mixed contravariant-covariant representation T̃ (x) = T̃lk (x)gk (x) ⊗ gl (x). Then, recalling the definition of Div(T̃ (x)) as the unique vector satisfying Div(T̃ (x)T a) = Div(T̃ (x)) · a for all constant vectors a ∈ RN , one computes that Div(T̃ (x)) · a = Div(T̃ (x)T a) = Div(ṽk (x)gk (x)) with ṽk (x) := T̃kl (x) (gl (x) · a) . (33) Making use of the result (??), one obtains kp Div(T̃ (x)T a) = T̃kl (x) g km (x)Γpmp (x) + g,p (x) (gl (x) · a) + l l g kp (x) T̃k,p (x)(gl (x) · a) + T̃k,p (x)(gl,p (x) · a) h kp (x) gl (x)+ = a · T̃kl (x) g km (x)Γpmp (x) + g,p i l g kp (x)T̃k,p (x)gl (x) + T̃kn (x)Γlnp (x)gl (x) = a · Div(T̃ (x)) (34) with i kp l T̃kl (x) g km (x)Γpmp (x) + g,p (x) + g kp (x) T̃k,p (x) + T̃kn (x)Γlnp (x) gl (x) h i lp k n k k n = g (x) T̃l,p (x) + T̃l (x)Γnp (x) − T̃n (x)Γlp (x) gk (x). (35) Div(T̃ (x)) = h Laplacian. The Laplacian, 4, is another commonly arising differential operator. For a scalar field, φ̃(x) one has 4φ̃(x) = Div(∇φ̃(x)) = Div gj (x)φ̃,j (x) = φ̃,j (x)Div(gj (x)) + gj (x) · ∇φ̃,j (x) jm (x) + gj (x) · (gk (x)φ̃,jk (x)) = φ̃,j (x) g jm (x)Γnmn (x) + g,m jm (x) + g jk (x)φ̃,jk (x) = φ̃,j (x) g jm (x)Γnmn (x) + g,m h i jk l = g (x) φ̃,jk (x) − φ̃,l (x)Γjk (x) . (36) The Laplacian can also be defined for a vector field ṽ(x) as 4ṽ(x) := Div(∇ṽ(x)). (37) If the vector field is expressed through its contravariant representation ṽ(x) = ṽ k (x)gk (x), then the reader should verify that its Laplacian takes the form j r 4ṽ(x) = gj (x)g mn (x) ṽ,mn (x) + 2ṽ,n (x)Γjrm (x) − ṽ,rj (x)Γrmn (x) (38) ṽ s (x) Γrsm (x)Γjrn (x) − Γjsr (x)Γrmn (x) + ṽ r Γjrm,n (x) . 7 On the other hand, if the vector field is expressed through its covariant representation ṽ(x) = ṽk (x)gk (x), then the reader should verify that its Laplacian takes the form 4ṽ(x) = gk (x) g pl (x)g jk (x)ṽj,lp (x) − 2g pl (x)g jk (x)Γnjl (x) + g jl (x)g nk (x)Γplj (x) ṽn,p (x) +g pl (x)g nk (x) Γjlp (x)Γsnj (x) + Γjnp (x)Γjjl (x) − Γsnl,p (x) ṽs (x) . (39) 3.1 Cylindrical Coordinates The general presentation given in the previous section is applied herein to the cylindrical coordinate system in R3 . Adopting the notation in (??) and (??) one shows for a scalar field φ̃(r, θ, z), that the gradient is given by 1 ∇φ̃(r, θ, z) = j1 (θ)∂r φ̃ + j2 (θ)∂θ φ̃ + j3 ∂z φ̃. r whereas the Laplacian takes the form 1 1 4φ̃(r, θ, z) = φ̃,rr + φ̃,r + 2 φ̃,θθ + φ̃,zz . r r (40) (41) Suppose that ṽ(r, θ, z) is a vector field with component representation ṽ(r, θ, z) = ũk (r, θ, z)jk (θ). Then its gradient has the form with ∇ṽ(r, θ, z) = g mn (r, θ, z)jm (θ) ⊗ jn (θ) (42) g 11 = ∂r ũ1 g 12 = 1r (∂θ ũ1 − ũ2 ) g 13 = ∂z ũ1 g 21 = ∂r ũ2 g 22 = 1r (∂θ ũ2 + ũ1 ) g 23 = ∂z ũ2 g 31 = ∂r ũ3 g 32 = 1r ∂θ ũ3 g 33 = ∂z ũ3 . (43) From (??) and (??) it follows immediately that 1 1 Div(ṽ(r, θ, z)) = tr(∇ṽ) = ∂r ũ1 + ũ1 + ∂θ ũ2 + ∂z ũ3 . r r 3.2 (44) Spherical Coordinates The general results are next applied to the spherical coordinate system in R3 . Adopting the notation in (??) and (??), one obtains for a scalar field f˜(ρ, θ, φ) the result ∇f˜(ρ, θ, φ) = f˜,ρ k1 + f˜,θ f˜,φ k2 + k3 . ρ sin(φ) ρ (45) For a vector field ṽ(ρ, θ, φ) = ṽ j kj (θ, φ), the reader should verify that 2 1 1 3 cos(φ) 3 1 + v1 + Div(ṽ) = v,ρ v,θ2 + v,φ + v . ρ ρ sin(φ) ρ ρ sin(φ) (46) Finally, the reader should derive for the Laplacian applied to the scalar field f˜(ρ, θ, φ) the result 1 1 1 4f˜ = 2 ∂ρ (ρ2 ∂ρ f˜) + 2 ∂θθ f˜ + 2 ∂φ (sin(φ)∂φ f˜). (47) 2 ρ ρ sin(φ) ρ sin(φ) 8