Skip to content

Commit

Permalink
f_psi_sign has been added for coil in torpex.py for signed Bp
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukiST committed Sep 18, 2024
1 parent 7653245 commit a69274d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hypnotoad/cases/torpex.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def __init__(self, equilibOptions, meshOptions):
self.Rmax = float("inf")
self.Zmin = -float("inf")
self.Zmax = float("inf")

self.f_psi_sign = 1.0 # H.seto (dummy)

elif "gfile" in equilibOptions:
# load a g-file
with open(equilibOptions["gfile"], "rt") as fh:
Expand Down Expand Up @@ -207,7 +210,7 @@ def __init__(self, equilibOptions, meshOptions):
"consistent with sign of grad(psi)"
)

self.f_psi_sign = numpy.sign(psi_bndry - psi_axis)
self.f_psi_sign = numpy.sign(psi_bndry - psi_axis) # H.seto (dummy)

# index of a point close to the magnetic axis
i_axis = numpy.searchsorted(R, R_axis)
Expand Down Expand Up @@ -298,7 +301,7 @@ def __init__(self, equilibOptions, meshOptions):
)
self.Bt_axis = Bt[ZindMid, RindMid]

self.f_psi_sign = numpy.sign(0.0 - psi[ZindMid, RindMid]) # H.seto
self.f_psi_sign = numpy.sign(0.0 - psi[ZindMid, RindMid]) # H.seto (dummy)

else:
raise ValueError("Failed to initialise psi function from inputs")
Expand Down

0 comments on commit a69274d

Please sign in to comment.