# Cavendish Experiment Simulator

Friday, July 27, 2018 - 00:56 | Author: wabis | Topics: Simulation, Interactive, Physics, Knowlegde The Cavendish experiment can be used to show that mass attracts mass according to Newton's law of universal gravitation . Creating such an experiment is very challenging because the gravitational forces involved are tiny, about in the nano Newton range. This simulation can be used to plan an experiment and to verify whether the outcome is likely the result of gravity or other influences. The math involved is explained and the source code of the simulation is available.

## Simulation

Click into graphic window to stop and restart the simulation. See infos about the Graphic Values and the Experiment Parameters below. If you are new to this, see Explanation of the Cavendish Experiment.

The table below shows turn around and zero tension crossing events.

Use Get App Url to create an url you can post online to call the simulation with the current parameter setting. You can also paste such an url into the field above and press Enter or click on Set App State. This way you can save and restore states for later usage.

## Graphic Values

The values shown in the graphic are:

Theta θ: is the deflection angle from the zero tension angle α0. It correspond to the red arc in the graphic.

Fg1: is the magnitude of the gravitational force between a fixed and a suspended weight according to Newton's law of universal gravitation . Note, this is not the only force that is acting on the suspended mass and only the tangent component of this force incorporates into the total force of the system.

Fg: is the magnitude of all tangential components of the gravitational forces on the weights m2. If kt = 0 and kd = 0 then this is the only force acting in the system.

Ft: is the tension force due to the torque induced by the string tension constant kt. In equilibrium and if the weights do not touch each other, it is Fg = Ft.

## Experiment Parameters

Change the following values to simulate your configuration:

Speed: defines how much faster the simulations runs than normal speed.

m1, m2: mass of the fixed and suspended weights respectively. See Gravitational Forces how the masses create a gravitational force which moves the suspended weights.

r1, r2: radius of the fixed and suspended weights respectively. The size of the weights has no influence on the movement of the suspended weights. They only define the collision angles.

L1, L2: distances of the fixed and suspended weights from the pivot.

kt: string tension constant that incorporates a torque due to the twisting of the string from the zero tension angle $\alpha_0$. See Tension Force how this parameter results in a force acting on the suspended weights.

kd: factor to incorporate a linear damping, so that the system does not oscillate infinitely. Real physical systems often have linear and quadratic damping factors. Linear damping means, that the damping force is proportional to the speed. Quadratic damping means, that the damping force is proportional to the square of the speed. Quadratic damping needs only be taken into account for fast moving system. See Drag Force how this parameter results in a force damping the oscillation of the suspended weights.

α0: is the angle of zero tension in the supporting string.

θ0: is the initial deflection angel as measured counter clockwise from α0.

## Explanation of the Cavendish Experiment

The Cavendish experiment uses two fixed weights and two weights on the ends of a bar which is suspendet on a string so it can rotate around a pivot. This setup cancels the influence of earth's gravity on the experiment. If you place the big fixed weights near the small weights, they attract each other. Because the involved forces are tiny the movement is very slow and it can take a long time to see a result, at least some minutes to hours. Because the gravitational forces between the weights are so tiny, the experiment has to be shielded from air currents and electric and magnetic influences.

The experiment can be used to measure the gravitational constant G if done properly. You can do this by executing the following steps:

1. Measuring the String Tension Constant if not already known.
2. Measuring the Gravitational Force between the weights in equilibrium

To be able to execute steps 3 and 4 you have to design the setup in such a way, that the weights do not touch in equilibrium. The string tension force has to be strong enough to counteract the attraction between the forces. In equilibrium the force due to the string tension is equal the gravitational attraction. So knowing the string tension constant kt and the deflection angle θ due to gravity we can compute the tension force Ft, which is equal the gravitational attaction Fg of the weights. From the distance of the weights in equilibrium, the measured gravitational forces and the mass of the weights we can compute the gravitational constant G.

