You are on page 1of 42

Tema 8: The Method of Lines (MOL)

SIMULACIÓN NUMERICA EN I. AEROESPACIAL


Index
Index

Introduction
1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion
4 Examples
equation
Example 3: Example 1: Advection equation
Advection-
Diffusion-Reaction
equation
Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 2/42


Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 3/42


Introduction
Index In this unit we propose the Method of Lines (MOL) for solving
Introduction time-dependent PDEs. We numerically solve some physically relevant
Basic MOL PDEs that can be derived based on principles of conservation:
Basic Stability

Examples
The Advection equation
Example 1:
Advection equation
ut = −νux
Example 2:
Advection-Diffusion
equation The Advection-Diffusion equation (heat equation is the particular case
Example 3:
Advection-
Diffusion-Reaction
ν = 0)
equation
ut = −νux + αuxx
MOL Stability
Linear Differential
Systems The Advection-Diffusion-Reaction equation
Numerical methods
for Systems
MOL
ut = −νux + αuxx + r(u)

In this unit MOL is applied to parabolic problems but also works solving
hyperbolic problems in a similar way
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 4/42
Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 5/42


Basic MOL
Index To introduce the method of lines we consider the simple case of the linear
Introduction advection equation
Basic MOL
ut = −νux 0<x<L t>0
Basic Stability

Examples u(x, 0) = f (x) 0≤x≤L (IC)


Example 1:
Advection equation
Example 2:
u(0, t) = u0 (t) t>0 (BC)
Advection-Diffusion
equation
Example 3:
where ν is a real positive constant representing a velocity. MOL proceeds
Advection-
Diffusion-Reaction
equation
in two separated steps:
MOL Stability
Linear Differential
MOL steps
Systems
Numerical methods
for Systems
MOL
1 Approximation of the spatial derivatives using finite difference formulas.
This transforms the original continuous PDE into a semi-discrete
(discrete in space, continuous in time) system.
2 Time integration of the resulting system numerically (Euler, R-K, etc.)
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 6/42
Basic MOL
Index Define a uniform spatial grid with step-size ∆x = L/m, where m is the
Introduction number of subintervals. Each spatial grid point is xi = i∆x, x0 = 0,
Basic MOL xm = L
Basic Stability

Examples
Example 1:
Advection equation
Example 2:
Advection-Diffusion
equation
Example 3:
Advection-
Diffusion-Reaction
equation

MOL Stability
Linear Differential
Systems
Numerical methods
for Systems
MOL

The colored strip is the domain on which the PDE is defined. MOL
approximations are defined along the dashed lines (xi , t)
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 7/42
Basic MOL
Index MOL proceeds as follows:
Introduction
The PDE holds at each grid point, thus
Basic MOL

Basic Stability ut (xi , t) = −νux (xi , t) i = 1, 2, . . . , m


Examples
Example 1:
Advection equation Replace the spatial derivative by a finite difference formula, e.g.
Example 2:
Advection-Diffusion
equation
Backward formula
Example 3:
Advection-
Diffusion-Reaction u(xi , t) − u(xi−1 , t)
equation ut (xi , t) = −ν i = 1, 2, . . . , m
MOL Stability ∆x
Linear Differential
Systems
Numerical methods Denote u(xi , t) = ui (t). Previous equation is equivalent to
for Systems
MOL
ui (t) − ui−1 (t)
u0i (t) = −ν i = 1, 2, . . . , m
∆x
Remember u0 (t) = u(0, t) is the BC
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 8/42
Basic MOL
Index

Introduction

Basic MOL
Adding IC and BC information we get a semi-discrete system of first
Basic Stability
order ODEs
Examples
−ν
Example 1:
 0 ν
Advection equation
Example 2:  u1 = ∆x−ν
 u1 + ∆x u0 (t) u1 (0) = f (x1 )
Advection-Diffusion  u0 =

(u2 − u1) u2 (0) = f (x2 )
equation 2 ∆x
Example 3:
Advection- ..
Diffusion-Reaction
equation

 .
 0 −ν

