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 - 265 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

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

Bild der Seite - 265 -

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

Text der Seite - 265 -

8.4 Oscillating1DSystems:ASecondOrderODE 265 If there is no external excitation force acting on the body, we have the equation ofmotion mu′′+μmgsign(u′)+kα−1 tanh(αu)=0 . Let us simulate a situation where a body of mass 1 kg slides on a surface with μ = 0.4, while attached to a spring with stiffness k = 1000 kg/s2. The initial displacement of the body is 10 cm, and theα parameter in s(u) is set to 60 1/m. Using theEulerCromer functionfromtheosc_EC_generalcode,we can write a functionsliding_frictionfor solving thisproblem: def sliding_friction(): from numpy import tanh, sign f = lambda v: mu*m*g*sign(v) alpha = 60.0 s = lambda u: k/alpha*tanh(alpha*u) F = lambda t: 0 g = 9.81 mu = 0.4 m = 1 k = 1000 U_0 = 0.1 V_0 = 0 T = 2 dt = T/5000. u, v, t = EulerCromer(f=f, s=s, F=F, m=m, T=T, U_0=U_0, V_0=V_0, dt=dt) plot_u(u, t) Running thesliding_frictionfunctiongives us the results in Fig. 8.34 with s(u)= kα−1 tanh(αu) (left) and the linearizedversion s(u)= ku (right).
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