Skip to main content
Sandbox Physics
How black holes move energy through cluster gas

How to check whether a numerical wave is a shock

The speed, jumps and entropy rise of a shock have to agree. Open gentle-wave-convergence.json and reproduce the field errors for a gentle thermal pulse. Then open weak-shock-acceptance.json to see how a separate fixed source passes the shock tests at two times.

Identify the two physical problems being compared

One spherical gas calculation cools under gravity and receives a central thermal pulse during eighteen to nineteen million years. The other starts from the same atmosphere and only cools. The thermal energy is five percent of the eighteen-million-year total input; power, schedule and spatial kernel stay fixed.

Spatial comparison uses 2048 and 4096 radial cells. The timestep comparison halves the CFL coefficient from 0.35 to 0.175 on the same 4096 grid. This coefficient limits how far the fastest signal travels across the grid in one step. Every case runs from its initial state to sixty million years.

Each spherical record retains twelve predeclared complete fields, 334 integral rows and 81 candidate-diagnostic frames. Complete fields are retained at the twelve declared times. Conservation and physical-domain checks cover every accepted step.

Reading: Sandbox Physics

A cell mean is not a centre-point sample

A finite-volume cell represents a shell average. Combining two fine cells requires their actual shell volumes. A simple arithmetic mean gives the larger outer shell too little weight.

Reconstruct density, radial velocity and pressure in each physical calculation, then subtract matching cooling. Project the fine-grid difference onto coarse volumes before comparing it. The independent reader script streams through the shells to check the same volume integrals.

f‾C=1VC∑j⊂CVjf‾j,Vj=4π3(rj+13−rj3)\overline f_C=\frac{1}{V_C}\sum_{j\subset C}V_j\overline f_j,\qquad V_j=\frac{4\pi}{3}\left(r_{j+1}^3-r_j^3\right)
Density, velocity and pressure are tested separately, preserving their distinct units.

Read the denominator before the percentage

The error divides the volume integral of the absolute discrepancy by the actual pulse-minus-cooling signal. Each variable and saved time is tested separately. Before heat release, the first three signals are exactly zero; those cases use an absolute-error check.

ef(t)=∑CVC∣δfCcoarse−PδfCfine∣∑CVC∣PδfCfine∣e_f(t)=\frac{\sum_C V_C\left|\delta f_C^{\rm coarse}-\mathcal P\delta f^{\rm fine}_C\right|}{\sum_C V_C\left|\mathcal P\delta f^{\rm fine}_C\right|}
Projection uses shell volumes. The original spatial limit is five percent and the half-timestep limit one percent.
Actual comparisonLargest relative field errorResult
512 to 10240.178Spatial fail
1024 to 20480.0794Spatial fail
2048 to 40960.0332Spatial pass
Half timestep, original coarse projection4.68727×10−64.68727\times10^{-6}Time pass
Half timestep, additional native 4096 comparison4.85967×10−64.85967\times10^{-6}Time pass

Reading: Sandbox Physics

Associate the same propagation branch

Several compression bands may coexist. Selecting the strongest feature independently in every frame can jump from a fading pulse to a growing one. Differencing those positions invents a speed that no single front travelled.

The diagnostic retains all bracketed negative-gradient minima in its window. Adjacent quarter-million-year frames require unique bidirectional links using actual upstream flow, sound speed and the predeclared weak-shock Mach interval. Ambiguous links, a selected-branch switch or a stronger truncated boundary shoulder make the candidate speed unavailable.

This establishes local kinematic consistency only. It neither classifies a minimum as a shock nor forces distant assessment times into one trajectory.

Reading: Sandbox Physics

Compare excess entropy with its matching floor

Heating and cooling themselves change entropy. An advected source-corrected label separates their declared contributions from the excess diagnostic. Candidate entropy is then compared with the largest acoustic-control, matching-cooling, spatial or timestep floor.

Matching cooling dominates all four final floors. At thirty million years, excess entropy is about 1.21 times ten to the minus ninth, versus a floor about 5.67 times ten to the minus eighth. Their ratio is 0.02134; the required ratio is greater than ten. The small negative value at twenty-six million years lies below the floor and is retained as unresolved numerical excess.

Time / million yearsExcess entropy / original floorOriginal RH jump relative error
26−0.1260.709
300.02130.367
340.02470.458
380.02770.304

Reading: Sandbox Physics

Admit the gentle wave and retain the shock failure

A shock must satisfy all the original conditions: a location beyond the source and stencil, compression, a Mach number above one and at most 1.3, consistent density/pressure jumps, separation from sonic numerical uncertainty, and entropy clearly above the matching floor. At least two consecutive assessment times must pass.

All four times fail jump, sonic-separation and entropy conditions. Refined pulse-gradient half-height widths are about 0.38 to 0.61 kiloparsecs, spanning about 19 to 65 local cells. These describe a finite waveform; they are not fitted discontinuity thicknesses.

A separate uniform ideal-gas RH reference passed its own tests. It supplies evidence for its own prescribed uniform-gas problem. The AGN pulse keeps its separate shock assessment.

Reading: Sandbox Physics · Forman et al. (2007)

Replay the two field norms locally

Download the full packet, native refinement ZIP, manifest, convergence record and independent script. ZIP members preserve the original NPZ bytes. The packet keeps all 4096 radii and twelve actual timestamps without downsampling or interpolation.