To demonstrate that mass attracts mass without quantitatively measure the forces, you can setup the experiment so, that the weights simply collide. In this case you have not to deal with the string tension force, as long as it is not strong enough to hold the weights seprarated.

## How does the Simulation help?

This App simulates a simple Cavendish experiment setup. It can be used to estimate how long it takes until the gravitational forces between the weights lets them collide. It shows, explains and simulates how the string tension constant can be measured and how the gravitational forces can be obtained from that and how G can be calculated then.

It is assumed that the moving weights are suspended on a string at the center pivot. If twisted, the string can exerpt a torque that counteracts gravity. The magnitude of the torque is dependent on the deflection angle θ of the suspension bar from the zero tension position α0 and can be controled by the Parameter kt.

In addition a linear damping force can be applied to the system. The magnitude of the damping is dependent on the angular speed of the suspension bar and can be controled by the Parameter kd.

## Simulation of a Commertially available Cavendish Experiment

The Harward Univerity shows on their website how they conducted the Cavendish Experiment using a commertially available apparatus:

They give the data of the apparatus and the results of the experiment, like the final equilibrium angle and the oscillation period. I have entered the experiment parameters in the simulator above and got exactly the same results within the accuracy they state.

## Measuring the String Tension Constant

If you create the Canvendish experiment yourself, you probably don't know the string tension constant kt. But you can measure it using the following method:

• Remove the fixed weights m1
• Let the suspension bar find its zero tension position α0
• Displace the suspension bar some degrees from α0
• Let the suspension bar oscillate
• Note the times when the bar reaches its maximum deflection angles

(Jump directly to the formula (5) if you have already measured T to compute kt)

The idea behind this is: The string acts like a spring and the suspension bar like a mass. So we have a spring-mass system that can oscillate. The tension constant corresponds to the spring constant. The only difference is, that we have a rotating system, where the tension constant gives a torque rather than a force and the mass is replaced by a moment of inertia.

The oscillation period of a mass-spring system can be computed as follows:

(1)
where'
 $T$ ' =' 'period of one full oscillation $m$ ' =' 'mass of the system $k_s$ ' =' 'spring constant in N/m

Note that the period is measured from one point of oscillation until it reaches the same point from the same direction.

Tip: If you have multiple time periods measured in one run, average over the last few periods, because the influence of damping and non-linearities in the system is smallest when the amplitude of the oscillation is smallest.

The oscillation period of a string-suspension bar system can be computed very similarly:

(2)
where'
 $T$ ' =' 'period of one full oscillation $I$ ' =' 'moment of inertia $k_t$ ' =' 'spring constant in N·m/rad

If we have measured the oscillation period T, we can compute the corresponding string tension constant by solving (2) for kt:

(3)
where'
 $k_t$ ' =' 'spring constant in N·m/rad $I$ ' =' 'moment of inertia $T$ ' =' 'period of one full oscillation

But what is this Moment of inertia I? It is a quantity that determines the torque needed for a desired angular acceleration about a rotational axis; similar to how mass determines the force needed for a desired linear acceleration.

The moment of inertia depends on the mass distribution of an object. Is can be computed by dividing an object into many small volume elements mi. The moment of inertia of each element is its mass times the square of its distance from the rotation axes: Ii = mi · ri2.

For a suspension bar with heavy weights at the end, so that the weight of the bar is negligible, like in the simulation, the moment of inertia is simply:

(4)
where'
 $I$ ' =' 'moment of inertia of the suspension bar with the weights m2 $m_2$ ' =' 'mass of one of the weights at the end of the suspension bar $L_2$ ' =' 'distance from the pivot point to the center of the mass m2

See Computing the Moment of Inertia for the Suspension Bar, if the mass of the bar itself is not neglegtable or if you want higher precision measurements.

So for the suspension bar system in the simulation or for a corresponding real model we can compute the string tension constant by inserting (4) into (3):

