# Cavendish Experiment Simulator

The Cavendish balance can be used to show that even small everyday masses attract according to Newton's law of universal gravitation. Such experiments are challenging because the gravitational forces involved are tiny, typically a few nano-newtons. This physics-based simulation will reproduce the ideal response of the balance and verify whether the observed outcome is likely the result of gravity or other environmental influences.

## Simulation

Click into window with the graph to stop and restart the simulation. See the Graph Values and the Experiment Parameters below. If you are new to this, see Explanation of the Cavendish Experiment.

The table below shows the turn around and zero torsion crossing events.

## Graph Values Displayed

The values shown in the graph are:

Theta θ: is the deflection angle from the zero torsion 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 torsion force due to the torque induced by the string torsion 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 torsion constant that incorporates a torque due to the twisting of the string from the zero torsion angle $\alpha_0$. See Torsion 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 torsion 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 suspended 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 Cavendish balance experiment can be used to measure the gravitational constant G by following these steps:

1. Measuring the String Torsion 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 torsion force has to be strong enough to counteract the attraction between the masses. In equilibrium the force due to the string torsion is equal the gravitational attraction. So knowing the string torsion constant kt and the deflection angle θ due to gravity we can compute the torsion 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 torsion force, as long as it is not strong enough to hold the weights seprarated.

## How does the Simulation help?

This is a simulation of 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 explains and simulates how the string torsion 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 exert a torque that counteracts gravity. The magnitude of the torque is dependent on the deflection angle θ of the suspension bar from the zero torsion 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

A physics lecture demonstration used at Harvard University is based on a commercial apparatus for teaching about the Cavendish Experiment. This is the same equipment we use in our teaching laboratory and that will be incorporated into the online Introductory Physics laboratory classes.

They give the details about the apparatus and results to be expected in a demonstration, like the final equilibrium angle and the oscillation period. You can reproduce that behavior with this simulator.

## Measuring the String Torsion Constant

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

• Remove the fixed weights m1
• Let the suspension bar find its zero torsion 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 torsion constant corresponds to the spring constant. The only difference is, that we have a rotating system, where the torsion 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 torsion 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 torsion 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 Torsion Constant

To measure the string torsion constant we remove the fixed weights. Then we displace the suspension bar from the zero torsion 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 torsion 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 torsion 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 torsion position α0 to the current position. In this equilibrium state the momentum due to the string torsion is proportional to the gravitational force.

If we now the string torsion 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 torsion 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 torsion constant kt = 20 nN·m/rad, we can compute the torsion 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 based on the physics of the Cavendish experiment. The sum of all forces results in the acceleration of the suspended weights. A Numerical Integration of the acceleration delivers the next state after a small time interval that specifies the new rotation speed and position. From this new state all forces are computed again, and so forth.

Gravitaional Forces on the Cavendish Experiment

### 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$.

### Torsion Force

The string exerts a torque on the suspended mass system that is proptional to the rotation angle measured from the zero torsion 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 torsion 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 torsion force is minus:

(31)
where'
 $F_t$ ' =' 'tangential torsion force $k_t$ ' =' 'string torsion constant in Nm/rad $\alpha_0$ ' =' 'zero torsion 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 torsion forces acting at each mass m2.

If the torsion constant kt is too big, the gravitaional forces cannot move the weights together, but only deflect them in the corresponding direction. The torsion 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$ ' =' 'torsion 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 torsion angle

### Numerical Integration

The integration cannot 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 cannot 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

Credit: Walter Bislins generously offered in the public domain – 2020.
Edited for the Module Project by John Kielkopf – April 13, 2021.