src/zephyrus/collision.py on agu/collision_massloss carries the Kegerreis scaling law as it stood in Morrigan on 21 July. Morrigan has moved since, and the ZEPHYRUS copy has not.
Two differences, both in the same expression.
The mass ratio uses the target mass where the paper uses the total. ZEPHYRUS has
bracket = (v_c/v_esc)**2 * (M_i/M_T)**(1/2) * (rho_i/rho_t)**(1/2) * fm
with M_T documented as "mass of impactor (i) or total (T)" but passed the target mass by the caller. The docstring immediately above it writes the term as $M_i/M_{tot}$, so the formula and its own documentation already disagree. Morrigan fixed this on 23 July (commit 7bb84da, FormingWorlds/Morrigan): the parameter is now M_t for the target, M_tot = M_i + M_t is formed explicitly, and the ratio uses M_tot. Measured over a thousand impacts, the correction reduces the loss fraction by around 11 per cent typically and up to 20 per cent, so it is not a rounding level difference.
There is no clamp. The fit 0.64 * bracket**0.65 is only meaningful on [0, 1], and it does go above 1 in practice: sampling real impacts from Morrigan runs, the raw value reached 2.5 and exceeded 1 in about half a per cent of cases. Morrigan clamps with min(max(frac_lost, 0.0), 1.0). Without the clamp a strong impact returns a fraction above one, and whatever consumes it removes more atmosphere than exists.
Two smaller things while the file is being touched. collision.py is not re-exported from zephyrus/__init__.py, so it is not reachable as part of the package API yet, and there is no test file for it. The natural first test is a pinned value against the paper with a guard showing the wrong denominator falls outside tolerance, since that is exactly the error being corrected here.
Worth noting for whoever picks this up: PROTEUS is going to call this function rather than Morrigan's own copy, so this is the one that ends up in coupled results.
src/zephyrus/collision.pyonagu/collision_masslosscarries the Kegerreis scaling law as it stood in Morrigan on 21 July. Morrigan has moved since, and the ZEPHYRUS copy has not.Two differences, both in the same expression.
The mass ratio uses the target mass where the paper uses the total. ZEPHYRUS has
with$M_i/M_{tot}$ , so the formula and its own documentation already disagree. Morrigan fixed this on 23 July (commit
M_Tdocumented as "mass of impactor (i) or total (T)" but passed the target mass by the caller. The docstring immediately above it writes the term as7bb84da, FormingWorlds/Morrigan): the parameter is nowM_tfor the target,M_tot = M_i + M_tis formed explicitly, and the ratio usesM_tot. Measured over a thousand impacts, the correction reduces the loss fraction by around 11 per cent typically and up to 20 per cent, so it is not a rounding level difference.There is no clamp. The fit
0.64 * bracket**0.65is only meaningful on[0, 1], and it does go above 1 in practice: sampling real impacts from Morrigan runs, the raw value reached 2.5 and exceeded 1 in about half a per cent of cases. Morrigan clamps withmin(max(frac_lost, 0.0), 1.0). Without the clamp a strong impact returns a fraction above one, and whatever consumes it removes more atmosphere than exists.Two smaller things while the file is being touched.
collision.pyis not re-exported fromzephyrus/__init__.py, so it is not reachable as part of the package API yet, and there is no test file for it. The natural first test is a pinned value against the paper with a guard showing the wrong denominator falls outside tolerance, since that is exactly the error being corrected here.Worth noting for whoever picks this up: PROTEUS is going to call this function rather than Morrigan's own copy, so this is the one that ends up in coupled results.