Anda di halaman 1dari 9

Derivation of Gradient, Divergence, Curl and Laplacian

Operator in Spherical and General Orthogonal Coordinates


(A Thorough Discussion)
by Shule Yu
September 29, 2013

Denotation and Convention


We will use the following denotation in the discussion.
e with a hat for unit vector. e.g. ex is the Cartesian coordinates unit vector along the x direction, er is
the Spherical coordinates unit vector along the r direction, ep is the general coordinates unit vector along
p direction. p = 1, 2, 3 in a 3-D problem.
cp is the coordinate of a point in general coordinates. e.g. coordinate of P in Cartesian is (x, y, z), in
spherical Coordinate is (r, , ), in general orthogonal coordinates is (c1 , c2 , c3 ).
Einstein summation convention ONLY for subscripts. Superscripts is free. e.g. ai bi =

3
P

ai bi , however,

i=1

ap bp =ap bp , p = 1, 2, 3.

For convenience, in Cartesian coordinate, we also use xi as the coordinates of ~x, namely, ~x = (x, y, z) =
(x1 , x2 , x3 ).
Similarly as above, we also will use xi denote unit vectors in Cartesian coordinate, namely, x1 = ex ,
x2 = ey , x3 = ez . Thus we have:
xi =

~x
xi

(1)

Orthogonal Coordinates
Orthogonal means:
ep eq = pq

1 p=q
=

0 p=
6 q

(2)

Right hand convention (orthogonal property as well, we have):


e1 e2 = e3

Scales. We use hp as the scales in the p direction in general coordinates. (see below)

(3)

Scales
Definition of unit vectors for general coordinates. The directions of unit vectors equal the direction of
gradient of corresponding coordinate; The length of unit vectors should be 1.
Thus we introduce Scales denoted as hp :
ep = hp cp
Use Cartesian coordinates solve the gradient. (f =

ep = hp

(4)

ex +
ey +
ez ):
x
y
z
cp
xi
xi

(5)

Decompose ep in Cartesian coordinates:

Compare equation (5) and (6) we have:

ep = npi xi

(6)

np
cp
= pi
xi
h

(7)

Pure mathematic deduction:

npi xi

ep =

= npi

= npi

~x
xi

eq. (1) & (6)

P ~x cq
q
q c xi

chain rule

P ~x nqi
q q
q c h

eq. (7)

npi

P ~x npi nqi
q hq
q c

change the order of summation

P ~x pq
q q
q c h

eq. (2)

1 ~x
hp cp

summation with f unction

(8)

Through the deduction, eq.(8), we have:


~x
= hp ep
cp

(9)

Meaning of Scales and Infinitesimal elements


Consider dl is the infinitesimal path of point P when its coordinates changes dcp , p = 1, 2, 3. We can
calculate the path length using dot product:
(dl)2 = d~x d~x =

X ~x
X ~x
( q dcq )
( p dcp )
c
c
q
p

(chain rule)

(10)

Use eq.(9) in the above equation:


(dl)2 =

X
X
(hp ep dcp )
(hq eq dcq )

(11)

Remember we have the orthogonal condition, eq.(2), we have :


(dl)2 =

X
(hp dcp )2 = (h1 dc1 )2 + (h2 dc2 )2 + (h3 dc3 )2

(12)

Thus we come to a very very important equation, eq.(12).


if the path is along one coordinates axis, its length is:


dl1 dc2 =0 = h1 dc1
dc3 =0

(13)

which means the area of surface element is:


dS = dl1 dl2 = h1 h2 dc1 dc2

(14)

and the volume of volume element is:


dV = dl1 dl2 dl3 = h1 h2 h3 dc1 dc2 dc3

(15)

Calculation of Scales
Consider the path is along the 1st coordinates axis, use eq.(13)
(dl)2 = (h1 dc1 )2 = (dx)2 + (dy)2 + (dz)2

(16)

Because dc2 = dc3 = 0, use the partial derivative, we have:


(h1 dc1 )2 = (

x 1 2
y
z
dc ) + ( 1 dc1 )2 + ( 1 dc1 )2
1
c
c
c

(17)

