Appearance
The n = 1 polytrope: equilibrium and collapse
| ID | Group | Milestone | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|---|
| SV-7, SV-8 | Self-gravity | M8 (#81) · P4 | P | CPU, FNL | yes | selfgravity-star |
Case and scope
An n = 1 polytrope star under the isolated self-gravity of SV-6, centred in a closed box. The n = 1 polytrope is the Lane–Emden equilibrium
What the case catches:
- SV-7, the equilibrium: a potential or a force inconsistent with the pressure gradient. The spurious motion of the discrete scheme around the continuum equilibrium (the drift of the central density, the Mach number inside the star) must shrink with the grid;
- SV-8, the collapse: a leak in the exact exchange of
and through the isolated solver. Its symmetry (an even kernel) must give the same exactness as the periodic solver: drifts only at the Runge–Kutta order while and exchange, and the momentum stays at round-off.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | compressible Euler, | models |
| Poisson solver | FFT with isolated boundaries (poisson_bc = isolated): zero padding and the lattice Green's function | adam_poisson_fft_object.F90, adam_fnl_poisson_fft_object.F90 |
| Coupling | one solve per Runge–Kutta stage, the potential path | solve_potential, adam_flume_common_object.F90; add_potential_sources, adam_flume_cpu_object.F90 |
| Space | WENO5 (weno-u-5) flux splitting on characteristic variables (weno) | numerics |
| Time | SSP Runge–Kutta, 3 stages, CFL 0.4 (SV-8: 0.4, 0.2, 0.1) | adam_stepper_object.F90 (SELAH) |
| Positivity limiter | SV-7: cell (its gravity energy correction, M7-G1); SV-8: none | limit_positivity, adam_flume_cpu_object.F90; numerics |
| Boundaries | wall-inviscid on every face: a closed box, no mass or energy crosses it, so | boundary conditions; adam_flume_bc_object.F90 |
| Initial condition | polytrope: the star and its atmosphere | set_initial_conditions, adam_flume_ic_object.F90 |
Initial and boundary conditions
| Item | Value |
|---|---|
| Star | polytrope: n = 1, radius |
| Atmosphere | isothermal at the central temperature ( |
| Box | wall-inviscid on every face |
| Ranks | 2 |
SV-7, equilibrium (star) | star_pressure_factor 1, atmosphere cell; |
SV-8, collapse (starc) | star_pressure_factor 0.5, atmosphere |
Regression selfgravity-star | star --levels 1: |
Input files
| File | Role |
|---|---|
src/tests/flume/verification/selfgravity/make_polytrope.py | writes star and starc (--cells, --levels, --cfl, --time-max, --it-save, --atmosphere, --limiter; the AMR options are on the star on AMR) |
src/tests/flume/verification/selfgravity/star.sh | runs the legs sv7, sv8 here and sv14 to sv17 of the star on AMR (--np N, --legs LIST, --keep; FLUME_EXE selects the backend) |
src/tests/flume/verification/selfgravity/star_oracle.py | convergence (SV-7): the drifts on two grids and their reduction |
src/tests/flume/verification/selfgravity/jeans_oracle.py | conservation (SV-8): |
src/tests/flume/regression/selfgravity-star/input.ini | the frozen equilibrium at |
src/tests/flume/verification/make_doc_runs.sh, group isolated | sv7-l{2,3}, sv8-collapse-{0.4,0.2,0.1} (a checkpoint every 10 steps); needs exe/adam_flume_cpu_fft and exe/test_poisson_fft |
src/tests/flume/verification/make_doc_figures.py, fig_selfgravity_star | draws the figure (--only selfgravity-star) |
bash
cd src/tests/flume/verification/selfgravity && ./star.sh --legs sv7,sv8 # CPU (exe/adam_flume_cpu_fft)
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl_fft ./star.sh --legs sv7,sv8 # FNLResults

Top: at
The central density is the mean over the cells within one cell of the centre; the Mach numbers are taken inside
| Leg | Asserted | Bound | CPU | FNL |
|---|---|---|---|---|
| SV-7 | the largest central-density drift to | 1.73 | 1.74 | |
| SV-7 | the largest Mach number inside | 2.06 | the same | |
| SV-7 | the largest Mach number in the whole star (set at its surface): 0.43, 0.29; reduction | reported | 1.49 | 1.50 |
| SV-8 | drift of | 2.85, 3.09 | 2.85, 3.09 (the same drifts) | |
| SV-8 | the largest |
Measured: ADAM 0bcdf870 + the night-2026-11-22 tree (the paper commit, tag pending), CPU gfortran 16.2.0 + Open MPI 5.0.11 (iac_gnu) on medooza (gnode22), FNL nvfortran 26.9, CUDA 12.9 (iac_nvf) on NVIDIA A30, 2026-11-23 (selfgravity/star.sh --legs sv7,sv8, jobs 1369376 CPU, 1369378 FNL).
Related cases: the periodic analogue of the collapse is SV-4; the solver is SV-6; the star on AMR grids is SV-14 to SV-17; the limiter's gravity energy correction comes from the force (M7-G1).
Findings
- Only the time integration drifts. In the collapse
and each change by 74 % of , while drifts by at CFL 0.4 and falls as : the isolated solver conserves as exactly as the periodic one (SV-4), through its symmetry. - The positivity limiter breaks the exchange where it acts. Its gravity energy correction (M7-G1) is not part of the flux form. A star in a
atmosphere needs it at its surface (without it the gas there reaches in ten steps and its pressure goes negative), and with it drifts by by at , against without it in a atmosphere. SV-8 therefore runs in the heavier atmosphere, without the limiter. - A heavy atmosphere is not an equilibrium test. The
atmosphere holds 22 % of the star's mass, and the star then pulsates with 13 % of its central density at ; SV-7 uses the light one. - The equilibrium converges at about first order, set by the star's surface. The n = 1 surface has a kink in the density (
, ), the light atmosphere needs the limiter there (first order where it acts), and the surface is where the largest Mach number sits ( , ): it shrinks only 1.5-fold from to . The pulsation it drives sets the core's drift, which shrinks 1.7-fold, and the interior motion 2.1-fold. A star of radius 8 cells pulsates by 10 % of its central density, of 16 cells by 6 %. - The bound asserts convergence, not an order. The runs reach two free-fall times.
- The regression case
selfgravity-starfreezes the equilibrium atin the atmosphere without the limiter, not SV-7's light-atmosphere setup.