Finite difference discretization
A basic model for vibrations
A centered finite difference scheme
Implementation
Making a solver function
Verification
Scaled model
Visualization of long time simulations
Using a moving plot window
Making animations
Using Bokeh to compare graphs
Using a line-by-line ascii plotter
Empirical analysis of the solution
Analysis of the numerical scheme
Deriving a solution of the numerical scheme
The error in the numerical frequency
Empirical convergence rates and adjusted \( \omega \)
Exact discrete solution
Convergence
The global error
Stability
About the accuracy at the stability limit
Alternative schemes based on 1st-order equations
The Forward Euler scheme
The Backward Euler scheme
The Crank-Nicolson scheme
Comparison of schemes
Runge-Kutta methods
Analysis of the Forward Euler scheme
Energy considerations
Derivation of the energy expression
An error measure based on energy
The Euler-Cromer method
Forward-backward discretization
Equivalence with the scheme for the second-order ODE
Implementation
The Stoermer-Verlet algorithm
Staggered mesh
The Euler-Cromer scheme on a staggered mesh
Implementation of the scheme on a staggered mesh
Exercises and Problems
Problem 1: Use linear/quadratic functions for verification
Exercise 2: Show linear growth of the phase with time
Exercise 3: Improve the accuracy by adjusting the frequency
Exercise 4: See if adaptive methods improve the phase error
Exercise 5: Use a Taylor polynomial to compute \( u^1 \)
Problem 6: Derive and investigate the velocity Verlet method
Problem 7: Find the minimal resolution of an oscillatory function
Exercise 8: Visualize the accuracy of finite differences for a cosine function
Exercise 9: Verify convergence rates of the error in energy
Exercise 10: Use linear/quadratic functions for verification
Exercise 11: Use an exact discrete solution for verification
Exercise 12: Use analytical solution for convergence rate tests
Exercise 13: Investigate the amplitude errors of many solvers
Problem 14: Minimize memory usage of a simple vibration solver
Problem 15: Minimize memory usage of a general vibration solver
Exercise 16: Implement the Euler-Cromer scheme for the generalized model
Problem 17: Interpret \( [D_tD_t u]^n \) as a forward-backward difference
Exercise 18: Analysis of the Euler-Cromer scheme
Generalization: damping, nonlinearities, and excitation
A centered scheme for linear damping
A centered scheme for quadratic damping
A forward-backward discretization of the quadratic damping term
Implementation
Verification
Visualization
User interface
The Euler-Cromer scheme for the generalized model
The Stoermer-Verlet algorithm for the generalized model
A staggered Euler-Cromer scheme for a generalized model
The PEFRL 4th-order accurate algorithm
Exercises and Problems
Exercise 19: Implement the solver via classes
Problem 20: Use a backward difference for the damping term
Exercise 21: Use the forward-backward scheme with quadratic damping
Applications of vibration models
Oscillating mass attached to a spring
General mechanical vibrating system
A sliding mass attached to a spring
A jumping washing machine
Motion of a pendulum
Dynamic free body diagram during pendulum motion
Motion of an elastic pendulum
Vehicle on a bumpy road
Bouncing ball
Two-body gravitational problem
Electric circuits
Exercises
Exercise 22: Simulate resonance
Exercise 23: Simulate oscillations of a sliding box
Exercise 24: Simulate a bouncing ball
Exercise 25: Simulate a simple pendulum
Exercise 26: Simulate an elastic pendulum
Exercise 27: Simulate an elastic pendulum with air resistance
Exercise 28: Implement the PEFRL algorithm
References