Open
Description
This was observed by Jon in #213, and leads to error 76 in bootstrap_fraction_wilson
. This is because iprofile=1
and qstar
has dropped below q0
in routine culcur
; so alphaj
becomes negative, eventually leading to aj
being NaN. I suggest that alphaj
is prevented from becoming negative at the point at which it is set in routine culcur
:
if iprofile == 1:
# Ensure current profile consistency, if required
# This is as described in Hartmann and Zohm only if icurr = 4 as well...
# Tokamaks 4th Edition, Wesson, page 116
alphaj = qstar / q0 - 1.0
Note that the Wilson bootstrap routine is always run, even if it is not selected in the input file:
Line 921 in 7e15d39
James claimed to have fixed this problem but it seems to have come back.
Steps to reproduce
Expected behaviour
alphaj
should remain positive somehow.