This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

← Posts

demoAINuclear physics

A star of free neutrons can weigh at most 0.71 suns

Hold a ball of neutrons up by their Fermi pressure alone, with gravity from general relativity, and solve for the star at each central density. The mass rises, peaks at solar masses with a radius of 9.16 km, and falls: no heavier star of free neutrons exists. A scipy twin written in different variables gets , and Narain, Schaffner-Bielich and Mishustin (2006) quote .

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

The reference, in posts/refs/the-free-neutron-star-limit.py, integrates the same physics a different way: in cgs units, with the radius as the independent variable and the Fermi momentum as the unknown, by scipy's DOP853 at a relative tolerance of , and finds the maximum with minimize_scalar. It gives at km. The literature value is from G. Narain, J. Schaffner-Bielich and I. N. Mishustin, "Compact stars made of fermionic dark matter", Phys. Rev. D 74, 063003 (2006), arXiv:astro-ph/0605724: from their Eqs. (31) and (32), a star of free neutrons has "the maximum mass at a radius of km, which match very well the original results of Oppenheimer and Volkoff" (Phys. Rev. 55, 374, 1939).

The program takes 400 steps per star, and its maximum agrees with scipy's to of a solar mass; the tests allow , relative.

The question

A neutron star is held up by the pressure of its neutrons. Neutrons are fermions: no two can share a state, so packing them tighter forces them into states of higher momentum, and that momentum pushes outward even at zero temperature. In 1939 Oppenheimer and Volkoff asked how heavy a star held up this way alone can be, ignoring the nuclear force between the neutrons. In general relativity pressure is itself a source of gravity, so a star that squeezes its center harder to push back also pulls harder, and past some central density the extra pull wins.

The equation of state

A cold gas of free neutrons is described by one number, the Fermi momentum , written as . The energy density (including the neutrons' rest mass) and the pressure are

with . The bracket in is a difference of nearly equal terms when is small, so below the program uses the first two terms of its series, , which agree with the full formula to there.

Printed

EPS0_CGS: 2.05811e+36
M_SUN_KM: 1.47663

Tests 2 of 2 pass

  • eps0 = m_n^4 c^5 / (8 pi^2 hbar^3) and G M_sun / c^2 are scipy's (passes)
  • at x = 0.01 the series is the full pressure formula, evaluated in mpmath, to 2.1e-9 (passes)

The structure equations

In geometric units (, lengths in km) the Tolman-Oppenheimer-Volkoff equations give the mass inside radius and the pressure there. The program writes them with the log-enthalpy as the independent variable, where is the energy it costs to add one neutron. For free neutrons , so and the equation of state needs no inverting. The surface, where the pressure is zero, is exactly, so every star is integrated over a known interval, from at the center to 0; the equations are the two at the top of the page (Lindblom, ApJ 398, 569, 1992).

Near the center grows like , and near the surface the density falls like ; a fixed-step method follows neither well. So the program steps evenly in a variable that runs from 0 at the center to 1 at the surface, defined by . Near the center that makes a straight line in , , and near the surface , so and the density is a polynomial in there too. The integration starts at from those two leading terms, with , because a fourth-order step across the center itself, where and are both zero, is only second-order accurate. With 400 steps a star's radius and mass agree with the scipy twin to about , the digits the twin was recorded to; with 100 steps, to .

Printed

star_half: [13.5094, 0.594179]
star_two: [5.08061, 0.476305]
diff_400: 3.33602e-07
diff_100: 3.26408e-05

Tests 2 of 2 pass

  • with 400 steps the stars agree with the twin to about 3e-7, with 100 steps to 3e-5 (passes)
  • single stars at x_c = 0.5 and 2 match scipy's radius and mass to 1e-6 (passes)

The sequence of stars

Each central density gives one star. A light star is large: at (central Fermi momentum half of ) it has 0.594 solar masses in a radius of 13.5 km. Before running: squeeze the center harder, to . Is the star heavier?

It is lighter, 0.476 solar masses in 5.08 km. Somewhere in between the mass passed through a maximum. The next cell draws the whole sequence and then finds the peak by golden-section search on .

Printed

x_max: 0.833853
r_max: 9.16146
m_max: 0.71018
rho_c: 4205836637856694
m_max_diff: 1.56367e-08
Free-neutron stars: mass against radius00.20.40.60.85101520radius R (km)mass M (solar masses)
one star per central densitythe heaviest: 0.710 at 9.16 km
Mass against central Fermi momentum
M(xc)
00.20.40.60.80.20.5125central Fermi momentum xc=pF/mncmass M (solar masses)

Tests 3 of 3 pass

  • the maximum is scipy's 0.71018029 solar masses at 9.161465 km, to 1e-6 (passes)
  • the maximum mass agrees with scipy's to 2e-8 of a solar mass (passes)
  • and Narain, Schaffner-Bielich and Mishustin's 0.710, to the three digits they quote (passes)

The heaviest star has solar masses and km (m_max, r_max), at a central Fermi momentum (x_max) and a central density of g/cm³ (rho_c). Narain, Schaffner-Bielich and Mishustin (2006) quote 9.192 km for the radius, 0.3% larger than both this program and the scipy twin; their number comes from a scaling formula (their Eq. (32)) whose coefficient, 3.367, they give to four digits.

Along the sequence, the stars to the right of the peak (larger, lighter, less dense) are stable: add a little mass and the star settles slightly smaller. The stars to its left are not, and a small squeeze makes them collapse. So 0.71 solar masses is the most a star of free neutrons can hold. Heavier neutron stars need the force between neutrons, which this model leaves out, to be repulsive at these densities.

Checked when the site was built: 7 of 7 tests passed, in 1.27 s. Download 2026-09-25-the-free-neutron-star-limit.viv