The model is derived by applying Newton's Second Law to the two masses. In ordinary differential equations, the model is:
Equations (7)-(12) are what you need for simulation.