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

Page - 257 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Image of the Page - 257 -

Image of the Page - 257 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Text of the Page - 257 -

8.4 Oscillating1DSystems:ASecondOrderODE 257 theEuler-Cromermethod(error∼Δt)or thesecond-orderRunge-Kutta,orHeun’s, method(error∼Δt2). Note that the fourth-orderRunge-Kuttamethod is fully explicit so there is never any need to solve linear or nonlinear algebraic equations, regardless of what f looks like. However, the stability is conditionaland dependsonf . There is a large familyof implicit Runge-Kuttamethods thatare unconditionallystable,but require solutionof algebraic equations involvingf at each time step. The Odespypackage has support for a lot of sophisticated explicit Runge-Kutta methods, but not yet implicitRunge-Kuttamethods. 8.4.8 MoreEffects:Damping,Nonlinearity,andExternalForces Ourmodelproblemu′′+ω2u=0 is the simplest possible mathematicalmodel for oscillating systems. Nevertheless, this model makes strong demands to numerical methods, as we have seen, and is very useful as a benchmark for evaluating the performanceofnumericalmethods. Real-life applications involve more physical effects, which lead to a differential equation with more terms and also more complicated terms. Typically, one has a damping force f(u′) and a spring force s(u). Both these forces may depend nonlinearlyon their argument,u′ oru. In addition, environmental forcesF(t)may act on the system. For example, the classical pendulum has a nonlinear “spring” or restoring force s(u) ∼ sin(u), and air resistance on the pendulum leads to a damping forcef(u′)∼ |u′|u′. Examples on environmental forces include shaking of the ground (e.g., due to an earthquake) as well as forces from waves and wind. With three types of forces on the system: F, f , and s, the sum of forces is written F(t)− f(u′)− s(u). Note the minus sign in front of f and s, which indicates that these functions are defined such that they represent forces acting against the motion. For example, springs attached to the wheels in a car are combined with effective dampers, each providing a damping force f(u′) = bu′ that acts against the spring velocity u′. The corresponding physical force is then −f: −bu′, which points downwards when the spring is being stretched (and u′ pointsupwards),while−f actsupwardswhen thespring isbeingcompressed(and u′ pointsdownwards). Figure 8.28 shows an example of a mass m attached to a potentially nonlinear spring and dashpot, and subject to an environmental forceF(t). Nevertheless, our generalmodelcanequallywell beapendulumas in Fig.8.29with s(u)=mgsinθ and f(u˙) = 12CDA θ˙|θ˙| (where CD = 0.4, A is the cross sectional area of the body,and is thedensityofair). Newton’s second lawfor thesystemcanbewrittenwithmass timesacceleration on the left-handside and the forceson the right-handside: mu′′ =F(t)−f(u′)−s(u).
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition"
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
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python