1 SUBROUTINE init_tf_coils (nvariables, xvariables)
10 INTEGER :: nvariables, nx_max, ny_max, nx, ny, ntf
11 REAL(rprec) :: xvariables(*)
12 REAL(rprec) :: tfc_xmin, tfc_xmax
13 REAL(rprec) :: tfc_ymin, tfc_ymax
14 REAL(rprec) :: tfc_zmin, tfc_zmax
15 REAL(rprec) :: tfc_dphi, tfc_phi, tfc_rad
16 REAL(rprec) :: tfc_dx, tfc_dy, tfc_scl
24 tfc_dphi = twopi/(nx_max*ny_max)
25 tfc_phi = 0.5_dp*tfc_dphi
28 tfc_rad = 2.15_dp/tfc_scl
29 tfc_xmin = -0.375_dp/tfc_scl
30 tfc_xmax = 0.375_dp/tfc_scl
31 tfc_dx = 0.150_dp/tfc_scl
33 tfc_ymax = 0.013_dp/tfc_scl
34 tfc_dy = 0.026_dp/tfc_scl
35 tfc_zmin = -2.48_dp/tfc_scl
36 tfc_zmax = 2.48_dp/tfc_scl
40 mtfcoil = nx_max*ny_max
46 tfc_x(ntf,1) = (tfc_xmax - (nx-1)*tfc_dx)
48 tfc_x(ntf,1) = (tfc_xmin + (nx-1)*tfc_dx)
50 tfc_x(ntf,2) = tfc_x(ntf,1)
51 tfc_x(ntf,3) = tfc_rad*cos(tfc_phi)
52 tfc_x(ntf,4) = tfc_x(ntf,3)
53 tfc_x(ntf,5) = tfc_x(ntf,1)
54 tfc_y(ntf,1) = (tfc_ymax - (ny-1)*tfc_dy)
55 tfc_y(ntf,2) = tfc_y(ntf,1)
56 tfc_y(ntf,3) = tfc_rad*sin(tfc_phi)
57 tfc_y(ntf,4) = tfc_y(ntf,3)
58 tfc_y(ntf,5) = tfc_y(ntf,1)
59 tfc_z(ntf,1) = tfc_zmax
60 tfc_z(ntf,2) = tfc_zmin
61 tfc_z(ntf,3) = tfc_zmin
62 tfc_z(ntf,4) = tfc_zmax
63 tfc_z(ntf,5) = tfc_zmax
64 tfc_cur(ntf) = i_tfc/mtfcoil
65 tfc_phi = tfc_phi + tfc_dphi
84 END SUBROUTINE init_tf_coils