$$ \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\Oof}[1]{\mathcal{O}(#1)} $$

 

 

 

Finite difference methods for vibration problems

Hans Petter Langtangen [1, 2]

[1] Center for Biomedical Computing, Simula Research Laboratory
[2] Department of Informatics, University of Oslo

Nov 12, 2014

Note: PRELIMINARY VERSION (expect typos)

Table of contents

Finite difference discretization
      A basic model for vibrations
      A centered finite difference scheme
            Step 1: Discretizing the domain
            Step 2: Fulfilling the equation at discrete time points
            Step 3: Replacing derivatives by finite differences
            Step 4: Formulating a recursive algorithm
            Computing the first step
            The computational algorithm
            Operator notation
Implementation
      Making a solver function
            Computing \( u^{\prime} \)
      Verification
            Manual calculation
            Testing very simple solutions
            Checking convergence rates
Long time simulations
      Using a moving plot window
      Making a video
      Using a line-by-line ascii plotter
      Empirical analysis of the solution
Analysis of the numerical scheme
      Deriving a solution of the numerical scheme
      Exact discrete solution
      The global error
      Stability
      About the accuracy at the stability limit
Alternative schemes based on 1st-order equations
Standard methods for 1st-order ODE systems
      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
            Energy of the exact solution
      An error measure based on total energy
The Euler-Cromer method
      Forward-backward discretization
      Equivalence with the scheme for the second-order ODE
      Implementation
      The velocity Verlet algorithm
Generalization: damping, nonlinear spring, and external excitation
      A centered scheme for linear damping
      A centered scheme for quadratic damping
      A forward-backward discretization of the quadratic damping term
      Implementation
      Verification
            Constant solution
            Linear solution
            Quadratic solution
      Visualization
      User interface
      The Euler-Cromer scheme for the generalized model
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 \)
      Exercise 6: Find the minimal resolution of an oscillatory function
      Exercise 7: Visualize the accuracy of finite differences for a cosine function
      Exercise 8: Verify convergence rates of the error in energy
      Exercise 9: Use linear/quadratic functions for verification
      Exercise 10: Use an exact discrete solution for verification
      Exercise 11: Use analytical solution for convergence rate tests
      Exercise 12: Investigate the amplitude errors of many solvers
      Exercise 13: Minimize memory usage of a vibration solver
      Exercise 14: Implement the solver via classes
      Exercise 15: Interpret \( [D_tD_t u]^n \) as a forward-backward difference
      Exercise 16: Use the forward-backward scheme with quadratic damping
      Exercise 17: Use a backward difference for the damping term
      Exercise 18: Simulate a bouncing ball
      Exercise 19: Simulate an elastic pendulum
      Exercise 20: Analysis of the Euler-Cromer scheme
References

Vibration problems lead to differential equations with solutions that oscillate in time, typically in a damped or undamped sinusoidal fashion. Such solutions put certain demands on the numerical methods compared to other phenomena whose solutions are monotone. Both the frequency and amplitude of the oscillations need to be accurately handled by the numerical schemes. Most of the reasoning and specific building blocks introduced in the fortcoming text can be reused to construct sound methods for partial differential equations of wave nature in multiple spatial dimensions.

Read »