Presentation is loading. Please wait.

Presentation is loading. Please wait.

6th Lecture : Numerical Methods

Similar presentations


Presentation on theme: "6th Lecture : Numerical Methods"— Presentation transcript:

1 6th Lecture : Numerical Methods
1 6th Lecture : Numerical Methods Boundary Layer Theory Dept. of Naval Architecture and Ocean Engineering

2 Contents Shooting method for Falkner-Skan equation Numerical method
2 Shooting method for Falkner-Skan equation Numerical method Finite difference Stability analysis Explicit vs. Implicit scheme Mid-term Exam : Plan

3 Shooting Method for Falkner-Skan Eqn. (I)
3 Recall, from Falkner-Skan Transform (HW#2) Then the momentum equation becomes Boundary condition This is … Boundary Value Problem (BVP) : BC’s are defined at both sides of domain. cf. Initial Value Problem (IVP) : BC’s are defined at single side. For IVP, we can march with integration from η=0 to η= η. Nth order ODE  Set of N Simultaneous 1st order differential equations

4 Shooting Method for Falkner-Skan Eqn. (II)
4 1st order IVP Recall, to solve ODE = to integrate ODE How to integrate ? Runge-Kutta method ! 4th order Runge-Kutta method Discretization

5 Shooting Method for Falkner-Skan Eqn. (III)
5 The Falkner-Skan equation is BVP, not IVP. Let’s set Then we have original equations Real boundary condition is We have to find s such that From some arbitrary initial guess s0, get a converged value sn by iterative method. Let’s employ Newton’s method s : arbitrary intial condition

6 Shooting Method for Falkner-Skan Eqn. (IV)
6 The Falkner-Skan equation If we differentiate both sides of equation Then we have variational equations Runge-Kutta method : to integrate original & variational equations to get

7 Shooting Method for Falkner-Skan Eqn. (V)
7 FORTRAN Program (I)

8 Shooting Method for Falkner-Skan Eqn. (VI)
8 FORTRAN Program

9 Shooting Method for Falkner-Skan Eqn. (VII)
9 FORTRAN Program (II)

10 Shooting Method for Falkner-Skan Eqn. (VIII)
10 FORTRAN Program (III)

11 Numerical Method (I) For non-similar flows Finite Difference
11 For non-similar flows We have to solve PDE numerically. Computer solves Difference Equation, not Differential Equation. Finite Difference We divide the space into NM points with spacing (Δx, Δy)

12 Numerical Method (II) Finite Difference : cont’d
12 Finite Difference : cont’d For first partial derivative For second derivative forward difference backward difference central difference

13 Numerical Method (III)
13 Finite Difference : cont’d

14 Numerical Method (IV) 14 Finite Difference : cont’d

15 Numerical Method (V) Simplified example : Advection/Heat equation
15 Simplified example : Advection/Heat equation Finite differencing gives Explicit scheme : marching with respect to x

16 Numerical Method (VI) Before going further …
16 Before going further … We have to consider stability & accuracy. Error Round-off error : finite number of digit used in computer Truncation error : higher-order terms from finite difference Stability : Due to many arithmetic operations, errors may accumulate to become infinite. von Neumann’s stability analysis For advection/heat equation, let’s assume the solution form as (This assumption is valid, because the equation is linear.) In finite difference form,

17 Numerical Method (VII)
17 Von Neumann’s stability analysis : cont’d Substituting into In finite difference form, Stability of the solution requires This gives Thus, for explicit scheme, Δx (or Δt) should be not be made arbitrarily large. Note, implicit scheme is unconditionally stable.

18 Numerical Method (VIII)
18 Implicit scheme Reconsider finite differencing of diffusion term, This equation can’t be solved separately.  Inversion of Tri-diagonal matrix unknown Tri-Diagonal Matrix

19 Numerical Method (IX) Crank-Nicolson scheme : Explicit + Implicit
19 Crank-Nicolson scheme : Explicit + Implicit Advantages Absolutely stable 2nd order accurate Truncation error for explicit : Truncation error for implicit : Truncation error for C-N :

20 Numerical Method (X) For non-linear N-S equation : beyond this course
20 For non-linear N-S equation : beyond this course There are many schemes, for example, Convection term : upwind Diffusion : Crank-Nicolson Pressure correction : Fractional Step (Runge-Kutta) Stability analysis is not applicable in nonlinear equation.


Download ppt "6th Lecture : Numerical Methods"

Similar presentations


Ads by Google