An Oscillating Mass Connected to a Spring


NOTE: Before simulating the Oscillator model below, you need to introduce some declarations needed, such as the types Mass, Spring, and Fixed. This is done by evaluating the declarations in the Components section below: select the cell marker to the right and push shift-return as usual.


1 Components






2 Oscillator

The following model gives rise to some dynamic movement when simulated. A mass is connected to a spring which is connected to a fixed housing. The mass mass1 is subject to the gravitational force -mg and the force from the spring. It is given an initial position s=-0.5 which is offset from the equilibrium position and therefore starts an oscillating movement up-and-down.



3 Simulation of Oscillator




Diagram 1: Plot of the absolute position mass1.s(t) of the center of the haning mass.




Diagram 2: Plot of the absolute velocity mass1.v(t) of the center of the hanging mass.