Finding
collisions_off now correctly makes the background collision frequency zero before derived quantities are assembled (tracked by #256). Several optional consumers still divide by that zero collision frequency directly:
KIM/src/dispersion/wkb_dispersion.f90 (three response terms)
KIM/src/dispersion/fun_input.f90 (two response terms)
KIM/src/asymptotics/flr2_fourier_kernel.f90
KIM/src/asymptotics/FLR2_asymptotics.f90
KIM/src/flr2/flr2_response.f90
KIM/src/diagnostics/kim_qldiff_mod.f90
The main configuration validation rejects collisions_off=.true. with collision_model='FokkerPlanck', but Krook/WKB and optional diagnostic/asymptotic combinations can still reach code that contains factors such as 1/nu or 1/(omega_c*nu). Zeroing unused susceptibility arrays in background construction therefore does not by itself make these downstream expressions finite.
Risk
Depending on the selected optional mode, a nominally collisionless run can produce IEEE divide-by-zero/invalid values or NaNs in WKB, FLR2, or quasilinear diagnostics.
Recommended resolution
- Define which optional response/diagnostic modes are supported with
collisions_off.
- Reject unsupported combinations during configuration validation.
- For supported collisionless limits, implement the analytically combined finite limit rather than evaluating separately divergent
1/nu factors and zero susceptibility moments.
- Add mode-level regressions that enable
collisions_off and assert finite outputs/no IEEE exceptions.
Scope note
This was found while reviewing #256. It is intentionally not folded into that bounded background-ordering PR because each consumer requires a model-specific collisionless-limit decision.
Finding
collisions_offnow correctly makes the background collision frequency zero before derived quantities are assembled (tracked by #256). Several optional consumers still divide by that zero collision frequency directly:KIM/src/dispersion/wkb_dispersion.f90(three response terms)KIM/src/dispersion/fun_input.f90(two response terms)KIM/src/asymptotics/flr2_fourier_kernel.f90KIM/src/asymptotics/FLR2_asymptotics.f90KIM/src/flr2/flr2_response.f90KIM/src/diagnostics/kim_qldiff_mod.f90The main configuration validation rejects
collisions_off=.true.withcollision_model='FokkerPlanck', but Krook/WKB and optional diagnostic/asymptotic combinations can still reach code that contains factors such as1/nuor1/(omega_c*nu). Zeroing unused susceptibility arrays in background construction therefore does not by itself make these downstream expressions finite.Risk
Depending on the selected optional mode, a nominally collisionless run can produce IEEE divide-by-zero/invalid values or NaNs in WKB, FLR2, or quasilinear diagnostics.
Recommended resolution
collisions_off.1/nufactors and zero susceptibility moments.collisions_offand assert finite outputs/no IEEE exceptions.Scope note
This was found while reviewing #256. It is intentionally not folded into that bounded background-ordering PR because each consumer requires a model-specific collisionless-limit decision.