Appearance
Radiative cooling
| ID | Group | Milestone | Backends | Figure | Regression |
|---|---|---|---|---|---|
| CO (co1 to co7) | Euler | M11 (#93) | CPU, FNL | yes | radiative-shock |
Case and scope
[cooling] adds optically thin cooling,
What the case catches:
- a cooling that is not exact: a wrong segment, exponent or inverse, a lost digit near an exponent of 1, a step that depends on
; - a floor that leaks or overshoots;
- energy that is not accounted for:
plus the radiated energy must stay constant; - a dual-energy entropy left on the old adiabat: the next sync would lift the cooled cells back and undo the cooling;
- a backend that disagrees, a unit that is not converted, or a silent input;
- a cooling-dynamics coupling that is wrong: the shock speed, the layer and the dense layer of the radiative shock.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Model | euler (and euler-de, co4) with [cooling]: | adam_flume_cooling_object.F90 |
| Cooling | once per step after the dual-energy sync, Townsend's exact integration (D-M11-1), dt_factor limiter optional | adam_flume_cooling_library.F90, apply_cooling (CPU), apply_cooling_dev (FNL) |
| Space, time | as Sod (V1): WENO5 characteristic flux splitting, SSP-RK(3,3), CFL 0.5 | adam_flume_cpu_euler_kernels.F90, FNL adam_flume_fnl_euler_kernels.F90 |
Initial and boundary conditions
| Leg | Setup |
|---|---|
| co1 | the uniform box: the sod-x grid, 50 cells, dt_factor = 0.01 |
| co2 | the box from |
| co3 | [cooling] with mhd-ideal; non-increasing temperatures; lambdas of another length; 65 nodes; no particle_mass; a negative dt_factor |
| co4 | the box moving at euler-de, and with euler, to |
| co5 | the co1 limited box to [reference] |
| co6 | the co1 CFL and co4 euler-de runs of CPU and FNL |
| co7 | the radiative shock: two streams |
The radiative shock. The shocked gas cools back to the floor and piles into a dense layer at rest. Taken whole, shock plus cooling layer is an isothermal jump at
Input files
| File | Role |
|---|---|
src/tests/flume/verification/cooling/make_co.py | writes the inputs (`--case box |
src/tests/flume/verification/cooling/check.sh | runs the legs (--legs co1,...,co7, default all but co6; FLUME_EXE selects the backend; co6 compares the work directories of both) |
src/tests/flume/verification/cooling/co_oracle.py | the isochoric ODE by Gauss–Legendre quadrature in |
src/tests/flume/regression/radiative-shock/input.ini | the frozen co7 case, 100 cells to |
make_doc_runs.sh <runs> cooling, make_doc_figures.py --only radiative-cooling | the figure (3 runs, 2 minutes) |
bash
cd src/tests/flume/verification/cooling && ./check.sh # CPU
FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh # FNL
./check.sh --legs co6 # CPU against FNLResults

Top: the uniform box from
| Leg | Asserted | Bound | CPU | FNL |
|---|---|---|---|---|
| co1 | ||||
| co1 | dt_factor = 0.01; every step within | |||
| co1 | ||||
| co2 | exact, bitwise | |||
| co3 | the six invalid inputs | refused | refused | refused |
| co4 | euler-de moving box: euler | the same | ||
| co5 | the box through [reference] against the code-units box | bitwise | bitwise | bitwise |
| co6 | FNL against CPU, every row: time, | (the same comparison) | ||
| co7 | the shock speed against | 1 % | ||
| co7 | the cooling layer's density against the ODE (L1); its | 5 %; one cell | ||
| co7 | the outer half of the dense layer: | 2 % |
Related cases: dual energy holds the entropy co4 keeps consistent, and the cold Noh shock whose collision co7 cools; Sod is the grid of the box.
Findings
- The cooling is exact at any step. Townsend's integration turns the stiff ODE into a closed form: the box follows the quadrature of the ODE to
at the CFL step, with no cooling limit on , and the floor is reached exactly. The dt_factorlimiter is there for the coupling with the dynamics, not for the cooling. - The entropy of the dual energy must follow the radiation. Cooling lowers the entropy for real; the cooled cells take the entropy of the internal energy the stored
holds. From the unrounded value, one ulp of rounding in left every cold cooled cell below its adiabat and the next sync lifted it. - The radiative shock checks the splitting. Its speed and its dense layer follow from the isothermal jump alone, its layer from a steady ODE whose end state is that jump; the run matches the three. The case needs a stable cooling exponent: at
the overstable shock oscillates for longer than the run. - The centre of the dense layer keeps the start-up transient. The gas of the first collision sits about 6 % below the floor temperature, at the dense layer's pressure; the floor stops the cooling, not the dissipation of the scheme, as in Noh's wall heating with the opposite sign.