Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 138 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 138 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 138 -

Image of the Page - 138 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 138 -

138 4 SolvingOrdinaryDifferentialEquations Fig.4.23 Comparison of the Runge-Kutta-Fehlberg adaptivemethod against the Euler-Cromer scheme fora long timesimulation (200periods) Note that the time_intervals_per_period argument refers to the time points where we want the solution. These points are also the ones used for numerical computationsintheodespy.EulerCromersolver,whiletheodespy.RKFehlberg solverwill use anunknownset of timepoints since the time intervals are adjusted as themethodruns.Onecaneasily lookat thepointsactuallyusedbythemethodas theseareavailableasanarraysolver.t_all(butplottingorexaminingthepoints requiresmodifications inside thecomparemethod). Figure 4.23 shows a computational example where the Runge-Kutta-Fehlberg methodisclearlysuperior to theEuler-Cromerschemeinlongtimesimulations,but thecomparison isnot really fairbecause theRunge-Kutta-Fehlbergmethodapplies about twice asmany timesteps in this computationandperformsmuchmorework per time step. It is quite a complicated task to compare two so differentmethods in a fairway so that the computationalwork versus accuracy is scientificallywell reported. 4.3.7 The4th-OrderRunge-KuttaMethod The4th-orderRunge-Kuttamethod (RK4) is clearly themostwidely usedmethod to solveODEs. Its power comes fromhigh accuracy evenwith not so small time steps.
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python