The chamber-pressure sub-step uses a correct fourth-order Runge-Kutta solver, but only chamber pressure is carried through the four stages. The web is advanced by explicit Euler outside the solver (states.py:168), and burn area and free chamber volume are frozen across the stages; the biliquid loop does the same with the propellant masses (states.py:224-225). The coupled scheme is therefore globally first order, not fourth.
Measured on examples/apcp_motor.py, chamber pressure interpolated at fixed probe times over timesteps from 4e-3 s down to 1.25e-4 s:
| probe time [s] |
observed order |
| 0.10 |
1.08, 1.04, 1.02, 1.01 |
| 0.50 |
1.07, 1.04, 1.02, 1.01 |
| 1.00 |
1.06, 1.03, 1.02, 1.01 |
The same measurement on the bare solver (dy/dt = -y) gives 4.06, 4.03, 4.02, 4.01, confirming the solver itself is fine and the order loss is in the surrounding timestep.
This is distinct from #319, which unfroze the inflow term to fix the effective stiffness and the resulting startup overshoot. That fix was correct but did not restore fourth-order accuracy.
The accuracy cost is small — about 0.007% in chamber pressure at a timestep of 1e-3 s, well below the uncertainty on the Saint-Robert coefficients — so the priority is correcting the claim, not the numerics:
The chamber-pressure sub-step uses a correct fourth-order Runge-Kutta solver, but only chamber pressure is carried through the four stages. The web is advanced by explicit Euler outside the solver (states.py:168), and burn area and free chamber volume are frozen across the stages; the biliquid loop does the same with the propellant masses (states.py:224-225). The coupled scheme is therefore globally first order, not fourth.
Measured on
examples/apcp_motor.py, chamber pressure interpolated at fixed probe times over timesteps from 4e-3 s down to 1.25e-4 s:The same measurement on the bare solver (
dy/dt = -y) gives 4.06, 4.03, 4.02, 4.01, confirming the solver itself is fine and the order loss is in the surrounding timestep.This is distinct from #319, which unfroze the inflow term to fix the effective stiffness and the resulting startup overshoot. That fix was correct but did not restore fourth-order accuracy.
The accuracy cost is small — about 0.007% in chamber pressure at a timestep of 1e-3 s, well below the uncertainty on the Saint-Robert coefficients — so the priority is correcting the claim, not the numerics:
docs/api/core/solvers.mdanddocs/theory/mass_balance.mddescribe the time marching as fourth order; scope that claim to the chamber-pressure sub-step and state the global order.