Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Seite - 269 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 269 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 269 -

Bild der Seite - 269 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 269 -

8.5 RateofConvergence 269 where Fn is a short notation for F(tn). Equation (8.81) is linear in the unknown un+1, so wecaneasily solve for thisquantity: un+1 = (2mun+(b 2 Δt−m)un−1 +Δt2(Fn−s(un)))(m+ b 2 Δt)−1 . (8.82) As in the case withoutdamping,we need to derivea special formula foru1. The initial condition u′(0) = 0 implies also now that u−1 = u1, and with (8.82) for n=0,weget u1 =u0+Δt 2 2m (F0−s(u0)). (8.83) In themoregeneralcasewith anonlineardampingtermf(u′), mu′′+f(u′)+s(u)=F(t), weget m un+1−2un+un−1 Δt2 +f(u n+1−un−1 2Δt )+s(un)=Fn, which is a nonlinearalgebraicequation forun+1 that must be solved bynumerical methods.Amuchmoreconvenientschemearises fromusingabackwarddifference foru′, u′(tn)≈ u n−un−1 Δt , because the dampingtermwill thenbeknown, involvingonlyun andun−1, andwe caneasily solve forun+1. The downside of the backward difference compared to the centered differ- ence (8.80) is that it reduces the order of the accuracy in the overall scheme from Δt2 toΔt. In fact, theEuler-Cromerschemeevaluatesanonlineardampingtermas f(vn)whencomputingvn+1,andthis isequivalenttousingthebackwarddifference above. Consequently, the convenience of the Euler-Cromer scheme for nonlinear damping comes at a cost of lowering the overall accuracy of the scheme from second to first order inΔt. Using the same trick in the finite difference scheme for the second-orderdifferential equation, i.e., using the backwarddifference inf(u′), makes this scheme equallyconvenientandaccurate as the Euler-Cromerscheme in thegeneralnonlinearcasemu′′+f(u′)+s(u)=F. 8.5 RateofConvergence In this chapter, we have seen how the numerical solutions improve as the time step Δt is reduced, just like we would expect. Thinking back on numerical computation of integrals (Chap. 6), we experienced the same when reducing the
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python