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)
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)
ep = npi xi
(6)
np
cp
= pi
xi
h
(7)
npi xi
ep =
= npi
= npi
~x
xi
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
P ~x pq
q q
q c h
eq. (2)
1 ~x
hp cp
(8)
(9)
X ~x
X ~x
( q dcq )
( p dcp )
c
c
q
p
(chain rule)
(10)
X
X
(hp ep dcp )
(hq eq dcq )
(11)
X
(hp dcp )2 = (h1 dc1 )2 + (h2 dc2 )2 + (h3 dc3 )2
(12)
(13)
(14)
(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)
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)
c2 =
c3 =
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)
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)
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
f~ dV =
~
f~ dS
(26)
~ = 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
"
#
(28)
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
f~ dS~3 =
S3
f~ d~l
(33)
S3
Calculate the closed line calculus, choosing the positive direction according to right hand rule:
I
S3
(34)
(f 1 h1 ) 2 1 (f 2 h2 ) 1 2
dc dc +
dc dc
c2
c1
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)
(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)
"
h2 h3 f
h3 h1 f
h1 h2 f
(
)
+
(
)
+
(
)
c1 h1 c1
c2 h2 c2
c3 h3 c3
#
(41)
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)
(hp ep ) = p (hq eq )
q
c
c
(44)
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)