Appearance
Sink particles
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| SI (si1 to si11) | Self-gravity | M12 (#94) | CPU, FNL | yes | sinks-shu |
Case and scope
[sinks] adds point masses that act through self-gravity only (numerics):
- their mass is deposited into the Poisson source by cloud-in-cell;
- the mesh gravity is interpolated back with the same weights;
- they are advanced by kick-drift-kick once per step.
They form where the gas meets the checks of Federrath et al. (2010) and accrete the gas above the threshold density of their accretion radius. Two bound, converging sinks merge. With runtime regridding they form on the finest level allowed and keep their neighbourhood there. The list is replicated: every rank holds every sink.
What the case catches:
- a sink that is not in the Poisson source: a missing deposit or a wrong normalisation, or a sink that feels the gas but pulls none of it;
- a self-force, or a mesh force far from Newton's: a sink at rest that moves, or a binary whose period, energy or angular momentum drifts;
- mass that is not conserved: by the accretion, the creation, the merger or a regrid;
- a creation that is too eager or too strict: a Jeans-stable box that forms a sink, or a collapse that forms none or several;
- an accretion rate that is wrong: against the similarity solution of Shu (1977);
- a regrid that coarsens a sink's neighbourhood, or a sink formed on a coarse level;
- a restart that loses the sinks, a refused input that runs anyway, or a backend that disagrees.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Model | euler with [gravity] self_gravity, isolated (James) or periodic, and [sinks] | adam_flume_sinks_object.F90 |
| Gravity | the CIC deposit into the packed Poisson source, the centred difference of | deposit_sinks, compute_sink_accelerations in adam_flume_common_object.F90 |
| Sink step | kick-drift-kick on the committed state once per step; $\Delta t \le \tfrac12 h/ | v |
| Creation, accretion, mergers | Federrath et al. (2010): the threshold | create_sinks, accrete_sinks, merge_sinks; FNL accrete_sinks_gpu |
| Runtime AMR | creation on the finest level allowed, | mark_runtime (sink_region), sink_accretion_radius |
| Space, time | WENO5 characteristic flux splitting, SSP-RK(3,3), the positivity limiter | as the polytrope |
Initial and boundary conditions
Every case is the polytrope box with its numerics:
| Leg | Setup |
|---|---|
| si1 | one sink of mass 1 at rest at |
| si2 | the equal-mass circular binary: masses 1 at |
| si3 | [sinks] without self-gravity; with mhd-ideal; lists of different lengths; a non-positive mass; a sink outside the domain |
| si4 | the si1 box 20 steps in one run, and 10 + 10 steps across a restart |
| si5 | a sink of mass 0.1 at rest in a dense, cold periodic background ( |
| si6 | the polytrope at a tenth of its pressure, kept isothermal at |
| si7 | a static periodic box at |
| si8 | two sinks of mass 1 at |
| si9 | the si2, si5, si6 and si8 runs of CPU and FNL |
| si10 | runtime AMR (a Jeans marker of 8 cells, a regrid every 4 steps, regrid_prolongation = conservative-state). The si1 sink on a base of |
| si11 | the overdense singular isothermal sphere of Federrath et al. (2010, §3.4): |
The singular isothermal sphere. The singular-isothermal-sphere initial condition sets the cell mean of si_oracle.py integrates:
Input files
| File | Role |
|---|---|
src/tests/flume/verification/sinks/make_si.py | writes the inputs (`--case rest |
src/tests/flume/verification/sinks/check.sh | runs the legs (--legs si1,...,si11, default every leg but si9; FLUME_EXE selects the executable, default exe/adam_flume_cpu_fft; si9 compares the work directories of both) |
src/tests/flume/verification/sinks/si_oracle.py | the oracles: Kepler, the orbital energy and angular momentum, the mass and momentum budgets, the AMR levels of the last checkpoint, Shu's similarity equations |
src/tests/flume/regression/sinks-shu/input.ini | si11 at |
make_doc_runs.sh <runs> sinks, make_doc_figures.py --only sink-particles | the figure (4 runs) |
bash
cd src/tests/flume/verification/sinks && ./check.sh # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl_fft ./check.sh # FNL
./check.sh --legs si9 # CPU against FNLResults

Top: the circular binary over one orbit, its separation and orbital energy within 2 % (the mesh force is softened at about two cells). Bottom left: the accretion rate of the overdense isothermal sphere at
| Leg | Asserted | Bound | CPU | FNL |
|---|---|---|---|---|
| si1 | the sink's displacement over | |||
| si1 | gas plus sink momentum, over the momentum they exchange | |||
| si2 | the separation; the period against Kepler's at the mean separation | 3 %; 2 % | the same | |
| si2 | the orbital energy | 1 %; 1 %; | ||
| si3 | the five invalid inputs | refused | refused | refused |
| si4 | the histories of 20 steps against 10 + 10 across a restart | bitwise | bitwise | bitwise |
| si5 | gas plus sink mass; the sink grows | exact; 9.7 % of the sink | ||
| si5 | gas plus sink momentum, over the momentum exchanged | 5 % | ||
| si6 | sinks formed; distance from the centre; mass | 1; one cell; | 1; | 1; the same; |
| si7 | sinks formed in the Jeans-stable box | none | none | none |
| si8 | sinks left; their mass and momentum against the sum | 1; | 1; exact, | 1; exact, |
| si9 | FNL against CPU: positions (cells), velocities, masses, every row | (the same comparison) | si2 | |
| si10 | the blocks within | all; none | 6 of 6; none (56 coarse blocks beyond) | the same |
| si10 | the sink at rest on the composite grid; gas plus sink mass across the regrids | the same | ||
| si10 | the collapse on AMR: one sink, on the finest level, at the centre; mass | 1; all; one cell; | 1; 8 of 8; | the same |
| si11 | the accretion rate over | 6 %; | 0.959; | 0.959; |
| si11 at | the accretion rate | — | 0.985 | — |
Related cases: the polytrope is the box and the collapse of si6 and si10, radiative cooling keeps si6 isothermal, and self-gravity under runtime AMR is the regrid that si10 drives.
Findings
- The sinks are part of the Poisson source. A sink at rest stays put within
cells, and gas and sink exchange momentum equal and opposite to of it. The binary follows Kepler within the mesh force's error: at 8 cells the force, softened at about two cells, is 0.7 % above Newton's. That is a resolution property, not a defect. - Mass is exact, momentum is not quite. Accretion, creation, mergers and regrids conserve the mass to round-off. Near a point mass, the gas feels the potential through face gradients and the sink through the CIC gather; the two differ by about 1 % of the exchanged momentum (si5).
- Sinks belong on the finest level allowed. A sink formed on a coarse level had its neighbourhood refined at the next regrid. That interpolated the cold, Mach-8 infall onto the point mass into the new children, and 42 of them lost their pressure. It also halved the accretion radius from one step to the next. Forming only on
[amr] max_level, within its cells, is Federrath et al.'s rule and removes both effects. The collapse also needs regrid_prolongation = conservative-state. - A composite grid pulls on a sink. A sink at rest whose neighbourhood is refined asymmetrically feels its own potential through the 2:1 seams. The force is constant, about
finest cells over , against on a uniform grid. It is a truncation effect of the composite Poisson operator, bounded by the 40 steps of si10. - The singular sphere needs cell means. Sampled at the cell centres,
loses the mass of the unresolved core: 2 % of the box, 5 % of the gravity at . The hydrostatic sphere then expands instead of collapsing. - Shu's rate converges at first order. The accretion rate is 4.1 % below Shu's at
and 1.5 % below at . Federrath et al. report about 3 % at their resolution. The marginal sphere ( ) is not a test at these resolutions: the threshold accretion zone stores , more than the sink takes before the box runs out. - CPU and FNL agree to round-off, within
, on every compared run. Comparisons of a sink at a symmetric centre use its mass and its distance from the centre only: which of 8 tied cells wins, or a velocity of , is round-off.