Newton's cradle

Newton's cradle is a device that demonstrates conservation of momentum and energy using a series of swinging spheres. When one sphere at the end is lifted and released, it strikes the stationary spheres, transmitting a force through the stationary spheres that pushes the last sphere upward. The last sphere swings back and strikes the still nearly stationary spheres, repeating the effect in the opposite direction. The device is named after 17th-century English scientist Sir Isaac Newton. It is also known as Newton's pendulum, Newton's balls, Newton's rocker or executive ball clicker (since the device makes a click each time the balls collide, which they do repeatedly in a steady rhythm).

A typical Newton's cradle consists of a series of identically sized metal balls suspended in a metal frame so that they are just touching each other at rest. Each ball is attached to the frame by two wires of equal length angled away from each other. This restricts the pendulums' movements to the same plane.

Controls

The first comboBox allows eay selection of number of balls in the Newton's cradle

1 ball to the left

2 balls to the left

3 balls to the left

4 balls to the left

5 balls to the left

6 balls to the left

7 balls to the left

1 ball 1 raises 1 ball to the left and 1 ball to the right

2 ball 1 raises 2 ball to the left and 1 ball to the right

2 ball 2 raises 2 balls to the left and 2 balls to the right

3 ball 3 raises 3 balls to the left and 3 balls to the right

n is the number of balls allowed

i is the index of the ball to change

for which m[i] is the mass of the index ball

play button starts the simulation

reset button starts the simulation at afresh

Physics explanation

Newton's cradle can be modeled fairly accurately with simple mathematical equations with the assumption that the balls always collide in pairs.

The motion of the balls are modelled using dθ[i]dt=ω[i]dθ[i]dt=ω[i]

where θθ is the angle of the ball

ωω is the angular velocity

i represents each element of the ball

t is time

the second order differential equation is d(ω[i])dt=gsin(θ[i])LkLω[i]d(ω[i])dt=gsin(θ[i])LkLω[i]

where g is gravitational constant 9.81 m/s2m/s2

L is the length of the inextensible string connecting the ball to the support for rotational motion

k is a resistant coefficient to rotational motion ωω

Events of the ordinary differential equations

In a state event, a TOLERANCE =1.0e-6 is defined, a loop to check through each ball i, where a check of the θ[i]θ[i] is greater than θ[i+1]θ[i+1] plus the TOLERANCE, if true, return the balls to their closed up angular position θ[i+1]θ[i]θ[i+1]θ[i]. If false, do nothing.

Fixed Relationship Calculations

A for loop over i=0 to i less than number of balls to calculate the following

dx[i]=L(sinθ[i])dx[i]=L(sinθ[i]) where dx[i] is the change is x[i] position

dy[i]=Lcos(θ[i])dy[i]=Lcos(θ[i]) where dy[i] is the change in y[i] position

x[i]=xc[i]+dx[i] where xc[i] is each balls centre or equilibrium x position

y[i]=ymax+dy[i] where ymax is the support y position

vx[i]=Lω[i]cos(θ[i])vx[i]=Lω[i]cos(θ[i]) where vx[i] is the x direction linear velocities of each ball

vy[i]=Lω[i]sin(θ[i])vy[i]=Lω[i]sin(θ[i]) where vy[i] is the y direction linear velocities of each ball