MOL Stability um = ∆x (um − um−1 ) um (0) = f (xm )
Linear Differential
Systems
Numerical methods
for Systems
Integrate the system using one of the methods reviewed in Unit 5, for
MOL
example Euler’s method.

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 9/42


Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 10/42


Basic stability
Index

Introduction When a numerical method is applied to solve an ODE or PDE , we hope


Basic MOL the numerical scheme to be accuracy and stable. If we use the Method of
Basic Stability Lines (MOL) to solve a particular PDE the behaviour of the method
Examples depends on
Example 1:
Advection equation
Example 2: the finite difference method used to approximate spatial derivatives
Advection-Diffusion
equation
Example 3: the numerical time integrator method used to solve the semi-discrete
Advection-
Diffusion-Reaction
equation
system
MOL Stability step sizes ∆t and ∆x
Linear Differential
Systems
Numerical methods
for Systems
MOL Next slides show basic stability issues for MOL. In the last section we’ll
introduce the concept of matrix stability in order to have an understanding
knowledge of the behaviour of MOL.

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 11/42


Basic stability
Index Unfortunately, it is not possible to get good numerical results in any case.
Introduction Anyway, it can be proof that the following simple cases are stable when ∆t
Basic MOL is smaller than a value we denote ∆tmax :
Basic Stability

Examples
MOL for the Advection equation
Example 1:
Advection equation
Example 2:
Advection-Diffusion
BD space discretization for ux + Explicit Euler is stable if
equation
Example 3:
Advection- ∆x
Diffusion-Reaction
equation M t ≤ ∆tmax =
ν
MOL Stability
Linear Differential
Systems CD space discretization for ux + Leap-Frog is stable if
Numerical methods
for Systems
MOL
∆x
∆t ≤ ∆tmax =
ν
FD is unstable in any case
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 12/42
Basic Stability
Index MOL for the Advection-Diffusion equation
Introduction

Basic MOL
BD for ux and CD for uxx + Explicit Euler is stable if
Basic Stability

Examples 1
Example 1: ∆t ≤ ∆tmax = ν 2α
Advection equation
Example 2: ∆x + (∆x)2
Advection-Diffusion
equation
Example 3:
Advection-
Diffusion-Reaction
equation MOL for the Advection-Diffusion-Reaction equation
MOL Stability
Linear Differential
Systems
Numerical methods
BD for ux and CD for uxx + Explicit Euler is stable if
for Systems
MOL
1
∆t ≤ ∆tmax = ν 2α β
∆x + (∆x)2
− 2

where the reaction rate r(u) is supposed to be linear r(u) = βu


Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 13/42
Basic stability
Index

Introduction

Basic MOL

Basic Stability

Examples Other MOL schemes are stable for ∆t and ∆x good enough. Nevertheless,
Example 1:
Advection equation there are not general rules, each concrete equation and each combination
Example 2:
Advection-Diffusion
equation
is different.
Example 3:
Advection-
Diffusion-Reaction
equation Some examples are simulated in the next section and stability concepts
MOL Stability
Linear Differential
will be describe in detail at the end of this lesson
Systems
Numerical methods
for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 14/42


Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 15/42


Example 1: Advection equation
Index

Introduction Consider the following Advec-


Basic MOL tion problem
Basic Stability

Examples ut = −ux 0<x<1


Example 1:
Advection equation
Example 2:
Advection-Diffusion
equation
with BC u(0, t) = 0 t > 0.
Example 3:
Advection-
Assume the initial condition is
Diffusion-Reaction
equation a wave of the form
MOL Stability
Linear Differential
Systems u(x, 0) = f (x) =
Numerical methods
for Systems
MOL Figura: Example 1, wave shape Initial
5
Condition
e100(x−0,25) + e−100(x−0,25)

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 16/42


Example 1: Advection equation
Index

Introduction After space-discretization, we obtain the semi-discrete system with m


Basic MOL unknowns ui (t)
Basic Stability
−1
 0
Examples  u1 = ∆x u1 u1 (0) = f (x1 )
−1

 u0 =