(5)
where'
 $k_t$ ' =' 'spring constant in N·m/rad $m_2$ ' =' 'mass of one of the weights at the end of the suspension bar $L_2$ ' =' 'distance from the pivot point to the center of the mass m2 $T$ ' =' 'period of one full oscillation

### Example Measuring the String Tension Constant

To measure the string tension constant we remove the fixed weights. Then we displace the suspension bar from the zero tension angle (the rest position α0) some degrees eg. θ0 = 1° and let the suspension bar oszillate. We stop the time T of one full oszillation.

Note: due to damping and some non-linearities in the suspension string the most accurate measurement for T is when the oszillation angle is as small as possible. But this can make it difficult to stop the time accurately. One way to get better results is to average over some periods.

My simulation got me a period T = 6562 s (from the event table below the simulator).

If the weight of the suspension bar is neglegtable with respect to the weights m2, I can directly use formula (5) to calculate the string tension constant kt:

(6)
where'
 $k_t$ ' =' 'spring constant in N·m/rad $m_2$ ' =' '0.1 kg $L_2$ ' =' '0.33 m $T$ ' =' '6562 s

which is very close to the value kt = 20 × 10−9 N·m/rad that I entered in the simulation for this example.

## Computing the Moment of Inertia for the Suspension Bar

To measure the string tension constant kt with the formula (3) you need the moment of inertia I of the suspension bar with the weights m2. If the weight of the bar itself is much smaller than the weights at the end, you can neglegt the moment of inertia of the bar and simply use (5) to compute kt.

If the mass of the bar is not neglegtable or if you want higher precision measurements, you can incorporate the moment of inertia of the bar itself. Assuming the bar is a rod with any cross section shape, but constant diameter and density, you can compute its moment of inertia as follows:

(7)
where'
 $I_\mathrm{bar}$ ' =' 'moment of inertia of the suspension bar $m_\mathrm{bar}$ ' =' 'mass of the suspension bar $L_\mathrm{bar}$ ' =' 'length of the suspension bar

The total moment of inertia of the suspension bar inclusive the weights at the end is then:

(8)
where'
 $I$ ' =' 'total moment of inertia of the suspension bar with the weights m2 $m_2$ ' =' 'mass of one of the weights at the end of the suspension bar $L_2$ ' =' 'distance from the pivot point to the center of the mass m2 $m_\mathrm{bar}$ ' =' 'mass of the suspension bar $L_\mathrm{bar}$ ' =' 'length of the suspension bar

Note that Lbar is the length of the bar without the weights. So dependent of your construction Lbar may be smaller or bigger than 2 · L2.

If we want to be even more precise we have to include the moment of inertia of the ball weights too, due to their rotation. But beacuse the rotation is so slow, I did ignore it. But here is the contribution listed anyway:

(9)
where'
 $I_\mathrm{sphere}$ ' =' 'moment of inertia of one solid sphere weight $m_2$ ' =' 'mass of the sphere $r_2$ ' =' 'radius of the sphere

So the total moment of inertia gets:

(10)

## Measuring the Gravitational Force

To measure the gravitational force it is not sufficient to simply let the weights come together. You have to setup the system in such a way, that the weights come closer but never touch. Wait until the oscillation stops. Now you can measure the angle θ from the zero tension position α0 to the current position. In this equilibrium state the momentum due to the string tension is proportional to the gravitational force.

If we now the string tension constant kt and the angle θ we can compute the torque and from that the corresponding torque forces at the positions of the 2 weights m2. In equilibrium the sum of this forces is just equal to the total gravitational force:

(11)
where'
 $F_g$ ' =' 'total of gravitational forces composed of all tangential gravitational force components $M$ ' =' '$k_t \cdot \theta$ = torque induced by the twisted support string $k_t$ ' =' 'string tension constant in Nm/rad $\theta$ ' =' 'displacement angle in radian $L_2$ ' =' 'distances of weights m2 from origin