Thus,
(h1 )2 = (

x 2
y
z
) + ( 1 )2 + ( 1 )2
1
c
c
c

(18)

Take spherical coordinates as an example. We have:


x = r sin cos
y = r sin sin
(19)
z = r cos
c1 = r

c2 =

c3 =

After calculation, one can easily find that:


hr = 1

h = r

h = r sin

(20)

Gradient
Consider a scalar function f (x, y, z). Use chain rule on the gradient:
f =

X f
cp
p
c
p

(21)

And we have eq.(4), so the gradient in general coordinates is:

X 1 f
ep
p cp
h
p

(22)

The scales in orthogonal coordinates can be calculated use the method in the former section.
Examples.
In Spherical coordinates we have eq.(20) Thus the Gradient Operation in Spherical coordinates is:
f =

X 1 f
f
1 f
1 f
ep =
er +
e +
e
p
p
h c
r
r
r sin
p

(23)

Namely, in spherical coordinates:

1
1

er +
e +
e
r
r
r sin

(24)

Divergence
The definition of Divergence.
divergence measure the amount of material comming out of a volumn element
at certain point.
mathematically, thats mean calculation of divergence can be written as:
RRR

f~ dV

f~ = lim

(25)

V 0

use Gauss Theorem:


ZZZ

f~ dV =

~
f~ dS

(26)

Calculate the closed surface integral. Let


surface units pointing outside in the figure
Figure 1: Divergence at (c1 , c2 , c3 )

on the right, decompose f~ into f~ = f 1 e1 +


f 2 e2 + f 3 e3 , we have:
I

~ = f 1 (c1 + dc1 , c2 , c3 )h20 h30 dc2 dc3 f 1 (c1 , c2 , c3 )h2 h3 dc2 dc3
f~ dS

+ f 2 (c1 , c2 + dc2 , c3 )h300 h100 dc3 dc1 f 2 (c1 , c2 , c3 )h3 h1 dc3 dc1
3

1000 2000

+ f (c , c , c + dc )h
=

1 2

(27)
2

dc dc f (c , c , c )h h dc dc

(h2 h3 f 1 ) 1 2 3 (h3 h1 f 2 ) 2 1 3 (h1 h2 f 3 ) 3 1 2


dc dc dc +
dc dc dc +
dc dc dc
c1
c2
c3

The Divergence in general coordinates.


combine with eq.(15), we have:
1
f~ 1 2 3
h h h

"

(h2 h3 f 1 ) (h3 h1 f 2 ) (h1 h2 f 3 )


+
+
c1
c2
c3

#
(28)

Take spherical coordinates as an example.


h1 = 1

h2 = r

h3 = r sin

c1 = r

c2 =

c3 =

f 1 = fr f 2 = f

f 3 = f

(29)

