Skip to content

bug in core.rz2psinorm #3

@nicolavianello

Description

@nicolavianello

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().

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions