---
title: "Gravity Field & Shell Theorem Interactive Lab | Sandbox Physics"
description: "Inside a hollow shell, where does the shell's gravity go? Nowhere; it cancels."
canonical_url: "https://sandboxphysics.com/labs/gravity-shell-theorem/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/gravity-shell-theorem/"
last_modified: "2026-10-27"
---

M071 · Spherical gravity

# Gravity Field & Shell Theorem

**Inside a hollow shell, where does the shell's gravity go?** Nowhere; it cancels. Inside a uniform spherical shell, the near side pulls harder but has less mass, the far side pulls more weakly but has more, and the two balance exactly. The field is zero everywhere inside. The potential is not zero, though: it is constant, equal to its value at the shell's surface.

Set the densities of three spherical layers, move a probe along the radius to read the field, and drop a particle through a tunnel along a diameter. Compare a hollow cavity with a uniform sphere, then weigh the source from accelerations measured outside it.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The Newtonian radial field is prescribed in advance. Numerical errors are shown, and the limits of each approximation are stated.

Physics tutorial

## Spherical source, field and tunnel

**Background** A spherical source pulls straight toward its centre, and how hard it pulls depends on how its mass is arranged.

**Why it matters** Link what you see in the scene to the computed trajectory and to sensor readings taken separately.

Start with the essentials

- **Focus question**: Inside a hollow shell, where does the shell's gravity go?
- **One-sentence intuition**: Zero field does not imply zero potential.

### Core mathematical model

#### Mass enclosed within a radius

$$
M(<r)=4\pi\int_0^r\rho(s)s^2\,ds
$$

The layer densities set how much mass lies inside each radius. Shells outside that radius exert no net force there.

#### Field and potential

$$
\begin{aligned}g(r)&=\frac{GM(<r)}{r^2}\\\Phi(r)&=-G\left[\frac{M(<r)}r+4\pi\int_r^R\rho(s)s\,ds\right]\end{aligned}
$$

Outer shells exert no force inside their cavity but still add a constant to the potential there. At the centre the limiting value is used, so nothing is divided by zero.

#### Motion inside a uniform sphere

$$
\begin{aligned}g(r)&=\frac{4\pi G\rho}{3}r\quad(r\le R)\\x(t)&=x_0\cos\left(\sqrt{\frac{4\pi G\rho}{3}}\,t\right)\end{aligned}
$$

A particle released from rest inside a uniform sphere oscillates harmonically. The force stays finite as it passes the centre.

#### Energy per unit mass

$$
\varepsilon=\frac12\dot x^2+\Phi(|x|)
$$

In this idealization the tunnel runs along a diameter and removes none of the source mass.

#### Weighing the source from outside

$$
g_i=GM\,r_i^{-2}
$$

Fit a line through zero to the raw accelerations measured outside the source, using the calibrated radii. The fit is never given the source mass.

### Common difficulties

#### What the model assumes

**Typical misconception** An ideal model like this automatically describes a real planet or a relaxed star cluster.

**Better mental model** The source is fixed in advance, the test particle does not pull back on it, and the effects left out are listed.

### Run the experiment

1. 01

   #### Move the field probe

   Drag the blue handle from the centre to the exterior. Compare the solid field with the dashed exterior point-mass reference.

   **What to observe:** Inside the cavity the acceleration is zero while the potential remains negative.

2. 02

   #### Change the source

   Try Uniform sphere, Dense core and Rest inside a hollow shell, and change all three densities.

   **What to observe:** Where the density changes affects the field inside, but outside the sphere the field depends only on the total mass.

3. 03

   #### Send a particle across the cavity

   Compare Rest inside a hollow shell with Cross the empty cavity, and drag the gold time handle.

   **What to observe:** A particle that enters the field-free cavity keeps the velocity it had on entry.

4. 04

   #### Weigh the source from readings

   Acquire a radial field scan, add noise and export the raw CSV.

   **What to observe:** The mass fitted from the outside readings is shown separately from the exact source mass.

Physical conclusion

Check that the assumptions hold, not just that the numbers agree.

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