∆x (u2 − u1 ) u2 (0) = f (x2 )
Example 1:

Advection equation 2
Example 2:
Advection-Diffusion ..
equation 
 .
Example 3:  0 −1

Advection-
Diffusion-Reaction um = ∆x (um − um−1 ) um (0) = f (xm )
equation

MOL Stability
Linear Differential
where ∆x = 1/m is the space step size. We can numerically solve this
Systems
Numerical methods system with Euler’s method with certain ∆t.
for Systems
MOL

If ∆x, ∆t are small enough and the method is stable, the numerical
solution should be close to the analytical solution (see next figure ).

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 17/42


Example 1: Advection equation
Index

Introduction

Basic MOL

Basic Stability

Examples
Example 1:
Advection equation
Example 2:
Advection-Diffusion
equation
Example 3:
Advection-
Diffusion-Reaction
equation

MOL Stability
Linear Differential
Systems
Numerical methods
for Systems
MOL

Figura: Example 1, Analytical solution for the advection equation is


u(x, t) = u(x − νt, 0). The wave moves to the right with constant velocity ν = 1
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 18/42
Example 1: Advection equation
Index

Introduction

Basic MOL

Basic Stability
Next graphics show numerical results solving example 1 using 2-point
Examples
Example 1: Backward Differences for space-discretization and explicit Euler method
Advection equation
Example 2:
Advection-Diffusion
for time integration. The plotted times are t = 0, 0,25, 0,5 (MATLAB)
equation
Example 3:
Advection-
Diffusion-Reaction
equation
Matlab simulation graphs were extracted from: Wouwer A.V., Sauez P.
MOL Stability and Vilas C. Simulation of ODE/PDE Models with MATLAB, OCTAVE
Linear Differential
Systems and SCILAB. Springer (eBook)
Numerical methods
for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 19/42


Example 1: Advection equation
Index

Introduction

Basic MOL

Basic Stability Numerical solution for


Examples ∆t = ∆tmax = ∆x/ν
Example 1:
Advection equation using 2-point BD for
Example 2:
Advection-Diffusion
equation
space-discretization and
Example 3:
Advection- Euler for time integra-
Diffusion-Reaction
equation tion.
MOL Stability
Linear Differential
Systems
Numerical methods Numerical result is ex-
for Systems
MOL cellent

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 20/42


Example 1: Advection equation
Index

Introduction

Basic MOL Numerical solution for


Basic Stability ∆t = 0, 95∆x/ν <
Examples
Example 1:
∆tmax using 2-point BD
Advection equation
Example 2: for space-discretization
Advection-Diffusion
equation and Euler for time inte-
Example 3:
Advection-
Diffusion-Reaction gration.
equation

MOL Stability
Linear Differential
Systems
Numerical result is sta-
Numerical methods
for Systems ble but not accurate
MOL
(wave attenuates)

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 21/42


Example 1: Advection equation
Index

Introduction

Basic MOL

Basic Stability
Numerical solution for
Examples ∆t = 1, 05∆x/ν >
Example 1:
Advection equation ∆tmax using 2-point BD
Example 2:
Advection-Diffusion
equation
for space-discretization
Example 3:
Advection-
and Euler for time inte-
Diffusion-Reaction
equation gration.
MOL Stability
Linear Differential
Systems
Numerical methods
Numerical result is uns-
for Systems
MOL table

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 22/42


Example 2: Advection-Diffusion equation
Index

Introduction

Basic MOL Consider the Advection-Diffusion equation


Basic Stability

Examples ut = −ux + 0,005uxx 0<x<1 t>0


Example 1:
Advection equation
Example 2:
Advection-Diffusion
with two null boundary conditions u(0, t) = u(1, t) = 0 for t > 0 . Assume
equation
Example 3: the initial condition is
Advection-
Diffusion-Reaction
equation
5
MOL Stability u(x, 0) = = f (x) 0≤x≤1
Linear Differential e100(x−0,25) + e−100(x−0,25)
Systems
Numerical methods
for Systems
MOL
We applied MOL with BD approximation to ux and CD approximation to
second space derivative uxx ;

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 23/42


