### MyPhysicsLab – Double Spring 2D

PREV
HOME
NEXT

Instructions: click near to square or circles and drag with your mouse

#### Physics

An immoveable (but draggable) anchor point has two spring2 and bobs hanging below and swinging in two dimensions. We regard the bobs as point masses. We label the upper spring and bob as number 1, the lower spring and bob as number 2. Define the following variables:

- θ = angle (0=vertical)
- S = spring stretch (displacement from rest length)
- L = length of spring
- u = position of bob
- v = u'= velocity of bob
- a = u''= acceleration of bob
- F = net force on a bob

and some constants:

- R = rest length of spring
- T = position of anchor point
- m = mass of bob
- k = spring constant
- b = damping constant
- g = gravitational constant

Note that for this simulation the vertical dimension increases downwards.

Here are the equations of motion. The derivation is similar to that given for the single 2D spring.

F_{1x} = m_{1} a_{1x} = -k_{1} S_{1} sin θ_{1} - b_{1} v_{1x} + k_{2} S_{2} sin θ_{2}

F_{1y} = m_{1} a_{1y} = -k_{1} S_{1} cos θ_{1} - b_{1} v_{1y} + k_{2} S_{2} cos θ_{2} + m_{1} g

F_{2x} = m_{2} a_{2x} = -k_{2} S_{2} sin θ_{2} - b_{2} v_{2x}

F_{2y} = m_{2} a_{2y} = -k_{2} S_{2} cos θ_{2} - b_{2} v_{2y} + m_{2} g

The spring stretch S_{n} and angles θ_{n} are functions of the positions u_{n} of the bobs as follows:

L_{1} = √((u_{1x} - T_{x})^{2} + (u_{1y} - T_{y})^{2})

L_{2} = √((u_{2x} - u_{1x})^{2} + (u_{2y} - u_{1x})^{2})

S_{1} = L_{1} - R1

S_{2} = L_{2} - R2

cos θ_{1} = (u_{1y} - T_{y})/L_{1}

sin θ_{1} = (u_{1x} - T_{x})/L_{1}

cos θ_{2} = (u_{2y} - u_{1y})/L_{2}

sin θ_{2} = (u_{2x} - u_{1x})/L_{2}

#### Numerical Solution

To solve the equations of motion numerically, so that we can drive the simulation, we use the Runge-Kutta method for solving sets of ordinary differential equations. We need to convert the four second order equations of motion to eight first order equations.

u_{1x}' = v_{1x}

u_{1y}' = v_{1y}

u_{2x}' = v_{2x}

u_{2y}' = v_{2y}

v_{1x}' = -(k_{1}/m_{1}) S_{1} sin θ_{1} - (b_{1}/m_{1}) v_{1x} + (k_{2}/m_{1}) S_{2} sin θ_{2}

v_{1y}' = -(k_{1}/m_{1}) S_{1} cos θ_{1} - (b_{1}/m_{1}) v_{1y} + (k_{2}/m_{1}) S_{2} cos θ_{2} + g

v_{2x}' = -(k_{2}/m_{2}) S_{2} sin θ_{2} - (b_{2}/m_{2}) v_{2x}

v_{2y}' = -(k_{2}/m_{2}) S_{2} cos θ_{2} - (b_{2}/m_{2}) v_{2y} + g

We keep in mind that the spring stretch S_{n} and angles θ_{n} are functions of the position of the bob u_{n} as given previously.