Download presentation
Presentation is loading. Please wait.
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 y b to adjust u’(a) m(t) = u(b, t) - y b 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 Newton’s Method Nonlinear ODE Check for convergence of m(t)
8
Nonlinear Shooting Based on Newton’s Method Nonlinear ODE-IVP Chain Rule x and t are independent 0
9
Nonlinear Shooting with Newton’s Method Solve ODE-IVP Construct the auxiliary equations
10
Nonlinear Shooting with Newton’s Method Calculate m(t) -- deviation from the exact BC Update t by Newton’s 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 xixi x i-1 x i+1 hhhh
13
Finite-Difference Method Central difference approximations Tridiagonal system
14
Finite-Difference Method Central Difference ==> Tridiagonal system
15
Finite-Difference Method for Nonlinear BVPs Nonlinear ODE-BVPs Evaluate f i by appropriate finite-difference approximations xixi x i-1 x i+1 hhhh
16
Finite-Difference Method for Nonlinear BVPs SOR method Iterative solution Convergence criterion
17
Example 14.12 - MATLAB Note error in Text f i : 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 = 0x = a g 1 (t)g 2 (t)
21
Discretize the solution domain in space and time with h = x and k = t Time (j index) space (i index) x t
22
Initial and Boundary Conditions Initial conditions : u(x,0) = f(x) u(0, t) = g 1 (t) u(a, t) = g 2 (t) Explicit Euler method
23
Heat Equation Finite-difference (i,j)(i+1,j)(i-1,j) (i,j+1) u(x,t) x x t t xixi x i+1 x i-1 tjtj t j+1 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 12340 20 + 40 x 60e -2t 20e -t 0 1 2
28
Example Explicit Euler method First step: t = 0.05
29
Second step: t = 0.10 12340 20 + 40 x 60e -2t 20e -t 304050 29.614047.72
30
Heat Equation: Time-dependent BCs r = 0.4
31
Stability for Explicit Euler Method It can be shown by Von Neumann analysis that Switch to Implicit method to avoid instability Numerical Stability
32
Explicit Euler Method: Stability Unstable !! r = 1
33
Implicit Euler method Initial conditions : u(x,0) = f(x) u(0, t) = g 1 (t) u(a, t) = g 2 (t) Unconditionally Stable
34
Implicit Method Finite-difference (i,j) (i+1,j+1)(i-1,j+1)(i,j+1) T(x,t) x x t t xixi x i+1 x i-1 tjtj t j+1 Forward-difference Central-difference at time level j+1
35
Implicit Euler Method Implicit Euler method for heat equation Tridiagonal matrix (Thomas algorithm) Unconditionally stable
36
Implicit Euler Method Unconditionally stable r = 2
37
Example: Implicit Euler Method Heat Equation (Parabolic PDE) c = 0.5, h = 0.25, k = 0.1 12340 20 + 40 x 60e -2t 20e -t 0 1
38
Example Implicit Euler method
39
Solve the tridiagonal matrix 12340 20 + 40 x 60e -2t 20e -t 0 1 28.9638.5146.19
40
Crank-Nicolson method Initial conditions : u(x,0) = f(x) u(0, t) = g 1 (t) u(a, t) = g 2 (t) Implicit Euler method : first-order in time Crank-Nicolson : second-order in time
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 n+1
43
Example: Crank-Nicolson Method Heat Equation (Parabolic PDE) c = 0.5, h = 0.25, k = 0.1 12340 20 + 40 x 60e -2t 20e -t 0 1
44
Example Crank-Nicolson method Tridiagonal matrix (r = 0.8)
45
Solve the tridiagonal matrix 12340 20 + 40 x 60e -2t 20e -t 0 1 29.4239.3047.43
46
Implicit Euler method Unconditionally stable r = 2
47
Heat Equation with Insulated Boundary No heat flux at x = 0 and x = a x = 0x = a u x (a,t) = 0 u x (0,t) = 0
48
Insulated Boundary No heat flux at x = a x = a x n+1 x n-1 xnxn u x (a,t)=0
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.