V3FIT
coilsnamin.f
1  MODULE coilsnamin
2  USE modular_coils
3  USE saddle_coils
4  USE saddle_surface
5  USE vf_coils
6  USE tf_coils
7  USE bcoils_mod
8  USE bnorm_mod
9  USE control_mod
10  USE vcoilpts
11  IMPLICIT NONE
12 
13  namelist /coilsin/ nmod_coils_per_period, nf_phi, nf_rho, epsfcn,
14  1 lvf, lmodcur, lsurfv, lbnorm, rhoc, rhos, phic, phis, curmod,
15  2 dcc_wgt, dcc_exp, dcc_tgt, dcp_wgt, dcp_exp, dcp_tgt, rc_wgt,
16  3 rc_exp, rc_tgt, lmod_wgt, lmod_tgt, niter_opt, nstep, i_pol,
17  4 numsurf, m_num, n_num, rmn_sf, zmn_sf, num_vf, rc_vf, zc_vf,
18  5 cc_vf, lbcoil, lncsx, lsymm, lsaddle, nsad_coils_per_period,
19  6 ltfc, ltfcv, i_tfc, lsadsfv, nsad_u, nsad_v, nfils, sad_v_c,
20  7 sad_v_s, sad_u_c, sad_u_s, sad_v0, sad_u0, lsadcur, lpolcur,
21  8 cursad, numsurf_sad, m_sad, n_sad, rmn_sad, zmn_sad, dsc_wgt,
22  9 dsc_exp, dsc_tgt, r_ext, ymin_wgt, ymin_tgt, lmodular, lqos,
23  a rs_wgt, rs_exp, rs_tgt, lsmod, laccess, n_access, x0_access,
24  b y0_access, z0_access, x1_access, y1_access, z1_access,
25  c dac_wgt, dac_exp, dac_tgt, cvf_wgt, cvf_tgt, cs_wgt, cs_tgt,
26  d cu_wgt, cu_tgt, dpc_wgt, mc_bg, lp_bg, bcoil_cur, dscxp_wgt,
27  e dscxp_exp, dscxp_tgt, deln, delt, lspline, lsplbkp, nvar_vc,
28  f nvar_uc, bkp_wgt, bkp_tgt, mxb_wgt, lvfvar, nrvf_c, rcfc_vf,
29  g rcfs_vf, lvfr, lvfz, nopt_alg, lrestart, nopt_wsurf, rvf_wgt,
30  h rvf_tgt, nsad_group, ls_cur, csad_scl, lsad_wgt, lsad_tgt,
31  i rmax_wgt, rmax_tgt, bcoil_file, lbcoil_cur, lsadshape,
32  j lvfc, lcc_vf, csc_wgt, csc_tgt, scd_wgt, scd_tgt, lctrlpt,
33  k nwdim, nvf_fix, laxis, vacfld_wgt, sc_dmin_tgt, sc_dmin_wgt
34 !
35 ! VARIABLE DESCRIPTIONS
36 !
37 ! SCALARS
38 !
39 ! nmod_coils_per_period - no. of coils per fp, modular representation
40 ! nsad_coils_per_period - no. of coils per fp, saddle representation
41 ! nf_phi - no. of phi Fourier modes, modular rep.
42 ! nf_rho - no. of rho Fourier modes, modular rep.
43 ! epsfcn - step size for derivative approximation
44 ! niter_opt - max. number of function evaluations
45 ! nstep
46 ! i_pol - total poloidal current per fp
47 ! num_vf - no. of vf coil pairs
48 ! nsad_u - no. of u-coefficients (Fourier or spline) in saddle rep.
49 ! nsad_v - no. of v-coefficients (Fourier or spline) in saddle rep.
50 ! nfils - no. of filaments per modular/saddle coil (1, 3, or 5)
51 ! n_access - number of access zone constraints
52 ! deln - dist. from coil centerline to filament, normal to winding surface
53 ! delt - dist. from coil centerline to filament, tangent to winding surface
54 ! nvar_vc - nvar_vc(i,j) = 0/1 to fix/vary spline coefficient i, coil type j
55 ! nvar_uc
56 ! nrvf_c
57 ! nopt_alg
58 ! nopt_wsurf
59 ! nsad_group = array of integers defining current group for 'saddle' coils
60 ! nwdim
61 ! nvf_fix
62 !
63 ! LOGICAL CONTROL VARIABLES
64 !
65 ! lvf
66 ! lmodcur = T to vary currents in modular representation
67 ! lsurfv = T to vary winding surface coefficients in modular representation
68 ! lbnorm = T to read bnorm coeffs. and match B-normal at plasma boundary
69 ! lbcoil = T to read file containing background coils
70 ! lncsx = T to extend coils in v=0 plane for NBI access
71 ! lsymm = T for coil in v=0 plane with modular representation
72 ! lsaddle = T to use saddle OR modular coil representation
73 ! ltfc
74 ! ltfcv
75 ! lsadsfv = T to vary winding surface in saddle representation
76 ! lsadcur = T to vary currents in saddle representation
77 ! lpolcur = T to implement constraint on total poloidal currents
78 ! lmodular = T to use modular coil representation (defunct, superceded by lsaddle)
79 ! lqos = T for code to generate qos TF winding
80 ! lsmod = T to implement modular mode in saddle representation
81 ! laccess = T to implement access zone constraints
82 ! lp_bg
83 ! lspline = T for spline option in saddle representation
84 ! lsplbkp = T to vary spline breakpoints (not used yet)
85 ! lvfvar = T to vary VF coil geometry
86 ! lvfr = T to vary r-coefficients in VF coil representation
87 ! lvfz = T to vary z-coordinates in VF coil representation
88 ! lrestart
89 ! ls_cur
90 ! lbcoil_cur
91 ! lsadshape = T to vary coil geometry
92 ! lvfc = T to vary VF coil currents
93 ! lcc_vf
94 ! lctrlpt = T for control point spline representation (also need lspline=T)
95 ! laxis = T to include magnetic axis in coils.ext file
96 !
97 ! COILS FOR MODULAR REPRESENTATION
98 !
99 ! rhoc = coeffs. of cosine terms in modular representation of poloidal angle (u)
100 ! rhos = coeffs. of sine terms in modular representation of poloidal angle (u)
101 ! phic = coeffs. of cosine terms in modular representation of toroidal angle (v)
102 ! phis = coeffs. of sine terms in modular representation of of toroidal angle (v)
103 ! curmod = coil currents for modulars
104 ! numsurf - number of winding surface modes, modular rep.
105 ! m_num - vector of poloidal mode numbers, modular rep.
106 ! n_num - vector of toroidal mode numbers, modular rep.
107 !
108 ! COILS FOR SADDLE REPRESENTATION
109 !
110 ! sad_v_c = coeffs. of cosine terms for v-coordinate, saddle representation
111 ! sad_v_s = coeffs. of sine terms for v-coordinate, saddle representation
112 ! sad_u_c = coeffs. of cosine terms for u-coordinate, saddle representation
113 ! sad_u_s = coeffs. of sine terms for u-coordinate, saddle representation
114 ! sad_v0 = const. term used in original b-spline (non-control-pt.) repr.
115 ! sad_u0 = const. term used in original b-spline (non-control-pt.) repr.
116 ! cursad = coil currents for saddles
117 ! numsurf_sad - no. of winding surface modes, saddle rep.
118 ! m_sad - vector of poloidal mode numbers, saddle rep.
119 ! n_sad - vector of toroidal mode numbers, saddle rep.
120 !
121 ! SURFACE ARRAYS
122 !
123 ! rmn_sf = R-coefficients, winding surface for modular representation
124 ! zmn_sf = Z-coefficients, winding surface for modular representation
125 ! rmn_sad = R-coefficients, winding surface for saddle representation
126 ! zmn_sad = R-coefficients, winding surface for saddle representation
127 !
128 ! TARGET/WEIGHTS
129 !
130 ! dcc_wgt = weights for coil-coil spacing penalties, modular rep.
131 ! dcc_exp = exponents for coil-coil spacing, = -1 to use linear constraints
132 ! dcc_tgt = targets for coil-coil spacing penalties
133 ! dcp_wgt = weight for coil-plasma spacing penalties
134 
135 ! dcp_exp = exponent for coil-plasma spacing, = -1 to use linear constraint
136 ! dcp_tgt = target tor coil-plasma spacing penalty
137 ! rc_wgt = weights for coil radius of curvature penalties
138 ! rc_exp = exp. for coil radius of curvature penalty, = -1 for linear constraints
139 ! rc_tgt = targets for coil radius of curvature penalties
140 ! dsc_wgt = weights for coil-coil spacing penalties, 'saddle' rep.
141 ! dsc_exp = exponent for 'saddle' coil-coil spacing, = -1 for linear con.
142 ! dsc_tgt = targets for 'saddle' coil-coil spacing penalties
143 ! sc_dmin_tgt = 2D array of saddle coil-coil spacing penalties for each
144 ! coil pair (diagonal is excluded)
145 ! sc_dmin_wgt = 2D array of saddle coil-coil weights
146 ! r_ext
147 ! ymin_wgt = weights for y-min constraints
148 ! ymin_tgt = targets for y-min constraints
149 ! rs_wgt = weights for 'saddle' coil radius of curvature penalties
150 ! rs_exp = exp. For 'saddle' coil radius of curvature penalty, = -1 for linear
151 ! rs_tgt = targets for 'saddle' coil radius of curvature penalties
152 ! lsad_wgt = weights for 'saddle' coil length constraints
153 ! lsad_tgt = target values for 'saddle' coil length constraints
154 ! lmod_wgt = weights for modular coil length constraints
155 ! lmod_tgt = target values for modular coil length constraints
156 ! dac_wgt = weights for access penalties
157 ! dac_exp = exponent for access penalties
158 ! dac_tgt = target distance for access penalties
159 ! cvf_wgt
160 ! cvf_tgt
161 ! cs_wgt
162 ! cs_tgt
163 ! cu_wgt
164 ! cu_tgt
165 ! dpc_wgt
166 ! dscxp_wgt = weights for 'saddle' coil linear current density penalties
167 ! dscxp_exp = exponents for 'saddle' coil linear current density penalties
168 ! dscxp_tgt = targets for 'saddle' coil linear current density penalties
169 ! bkp_wgt
170 ! bkp_tgt
171 ! mxb_wgt
172 ! rmax_wgt
173 ! rmax_tgt
174 ! rvf_wgt
175 ! rvf_tgt
176 ! csc_wgt
177 ! csc_tgt
178 ! scd_wgt
179 ! scd_tgt
180 
181 ! rc_vf
182 ! zc_vf
183 ! cc_vf
184 ! i_tfc
185 ! x0_access = coordinates of endpoints for lines defining access zones
186 ! y0_access =
187 ! z0_access =
188 ! x1_access =
189 ! y1_access =
190 ! z1_access=
191 ! mc_bg
192 ! bcoil_cur = 'background' coil currents
193 ! rcfc_vf
194 ! rcfs_vf
195 ! csad_scl
196 ! bcoil_file = name of 'background' coil file
197 
198  CONTAINS
199 
200  SUBROUTINE read_coils_namelist (iunit, istat)
201  INTEGER :: iunit, istat
202 
203  READ (iunit, nml=coilsin, iostat=istat)
204 
205  END SUBROUTINE read_coils_namelist
206 
207  END MODULE coilsnamin