You are on page 1of 16

Brief Introduction to Tensor Algebra

CONTENT I. Basic concepts 1. dierent coordinate systems 2. tensor algorithm II. Dierentiation of tensors 1.The dierentiation of base vectors 2. Covariant derivatives of vector elds 3. Grad, div and curl III. Tensor expression of basic terms in uid mechanics 1. convective terms 2. pressure gradient term 3. diusion terms I. Basic concepts 1. dierent coordinate systems a. rectangular cartesian coordinates b. generalized cartesian coordinates c. orthogonal curvilinear coordinates d. generalized curvilinear coordinates 2. tensor algorithm a. contravariant and covariant components For basis g1 , g2 , g3 :

non-coplanar condition: (g1 g2 ) g3 = 0 u = u 1 g1 + u 2 g2 + u 3 g3 = u i gi For reciprocal basis g1 , g2 , g3 :


i g i gj = j

(1)

(2) (3)

u = u 1 g 1 + u2 g 2 + u3 g 3 = ui g i
j u g j = u i gi g j = u i i = u j i u g j = u i g i gj = u i j = u j

(4) (5)

ui : contravariant components ui : covariant components gi : contravariant base vectors gi : covariant base vectors b. Relationship between contravariant and covariant components ui = u gi = (uk gk ) gi = uk (gk gi ) ui = u gi = (uk gk ) gi = uk (gk gi ) Introducing metric tensor: gik = gi gk , g ik = gi gk The relationship between contravariant and covariant components : ui = g ik uk ui = gik uk 2 (10) (11) (8) (9) (6) (7)

The relationship between contravariant and covariant base vectors: gi = gij gj gi = g ij gj (12) (13)

c. Calculations of gij and g ij gi = r xi (14)

where r is position vector. In rectangular cartesian coordinates: r = y 1 a1 + y 2 a2 + y 3 a3 The covariant base vectors can be expressed as : gi = y2 y3 y1 a + i a2 + i a3 i 1 x x x yj yj xi xk (16) (17) (15)

gik = gi gk = To nd g ij , g1 = g2 g3

g2 g 3 g1 (g2 g3 ) g3 g 1 = g1 (g2 g3 ) g1 g 2 = g1 (g2 g3 )

(18) (19) (20)

g ij = (grs gmn grn gms )/g where i = 1 : r = 2, m = 3; i = 2 : r = 3, m = 1; i = 3 : r = 1, m = 2; 3 j = 1 : s = 2, n = 3 j = 2 : s = 3, n = 1 j = 3 : s = 1, n = 2

(21)

(22) (23) (24)

where g is the determinant of the metric tensor. The Jacobian value of the coordinate transformation:
y1 x1 y1 x2 y2 x2 y3 x2 y1 x3 y2 x3 y3 x3

J=

y2 x1 y3 x1

(25)

another expression of g ik g ik = gi gk = Some examples: Rectangular cartesian coordinates, gij = ij . Cylindrical polar coordinates, g11 = 1, g22 = 2 , g33 = 1, and g12 = g23 = g31 = 0. Orthogonal curvilinear coordinates, gij = 0, i = j. d. Dot products in general coordinates 1) Scalar products of two vectors In generalized coordinates u v = (ui gi ) (vj gj ) according to
j gi g j = i

xi xj yk yk

(26)

(27)

(28)

we obtain: u v = u i vi 2) dot products of second order tensors 4 (29)

T = Tij gi gj The dot products:

S = S kl gk gl

(30)

T S = (Tij gi gj ) (S kl gk gl )
j = Tij gi k S kl gl

(31) (32) (33)

= Tij S jl gi gl 3) double dot products of second order tensors The denation of double dot product: (ab) : (cd) = (a c)(b d) T : S = (Tij gi gj ) : (S kl gk gl ) = Tij S kl (gi gk )(gj gl ) = Tij S ij

(34)

(35) (36) (37)

II. Dierentiation of tensors 1.The dierentiation of base vectors 1) derivatives of base vectors gi = 1 g1 + 2 g2 + 3 g3 = k gk ij ij ij ij xj k Christoel symbols of the second kind. ij
l k gk g l = k k = ij ij

(38)

gi gl xj

(39)

k = ij

gi k g xj 5

(40)

Christoel symbols of the rst kind: gi = ij1 g1 + ij2 g2 + ij3 g3 = ijk gk xj Formulas for the Christoel symbols of the rst kind are ijk = gi gk xj (42) (41)

Calculation of Christoel symbols

gi r 2r = j i = j i xj x x x x and gk = xk yl

(43)

(44)

k = ij and ijk =

