Lecture 34 Ordinary Differential Equations BVP - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Lecture 34 Ordinary Differential Equations BVP

Description:

Construct the auxiliary equations. Nonlinear Shooting with Newton's Method ... ux(a,t) = 0. ux(0,t) = 0. Insulated Boundary. No heat flux at x = a. x = a. xn 1 ... – PowerPoint PPT presentation

Number of Views:1355
Avg rating:3.0/5.0
Slides: 49
Provided by: San59
Category:

less

Transcript and Presenter's Notes

Title: Lecture 34 Ordinary Differential Equations BVP


1
Lecture 34 - Ordinary Differential Equations -
BVP
  • CVEN 302
  • November 28, 2001

2
Systems of Ordinary Differential Equations - BVP
  • Shooting Method for Nonlinear BVP
  • Finite Difference Method
  • Partial Differential Equations

3
Shooting Method for Nonlinear ODE-BVPs
  • Nonlinear
  • ODE
  • Consider
    with guessed slope t
  • Use the difference between u(b) and yb to adjust
    u(a)
  • m(t) u(b, t) - yb is a function of the guessed
    value t
  • Use secant method or Newton method to find the
    correct t value with m(t) 0

4
Nonlinear Shooting Based on Secant Method
  • Nonlinear
  • ODE

5
MATLAB Example in Nonlinear Shooting Method
  • Nonlinear shooting with secant method
  • Convert to two first-order ODE-IVPs
  • Update t using the secant method

6
Nonlinear Shooting - Secant Method
y(x)
y(x)
7
Nonlinear Shooting Based on Newtons Method
  • Nonlinear
  • ODE
  • Check for convergence of m(t)

8
Nonlinear Shooting Based on Newtons Method
  • Nonlinear
  • ODE-IVP
  • Chain
  • Rule

0
x and t are independent
9
Nonlinear Shooting with Newtons Method
  • Solve ODE-IVP
  • Construct the auxiliary equations

10
Nonlinear Shooting with Newtons Method
  • Calculate m(t) -- deviation from the exact BC
  • Update t by Newtons method

11
Finite-Difference Methods
  • Divide the interval of interest into subintervals
  • Replace the derivatives by appropriate
    finite-difference approximations in Chapter 11
  • Solve the system of algebraic equations by
    methods in Chapters 3 and 4
  • For nonlinear ODEs, methods in Chapter 5 may be
    used

12
Finite-Difference Method
  • General Two-Point BVPs
  • Replace the derivatives by appropriate
    finite-difference approximations

13
Finite-Difference Method
  • Central difference approximations
  • Tridiagonal system

14
Finite-Difference Method
  • Central Difference gt Tridiagonal system

15
Finite-Difference Method for Nonlinear BVPs
  • Nonlinear ODE-BVPs
  • Evaluate fi by appropriate finite-difference
    approximations

16
Finite-Difference Method for Nonlinear BVPs
  • SOR method
  • Iterative solution
  • Convergence criterion

17
Example 14.12 - MATLAB
  • Note error in Text

fi negative sign
18
Chapter 15
  • Partial Differential Equations

19
Classification of PDEs
  • General form of linear second-order PDEs with two
    independent variables
  • linear PDEs a, b, c,.,g f(x,y) only

20
Heat Equation Parabolic PDE
  • Heat transfer in a one-dimensional rod

x 0
x a
g1(t)
g2(t)
21
Discretize the solution domain in space and time
with h ?x and k ?t
t
Time (j index)
x
space (i index)
22
Initial and Boundary Conditions
Explicit Euler method
u(a, t) g2(t)
u(0, t) g1(t)
Initial conditions u(x,0) f(x)
23
Heat Equation
  • Finite-difference

t
tj1
u(x,t)
(i,j1)
t
tj
(i,j)
(i1,j)
(i-1,j)
x
xi
xi1
xi-1
x
Forward-difference Central-difference at time
level j
24
Explicit Method
  • Explicit Euler method for heat equation
  • Rearrange

Stability
25
Explicit Euler Method
  • Stable
  • Unstable (negative coefficients)

26
Heat Equation Explicit Euler Method
r 0.5
27
Example Explicit Euler Method
  • Heat Equation (Parabolic PDE)
  • c 0.5, h 0.25, k 0.05

2
60e -2t
20e -t
1
0
1
2
3
4
0
20 40 x
28
Example
  • Explicit Euler method
  • First step t 0.05

29
  • Second step t 0.10

29.61
40
47.72
60e -2t
20e -t
30
40
50
1
2
3
4
0
20 40 x
30
Heat Equation Time-dependent BCs
r 0.4
31
Numerical Stability
  • Stability for Explicit Euler Method
  • It can be shown by Von Neumann analysis that
  • Switch to Implicit method to avoid instability

32
Explicit Euler Method Stability
r 1
Unstable !!
33
Implicit Euler method
Unconditionally Stable
u(a, t) g2(t)
u(0, t) g1(t)
Initial conditions u(x,0) f(x)
34
Implicit Method
  • Finite-difference

t
(i1,j1)
(i-1,j1)
(i,j1)
tj1
T(x,t)
t
tj
(i,j)
x
xi
xi1
xi-1
x
Forward-difference Central-difference at time
level j1
35
Implicit Euler Method
  • Implicit Euler method for heat equation
  • Tridiagonal matrix (Thomas algorithm)
  • Unconditionally stable

36
Implicit Euler Method
r 2
Unconditionally stable
37
Example Implicit Euler Method
  • Heat Equation (Parabolic PDE)
  • c 0.5, h 0.25, k 0.1

1
60e -2t
20e -t
0
1
2
3
4
0
20 40 x
38
Example
  • Implicit Euler method

39
  • Solve the tridiagonal matrix

28.96
38.51
46.19
1
60e -2t
20e -t
0
1
2
3
4
0
20 40 x
40
Crank-Nicolson method
Implicit Euler method first-order in
time Crank-Nicolson second-order in time
u(a, t) g2(t)
u(0, t) g1(t)
Initial conditions u(x,0) f(x)
41
Crank-Nicolson Method
  • Crank-Nicolson method for heat equation
  • Average between two time levels
  • Tridiagonal matrix
  • Unconditionally stable (neutrally stable)
  • Oscillation may occur

42
General Two-Level Method
  • General two-stage method for heat equation
  • Weighted-average of spatial derivatives between
    two time levels n and n1

43
Example Crank-Nicolson Method
  • Heat Equation (Parabolic PDE)
  • c 0.5, h 0.25, k 0.1

1
60e -2t
20e -t
0
1
2
3
4
0
20 40 x
44
Example
  • Crank-Nicolson method
  • Tridiagonal matrix (r 0.8)

45
  • Solve the tridiagonal matrix

29.42
39.30
47.43
1
60e -2t
20e -t
0
1
2
3
4
0
20 40 x
46
Implicit Euler method
r 2
Unconditionally stable
47
Heat Equation with Insulated Boundary
  • No heat flux at x 0 and x a

x 0
x a
ux(a,t) 0
ux(0,t) 0
48
Insulated Boundary
  • No heat flux at x a

ux(a,t)0
xn1
xn-1
xn
x a
Write a Comment
User Comments (0)
About PowerShow.com