Skip to content
FusionVaultPublic

About

Rust crates for physics from the measured to the novel: gravity and magnetic fields, gravitational waves, plasma and fusion, and frontier proposals beside general relativity, each tested against published numbers

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

176 Commits

Folders and files

Repository files navigation

physica

Rust crates for physics from the measured to the novel, computed and tested: one library for the fields Earth and its satellites measure, and for the frontier proposals set beside general relativity and the experiments. Read the gravity fields measured by GRACE, GRACE-FO and GOCE and turn them into maps of water, ice and earthquakes; simulate the quantum (cold-atom) sensors of future missions; chart gravitational waves from nanohertz to terahertz; evaluate Earth's magnetic field and the magnetohydrodynamics behind magnets, plasmas and space weather; compute the frontier proposals for controlling gravity next to general relativity and the measurements; and model the plasmas and fusion reactions that come up along the way. Every formula is tested against published numbers, and the data tests are registered before the data decides them.

Water storage anomaly in July 2026, from GRACE-FO

The crates

Crate What it does
physica · docs All of them in one dependency, plus the cross-domain analogies: one spherical-harmonic engine for gravity and magnetism, the spin-2 factor, Schwinger and Unruh, the pinch and the filament
metrology · docs The physical constants every crate shares, defined once: SI, CODATA 2018, IERS and IAU values
geopotential · docs Earth's gravity field from spherical harmonics: read ICGEM .gfc models, then gravity, geoid and water height at a point or on a map; the normal gravity of GRS80 and WGS84 from their defining constants, and heights from geopotential numbers
gravimetry · docs Gravity missions and quantum sensors (noise models, error predictions, a satellite-pair simulator), GRACE processing (technical notes, smoothing, stripe removal, water height, a Kalman smoother), earthquake gravity, buried-body forward models, the Earth tide and the permanent-tide conventions, clocks as height meters with the GNSS relativistic corrections, and the atmosphere's pressure waves
gravitational · docs Gravitational waves: strain conventions, noise curves, inspirals and binary pulsars, Kerr orbits, periastron advance and geodetic precession, ringdown and merger remnants, neutron-star tides, energy, memory, propagation and the graviton, stochastic backgrounds, high-frequency limits, gravity sensors as detectors, lab gravity, lensing and ΛCDM distances
gravitics · docs Frontier gravity computed three ways (each proposal's own model, general relativity, and the measurements): superconductors, high-frequency generators, propellantless thrust, pulsed-field "electrogravity", warp drives, light in strong gravity (exact and multipole deflection, black-hole shadows), the Schwinger limit, gravitoelectromagnetism with the Lense–Thirring drag of orbits and gyroscopes, gravity's anomalies, MOND and short-range forces, equivalence-principle tests with the new-force couplings they bound, and tabletop quantum gravity
magnetics · docs Earth's magnetic field from WMM2025 on the same engine as its gravity, magnetohydrodynamics (waves, shocks, stability, Hartmann flow, dynamos), magnet design and its stress limits, and space weather from the solar wind to the power grid
plasmoid · docs Fusion and self-organising plasma: Coulomb barriers and Gamow peaks, Bosch–Hale and p–¹¹B reaction rates, Lawson, tokamak limits, Z-pinches and the plasma focus, Taylor-relaxed plasmoids and reconnection, aneutronic power balance and direct energy conversion
lab The research workbench: regenerates every figure and reruns every analysis here (not published)

The former geo5d crate (normal gravity, heights, clocks as height meters, frame dragging) is folded into these: geopotential::normal, gravimetry::clocks, gravitational::energy and gravitics::gem.

web/ holds 3D models of the physics, computed in the browser with the crates' equations. The first one rebuilds the rig of US 12,417,870 (a ball between high-voltage coils, claimed to move by a gravitational field) and simulates the ball under every force and torque, checking itself against the Rust crates on load.

Quick start

cargo add geopotential          # one domain
cargo add physica               # or all of them at once

Download a gravity model, for example GOCO06s.gfc from the ICGEM model table, then:

use geopotential::read_gfc;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let model = read_gfc(&std::fs::read_to_string("GOCO06s.gfc")?)?.model.base;

    // Gravity 400 km above northern Italy (radius in metres, angles in radians).
    let (r, lat, lon) = (6_378_137.0 + 400e3, 45f64.to_radians(), 7f64.to_radians());
    let [north, east, up] = model.partials(r, lat, lon).acceleration_neu(r, lat);

    println!("gravity: {north:.2e} north, {east:.2e} east, {up:.4} up (m/s²)");
    Ok(())
}