Now we have the sum of all tangential acting components of the gravitational forces Fg as displayed in the simulator. The force acting at one mass is half of that.

To compute the gravitational constant we need not the total tangential components of the gravitational forces but the force vector from one mass m2 to the nearest mass m1. We have essentially to reverse engineer what the simulation does as described at Gravitational Forces to get $\vec F_{g1}$. This is a tedious calculation and shown at (13) for completeness.

But we can use Fg as an approximation:

 (12)

To get the real force $\vec F_{g1}$ between two weights m1 and m2 we have to reconstruct the force vectors from the tangential components. For that we need the geometry of the experiment at the stabilized state. The following used geometric parameters are defined under Gravitational Forces.

The real force is then:

(13)
with
and

## Computing the Gravitational Constant G

The formula to compute a gravitational force between two weights is:

 (14)

If we know F, the masses and the distance d between the weights, we can calculate the gravitational constant G by solving (14) for G:

(15)

F is our Fg / 2 from Measuring the Gravitational Force.

To check that the formulas are correct, you can use the force displayed as Fg1 in the simulation. This is the pure force between two weights m1 and m2 (not their tangential component).

What we still don't know is the distance d between the weights. We can measure it or calculate it from the deflection angle θ:

 (16)

### Example computing G

In this example I got the following deflection angle after some hours after the suspension bar stoped oscillating: θ = 2.411°. Assuming we have already measured the string tension constant kt = 20 nN·m/rad, we can compute the tension force which is the same as the total gravitational forces:

(17)
where'
 $F_g$ ' =' 'total of gravitational forces composed of all tangential gravitational force components $k_t$ ' =' '20 × 10−9 N·m/rad $\theta$ ' =' '2.411° = 0.04208 rad $L_2$ ' =' '0.33 m

Lets calculate the distance between the weights:

(18)
where'
 $L_1$ ' =' '0.33 m $L_2$ ' =' '0.33 m $\alpha_0$ ' =' '35° = 0.61087 rad $\theta$ ' =' '2.411° = 0.04208 rad

The gravitational constant using the measured force FFg / 2 is then:

(19)
where'
 $F$ ' =' 'Fg / 2 = 1.275 × 10−9 N $d$ ' =' '0.1852 m $m_1$ ' =' '7 kg $m_2$ ' =' '0.1 kg

If we use the exact gravitational force as displayed at Fg1 and computable with (13) we get:

(20)
where'
 $F$ ' =' '$F_{g1}$ = 1.362 × 10−9 N $d$ ' =' '0.1852 m $m_1$ ' =' '7 kg $m_2$ ' =' '0.1 kg

which is the publised value.

## Simulation Math

The simulation is not an algorithmus to produce an animation. I tought the computer how physics works. He computes all forces from the current state, taking all parameters into account. The sum of all forces results in the acceleration of the suspended weights. Numerical Integration of the acceleration delivers the next state after a certain small time interval: the new rotation speed and position. From the new state all forces are computed again, and so forth.

### Gravitational Forces

To calculate the gravitational forces we need to define some points as vectors, for which the origin is at the pivot of the weights m2:

(21)
where'
 $\vec P_1$ ' =' 'center of left mass m1 $\vec P_2$ ' =' 'center of left mass m2 $\vec P_3$ ' =' 'center of right mass m1 $L_1$ ' =' 'distances of the weights m1 from origin $L_2$ ' =' 'distances of the weights m2 from origin $\alpha$ ' =' 'angular position of mass m1

Furthermore we need the vectors from $\vec P_2$ to $\vec P_1$ and $\vec P3$ and their lengths:

(22)
(23)
(24)
(25)
where'
 $\vec D_1, \vec D_3$ ' =' 'vectors from P2 to P1 and P3 respectively $d_1, d_3$ ' =' 'lengths of vectors $\vec D_1$ and $\vec D_3$ respectively

The gravitational force vectors are then:

