Page - 290 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
Image of the Page - 290 -
Text of the Page - 290 -
290 9 SolvingPartialDifferentialEquations
9.2 FiniteDifferenceMethods
We shall now construct a numerical method for the diffusion equation. We know
how to solve ODEs, so in a way we are able to deal with the time derivative.
Very often in mathematics, a new problem can be solved by reducing it to a series
of problems we know how to solve. In the present case, it means that we must
do something with the spatial derivative ∂2/∂x2 in order to reduce the PDE to
ODEs. One important technique for achieving this, is based on finite difference
discretizationof spatialderivatives.
9.2.1 ReductionofaPDEtoaSystemofODEs
Introducea spatial mesh inΩ withmesh points
x0 =0<x1 <x2 < · · ·<xN =L.
Thespacebetweentwomeshpointsxi andxi+1, i.e. the interval [xi,xi+1], is called
acell.Weshallhere, forsimplicity,assumethateachcellhas thesamelengthΔx=
xi+1−xi, i=0,.. .,N−1.
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
- Title
- Programming for Computations – Python
- Subtitle
- A Gentle Introduction to Numerical Simulations with Python 3.6
- Volume
- Second Edition
- Authors
- Svein Linge
- Hans Petter Langtangen
- Publisher
- Springer Open
- Date
- 2020
- Language
- English
- License
- CC BY 4.0
- ISBN
- 978-3-319-32428-9
- Size
- 17.8 x 25.4 cm
- Pages
- 356
- Keywords
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Category
- Informatik