Each crate's README has more examples, and every crate has runnable programs in its examples/ directory that reproduce a published number:

cargo run -p magnetics  --example compass_declination   # declination from WMM2025
cargo run -p gravitational --example binary_pulsar      # the Hulse–Taylor orbital decay
cargo run -p plasmoid   --example triple_products       # fusion shots against the Lawson limit
cargo run -p gravitics  --example electrogravity_claim  # a gravity claim against the classical force
cargo run -p physica    --example three_fields_one_engine

They are compiled and run by cargo test, so the numbers in them stay true.

Gallery

Geoid The geoid from GOCO06s Kamchatka An earthquake from space: Kamchatka 2025 against the USGS fault model
El Niño El Niño drains the continents: global land water and a registered forecast Noise What makes a month noisy: solar activity and satellite modes
Instrument noise Quantum against classical sensors (Zingerle et al. 2024, Fig. 1) Closed loop Simulated missions against a real month
Proposals Each frontier proposal against general relativity and experiment Warp What a warp bubble costs against the quantum inequality
Tonga The Tonga pressure wave as GRACE-FO would see it Thrust Thrust per watt: claims against light and ion wind

Research

Eight research reports, their notes and check scripts, the registered tests and their results, the formula audits and the external research that has been reviewed into the crates are in research/, with the order of work in research/roadmap.md. Each forecast is committed as a git tag before the data that decides it exists, and results are reported whether they hit or miss.

Test Question Status
W1 How much water does land lose in an El Niño, and does it come back? Registered 2026-10-24; scored from early 2027
E1 Can monthly gravity see the 2025 Kamchatka earthquake, and is there more than the slip explains? Detected. Matches the USGS fault model, with no excess
Q0 What makes a monthly field noisy? Solar activity and satellite modes
Screen Which climate patterns move global land water? Only El Niño, once 27 tests are accounted for
Q2 Are the stated errors of the monthly fields right? Too small, by about 2× above degree 10
M1 Can a blind search of every month and place find earthquakes? Sumatra and Tohoku, with no false alarms; smaller ones need a targeted test
T1 Does GRACE-FO's laser ranging feel the 2022 Tonga eruption's pressure wave? Not detected: 1.75 ± 1.52 hPa on the first day (Z = 1.15, p = 0.12; 95% limit 4.3 hPa, against the expected 2.1–3.9), and nothing on the wave's second pass. Registered and frozen before the data was seen

Findings so far:

  • El Niño drains the land. Global land loses about 620 km³ of water per °C of El Niño (p < 0.001). La Niña's effect is smaller and not significant. The forecast for the 2026 El Niño is a loss of about 1,300 km³ by December, about 3.7 mm of sea level.
  • The Kamchatka earthquake is seen from orbit. The Mw 8.8 earthquake left a −3.5 / +3.5 µGal dipole, larger than at any of 100 random places.
    • It has 0.91 ± 0.16 times the amplitude of the USGS fault model (Okubo 1992 half-space), with correlation 0.59, so the slip explains it.
    • After-slip is not significant yet (p = 0.08).
  • The sun adds noise. Solar activity raises the short-wavelength noise of a month by 30% per standard deviation of solar flux. At the 300 km scale used above, no factor matters, so solar maximum does not explain those results.
  • A blind search finds the two biggest earthquakes and nothing false. Searching every month and place, with no catalogue, found Sumatra 2004 and Tohoku 2011 and no false alarms in 254 months. No flood or drought made a step that sudden.
  • The stated errors are too small. Above degree 10, the monthly fields scatter 2 to 2.5 times more than their stated errors. Scaled up, a Kalman smoother predicts withheld months with calibrated errors (rms 1.07), so it can fill the gaps in the record and map its uncertainty.