2 yl xk xi xj yl 2 yl yl xi xj xk

(45)

(46)

2) The relationship between the Christoel symbols k = ij similarly, ijk = gkl l ij


gj ? xk j gi g j = i

gi k gi kl g = j g gl = g kl ijl j x x

(47)

(48)

(49) (50) (51)

g j gi g j + gi k = 0 xk x gj j = gi k ik x 6

gj = j gi ik xk 3) Examples of Christoel symbols: (1) Cartesian coordinates (rectangular or generlized cartesian) k = ijk = 0 ij (2) Cylindrical polars In cylindrical polar, all the components of k are zero except for ij 1 2 = 2 = , 12 21 or the Christoel symbol of the rst kind, 122 = 212 = , (3)Spherical polars 221 = 1 = 22

(52)

(53)

(54)

(55)

non-zero components of Christoel symbols for spherical polar coordinates are 1 2 = 2 = , 12 21 r 1 = r, 22 3 = 3 = cos, 23 32 3 = 3 = 13 31 1 = rsin2 , 33 1 r 2 = sincos 33 (56) (57)

2. Covariant derivatives of vector elds u xj = ui gi ui + j gi xj x ui ui i k = u ij gk + j gi = ( j + i uk )gi kj x x (58) (59)

The covariant derivative of the contravariant vector ui . ui = ,j u xj ui + i uk kj xj (60)

gi ui + j gi j x x ui ui = ui i gk + j gi = ( j k uk )gi ij kj x x = ui 7

(61) (62)

The covariant derivative of the covariant vector ui ui,j = ui k uk ij j x (63)

The relationship between these two kinds of covariant derivatives: u = ui,j gi = ui gi = ui gik gk = uk gki gi ,j ,j ,j j x So ui,j = gik uk ,j 3. Grad, div and curl 1) gradient of a scalar The grad operator (65) (64)

grad = The gradient of a scalar: grad =

= gi

xi

(66)

= gi

xi

(67)

grad = gi 2) gradient of a vector

= g ij gj i i x x

(68)

gradu =

u i g xi

(69)

uk u = ( i + uj k )gk = uk gk ij ,i xi x

(70)

gradu = uk gk gi ,i 8

(71)

u = uk,igk xi

(72)

gradu = vk,i gk gi 3) divergence of a vector

(73)

divu = from

u gi i x

(74)

uk u = ( i + uj k )gk = uk gk ij ,i xi x divu = u gi xi

(75)

(76) (77) (78) (79) (80)

= u k gk g i ,i = ui ,i ui = ,i ui + u j i ij xi ln( g) i = ij xj

so ui ,i ui j ln( g) +u = xi xj 1 i = ( gu ) g xi (81) (82) (83)

1 i ( gu ) divu = g xi 4) divergence of a second-order tensor A second order tensor can be written as T = T ij gi gj 9

(84)

T xk

T ij gi gj + T ij gi m gm jk xk ij T gi gj + T ij m gm gj + T ij gi m gm = ik jk xk

(85) (86)

T T ik gk = gi + T ik m gm + T ij gi k ik jk xk xk ik T = gi + T jk i gi + T ij k gi jk jk xk
ik divT = T,k gi

(87) (88) (89) (90) (91) (92) (93)

T = Tij gi gj divT = g jk Tij,k gi T = T i gi g j j


i divT = g jk Tj,k gi

where
ij T,k =

T ij + i T mj + j T im mk mk k x Tij m Tmj m Tim Tij,k = ik jk xk Tji i i Tj,k = k + i m Tm mk jk x u xi

(94) (95) (96)

5) curl of vectors curlu = gi (97) (98)

1 curlu = eijk uk,j gi g where eijk are the permutation symbols.


if any of i, j, k are the same (99)

eijk =

+1 if (i, j, k) is a cyclic permutation of (1,2,3) 1 otherwise

10

III. Tensor expression of basic terms in uid mechanics 1. convective terms The acceleration term: a = u t u = t u = t u = t + (u grad)u + (gradu) u + div(uu) u(divu) 1 + grad( u u) + u 2 (100) (101) (102) (103)

1) (u grad)u u = u i gi grad = gi xi u xi

(104) (105)

(u grad)u = ui

(106) (107)

= u i uj gj ,i 2) div(uu)

uu = ui uj gi gj div(uu) = (ui uk ),k gi


1 3) grad( 2 u u)

(108) (109)

1 1 1 grad( u u) = ui ui = gij ui uj 2 2 2 2. pressure gradient term

(110)

11

i g xi ij = g gj = !j gj xi

(111) (112)