(26)
where'
 $\vec F_{g1}, \vec F_{g3}$ ' =' 'gravitational forces on weight m2 at P2 due to weights m1 at P1 and P3 $G$ ' =' '6.674 × 10−11 N·m2/kg2 = gravitational constant $m_1$ ' =' 'mass of fixed weights at P1 and P3 $m_2$ ' =' 'mass of suspended weight at P2 $\vec D_1, \vec D_3$ ' =' 'vectors from P2 to P1 and P3 respectively $d_1, d_3$ ' =' 'distances between the weights

Note: the term $\vec D_1 / d_1$ defines a unit vector from P2 to P1, which gives the direction of the force $\vec F_{g1}$ due to mass P1. The same applies to $\vec F_{g3}$.

Because the suspended weights are not free to move in any direction but are constrained to rotate around the pivot point, only the tangent components are relevant for the movement. The radial components of the forces cancel each other. To calculate the tangent components we introduce a tangential unit vector $\hat r_t$ as shown in the image above:

 (27)

Now we can calculate the tangential components of the gravitational forces by applying the vector dot product :

(28)
where'
 $F_{g1,t}, F_{g3,t}$ ' =' 'tangential components of forces $\vec F_{g1}$ and $\vec F_{g3}$ respectively $\vec F_{g1}, \vec F_{g3}$ ' =' 'gravitational forces on weight m2 at P2 due to weights m1 at P1 and P3 $\hat r_t$ ' =' 'tangential unit vector pointing in moving direction of mass m2

To get the total gravitational force we add the tangential force components and multiply by 2 because we have 2 suspended weights:

(29)
where'
 $F_g$ ' =' 'total of gravitational forces composed of all tangential gravitational force components $F_{g1,t}, F_{g3,t}$ ' =' 'tangential components of forces $\vec F_{g1}$ and $\vec F_{g3}$ respectively

The sum of the tangent components of the gravitational forces is displayed as Fg in the simulation.

Note: $F_{g3,t}$ points in the opposite direction of $F_{g1,t}$, which is taken into account by an opposite sign, resulting from the vector dot product with $\hat r_t$.

### Tension Force

The string exerts a torque on the suspended mass system that is proptional to the rotation angle measured from the zero tension angle $\alpha_0$. The torque acts always in the direction to the zero torque angle. To compute the sum of all forces, we need the torque in terms of a tension force acting at the locations of the weights m2.

The magnitude of the torque is:

 (30)

The torque is acting against the displacement from α0, so the tension force is minus:

(31)
where'
 $F_t$ ' =' 'tangential tension force $k_t$ ' =' 'string tension constant in Nm/rad $\alpha_0$ ' =' 'zero tension angle $\alpha$ ' =' 'angular position of weight m1 $L_2$ ' =' 'distance of the suspended weights from the pivot

Note: this is the sum of the two tension forces acting at each mass m2.

If the tension constant kt is too big, the gravitaional forces can not move the weights together, but only deflect them in the corresponding direction. The tension force is displayed as Ft in the simulation.

### Drag Force

To introduce a damping of the system, we can define a linear damping constant kd, which produces a tangential damping force always acting against the direction of motion. The magnitude of the damping force is proportional to the angular speed.

(32)
where'
 $F_d$ ' =' 'damping force tangential $k_d$ ' =' 'linear damping constant in N/(rad/s) $\dot \alpha$ ' =' 'angular speed

If you set kd = 0 the system is undamped and oscillates indefinitely.

### Acceleration

Now we get to the equations of motion. If we know all forces acting on the suspended part of the system, we can compute the angular acceleration applying Newton's second law of motion a = F / m:

(33)
where'
 $\ddot \alpha$ ' =' 'angular acceleration $a$ ' =' 'tangential acceleration by applying Newton's second law $F_g$ ' =' 'gravitational force tangential component $F_t$ ' =' 'tension force tangential $F_d$ ' =' 'damping force tangential $m_2$ ' =' 'mass of one suspended weight, note we have 2 such weights to take into account $L_2$ ' =' 'distance of the suspended weights from the pivot