The replay gives spatial maximum 0.03321494 and original coarse-projected timestep maximum about 4.687 parts per million. Both maxima occur in the final-frame velocity column, and early zero-signal errors are zero. This recomputes field norms; the separate saved results describe per-step conservation, benchmarks and shock identification.

            python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install numpy==2.3.5
python reproduce-wave-refinement.py --materials . --output local-wave-check.json
          

Reading: Sandbox Physics

The fixed momentum pulse passes at two times

The second calculation uses the same mean power and eighteen-million-year input period. The model assigns ninety percent of the energy to cavities. The spherical gas calculation follows the response to the remaining ten percent. At the end of the input period, a radial force pushes gas outward inside three kiloparsecs for fifty thousand years. Positive work and direct heating share the ten-percent allocation. Energy returned by the gas goes into a separate store.

Find profileConvergence in weak-shock-acceptance.json. After subtracting matched cooling, the largest spatial error between 4096 and 8192 cells is 2.48%. Halving the timestep gives a maximum error of 0.0167% on the 8192 grid and 0.0146% after coarse projection. Then read calibratedAssessments for the individual fronts.

The Mach number is the front speed relative to the gas ahead, divided by its sound speed. The Rankine–Hugoniot relations use that number to predict the density and pressure jumps. The table gives the larger of the two relative jump errors, with a ten-percent limit. The excess entropy behind the front must exceed ten times the numerical floor. Subtract the excess ahead of the front as well. The resulting rise must clear the same threshold.

Time / million yearsMach numberRelative jump errorEntropy rise / floor
261.0238887.3427%22.44
301.0175747.7419%16.51
341.01706924.18%13.36
381.01302216.12%8.67

Reading: Weak-shock acceptance report (Sandbox Physics 2026)

Find the front in the saved gas profiles

Every test passes at 26 and 30 million years, two successive assessment times. The jumps miss the limit at 34 million years. At 38 million years the jump error still exceeds the limit and the entropy rise falls short of ten times its floor.

Open accepted-weak-shock-records.json.gz to inspect all 8192 shells at both passing times. The file keeps the momentum pulse and its cooling-only control on the same grid. A probe compares the two calculations at one radius. For the jumps in the table, read across the front within the momentum-pulse calculation.

Reading: Native weak-shock gas profiles (Sandbox Physics 2026)

Try the observation

Probe the gentle wave and the weak shock

  1. At thirty million years, move a probe through several compression and rarefaction regions.
  2. Follow complete profiles through time and check that a proposed front keeps its identity.
  3. Distinguish visibility of a compression wave from the shock conditions in the explanation.
  4. Choose “Follow a weak shock” and drag the probe across the front at 26 million years. Switch to 30 million years and compare the marked radius and the jumps in the table.

Compare a different shock problem

  1. Read that Lab’s own initial conditions and assumptions.
  2. Compare its jump relations without combining its source energy with this gentle pulse.

Exercises and explained answers

Why refine space if the half-timestep error is already small?

The two errors arise from different discretizations. Earlier timestep errors were small while spatial waveform errors exceeded ten percent. Finite spatial resolution still affects the waveform after the timestep is reduced.

Why can connecting the steepest gradient in every frame invent a supersonic speed?

The selected maximum can switch between different pulses. The difference includes the separation between two branches; the inferred trajectory changes identity.

Primary sources and calculation notes

  1. Forman et al. (2007), Filaments, bubbles, and weak shocks in the gaseous atmosphere of M87

    Density and temperature jumps support the weak-shock interpretation in a different system, M87. Used as an observational contrast, not a calibration of the gentle pulse.

  2. Sandbox Physics, frozen gentle-source numerical evidence (2026)

    512/1024/2048/4096-cell refinement, the original shock criteria and matching controls for the five-percent thermal release. All four assessment times for this source fail the resolved-shock criteria.

  3. Weak-shock acceptance report (Sandbox Physics 2026)

    The fixed momentum-and-work pulse. See profileConvergence for the space and timestep checks and calibratedAssessments for the original shock criteria and the entropy rise across each of the four fronts.

  4. Native weak-shock gas profiles (Sandbox Physics 2026)

    Native simulated gas fields and matched cooling fields for 8192 shells at each of the two passing times. The frames entries locate the fronts and give their measured jumps.

Keep reading

What this page links to directly

See this series on the content map →

Black holes and cluster gas · Reading path

From cavities to the heating question

  1. ArticleWhat fills the dark holes in Perseus?
  2. ArticleDoes a passing pressure wave leave heat behind?
  3. ArticleHow much enthalpy does a rising bubble transfer?
  4. ArticleCompare radial transport with radiative cooling
  5. ArticleReplay a Perseus cavity pair against cooling losses
  6. You are hereHow to check whether a numerical wave is a shock
  7. ArticleFollow heating through condensation, cosmic rays and XRISM
1 more group

Other articles that use the same experiments

Each experiment from this article that another series also uses, followed by the articles there.

  1. LabSupernova Remnant Shocks and Particle Cycles
  2. ArticleWhy supernova remnants keep shining
  3. ArticleHow a strong shock turns motion into heat
  4. ArticleTwo shocks and a separate point explosion
  5. ArticleEnergetic seeds gain momentum one mean cycle at a time
  6. ArticleRecalculate a point blast and read the fixed HESS 2004 spectrum
  7. ArticleRead the upstream X-ray hotspots before inferring a magnetic field
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy