Docsity

Computational Fluid Dynamics Lecture 3: Equal-Spaced Mesh and Spatial Differencing - Prof., Study notes of Aerospace Engineering

Toggle sidebar
bg1
Fall 2008 - James D. Baeder
ENAE684 - Computational Fluid Dynamics I
Lecture #3 - 1
ENAE684 - Lecture #3
ENAE684 - Lecture #3
Finite Difference Approximations
•Derivation / Accuracy
•Method of Undetermined Coefficients (Taylor Tables)
•Taylor Series Analysis
•Types of Spatial Discretization
•Central / One-sided / Biased / Upwind
•Lagrangian and Hermetian Interpolation
•Derivation / Accuracy / Interpretation
!
uxj fK,uj#2,uj#1,uj,uj+1,uj+2,K,uxj#2,uxj#1,uxj+1,uxj+2,K, x
( )
!
˜
u x
( )
=akx
( )
uk
k=0
K
"+bkx
( )
#
mu
#
xm
$
%
&
'
(
)
k
k=0
K
"
x
u
jj-1 j+1
!
"
x
+uj=uj+1#uj
$x
!
xuj=uj+1#uj#1
2 x
!
x
#uj=uj#uj#1
x
!
uxj"˜
u
xxj
( )
Fall 2008 - James D. Baeder
ENAE684 - Computational Fluid Dynamics I
Lecture #3 - 2 Equal-Spaced Mesh
Equal-Spaced Mesh
•Justification for Cartesian, Equi-spaced Grids
•Can perform transformation of coordinates
•Smooth & accurate --> local accuracy same in both spaces
•Equi-spaced Cartesian mesh in transformed (computational) space
Justify in
Justify in
Class
Class
Fall 2008 - James D. Baeder
ENAE684 - Computational Fluid Dynamics I
Lecture #3 - 3
Accuracy
Accuracy
•Differential:
•Unique, since:
•Difference:
•Not unique, depends upon approximation and !x:
How does one determine the coefficients and
the accuracy of difference approximations?
!
uxj fK,uj#2,uj#1,uj,uj+1,uj+2,K,uxj#2,uxj#1,uxj+1,uxj+2,K, x
( )
From
last
lecture!
Fall 2008 - James D. Baeder
ENAE684 - Computational Fluid Dynamics I
Lecture #3 - 4
Point Difference Operator
Point Difference Operator
•Define relationship at one point in the mesh
•Infinite number of difference operators available to
approximate same differential operator (3 shown)!
x
u
jj-1 j+1
!
"
x
+uj=uj+1#uj
$x
!
"
xuj=uj+1#uj#1
2$x
!
"
x
#uj=uj#uj#1
$x
From
last
lecture!
What if !x smaller?
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Computational Fluid Dynamics Lecture 3: Equal-Spaced Mesh and Spatial Differencing - Prof. and more Study notes Aerospace Engineering in PDF only on Docsity!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 1

ENAE684 - Lecture #3 ENAE684 - Lecture

Finite Difference Approximations

  • Derivation / Accuracy
    • Method of Undetermined Coefficients (Taylor Tables)
    • Taylor Series Analysis
  • Types of Spatial Discretization
    • Central / One-sided / Biased / Upwind
  • Lagrangian and Hermetian Interpolation
    • Derivation / Accuracy / Interpretation

!