Thus,
"
#
2 sin f )
(rf
)
1
(r
(r
sin
f
)

f~ = 2
+
+
r sin
r

(30)

Namely,
f~

1
r2 sin

2
1
1 f
(r fr ) +
(sin f ) +
r
r sin
r sin

(31)

Curl
The definition of Curl.
curl represent the amount how vector field swirl
around.
mathematically, we can represent the 3rd component of curl of f~ as follows:
RR
h

ip=3
f~
= lim

f~ dS~3

S3

(32)

S3

S3 0

Figure 2: Curl in e3 at (c1 , c2 , c3 )


Use Stokes Theorem:
ZZ

f~ dS~3 =

S3

f~ d~l

(33)

S3

Calculate the closed line calculus, choosing the positive direction according to right hand rule:
I

f~ d~l = f 1 (c1 , c2 + dc2 , c3 )h10 dc1 + f 1 (c1 , c2 , c3 )h1 dc1

S3

+ f 2 (c1 + dc1 , c2 , c3 )h20 dc2 f 2 (c1 , c2 , c3 )h2 dc2


=

(34)

(f 1 h1 ) 2 1 (f 2 h2 ) 1 2
dc dc +
dc dc
c2
c1

The Curl in general coordinates.


combine with eq.(14) we have the 3rd component of curl:
h

ip=3
~
f
=

1
h1 h2

"

(f 2 h2 ) (f 1 h2 )

c1
c2

#
(35)

consider the rotational symmetry of three direction, we can write the curl in general coordinates:
1
f~ 2 3
h h

"

#
(f 3 h3 ) (f 2 h2 ) 1

e
c2
c3
"
#
"
#
1
(f 1 h1 ) (f 3 h3 ) 2
1
(f 2 h2 ) (f 1 h1 ) 3
+ 3 1

e + 1 2

e
h h
c3
c1
h h
c1
c2

(36)

Take spherical coordinates as an example. we have eq.(29), thus:


f~ =



(r sin f ) (rf )
1
er

r2 sin





(r sin f )
1
fr
1 (rf ) fr
+

e +

e
r sin
r
r
r

(37)

Namely,
f~







1

f
1
1 fr

1
fr
(sin f )
er +

(rf ) e +
(rf )
e
r sin

r sin
r
r r

(38)

Laplacian Operator
We can consider Laplacian Operator as a combined operator that divergence of a gradient:
2 f (f )

(39)

Thus, combine eq.(22) and eq.(28), we can get the general coordinates Laplacian Operator.
Laplacian Operator in general coordinates. Let
fp =

1 f
, p = 1, 2, 3
hp cp

(40)

which is in eq.(22). substitute it in eq.(28), we have:


1
f 1 2 3
h h h

"

h2 h3 f
h3 h1 f
h1 h2 f
(
)
+
(
)
+
(
)
c1 h1 c1
c2 h2 c2
c3 h3 c3

#
(41)

Take spherical coordinates as an example. we have eq.(29), thus:


1
f 2
r r
2





1

f
1
2f
2 f
r
+ 2
sin
+ 2 2
r
r sin

r sin 2

(42)

Additional Discussion
Partial derivative of the unit vector against coordinates.
from eq.(2) we have:
ep

ep
eq
q
+
e
=0
cr
cr

(43)

p, q = 1, 2, 3, r = 1, 2, 3. which contains 18(6*3) distinct scalar equations.


from eq.(9) we have:

(hp ep ) = p (hq eq )
q
c
c

(44)

which contains 3 nontrivial vector equations (9 scalar equations).


Use the equation set eq.(43) & eq.(44) we can solve the partial derivative of the unit vector against
ep
coordinates ( q ):
c
"
#
ep
eq hq
e1 hp
e2 hp
e3 hp
(45)
= p p pq
+ 2 2 + 3 3
cq
h c
h1 c1
h c
h c
Take spherical coordinates as an example.
use spherical coordinates characters, eq.(29), in the equation above, we have:

er
=0
r

e
=0
r

e
=0
r

er
= e

e
= er

e
=0

er
= sin e

e
= cos e

e
= sin er cos e

(46)

This can be useful in directly (violently) derive the operators in general coordinates:
use the rule of partial derivatives:

( p eq ) (f r er ) =
c

( p eq ) (f r er ) =
c

f r
cp

f r
cp

(eq er ) + (f r )(eq )

(eq er ) + (f )(eq )

er
cp

er
cp

(47)

!
(48)

take Laplacian operator in spherical coordinates as an example, use eq.(47) and eq.(48):


f = (f ) =

1
1
er +
e +
e
r
r
r sin

 

f
1 f
1 f

er +
e +
e
r
r
r sin

f
2f
er
1 f
1 f
e
(er er ) +
(er )
+
(
)(er e ) +
(er )
+
2
r
r
r
r r
r
r
+

1 f
1 f
(
)(er e ) +
(er )
r r sin
r sin
r

+
(many terms equal zero so it is not a hard problem, just complicate)
2f
2 f
1 2f
cos f
1
2f
+
+ 2 2 + 2
+ 2 2
2
r
r r
r
r sin
r sin 2




1

f
1
1
2f
2 f
r
+ 2
sin
+ 2 2
= 2
r r
r
r sin

r sin 2

Reference
1. Aki, K. & Richards, P. G. Quatitative Seismology. Page 31 - 32. (2002).
2. Wangyi Wu. Fluid Mechanics Book 1. Page 37 - 41. (1982)

(49)

Anda mungkin juga menyukai