Example 2: Advection-Diffusion equation
Index

Introduction
ui (t) denotes u(xi , t), u0 (t) = u(x0 , t) = 0 and um (t) = u(xm , t) = 0.
Basic MOL
The semi-discrete system obtained has (m − 1) unknowns for
Basic Stability
i = 1, 2, . . . (m − 1). Each equation is
Examples
Example 1:
Advection equation
−1 0, 005
Example 2:
Advection-Diffusion u0i = (ui − ui−1 ) + (ui+1 − 2ui + ui−1 )
equation ∆x ∆x2
Example 3:
Advection-
Diffusion-Reaction
equation with initial condition ui (0) = f (xi )
MOL Stability If Explicit Euler is applied to integrate the system, then, stability
Linear Differential
Systems
Numerical methods
requirement is
for Systems 1
MOL ∆t ≤ ∆tmax = 1 0,01
∆x + ∆x2

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 24/42


Example 2: Advection-Diffusion equation
Index

Introduction Numerical solution of


Basic MOL Example 2 using BD for
Basic Stability
the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2: point centered FDs for
Advection-Diffusion
equation
Example 3:
the second order deri-
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = ∆tmax .
Numerical methods
for Systems
MOL
Numerical result is ex-
cellent

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 25/42


Example 2: Advection-Diffusion equation
Index

Introduction Numerical solution of


Basic MOL Example 2 using BD for
Basic Stability the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2:
point centered FDs for
Advection-Diffusion
equation the second order deri-
Example 3:
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = 0, 1∆tmax .
Numerical methods
for Systems
MOL
Numerical result is sa-
tisfactory

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 26/42


Example 2: Advection-Diffusion equation
Index

Introduction Numerical solution of


Basic MOL Example 2 using BD for
Basic Stability
the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2: point centered FDs for
Advection-Diffusion
equation
Example 3:
the second order deri-
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = 1, 0027∆tmax .
Numerical methods
for Systems
MOL
Numerical result is uns-
table

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 27/42


Example 3: Advection-Diffusion-Reaction equation
Index We add to Example 2 a reaction term r(u) = −5u:
Introduction

Basic MOL ut = −ux + 0,005uxx − 5u 0<x<1 t>0


Basic Stability

Examples Consider BD approximation to ux and CD approximation to second space


Example 1:
Advection equation
Example 2:
derivative uxx , the linear semi-discrete system has equations
Advection-Diffusion
equation
Example 3: −1 0, 005
Advection- u0i = (ui − ui−1 ) + (ui+1 − 2ui + ui−1 ) − 5ui
Diffusion-Reaction
equation ∆x ∆x2
MOL Stability
Linear Differential
Systems
if i = 1, 2, . . . (m − 1) If Explicit Euler is applied to integrate the system,
Numerical methods
for Systems
then, stability requirement is
MOL

1
∆t ≤ ∆tmax = 1 0,01 5
∆x + ∆x2
+ 2

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 28/42


Example 3: Advection-Diffusion -Reaction equation
Index

Introduction Numerical solution of


Basic MOL Example 3 using BD for
Basic Stability
the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2: point centered FDs for
Advection-Diffusion
equation
Example 3:
the second order deri-
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = ∆tmax .
Numerical methods
for Systems
MOL
Numerical result is ex-
cellent

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 29/42


Example 3: Advection-Diffusion-Reaction equation
Index

Introduction Numerical solution of


Basic MOL Example 3 using BD for
Basic Stability the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2: point centered FDs for
Advection-Diffusion
equation the second order deri-
Example 3:
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = 0, 1∆tmax .
Numerical methods
for Systems
MOL
Numerical result is sa-
tisfactory

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 30/42


Example 3: Advection-Diffusion-Reaction equation
Index

Introduction Numerical solution of


