Seite - 163 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Bild der Seite - 163 -
Text der Seite - 163 -
5.1 FiniteDifferenceMethods 163
What about the source termg in our examplewith temperature distribution in
a rod? g.x;t/models heat generation inside the rod. Onecould thinkof chemical
reactions at amicroscopic level in somematerials as a reason to includeg. How-
ever, inmostapplicationswith temperatureevolution,g is zeroandheatgeneration
usually takesplaceat theboundary(as inourexamplewithu.0;t/D s.t/).
Before continuing,wemayconsider an exampleof how the temperature distri-
butionevolves in the rod. At time t D 0,weassume that the temperature is10ıC.
Thenwe suddenly apply a device atx D 0 that keeps the temperature at50ı Cat
this end. What happens inside the rod? Intuitively, you think that the heat genera-
tionat theendwillwarmup thematerial in thevicinityofxD0, andas timegoes
by,moreandmoreof therodwill beheated,before theentire rodhasa temperature
of50ıC(recall thatnoheat escapes fromthesurfaceof the rod).
Mathematically, (with the temperature inKelvin) this examplehasI.x/D 283
K, except at the end point: I.0/ D 323K, s.t/ D 323K, andg D 0. Thefigure
belowshowssnapshotsfromfourdifferenttimesintheevolutionofthetemperature.
5.1 FiniteDifferenceMethods
Weshall nowconstruct a numericalmethod for the diffusion equation. We know
how to solve ordinary differential equations, so in awaywe are able to dealwith
the time derivative. Very often inmathematics, 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
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python
- Titel
- Programming for Computations – Python
- Untertitel
- A Gentle Introduction to Numerical Simulations with Python
- Autoren
- Svein Linge
- Hans Petter Langtangen
- Verlag
- Springer Open
- Datum
- 2016
- Sprache
- englisch
- Lizenz
- CC BY-NC 4.0
- ISBN
- 978-3-319-32428-9
- Abmessungen
- 17.8 x 25.4 cm
- Seiten
- 248
- Schlagwörter
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Kategorie
- Informatik