where !j is the contravariant component of the gradient. 3. diusion terms divT = div(D) D is the rate-of-strain tensor: 1 D = [gradu + (gradu)T ] 2 (gradu)T is the transpose of gradu. 1 g0 D ik divT = ai + D jk i ai jk g0 xk Smagorinskys subgrid turbulence In rectangular cartesian coordinates: 1 s = cxy |gradu + (gradu)T | 2 In curvilinear coordinates: s = c g0 1 2 |D| = c g0 1 2 (D : D)1/2 = c g0 1 2 (D ij Dij )1/2 (117) (116) (115) (114) (113)

IV. Two examples of coordinate transformations 1. Boussinesq equations in curvilinear coordinates 12

Boussinesq equations in rectangular cartesian coordinates:

t +

M = 0,

(118)

M = (h + )u + (h + )[

2 z 1 2 (h h + 2 )] ( u) 2 6

1 +(h + )[z + (h )] [ (hu)], 2

(119)

ut + (u

)u + g + V1 + V2 = 0,

(120)

V1 =

2 z ( ut ) + z [ (hut )] 2

1 [ 2 ut + (hut )], 2 )( u)}

(121)

V2 = +

{(z )(u

1 2 )[ (hu)] + (z 2 )(u 2

1 {[ (hu) + u]2 }. 2

(122)

1)transformation of mass equation

t +

M = 0,

(123)

where M is the depth-integrated volume ux given by M = (h + )u + (h + )[


2 z 1 2 (h h + 2 )] ( u) 2 6

1 +(h + )[z + (h )] [ (hu)], 2 Tensor invariant forms: 1 t + ( g0 M k ) = 0, k g0 x

(124)

(125)

13

M k = (h + )uk + (h + )[

2 1 l k z 1 2 (h h + 2 )][ ( g0 u )]! 2 6 g0 xl 1 1 ( g0 hul )]!k . (126) +(h + )[z + (h )][ 2 g0 xl

2)transformation of momentum equations ut + (u The tensor invariant form: )u + g + V1 + V2 = 0, (127)

V1 =

2 z 2

uk + g!k + ul uk + V1k + V2k = 0, ,l t 1 ( ut ) + z [ (hut )] [ 2 ut + (hut )], 2

(128) (129)

Tensor invariant form: V1k =


2 z 1 l k [ ( g0 ut )]! 2 g0 xl 1 ( g0 hul )]!k +z [ t g0 xl 2 l [ ( g 0 ut ) + ( g0 hul )]!k , t l 2 g0 x g0 xl

(130)

V2 = +

{(z )(u

1 2 )[ (hu)] + (z 2 )(u 2

)( u)} (131)

1 {[ (hu) + u]2 }. 2

Tensor invariant form: V2k = {(z )ul 1 [ ( g0 hum )]}!k l g xm x 0 1 2 1 m k + (z 2 )ul l [ ( g0 u )]}! 2 x g0 xm 1 l 2 k 1 ( g0 hul ) + ( g0 u )] }! , + {[ 2 g0 xl g0 xl 14

(132)

2.Shorecirc equations in curvilinear coordinates 1) PS99, eqn (9) depth-integrated momentum equations:

(Vh) + t 1 +

[(V V h +
H

h0

V1 V1 dz + Q V1 () + V1 ()Q )a a ] (133) w w

1 T+

1 1 S + gh s + B = 0

tensor-invariant forms

(V h) + (V V h + V1 V1 dz + Q V1 () + V1 ()Q ), w w t h0 1 1 1 1 g s + B = 0 + T, + S, + gh

(134)

2)The general form of the horizontal momentum equation PS99 (10):

uH +( t

1 (uu))H = ( p)H

(135)

where u = uH + w, ()H means the horizontal components. ( (uu))H = (u uk ),k a = where = 1, 2 and k = 1, 2, 3. Expending (u w),z and using coordinate transformation (u w),z = u w + u w + 3 u u 3 3 z u w = z ( = 3 = 0) 3 3 ( (uu))H =
H H

(136)

(uH uH ) + (u w),z a

(137)

(138) u w a z (139)

(uH uH ) + 15

In the tensor-invariant form: u 1 p + (u u ), + (u w) = g t z (140)

Acceleration term in noninertial coordinates Coordinate transformation: xi = xi (y1 , y2 , y3 , t), or inverse transformation: ym = ym (xi , x2 , x3 , ), Acceleration term: a= where vi = wi =
dxi dt

=t

(141)

t=

(142)

Dv i w i i i gi ( + 2v j w,j w j w,j )gi D

(143)

relative velocity components frame velocity components

xi | t ym

16

You might also like