Basic MOL Example 3 using BD for
Basic Stability
the first-order derivati-
Examples
Example 1:
ve (advection term), 3-
Advection equation
Example 2: point centered FDs for
Advection-Diffusion
equation
Example 3:
the second order deri-
Advection-
Diffusion-Reaction vative (diffusion term),
equation

MOL Stability
explicit Euler method
Linear Differential
Systems
and ∆t = 1, 0027∆tmax .
Numerical methods
for Systems
MOL
Numerical result is uns-
table

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 31/42


Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 32/42


MOL Stability
Index As we show in previous unit, MOL schemes depend on both
Introduction
The finite difference approximations to spatial derivatives. Each election
Basic MOL
involves a different MOL scheme. This decision seems to be crucial if we
Basic Stability
want to get good approximations to the evolution problem.
Examples
Example 1:
Advection equation The numerical time integration method for solving the Differential
Example 2:
Advection-Diffusion System. Not every possibility works!
equation
Example 3:
Advection-
Diffusion-Reaction
equation
An unstable numerical scheme would be completely useless. However,
MOL Stability stability analysis is a difficult subject in general. There exists several
Linear Differential
Systems methods to develop stability issues. In this section we consider only
Numerical methods
for Systems
MOL
The linear advection-diffusion-reaction equation
The matrix method
To explain this method we need to review some stability concepts of
numerical methods applied to Differential Linear Systems .
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 33/42
Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 34/42


Linear Differential Systems
Index Consider a Linear Differential System
Introduction
u0 (t) = Au(t) A constant matrix
Basic MOL

Basic Stability We say a solution u(t) is stable if ∀ > 0 there exists δ > 0 s.t. if u? (t) is
Examples other solution s.t ku(0) − u? (0)k < δ, then
Example 1:
Advection equation
Example 2:
Advection-Diffusion
ku(t) − u? (t)k <  ∀t ≥ 0
equation
Example 3:
Advection-
Diffusion-Reaction
We say u(t) is asymptotically stable if ku(t) − u? (t)k tends to zero when t
equation
increases. We say the linear differential system is stable if all its solutions
MOL Stability
Linear Differential are asymptotically stable.
Systems
Numerical methods
for Systems Stability Criteria for Linear Differential Systems
MOL

If Re(λj ) < 0 for all eigenvalue λj of A, then the system is stable. If A is


diagonalizable, Re(λj ) ≤ 0 and Re(λj ) = 0 for some j, then solutions are
stable but not asymptotically
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 35/42
Numerical methods for Systems
Index

Introduction Consider a Linear System


Basic MOL u0 (t) = Au(t)
Basic Stability

Examples
where A is an m × m constant matrix.. For simplicity, assume A is
Example 1:
Advection equation
diagonalizable, i.e., there exists D = diag(λ1 , λ2 , . . . , λm ) diagonal matrix
Example 2:
Advection-Diffusion
and P invertible s.t.
equation
Example 3:
Advection-
Diffusion-Reaction
equation
A = P DP −1 ⇒ P −1 AP = D
MOL Stability
Linear Differential
Systems
Let v(t) = P −1 u(t), thus P −1 u0 (t) = P −1 Au(t) ⇒ v 0 (t) = Dv(t) It
Numerical methods
for Systems
decouples into m independent equations
MOL

vj0 (t) = λj v(t)

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 36/42


Numerical methods for Systems
Index

Introduction

Basic MOL
All that equations are of test type
Basic Stability

Examples
The integration method for the whole system also decouples into the
Example 1:
Advection equation
application of the method to each equation
Example 2:
Advection-Diffusion
equation
For the overall method to be stable, each of the decoupled problem must
Example 3:
Advection-
be stable
Diffusion-Reaction
equation

MOL Stability Stability condition (Systems)


Linear Differential
Systems
Numerical methods
for Systems
The overall method is absolutely stable iff ∆tλj is in the stability region of
MOL
the method for each eigenvalue λj of the matrix A

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 37/42


Index

Introduction 1 Introduction
Basic MOL
2 Basic MOL
Basic Stability

Examples 3 Basic Stability


