Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in core.rz2psinorm #3

Open
nicolavianello opened this issue May 27, 2016 · 2 comments
Open

bug in core.rz2psinorm #3

nicolavianello opened this issue May 27, 2016 · 2 comments
Assignees

Comments

@nicolavianello
Copy link
Contributor

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

@markchil
Copy link
Contributor

Thank you for looking into this. This (and a few other locations we use getCurrentSign() in core.py) are done to correct for some inconsistencies in the signs of EFIT's output: some things it gives with the correct sign, other things it always puts out positive, even when the correct sign is negative. I think I should probably figure out a way to specify where the corrections are necessary in EFIT.py so that core.py gives the correct outputs for inputs with the correct sign.

@markchil markchil self-assigned this May 31, 2016
@jcwright77
Copy link

This is a constant headache for all EFIT users. We’re dealing with this issue right now in one of our codes. AKAIK, many if not all plasma simulations using EFIT equilibria have internal consistency checks on signs to correct them.
-john

On May 31, 2016, at 12:33 AM, markchil [email protected] wrote:

Thank you for looking into this. This (and a few other locations we use getCurrentSign() in core.py) are done to correct for some inconsistencies in the signs of EFIT's output: some things it gives with the correct sign, other things it always puts out positive, even when the correct sign is negative. I think I should probably figure out a way to specify where the corrections are necessary in EFIT.py so that core.py gives the correct outputs for inputs with the correct sign.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #3 (comment), or mute the thread https://github.com/notifications/unsubscribe/AH8lzUZ7oRFisHX58SmcZz7yE_pvkcF1ks5qG7owgaJpZM4Iohus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants