Applied Computational Fluid Dynamics-Mathematics-Lecture Slides, Slides of Mathematics

This lecture is delivered by Prof. Dravid Mehta at Chennai Mathematical Institute for Mathematics course. Its main topics are: Applied, Computational, Fluid, Dynamics, Vector, Notation, Scalar, Vector, Gradients, Curl

Typology: Slides

2011/2012

Uploaded on 07/03/2012

toshi
toshi 🇮🇳

5

(5)

23 documents

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Mathematics Review
Applied Computational Fluid Dynamics
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Applied Computational Fluid Dynamics-Mathematics-Lecture Slides and more Slides Mathematics in PDF only on Docsity!

1

Mathematics Review

Applied Computational Fluid Dynamics

2

Vector Notation - 1

x =

Scalar ("inner") product: X  Y  xi yi

Vector ("outer") product: X Y Z

Dyadic tensor product XY  A aij  xiyj

Multiplica tion: X f  Y yi  fxi

Double dot("inner") product: A Baij bji

: :^ =

4

  • The gradient of a scalar f is a vector:

Similarly, the gradient of a vector is a second order tensor, and

the gradient of a second order tensor is a third order tensor.

  • The divergence of a vector is a scalar:

Gradients and divergence

i j k z

f

y

f

x

f grad f f 

z

A

y

A

x

A

div

x y z

A   .A 

5

  • The curl (“rotation”) of a vector v (u,v,w) is another vector:

Curl

y

u

x

v

x

w

z

u

z

v

y

w curl v rot v v , ,

x =

7

Identities

 (f g)  f g  gf

 (A  B)  (B  )A  (A  )B  B  (  A)  A  (  B)

 ( f A )  (f) A  f( A )

 ( A  B )  B ( A ) A  (  B)

 ( f A )  (f) A  f( A )

 (A  B)  (B  )A  (A  )B  (  B)A  (  A)B

8

Identities

A ( A) A

2      

k

j

(A )B i

z

B

A

y

B

A

x

B

A

z

B

A

y

B

A

x

B

A

z

B

A

y

B

A

x

B

A

z z

z y

z x

y z

y y

y x

x z

x y

x x

whereS isthe surfacewhichbounds volume τ

d

f d f

S

S

A A da

da

10

Integral theorems

whereS isthesurfacewhichbounds volume τ

Gauss divergence theorem d d

 S   

' : A s A

but doesnotbound a volume

opensurfaceS ie S maybea surface

whereCistheclosed curvewhichbounds the

Stokes theorem d d C S

3  D

 A ^ l    (  A)  s

11

Euclidian Norm

  • Various definitions exist for the norm of vectors and matrices. The

most well known is the Euclidian norm.

  • The Euclidian norm || V || of a vector V is:
  • The Euclidian norm || A || of a matrix A is:
  • Other norms are the spectral norm, which is the maximum of the

individual elements, or the Hölder norm, which is similar to the

Euclidian norm, but uses exponents p and 1/p instead of 2 and

1/2, with p a number larger or equal to 1.

i j

aij ,

2 A

i

vi

2 V

13

Matrix invariants - 1

  • An invariant is a scalar property of a matrix that is independent of the coordinate

system in which the matrix is written.

  • The first invariant I 1 of a matrix A is the trace tr A. This is simply the sum of the

diagonal components: I 1 = tr A = a 11 + a 22 + a 33

  • The second invariant is:
  • The third invariant is the determinant of the matrix: I 3 = det A.
  • The three invariants are the simplest possible linear, quadratic, and cubic

combinations of the eigenvalues that do not depend on their ordering.

13 33

11 31

12 22

11 21

23 33

22 32 2 a a

a a

a a

a a

a a

a a I   

14

Matrix invariants - 2

  • Using the previous definitions we can form infinitely many other variants, e.g:
  • In CFD literature, one will sometimes encounter the following alternative

definitions of the second invariant (which are derived from the previous

definitions):

  • For symmetric matrices:

I 2 = (1/2)*[(tr A )^2 - tr A^2 ] = a 11 a 22 + a 22 a 33 + a 33 a 11

or

I 2 = (1/6) * [ (a 11 -a 22 )^2 + (a 22 -a 33 )^2 + (a 33 -a 11 )^2 ] + a 122 + a 232 + a 312

  • The Euclidian norm:    i j

I aij ,

2 2 A

ik ik

ii

I I a a

I a

 

2

2 1

2 2 1

2

16

Gauss-Seidel method - continued

  • Next, using x 1 1 and x 2 0 :
  • And continue, until:
  • For all consecutive iterations we solve for x 1 2 , using x 2 1 … xN 1 ,

and next for x 22 using x 12 , x 31 … xN^1 , etc.

  • We repeat this process until convergence, i.e. until:

with δ a specified small value.

32 2

1 31 1 33 33

(^13) 3 a x a x a a

C

x   

  

1

1

n

Ni i NN NN

N N a x a a

C

x

 ( )

k 1 i

k xi x

17

Gauss-Seidel method - continued

  • It is possible to improve the speed at which this system of

equations is solved by applying overrelaxation, or improve the

stability if the system does not converge by applying

underrelaxation.

  • Say at iteration k the value of xi equals xi k . If applying the Gauss-

Seidel method, the value for iteration k+1 would be xik+1, then,

instead of using xi k+ , we consider this to be a predictor.

  • We then calculate a corrector as follows:
  • Here R is the relaxation factor (R>0). If R<1 we use

underrelaxation and if R>1 we use overrelaxation.

  • Next we recalculate xi k+ as follows:

1 k i

k corrector  R xi x

x x corrector

k i

k i  

 1

19

Gauss elimination - continued

  • This is done by multiplying the first row by a 21 /a 11 and subtracting

it from the second row. Note that C 2 then becomes C 2 -C 1 a 21 /a 11.

  • The other elements a 31 through an1 are treated similarly. Now all

elements in the first column below a 11 are 0.

  • This process is then repeated for all columns.
  • This process is called forward elimination.
  • Once the upper diagonal matrix has been created, the last

equation only contains one variable xn, which is readily calculated

as xn=Cn/ann.

  • This value can then be substituted in equation n-1 to calculate xn-

and this process can be repeated to calculate all variables xi. This

is called backsubstitution.

  • The number of operations required for this method increases

proportional to n 3

. For large matrices this can be a

computationally expensive method.

20

Tridiagonal matrix algorithm (TDMA)

  • TDMA is an algorithm similar to Gauss elimination for tridiagonal

matrices, i.e. matrices for which only the main diagonal and the

diagonals immediately above and below it are non-zero.

  • This system can be written as:
  • Only one element needs to be replaced by a zero on each row to

create an upper diagonal matrix.

  • When the algorithm reaches the ith row, only ai,i and Ci need to

be modified:

  • Backsubstitution is then used to calculate all xi.
  • The computational effort scales with n and this is an efficient

method to solve this set of equations.

ai (^) ,i 1 xi 1  ai,ixi ai,i 1 xi 1 Ci

i i

ii i i i i i

ii i i i i ii a

a C C C a

a a a a

1 ,

, 1 1

1 ,

, 1 1 , 1 , , 

 

      