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

Nuclear physics

Level densities

Nuclear level density, by counting the states

Put 100 fermions in equally spaced levels and count, one by one, the states with excitation energy . The counts are the partition numbers , exactly, up to . They grow like Bethe's ; at the count is 4.4% below the leading Hardy-Ramanujan term, and the next term of the series, , accounts for all but 0.06% of that.

States of 100 fermions in equally spaced levels10⁰10³10⁶020406080100excitation energy E (level spacings)number of states ρ(E)
countedHardy-Ramanujan: e2aE/(43E)
How close the leading term is
counted / Hardy-Ramanujan1−0.4433/E
0.80.91.0020406080100excitation energy Ecounted / Hardy-Ramanujan
✓ 6 tests passchecked when the site was built#level-density#fermi-gas#partitions#combinatorics
ReadOpen in the workbench

Look inside this program

  • Atlas

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

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

Neutron stars

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 .

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)
✓ 7 tests passchecked when the site was built#neutron-stars#general-relativity#tov-equations#fermi-gas
ReadOpen in the workbench

Look inside this program

  • Atlas

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

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

demoAINuclear physicswritten with an agent#3788e70f4b

Neutron pairing in a neutron-star crust

One cell of the neutron-star inner crust in one dimension: a slab of nuclear matter in a gas of free neutrons, with a contact pairing force. Solving the Bogoliubov-de Gennes equations self-consistently gives a pairing gap of 0.9151 MeV in the gas and 0.1518 MeV at the middle of the slab, as a separate numpy solver finds. The same code on a uniform ring reproduces the BCS gap equation's 0.961089 MeV to .

Pairing gap Δ(x) and neutron density across one crust cell
pairing gap Δ(x)neutron density (fm−1) (right axis)
00.51.0510152025x (fm)00.20.4neutron density (fm−1)pairing gap Δ (MeV)
ReadOpen in the workbench

Look inside this program

  • Atlas

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

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

Nuclei

demoAINuclear physicswritten with an agent#da397526f0

Skyrme Hartree-Fock of oxygen-16

The ground state of O from the SLy5 Skyrme functional, solved on a radial mesh at two spacings and extrapolated. The binding energy comes out 8.0250 MeV per nucleon and the charge radius 2.7993 fm; skyrme_rpa, the published code of Colò et al. (2013), gives 8.0261 MeV and 2.7991 fm in its own test run with the same force, and the six single-particle energies agree with it to 3 keV.

Oxygen-16 with SLy5: neutron and proton densities
neutronsprotons
00.020.040.060.080123456r (fm)density (fm−3)
ReadOpen in the workbench

Look inside this program

  • Atlas

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

  • Explore

    Run it and step through what each part did, with the code, values and plots beside it.

Nuclear forces

demoAINuclear physicswritten with an agent#9bd5187154

The two-pion loop function, built and differentiated by a small computer algebra system

The loop function sets the momentum dependence of the two-pion-exchange nuclear force at next-to-leading order. The program writes it as an expression tape, evaluates it, and differentiates the tape symbolically into a second tape. Both are checked against a 30-digit Feynman-parameter integral that never uses the closed form: and /MeV there, to and /MeV.

The two-pion loop function L(q), mπ=138.039 MeV11.520200400600800100000.51dL/dq (1/GeV)momentum transfer q (MeV)L(q)
L(q), tapeFeynman-parameter integral (mpmath)dL/dq, derivative tape (per GeV) (right axis)mpmath derivative (per GeV) (right axis)
ReadOpen in the workbench

Look inside this program

  • Atlas

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

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