1 SUBROUTINE cf_init( k_auto, nstep, dt, time,
2 * voltpf, d_pf_mat,d_tcam_mat )
12 c -----------------------------
21 common /comsta/ platok,eqdfn,i_bsh
24 common/com_flag/ kastr
27 c-----------------------------------------------------------------------
29 dimension rc(nclim), zc(nclim), pc(nclim), psip(nclim),
30 * vc(nclim), hc(nclim)
32 dimension rc1(nclim), zc1(nclim), rc2(nclim), zc2(nclim),
33 * rc3(nclim), zc3(nclim), rc4(nclim), zc4(nclim)
35 INTEGER necon(nilim), ntype(nclim)
36 dimension wecon(nilim)
38 common/comst0/ res(njlim), volk(njlim), volkp1(njlim)
40 common/comst1/ pjk(njlim),pjkp1(njlim),pjkp(njlim),pjkd(njlim)
41 common/comst2/ psk(njlim), pskp1(njlim),pskp(njlim),pskm1(njlim)
43 common/comloo/ rloop(nloopp),zloop(nloopp),
44 & rprob(nprobp),zprob(nprobp),fiprob(nprobp),nloop,nprob
46 dimension ccurx(nclim),ccury(nclim)
47 c***********************************************************************
53 c***********************************************************************
68 if(k_auto.eq.0) go to 2005
71 if(kastr.eq.1) go to 1150
73 write(fname,
'(a,a)') path(1:kname),
'durs.dat'
74 open(1,file=fname,form=
'formatted')
110 if(i_eqdsk.eq.1)
then
112 call
tab_efit(tokf,psax,eqdfn,rax,zax,b0,r0)
130 c***********************************************************************
131 c--- input of positions of
"PF_PROBE" points:
133 CALL
propnt( nout, nter, ninfw, ngra1,
134 * nprob, rprob, zprob, fiprob )
135 c***********************************************************************
136 c--- input of positions of
"FL_LOOP" points:
138 CALL
loopnt( nout, nter, ninfw, ngra1,
139 * nloop, rloop, zloop )
140 c***********************************************************************
143 c***********************************************************************
144 c--- input
parameters of pfc system and passiv conductors
146 CALL
conduc( nc, ncequi, ncpfc, nfw, nbp, nvv,
147 * rc,zc, pc, vc,hc, ntype,
148 * rc1,zc1, rc2,zc2, rc3,zc3, rc4,zc4,
151 * nout, nter, ninfw, ngra1 )
156 c***********************************************************************
157 c--- definition induct. and selfinduct.
matrix
158 c--- for
"EDDY" conductors:
"PPIND" from
COMMON /ppidps/
161 CALL
l_matr( nout, nter, nc, ncpfc,
162 * ntype, rc, zc, vc, hc,
167 IF( l.LE.nequi )
THEN
170 pjk(l) = pc(ncpfc+l-nequi)
174 write(fname,
'(a,a)') path(1:kname),
'currents.wr'
175 open(1,file=fname,form=
'formatted')
177 write(1,*) nequi,ncequi
178 write(1,*)(pjk(j),j=1,ncequi)
181 write(fname,
'(a,a)') path(1:kname),
'pfcurr.wr'
182 open(1,file=fname,form=
'formatted')
185 write(1,*)(pfceqw(j),j=1,nequi)
188 write(fname,
'(a,a)') path(1:kname),
'res_mat.wr'
189 open(1,file=fname,form=
'formatted')
191 write(1,*) (res(j),j=1,ncequi)
195 c..... toroidal currents of passive conductor structures
200 c********************************************************************
202 call
wrcoil(nc,ncpfc,rc,zc,pc,necon,wecon)
206 call
auto(rc,zc,pc,nc,nstep,ngrid,
209 * ntype, necon, wecon )
214 write(fname,
'(a,a)') path(1:kname),
'inpol.dat'
215 open(1,file=fname,form=
'formatted')
238 call
rd_prob( nprob, rprob, zprob, fiprob )
240 call
rd_loop( nloop, rloop, zloop )
243 write(fname,
'(a,a)') path(1:kname),
'currents.wr'
244 open(1,file=fname,form=
'formatted')
246 read(1,*) nequi,ncequi
247 read(1,*)(pjk(j),j=1,ncequi)
250 write(fname,
'(a,a)') path(1:kname),
'pfcurr.wr'
251 open(1,file=fname,form=
'formatted')
254 read(1,*)(pfceqw(j),j=1,nequi)
257 write(fname,
'(a,a)') path(1:kname),
'res_mat.wr'
258 open(1,file=fname,form=
'formatted')
260 read(1,*) (res(j),j=1,ncequi)
263 call
rdcoil(nc,ncpfc,rc,zc,pc,necon,wecon)
272 call
eqb( alf0,alf1,alf2, bet0,bet1,bet2, alw0,alw1,alw2,
274 * keyctr, nstep, platok, rax,zax, b0,r0, psax, igdf,
275 * n_tht, n_psi, epsro, nurs, i_eqdsk,i_bsh,
297 call prefit(rc,zc,ncpfc,necon,wecon,rax,zax,alp_b,psi_bnd)
304 call curfit_(rc,zc,ncpfc,necon,wecon,psi_bnd)
332 call
eq_0(pjk,psk,ncequi,nstep,ngrid,
333 * alf0, alf1, alf2, bet0, bet1, bet2,
334 * betpol, betplx, zli3,
336 * ftok, tokout, psicen, pscout,
337 * nursb,psi_bnd,alp_b,rax,zax,n_ctrl,b0,r0 )
341 call
eq_ax( pjk, psk, ncequi, nstep,ngrid,
342 * alf0, alf1, alf2, bet0, bet1, bet2,
343 * betpol, betplx, zli3,
345 * ftok,tokout,psicen,pscout,
347 * psi_bnd,alp_b,rax,zax,isymm )
351 call prefit(rc,zc,ncpfc,necon,wecon,rax,zax,alp_b,psi_bnd)
370 call precal(rc,zc,ncpfc,necon, wecon )
371 elseif(kxwx.eq.0)
then
372 call precal_wx(rc,zc,ncpfc,necon, wecon )
373 elseif(kxwx.eq.2)
then
374 call precal(rc,zc,ncpfc,necon, wecon )
377 if(n_ctrl.eq.1 .OR. kastr.eq.1)
then
378 call curfit_l(rc,zc,ncpfc,necon,wecon,psi_bnd)
380 call
curfit(rc,zc,ncpfc,necon,wecon,psi_bnd)
401 call
eq_ax( pjk, psk, ncequi, nstep,ngrid,
402 * alf0, alf1, alf2, bet0, bet1, bet2,
403 * betpol, betplx, zli3,
405 * ftok,tokout,psicen,pscout,
407 * psi_bnd,alp_b,rax,zax,isymm )
411 if(erps.gt.ereve0) go to 415
414 write(fname,
'(a,a)') path(1:kname),
'currents.wr'
415 open(1,file=fname,form=
'formatted')
417 write(1,*) nequi,ncequi
418 write(1,*)(pjk(j),j=1,ncequi)
421 write(fname,
'(a,a)') path(1:kname),
'pfc_curr.wr'
422 open(1,file=fname,form=
'formatted')
423 write(1,*)
'coil currents [mA]'
424 write(1,
'(a6,e13.5)')
'PF1',pjk(1)
425 write(1,
'(a6,e13.5)')
'PF2',pjk(2)
426 write(1,
'(a6,e13.5)')
'F3,4',pjk(3)
427 write(1,
'(a6,e13.5)')
'F5,6',pjk(4)
428 write(1,
'(a6,e13.5)')
'CS',pjk(5)
449 write(fname,
'(a,a)') path(1:kname),
'tcurrs.wr'
450 open(1,file=fname,form=
'formatted')
452 write(*,*)
'coil currents'
456 if(ik .eq. nepfc(j))
then
457 write(*,
'(i4,2(1pe13.5))') ik,pfcw1(j),pfceqw(ik)
465 c
write(nout,
'(8H li(3)=,1pe13.5)') zli3
479 call
eqb( alf0,alf1,alf2, bet0,bet1,bet2, alw0,alw1,alw2,
481 * keyctr, nstep, platok, rax,zax, b0,r0, psax, igdf,
482 * n_tht, n_psi, epsro, nurs, i_eqdsk,i_bsh,
493 subroutine aspid_flag(k_astr)
494 common/com_flag/kastr
499 subroutine aspid_ini(k_ini)
500 common/com_ini/key_ini
subroutine tab_efit(tokf, psax, eqdfn, rax, zax, b0, r0)
subroutine conduc(NC, NCEQUI, NCPFC, NFW, NBP, NVV, RC, ZC, PC, VC, HC, NTYPE, RC1, ZC1, RC2, ZC2, RC3, ZC3, RC4, ZC4, RES, VOLK, VOLKP1, NECON, WECON, NOUT, NTER, NINFW, ngra1)
subroutine loopnt(NOUT, NTER, NINFW, NGRA1,
subroutine rdcoil(nk, nkcoil, rk, zk, tk, necon, wecon)
subroutine eqb(alf0, alf1, alf2, bet0, bet1, bet2, alw0, alw1, alw2,
subroutine rd_loop(NLOO, RLOO, ZLOO)
subroutine l_matr(NOUT,NTER, NC, NCPFC,
subroutine auto(rk, zk, tk, nk, nstep, ngrid,
subroutine eq_ax(pcequi, psicon, ncequi, nstep, ngrid,
subroutine wrcoil(nk, nkcoil, rk, zk, tk, necon, wecon)
subroutine curfit(iopt, m, x, y, w, xb, xe, k, s, nest, n, t, c, fp, wrk, lwrk, iwrk, ier)
subroutine eq_0(pcequi, psitok, ncequi, nstep, ngrid,
subroutine propnt(NOUT, NTER, NINFW, NGRA1,
subroutine rd_prob(NPRO, RPRO, ZPRO, FIPRO)