The task is to make a simulation program that can predict how a (simple) mechanical system oscillates in response to environmental forces. Introducing u(t) as some displacement of the system at time t, application of Newton's second law of motion to such a mechanical system often results in the following type of equation for u: mu″+f(u′)+s(u)=F(t), The prime, as in u′, denotes differentiation with respect to time (u′(t) or du/dt). Furthermore, m is the mass of the system, f(u′) is a friction force that gives rise to a damping of the motion, s(u) represents a restoring force, such as a spring, and F(t) models the external environmental forces on the system. Equation (1) must be accompanied by two initial conditions: u(0)=I and u′(0)=V. The values of these have no effect on the steady state behavior of u(t) for large values of t, since this behavior is determined by the force F(t) and the system parameters m, f(u′), and s(u).
There are two types of the friction force f: linear damping f(u′)=bu′ and quadratic damping f(u′)=bu′|u′|. The input data consists of m, b, s(u), F(t), I, V, and specification of linear or quadratic damping. The unknown quantity to be computed is u(t) for t∈(0,T].
One example where the model above has relevance, is the vertical vibration of a vehicle in response to a bumpy road. Let h(x) be the height of the road at some coordinate x along the road. When driving along this road with constant velocity v, the vehicle is moved up and down in time according to h(vt), resulting in an external vertical force F(t)=−mh″(vt)v2. We assume that the vehicle has springs and dampers that here are modeled as bu′ (damper) and s(s)=ku (spring), with given damping parameter b and spring constant k. The unknown u(t) is the vertical displacement of the vehicle relative to the road. Figure 1 illustrates the situation. You may view an animation of such a motion on the web (by the way, this animation was created by coupling the Pysketcher tool for figure drawings with the differential equation solver presented later, see the script bumpy_road_fig.py for all details).
Figure 1: Vehicle on a bumpy road.
Another example regards the vertical shaking of a building due to earthquake-induced movement of the ground. If the vertical displacement of the ground is recorded as a function d(t), this results in a vertical force F(t)=−md″(t). The soil foundation acts as a spring and damper on the building, modeled through the damping parameter b and normally a linear spring term s(u)=ku.
In both cases we drop the effect of gravity, which is just a constant compression of the spring.
Our task is to compute and analyze the vertical u(t) vibrations of a vehicle, given the shape h(x) of the road and some velocity v.