ux j f (K , u j # 2 , u j # 1 , u j , u j + 1 , u j + 2 ,K, ux j # 2 , ux j # 1 , ux j + 1 , ux j + 2 ,K, x )

!

u^ ˜ ( x ) = ak ( x ) uk k = 0

K " +^ bk ( x^ )

m u

_x

m_

$

%

&

'

(

) k = 0 k

K "

x

u

j-1 j j+

!

" x^ + u (^) j = u^ j^ +^1 $^ # x^ u^ j

!

x u^ j =^ u (^) j + 1 # u (^) j # 1 2 x

!

x^ #^ u^ j =^ u (^) j # u (^) j # 1 x

!

ux (^) j " u ˜ x ( x (^) j ) ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 2

Equal-Spaced Mesh Equal-Spaced Mesh

  • Justification for Cartesian, Equi-spaced Grids
    • Can perform transformation of coordinates
      • Smooth & accurate --> local accuracy same in both spaces
      • Equi-spaced Cartesian mesh in transformed (computational) space

Justify inJustify in ClassClass

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 3

Accuracy Accuracy

  • Differential:
    • Unique, since:
  • Difference:
    • Not unique, depends upon approximation and !x:

How does one determine the coefficients and

the accuracy of difference approximations?

ux!

"u

"x

! lim

x $ 0

u ( x + # x ) % u ( x )

x

ux j f K, u (^) j # 2 , u (^) j # 1 , u (^) j , u (^) j + 1 , u (^) j + 2 ,K, ux j # 2 , ux j # 1 , ux j + 1 , ux j + 2

( ,K,^ x )

From last lecture!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 4

Point Difference Operator Point Difference Operator

  • Define relationship at one point in the mesh
    • Infinite number of difference operators available to approximate same differential operator (3 shown)!

x

u

j-1 j j+

" x

u (^) j =

u (^) j + 1 # u (^) j

$ x

!

" x u (^) j =

u (^) j + 1 # u (^) j # 1

2 $ x

" x

u (^) j =

u (^) j # u (^) j # 1

$ x

From last lecture!

What if !x smaller?

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 5

Taylor Series Analysis Taylor Series Analysis

  • From Calculus
    • If smooth , solution anywhere described by Taylor series expansion of function & derivatives at one point!!!
    • So, for example:

u (^) j + k = u (^) j + (^) ( k " x )

u

x

j

( k " x )

2 u

x

2

j

K +

n!

( k " x )

n #

n u

x

n

j

u (^) j + 1 = u (^) j + " x

u

x

j

" x

2 u

x

2

j

+ K +

n!

" x

n^ #

n u

x

n

j

From last lecture!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 6

Taylor Series Analysis (2) Taylor Series Analysis (2)

  • What if?
    • Subtract uj from both sides
    • Divide by !x:
    • This is a first order approximation to the first derivative at point j

uj + 1! uj

" x

u

x

j

" x

2 u

x

2

j

+ K +

n!

" x

n! 1 #^

n u

x

n

j

This process can be formalized

  • Taylor Tables to reduce chances for errors

(Method of Undetermined Coefficients)

From last lecture!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 7

Taylor Table Taylor Table

  • Example #
    • GIVEN: 3-pt backwards approximation to 1st derivative
    • REQUIRED:
        1. What are a 2 , a 1 , and a 0 for greatest accuracy?
        1. What is ert =? (<--- Taylor series error)
    • SOLUTION:
      • Let! s construct a Taylor Table!
      • Solve linear system to determine coefficients

(^ u (^) x ) j

" x

( a 0 u^ j +^ a 1 u^ j # 1 +^ a 2 u^ j # 2 ) +^ ert

From last lecture!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 8

Graphically Graphically

  • Note:
  • We will show later that this is equivalent to:
    • Fitting a function w/ solution at the three points (parabola)
    • Evaluating analytic derivative at the required point!

( u (^) x ) j

! x

( a 0 uj +^ a 1 uj " 1 +^ a 2 uj " 2 ) +^ ert

x

u

j-2 j-1 j j+

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 13

Types of Spatial Differencing (2) Types of Spatial Differencing (2)

  • Note:
    • Central operators always obtain highest order of accuracy for given maximum of p and q - Almost always used for even derivatives - Sometimes used for odd derivatives

Why not always used for all derivatives?

  • Forward and Backward schemes are useful for convection problems - Information convects in certain directions - We! ll learn more of why later - stability! ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 14

Upwind Schemes Upwind Schemes

  • Convection:
    • Characteristic speeds and directions
      • Magnitude & Sign of eigenvalues
    • Difference schemes that use data points into the wind (stream) are called upwind

x j-2 j-1 j j+1 j+

" (speed) > 0

downwind data

upwind data

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 15

Upwind Schemes (2) Upwind Schemes (2)

  • Note:
    • If " was in the opposite direction (<0) than a

forward scheme would be upwind

  • If more points are used in the upwind direction than the downwind than scheme is upwind-biased
  • Upwind schemes use numerics to mimic physics of convection - Regions of dependence and influence - Recall x-t diagram - Will be related to stability

t

x u(x,0)

u(0,t) "^ (speed) > 0

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 16

Taylor Table A Taylor Table A

  • Alternate Example (central differencing)
    • GIVEN: 3-pt central approximation to 1st derivative
    • REQUIRED:
        1. What are a 1 , a 0 and a-1 for greatest accuracy?
        1. What is ert =?
    • SOLUTION:
      • Let! s construct a Taylor Table!
      • Solve linear system to determine coefficients

(^ u (^) x ) j

" x

( a 1 u^ j + 1 +^ a 0 u^ j +^ a # 1 u^ j # 1 ) +^ ert

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 17

Taylor Table A (3) Taylor Table A (3)

  • Three unknowns
    • For maximum accuracy solve three equations
    • This results in:
      • !or

a 1

a 0

a " 1

[^ a 1 a 0 a " 1 ] =^

[^1 0 "^1 ]

" x u (^) j =

2 # x

( u^ j + 1 $^ u^ j $ 1 )

solving for first derivative

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 18

Taylor Table A (4) Taylor Table A (4)

  • The Taylor Series Error is then:
    • 2nd Order Accurate
    • But, half the error of backward scheme

!

ert = "

a 1 +

a " 1

() x

2 ( u (^) xxx ) (^) j

() x

2 ( uxxx ) (^) j

) x 2 ( uxxx ) j = O ) x 3 " 1 ( ) =^ O^ ) x

2 ( )

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 19

Taylor Table A2Taylor Table A

  • Another Alternate Example (interpolation)
    • GIVEN: 3-pt forwards-biased approximation to function
    • REQUIRED:
        1. What are a 1 , a 0 and a-1 for greatest accuracy?
        1. What is ert=?
    • SOLUTION:
      • Let! s construct a Taylor Table!
      • Solve linear system to determine coefficients

u j " (^12) = (^) ( a 1 u (^) j + 1 + a 0 u (^) j + a " 1 u (^) j " 1 ) + ert

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 20

Taylor Table A2 (2) Taylor Table A2 (2)

  • What if expand around j-1/2?

uj! x ( u x )

j! x

2

( u xx ) j! x

3

( u xxx ) j

"

uj # 1 2

1

"

1 2

$ %

&

' (

)

1 1 1

"

1 2

$ %

&

' (

)

2 1 2

"

1 2

$ %

&

' (

)

3 1 6

"

a 1 u (^) j + 1

"

a 1

"

a 1 ( (^1) )

1 1 1

"

a 1 ( (^1) )

2 1 2

"

a 1 ( 1 )

3 1 6

"

a 0 uj a 0 0 0 0

"

a # 1 u (^) j # 1

"

a # 1

"

a # 1 (# 1 )

1 1 1

"

a # 1 (# 1 )

2 1 2

"

a # 1 (# 1 )

3 1 6

"

ert^0 0 0?

Note: no scaling required

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 25

Taylor Table A3 (4) Taylor Table A3 (4)

  • The Taylor Series Error is then:

Oops, this is zero!

  • Does this mean NO Taylor series error? Not very likely!
  • better look at next column

ert = "

a 1 +

a " 1

() x^ ( uxxx ) (^) j

(^1 ) +^

(^1 )

() x^ ( u (^) xxx ) (^) j

= 0 ) x (^) ( u (^) xxx ) j

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 26

uj! x ( u x )

j! x

2

( u xx ) j! x

3

( u xxx ) j

"

! x 4 ( uxxxx ) (^) j

"

! x 2 ( uxx ) (^) j^0 0 1 0

"

a 1 u (^) j + 1

"

a 1

"

a 1 ( (^1) )

1 1 1

"

a 1 ( (^1) )

2 1 2

"

a 1 ( (^1) )

3 1 6

"

a 1 ( (^1) )

4 1 24

"

a 0 u (^) j a 0 0 0 0 0

"

a # 1 u (^) j # 1

"

a # 1

"

a # 1 (# 1 )

1 1 1

"

a # 1 (# 1 )

2 1 2

"

a # 1 (# 1 )

3 1 6

"

a # 1 (# 1 )

4 1 24

"

! x^2 ert^0 0 0 0?

Taylor Table A3 (5) Taylor Table A3 (5)

  • Convenient way of grouping like terms!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 27

Taylor Table A3 (6) Taylor Table A3 (6)

  • The Taylor Series Error is then:

Gained another order of accuracy!

ert = "

a 1 "

a " 1

() x

2 ( u (^) xxxx ) j

(^1 ) "^

(^1 )

() x

2 ( uxxxx ) j

) x

2 ( u (^) xxxx ) (^) j

" xx u (^) j =

x

2 ( u^^ j^ +^1 $^2 u^ j^ +^ u^ j $^1 )

O " x

2 ( )

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 28

Lagrangian Lagrangian InterpolationInterpolation

  • So far, all of our finite-difference schemes can be considered as based on Lagrangian interpolation:
  • Where ak(x) are power polynomials of degree K
  • Eg.: Consider quadratic interpolation (K=2)

u^ ˜ (^) ( x ) = ak ( x ) uk k = 0

K

"

u^ ˜ (^) ( x ) =

( x 1 "^ x ) ( x 2 "^ x )

(^ x 1 "^ x 0 ) ( x 2 "^ x 0 )

u 0 +

( x 0 "^ x ) ( x 2 "^ x )

(^ x 0 "^ x 1 ) ( x 2 "^ x 1 )

u 1

( x 0 "^ x ) ( x 1 "^ x )

(^ x 0 "^ x 2 ) ( x 1 "^ x 2 )

u 2

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 29

Lagrangian Lagrangian Interpolation (2)Interpolation (2)

  • Note:
    • Each polynomial, ak(x) is one when x = xk
    • Each polynomial, ak(x) is zero when x " xk
    • Exact interpolation at xk
    • If take 1st, 2nd, etc. derivative
      • Can rederive finite difference approximations

Lagrangian Approximations w/ Power Polynomials is equivalent to Taylor Series Analysis using Method of Undetermined Coefficients! ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 30

LagrangianLagrangian^ Interpolation (3)Interpolation (3)

  • Eg. Let x 1 = xj, x 2 = xj+1, x 0 = xj-1:

-->

u ˜ (^) ( x ) =

( x^ j "^ x ) ( x^ j + 1 "^ x )

2 # x

2 u (^) j " 1 "

( x^ j " 1 "^ x ) ( x^ j + 1 "^ x )

x

2 u (^) j

( x^ j " 1 "^ x ) ( x^ j "^ x )

2 # x

2 u^ j^ +^1

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 31

Lagrangian Lagrangian Interpolation (4)Interpolation (4)

  • This gives:

(linear!)

  • And

(constant!)

u^ ˜ x ( x ) =

2 x! xj! xj + 1

2 " x

2 uj! 1!^

2 x! xj + 1! x (^) j! 1

" x

2 uj

2 x! x (^) j! 1! x (^) j

2 " x

2 uj^ +^1

u^ ˜ xx ( x ) =

! x

2 uj " 1 "^

! x

2 uj +^

! x

2 uj + 1

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 32

Lagrangian Lagrangian Interpolation (5)Interpolation (5)

  • Therefore for first derivative
    • We can get
    • Or
      • shifting

" x u (^) j = u ˜ x ( x (^) j ) =

#$ x

2 $ x

2 u^ j #^1 #^

$ x

2 u^ j^ +^

$ x

2 $ x

2 u^ j^ +^1

" x u (^) j + 1 = u ˜ x ( x (^) j + 1 ) =

x

2 # x

2 u^ j $^1 $^

2 # x

x

2 u^ j^ +^

3 # x

2 # x

2 u^ j^ +^1

!

" x u (^) j =

u (^) j + 1 # u (^) j # 1

2 $ x

" x u (^) j =

2 # x

( u^ j $ 2 $^4 u^ j $ 1 +^3 u^ j )

Look familiar?

Look familiar?

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 37

Taylor Table II Taylor Table II

  • Example #
    • GIVEN: 2-pt backwards Hermetian approximation to 1st derivative
    • REQUIRED:
        1. What are b, a 1 , and a 0 for greatest accuracy?
        1. What is ert=?
    • SOLUTION:
      • Let! s construct a Taylor Table!
      • Solve linear system to determine coefficients

( u (^) x ) j + b ( u (^) x ) j! 1 =

" x

( a 0 uj +^ a 1 uj! 1 ) +^ ert

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 38

Taylor Table II (2) Taylor Table II (2)

  • Note shifting of derivative terms!
    • Expanded around!

uj! x ( u x )

j! x

2

( u xx ) j! x

3

( u xxx ) j

! x ( u x ) j^0 1 0

b! x ( u x ) j " 1 0 b^ b ( " 1 )^1

1

b (" 1 )

2 1 2 a 0 uj a 0 0 0 0

a 1 uj " 1 a 1^ a^1 ("^1 )

1 1 1

a 1 (" 1 )

2 1 2

a 1 (" 1 )

3 1 6

! xert^0 0 0?

Note: original equation multiplied by! x to make it easier

Note: headings

Note: separators

ux j

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 39

Taylor Table II (3) Taylor Table II (3)

  • Three unknowns
    • For maximum accuracy solve three equations
    • This results in:
    • Or
    • Or

a 0

a 1

b

[^ a 0 a 1 b ] =^ [^2 "^2 1 ]

" x u (^) j + " x u (^) j # 1 =

$ x

( u^ j #^ u^ j # 1 )

" x u (^) j +

" x u (^) j # 1 =

$ x

( u^ j #^ u^ j # 1 )

solving for first derivative

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 40

Taylor Table II (4) Taylor Table II (4)

  • The Taylor Series Error is then:

This is second order accurate in space!

ert =

b +

a 1

'( x

2 ( u (^) xxx ) j

(^1 ) +^

() 2 )

'( x

2 ( u (^) xxx ) j

( x

2 ( u (^) xxx ) j = O ( x

3 ) 1 ( ) =^ O^ ( x

2 ( )

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 41

Hermetian Hermetian

  • Finite Difference Schemes based on

Hermetian Interpolation often times

referred to variously as:

  • Compact Schemes
  • Padé Formulas
  • Hermetian
  • Predictor-Corrector
  • Rational Fractions

They all mean the same thing!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 42

Taylor Table IIATaylor Table IIA

  • Alternate Hermetian Example:
    • GIVEN: 3-pt central Hermetian approximation to 1st derivative
    • REQUIRED:
        1. What are b and a for greatest accuracy?
        1. What is ert=?
    • SOLUTION:
      • Let! s construct a Taylor Table!
      • Perhaps simplify if know certain features
        • Note assumed form of coefficients

b (^) ( ux ) j + 1

  • (^) ( ux ) j
  • b (^) ( u (^) x ) j " 1

x

( au^ j + 1 "^ au^ j " 1 ) +^ ert

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 43

Taylor Table IIA (2) Taylor Table IIA (2)

  • A lot of terms are automatically zero!

uj! x ( u x )

j! x

2

( u xx ) j! x

3

( u xxx ) j

"

! x^4 ( u (^) xxxx ) (^) j

"

! x^5 ( uxxxxx ) (^) j

b! x (^) ( u (^) x ) (^) j + 1 0

"

b

! x ( u x ) j^0 1 0 0 0

b! x ( u x ) j # 1 0

"

b

"

b (^) ( # (^1) )

4 1 24

"

au (^) j + 1

"

a

"

au (^) j # 1 -

"

a

-

"

a (^) (# 1 )

5 1 120 ! xert 0 0 0 0 0?

Fill out in class!

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 44

Taylor Table IIA (3) Taylor Table IIA (3)

  • Two unknowns (since assumed form)
    • For maximum accuracy solve two equations
    • This results in:
    • Or
    • Or

a

b

. =^

[^ a^ b ] =^

[ 3 1 ]

" x u (^) j + 1 + " x u (^) j +

" x u (^) j # 1 =

4 $ x

( u^ j + 1 #^ u^ j # 1 )

" x u (^) j + 1 +

" x u (^) j +

" x u (^) j # 1 =

2 $ x

( u^ j + 1 #^ u^ j # 1 )

Discuss if time!

solving for first derivative

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 49

Summary Summary

  • Taylor series expansion of a function and it’s derivatives at one point in the flowfield allow us to describe the solution in the vicinity of that point if the flow is relatively continuous. This allows us to formally derive formulas for representing the function or it’s derivatives in terms of the values at other nearby points. This derivation is simplified through the use of Taylor tables. The values of the various components can be determined by the Method of Undetermined Coefficients.
  • In general, a finite difference scheme for any function or it’s derivative at a particular point can be considered to be central, forward or backwards depending upon the choice of nearby information. In convection, a scheme that preferentially uses data points into the wind are called upwind and attempt to mimic the physics. Finite difference schemes that involve the function itself at other discrete points can be considered to be based upon Lagrangian interpolation, while if they also involve various derivatives of the function at other discrete points then it can be considered to be based upon Hermetian interpolation. If maximum Taylor series accuracy is obtained then the interpolation is based upon a power polynomial. In general, central schemes are more accurate that upwind schemes and Hermetian schemes are more accurate than Lagrangian schemes.
  • Especially in considering Hermetian schemes, but also for Lagrangian schemes, we must consider how the effects of boundary conditions are incorporated. For analysis, we will examine Matrix Difference Operators - an extension of Point Difference Operators.

Not inNot in ClassClass

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 50

Graphically A Graphically A

  • Note:
  • This is equivalent to:
    • Fitting a function w/ solution at the three points (parabola)
    • Taking derivative analytically
    • Evaluating the derivative at the required point!

x

u

j-2 j-1 j j+

" x u (^) j =

x

( a 1 u^ j + 1 +^ a 0 u^ j +^ a $ 1 u^ j $ 1 )

Not inNot in ClassClass

ENAE684 - Computational Fluid Dynamics I Fall 2008 - James D. Baeder

Lecture #3 - 51

Taylor Table A (2) Taylor Table A (2)

  • Convenient way of grouping like terms!

uj! x ( u x )

j! x

2

( u xx ) j! x

3

( u xxx ) j

! x ( u x ) j^0 1 0

"

a 1 u (^) j + 1

"

a 1

"

a 1 ( (^1) )

1 1 1

"

a 1 ( 1 )

2 1 2

"

a 1 ( (^1) )

3 1 6

"

a 0 uj a 0 0 0 0

"

a # 1 u (^) j # 1

"

a # 1

"

a # 1 (# 1 )

1 1 1

"

a # 1 (# 1 )

2 1 2

"

a # 1 (# 1 )

3 1 6

! xert^0 0 0?

Note: very similar to earlier example

Not inNot in ClassClass