Example 1:
Advection equation
Example 2:
Advection-Diffusion 4 Examples
equation
Example 3:
Advection-
Example 1: Advection equation
Diffusion-Reaction
equation Example 2: Advection-Diffusion equation
MOL Stability Example 3: Advection-Diffusion-Reaction equation
Linear Differential
Systems
Numerical methods
for Systems
5 MOL Stability
MOL
Linear Differential Systems
Numerical methods for Systems
MOL

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 38/42


MOL
Index There are several methods to study absolute stability for MOL. Matrix
Introduction method is a easy to understand method based on previous stability
Basic MOL concepts.
Basic Stability
For matrix stability analysis proposes we assumes the solution to be a
Examples
Example 1:
periodic signal u(x, t) = u(x + L, t) (we are examining u over a period L).
Advection equation
Example 2: This implicitly assumes periodic Boundary Condition u(0, t) = u(L, t)
Advection-Diffusion
equation
Example 3:
Matrix analysis has the following steps
Advection-
Diffusion-Reaction
equation Matrix analysis. Steps
MOL Stability
Linear Differential
Systems
Numerical methods
1 Derive the semi-discrete system we get after space discretization u0 = Au
for Systems
MOL 2 Compute the eigenvalues λj of A and test the stability of the
semi-discrete system
3 Impose ∆tλj lie in the stability region of the integration time method

Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 39/42


Example: advection equation. Step 1
 
Index −1 1
Introduction
 1 −1 
ν  
Basic MOL Case BD formula for ux A=  1 −1 
∆x  
Basic Stability  ··· 
Examples 1 −1
Example 1:  
Advection equation
Example 2:
−1 1
Advection-Diffusion
equation
 −1 1 
Example 3: ν  
Advection- Case FD formula for ux A=  −1 1 
Diffusion-Reaction
∆x  
equation  ··· 
MOL Stability
Linear Differential 1 −1
Systems  
Numerical methods
for Systems
0 −1 1
MOL 1 0 −1 
ν  
Case CD formula for ux A=  1 0 −1 
2∆x  
 ··· 
−1 1 0
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 40/42
Example: advection equation. Step 2
Index All matrices A are of the form
Introduction  
Basic MOL c1 c2 c3 . . . cm−1 cm
Basic Stability
 cm c1 c2 . . . cm−2 cm−1 
 
cm−1 cm c1 . . . cm−3 cm−2 
Examples A= 
Example 1:
Advection equation
 .. 
Example 2:
 . 
Advection-Diffusion
equation
Example 3:
c2 c3 c4 . . . cm c1
Advection-
Diffusion-Reaction
equation
Eigenvalues can be computed by the following formula
MOL Stability
Linear Differential
Systems m−1  
Numerical methods
X (k − 1)2πj
for Systems λk = cj+1 exp i
MOL
m
j=0

We analyse stability for the first case (BD formula). Other cases are left as
exercises
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 41/42
Example: advection equation. Step 2 and 3
Index Considering BD approximation to ux (details at class):
Introduction
      
ν 2π(k − 1) 2π(k − 1)
Basic MOL λk = cos − 1 − sin i
∆x m m
Basic Stability

Examples Thus all eigenvalues are in the left half complex plane (only λ1 = 0 has
Example 1:
Advection equation null real part). Solutions are stable
Example 2:
Advection-Diffusion
equation
Example 3:
Advection- Finally, step 3 imposes λk ∆t must be inside the stability region of the
Diffusion-Reaction
equation numerical time integration method. If we denote α = (2π(k − 1))/m, then
MOL Stability
Linear Differential ν∆t
Systems λk ∆t = [(cos(α) − 1) + i sin (α)]
Numerical methods
for Systems
∆x
MOL
are in a circle of radius ν∆t/∆x and center (−ν∆t/∆x, 0). If Euler’s
(explicit) method is applied, stability requirement is
ν∆t ∆x
≤ 1 ⇔ ∆t ≤
∆x ν
Grado en I. Aeroespacial Tema 8: The Method of Lines (MOL) Apuntes 42/42

You might also like