Reproduce everything

You need Rust 1.85 or later. All the data is free.

1. Download the data (about 150 MB; T1 also needs GRACE-FO Level-1B and AOD1B from PO.DAAC, which need a free Earthdata login, and the GOT4.10c tide grids from NASA GSFC):

mkdir -p data && cd data

# Every COST-G monthly field, 2002–2026, as one zip
curl -L -o costg.zip https://icgem.gfz.de/getseries/02_COST-G_/Grace-Grace-FO_RL02.1
unzip -q -j costg.zip -d costg
mkdir -p baseline && cp costg/GSM-2_200[4-9]*.gfc baseline/

# GRACE technical notes: C20 and C30 from laser ranging (TN-14), degree 1 (TN-13)
curl -LO https://archive.podaac.earthdata.nasa.gov/podaac-ops-cumulus-docs/gracefo/open/docs/TN-14_C30_C20_GSFC_SLR.txt
curl -LO https://archive.podaac.earthdata.nasa.gov/podaac-ops-cumulus-docs/gracefo/open/docs/TN-13_GEOC_CSR_RL0603.txt

# A static model
curl -L -o GOCO06s.gfc https://icgem.gfz.de/getmodel/gfc/32ec2884630a02670476f752d2a2bf1c395d8c8d6d768090ed95b4f04b0d5863/GOCO06s.gfc

# Climate indices (NOAA PSL), and solar and geomagnetic activity (GFZ Potsdam)
mkdir -p indices
for f in nina34.anom pdo amon.us nao ao aao qbo solar; do
  curl -L -o indices/$f.data https://psl.noaa.gov/data/correlation/$f.data
done
curl -L -o indices/dmi.had.long.data https://psl.noaa.gov/gcos_wgsp/Timeseries/Data/dmi.had.long.data
curl -L -o indices/Kp_ap_Ap_SN_F107_since_1932.txt https://kp.gfz-potsdam.de/app/files/Kp_ap_Ap_SN_F107_since_1932.txt

# Every earthquake of magnitude 8 or more since 2002 (USGS)
curl -L -o usgs_m8_2002_2026.csv "https://earthquake.usgs.gov/fdsnws/event/1/query?format=csv&starttime=2002-04-01&endtime=2026-08-01&minmagnitude=8.0&orderby=time-asc"

# The USGS fault model of the 2025 Kamchatka earthquake
mkdir -p usgs_us6000qw60
for f in coulomb.inp surface_deformation.disp; do
  curl -L -o usgs_us6000qw60/$f https://earthquake.usgs.gov/product/finite-fault/us6000qw60_1/us/1763589364802/$f
done
cd ..

For T1, also download GRACE-FO Level-1B, AOD1B and the GOT4.10c ocean tides. The PO.DAAC files need a free Earthdata login in ~/.netrc:

cd data
P=https://archive.podaac.earthdata.nasa.gov/podaac-ops-cumulus-protected
mkdir -p gracefo_l1b/aod1b tides
for d in 13 14 15 16; do
  for k in LRI noLRI; do
    curl -n -L -o gracefo_l1b/gracefo_1B_2022-01-${d}_RL04.ascii.$k.tgz $P/GRACEFO_L1B_ASCII_GRAV_JPL_RL04/gracefo_1B_2022-01-${d}_RL04.ascii.$k.tgz
    mkdir -p gracefo_l1b/2022-01-$d && tar xzf gracefo_l1b/gracefo_1B_2022-01-${d}_RL04.ascii.$k.tgz -C gracefo_l1b/2022-01-$d
  done
