Skip to content

Update get_data_from_EFIT_for_SOFT.py #21

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion efit/get_data_from_EFIT_for_SOFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def get_Br_Bz(psi,R,Z,dR=5e-3,dZ=5e-3,Rpsi=[],Zpsi=[]):

#mf Bphi Yes nz-by-nr matrix Toroidal field component
FPOL = gfile.Ginfo['FPOL']; # Poloidal current function in m-T, F = RBT on flux grid
Btor = FPOL/r; # T, toroidal magnetic field Btor(r)
# Note that B0 = FPOL[0]/R0, and Btor(r) = B0*R0/r, so Btor(r) = FPOL[0]/R0*R0/r = FPOL[0]/r
Btor = FPOL[0]/r; # T, toroidal magnetic field Btor(r)
Bphi = np.zeros(shape=np.shape(RGRID)); # to store data
for iZ in range(len(z)): Bphi[iZ,:] = Btor; # T, toroidal magnetic field, Bphi(z,r)
BPHI = Bphi.T; # Bphi(r,z)
Expand Down