Note: to get from the linear acceleration to the angular acceleration, we had to divide by L2.

It is common practice to write accelerations with two dots and speeds with one dot above the angle variable. One dot means a differentiation with respect to time. Two dots mean two times differentiated with respect to time.

### Equation of motion

From the angular acceleration we can calculate the angular speed by integration:

(34)
where'
 $\dot \alpha$ ' =' 'angular speed $\ddot \alpha$ ' =' 'angular acceleration $\dot \alpha_0$ ' =' 'initial angular speed

From the angular speed we get the angel by integration:

(35)
where'
 $\alpha$ ' =' 'angular position of mass m1 $\dot \alpha$ ' =' 'angular speed $\alpha_0$ ' =' 'initial angle = zero tension angle

### Numerical Integration

The integration can not be done analytically for such complicated systems, but have to be done numerically by a computer program.

In principle we divide the motions into small chunks of time length $\Delta t$. Then we compute for each time step from the known acceleration angle the change in angular velocity and the change in angular position. We add the change in angular velocity to the current angular velocity and the change in angular position to the current angular position and get angular velocity and position for the next time step:

 (36)
 (37)

This steps are continuously repeatet for each time step $\Delta t$ and the objects are drawn at the calculated positions.

Note: the simulation uses a more sophisticated rule for the integration, that halves the error compared to the above method.

### Collision handling

The weights can collide if the difference of L1 and L2 is smaller than the sum of the radii r1 + r2 of the weights.

If the weights can not collide, nothing has to be done, the simulation just works. But if the weights can collide, their angular speed has to be reversed on collision detection and the angular position has to be corrected.

We assume an elastic collision. That means the momentum is conserved without energy loss on the collision. This is established by simply inverting the angular speed on collisions.

To check for collisions we need the minimum and maximum angular positions of the suspension, that correspond to the collision positions. We can get the angles geometrically from the triangle P1, Pivot, P2 when the weights touch each other. In this case P1 and P2 are at a distance of r1 + r2 and the other sides of the triangle are L1 and L2:

(38)
(39)
where'
 $\alpha_\mathrm{min}$ ' =' 'smallest angel at collision point 1 $\alpha_\mathrm{max}$ ' =' 'greatest angel at collision point 2 $L_1$ ' =' 'distances of weights m1 from origin $L_2$ ' =' 'distances of weights m2 from origin $r_1$ ' =' 'radius of fixed weights $r_2$ ' =' 'radius of suspended weights

1Robert 11/20/2018 | 19:00

A minor point regarding the moment of inertia of the setup. Your formula (4)

would only hold if the balls itself were non rotating. Otherwise you need to add the moment inertia of the balls rotating around their center of mass, which for each individual ball is $\frac{2}{5} m_2 {r_2}^2$. So that gives

in total, according to Steiner's theorem. Note that this only holds if the balls are massive. Hollow balls have a different moment of inertia.

2wabis (Walter Bislin, Author of this Page) 11/25/2018 | 21:21

Thanks Robert, I added this at Computing the Moment of Inertia for the Suspension Bar.

3Blake Furman 1/18/2019 | 01:53

What do you think is the best material to used for the string?

4wabis (Walter Bislin, Author of this Page) 1/22/2019 | 17:56

I dont know, depends on the setting. I would certainly use something without any drill. Maybe a long film strip or nylon string or some metal wire? Look for steady environment conditions in any case.

5Kelsey 5/21/2019 | 19:17

I am calculating the moment of inertia, and was wondering what the mass of the suspension bar is? I couldn't find it on the page.

 About Walter Bislin (wabis) Rights Public Domain
 More Page Infos / Sitemap Created Thursday, July 26, 2018
 Scroll to Top of Page Changed Friday, June 5, 2020