done
curl -n -L -o gracefo_l1b/AOD1B_2022-01_06.tgz $P/GRACE_AOD1B_GRAV_GFZ_RL06/AOD1B_2022-01_06.tgz
tar xzf gracefo_l1b/AOD1B_2022-01_06.tgz -C gracefo_l1b/aod1b
curl -L -o tides/got4.10c.tar.gz https://earth.gsfc.nasa.gov/sites/default/files/2023-12/got4.10c.tar.gz
tar xzf tides/got4.10c.tar.gz -C tides
cd ..

2. Make the figures. Each command writes an SVG and, for most, a CSV of the plotted values. Set three shortcuts first:

MONTH=data/costg/GSM-2_2026182-2026212_GRFO_COSTG_BF01_0201.gfc
TN14=data/TN-14_C30_C20_GSFC_SLR.txt
TN13=data/TN-13_GEOC_CSR_RL0603.txt
Command (cargo run --release -p lab -- …) Figure
geoid data/GOCO06s.gfc figures The geoid
water-map $MONTH data/baseline $TN14 $TN13 figures Water in July 2026
triangle $MONTH figures Error of each coefficient
noise figures Instrument noise
gradiometry data/GOCO06s.gfc figures Gradiometer missions
sst figures $MONTH Simulated missions (about 5 minutes and 1 GB per mission)
w1 data/costg data/baseline $TN14 $TN13 data/indices/nina34.anom.data figures El Niño and land water
screen figures/w1_land_storage.csv data/indices figures Climate-index screen
q0 data/costg data/baseline $TN14 $TN13 data/indices/Kp_ap_Ap_SN_F107_since_1932.txt figures Noise
e1 data/costg data/baseline $TN14 $TN13 data/usgs_us6000qw60 figures/q0_noise.csv figures Kamchatka earthquake
kalman data/costg data/baseline $TN14 $TN13 figures Are COST-G's errors right?
m1 data/costg data/baseline $TN14 $TN13 figures/kalman_degrees.csv data/usgs_m8_2002_2026.csv figures Blind search for sudden mass changes
tonga figures The Tonga Lamb wave as GRACE-FO would see it
claims figures Each proposal against general relativity, warp energy, thrust per watt
t1-test data/gracefo_l1b data/gracefo_l1b/aod1b data/GOCO06s.gfc data/costg/GSM-2_2022001-2022031_GRFO_COSTG_BF01_0201.gfc data/tides/GOT4.10c/grids_oceantide figures --unblind 2022-01-13 2022-01-14 2022-01-15 2022-01-16 The T1 test (GRACE-FO Level-1B and AOD1B from PO.DAAC, GOT4.10c from NASA GSFC)

How it is checked

cargo test --workspace

The tests compare against:

  • closed-form results;
  • published tables, such as Okada's (1985) check values and the Wahr et al. (1998) Love numbers;
  • an independent implementation of the synthesis (the former geo5d crate, to about 1e-15);
  • the published figures of Zingerle et al. (2024), CARIOQA and GRICE;
  • simulations that recover a known field;
  • the numbers in the research notes' check scripts, for every physics formula;
  • NOAA's official World Magnetic Model test values, all 100 rows.

Every example in the crate READMEs is compiled and run as a test.

Limits:

  • Glacial isostatic adjustment is not removed, so Hudson Bay and Scandinavia show crustal rebound as water gain.
  • No leakage correction yet.
  • The simulator has no time-variable gravity, so it cannot show temporal aliasing.

Data and sources

Data:

Key papers:

The research reports cite the sources of every formula.

About

Rust crates for physics from the measured to the novel: gravity and magnetic fields, gravitational waves, plasma and fusion, and frontier proposals beside general relativity, each tested against published numbers

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages