Skip to content

Fix new time-step for spin-jet scheme

Filip Husko requested to merge fix_spin_jet_timestep into master

I have tested out changes introduced in the recent MR with all the SPIN-JET updates, but one issue did not come up until I ran high-res tests down to low enough redshifts in a large enough volume. Specifically, one black hole gets very low time-steps. I managed to trace the issue to the new time-step, which is computed in the following way in lines 1354-1356 in black_holes.h:

const float dt_redirection = 0.1 * m_warp(bp, constants, props) /
                                   bp->accretion_rate * j_BH(bp, constants) /
                                   j_warp(bp, constants, props) / sine;

The problem is in the fact that m_warp and j_warp are defined as floats (and they have been all this time), but their values can be very small (e.g. m_warp can be 10^-5 Msol). With this fix they are changed to be doubles, and I have confirmed this stops the problematic BH from having very small time-steps.

Merge request reports