-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi I think I found a bug in the computation of psinorm. It actually occurs whenever operating in reverse Ip case (for example whenever we operate with positive Ip and Bt which means counter clock-wise from the top)
Indeed in rz2psi the flux is multiplied by the factor -1_self.getCurrentSign(). After that the computation
is done getting the value of the flux on axis with self.getFluxAxis() which is not multiplied by the same factor. Indeed if you try to evaluate the flux at the radial vertical position of the axis as
self.rz2psi(Rax,Zax,time) in case you are running with positive Ip you get an opposite value respect to self.getFluxAxis().
I guess it can be simply solved by multiplying in line 826 of core.py both psi_boundary and psi_0 for -1_self.getCurrentSign().