5 * betap0, ftok0, psiax0, helin0,
12 c....................................................................
13 write(fname,
'(a,a)') path(1:kname),
'durs.dat'
14 open(1,file=fname,form=
'formatted')
34 c---------------------------------------------------------------
54 c---------------------------------------------------------------
58 c****************************************************************
59 c--- definition mutuals induct. and selfinduct.
matrix
60 c--- for
"EDDY" conductors: ppind
63 SUBROUTINE l_matr( NOUT, NTER, NC, NCPFC,
64 * ntype, rc, zc, vc, hc,
73 dimension rc(nclim), zc(nclim), vc(nclim), hc(nclim)
75 dimension wecon(nilim)
76 c....................................................................
77 c--------------------------------------------------------------------
83 ppind(j1,j2) = ppind(j2,j1)
86 ppind(j1,j2) =
selind( ntype(j1),rc(j1),vc(j1),hc(j1) )
89 ppind(j1,j2) =
betind( ntype(j1),
90 * rc(j1), zc(j1), vc(j1), hc(j1),
92 * rc(j2), zc(j2), vc(j2), hc(j2) )
96 c
WRITE(nout,*)
'**** J1 = ',j1,
' ****'
97 c
WRITE(nout,*)
'PPIND(J1,J2) : J2=1,NC,10'
98 c
WRITE(nout,101) (ppind(j1,j2),j2=1,nc,10)
105 ppind(j1,j2) = ppind(j1,j2)*amu0
111 c
WRITE(nout,*)
'** SELFINDUCT. OF "EDDY" CONDUCTORS **'
112 c
WRITE(nout,*)
' PPIND(L,L), L=1,NC : NC =', nc
113 c
WRITE(nout,101) (ppind(l,l), l=1,nc)
114 c
WRITE(nter,*)
'** SELFINDUCT. OF "EDDY" CONDUCTORS **'
115 c
WRITE(nter,*)
' PPIND(L,L), L=1,NC : NC =', nc
116 c
WRITE(nter,101) (ppind(l,l), l=1,nc)
118 c********************************************************************
119 c transform of
"FULL" matrix "P" (
"NC*NC" SIZE ) to
120 c
"EQUIVALENT" matrix "P" (
"NCEQUI*NCEQUI" SIZE ).
121 c here ncequi = nc - ncpfc + nequi.
123 CALL
tramat( ppind, njlim, nc, ncpfc, nequi,
126 c [ ppind(i,j) pet units ] = [micro*h] * bbb
127 c bbb = 10.d0 / (4.d0*pi) / (2.d0*pi) = 0.12665148...
129 c ppind(19,19) = 12.2d0
130 c ppind(19,19) = 27.46153d0
131 c ppind(19,19) = 110.0d0*0.12665148d0
133 ncequi = nc - ncpfc + nequi
135 c
WRITE(nter,*)
'** SELFINDUCT. OF "EDDY" CONDUCTORS **'
139 c
WRITE(nter,*)
' PPIND(L,L), L=1,NCEQUI : NCEQUI =', ncequi
140 c
WRITE(nter,101) (ppind(l,l), l=1,ncequi)
142 c
WRITE(nter,*)
'** MUTUALS INDUCT. OF "EDDY" CONDUCTORS **'
147 c
WRITE(nter,*)
' PPIND(L,J), L =',l,
' J=1,NCEQUI =', ncequi
148 c
WRITE(nter,101) (ppind(l,j), j=1,ncequi)
151 c--------------------------------------------------------------------
153 write(fname,
'(a,a)') path(1:kname),
'ppind_mat.wr'
154 open(1,file=fname,form=
'formatted')
157 write(1,*) ((ppind(i,j),i=1,ncequi), j=1,ncequi)
159 c--------------------------------------------------------------------
160 101
FORMAT(2x,5e14.7)
162 c--------------------------------------------------------------------
172 common/comeqg/ ncequi
175 write(fname,
'(a,a)') path(1:kname),
'ppind_mat.wr'
176 open(1,file=fname,form=
'formatted')
179 read(1,*) ((ppind(i,j),i=1,ncequi), j=1,ncequi)
184 c***********************************************************************
185 c--- input of positions of
"PF_PROBE" points:
187 SUBROUTINE propnt( NOUT, NTER, NINFW, NGRA1,
188 * npro, rpro, zpro, fipro )
192 dimension rpro(*), zpro(*), fipro(*)
194 write(fname,
'(a,a)') path(1:kname),
'pf_probe.dat'
195 open(1,file=fname,form=
'formatted')
211 READ(1,*) rpro(l), zpro(l), fipro(l)
212 c
WRITE(nout,*) l, rpro(l), zpro(l), fipro(l)
214 c--------------------------------------------------------------------
215 c--------------------------------------------------------------------
219 c--------------------------------------------------------------------
220 write(fname,
'(a,a)') path(1:kname),
'propoi.wr'
221 open(1,file=fname,form=
'formatted')
224 write(1,*) ( rpro(i), i=1,npro)
225 write(1,*) ( zpro(i), i=1,npro)
226 write(1,*) (fipro(i), i=1,npro)
230 c***********************************************************************
231 c--- reading of positions of
"PF_PROBE" points:
237 dimension rpro(*), zpro(*), fipro(*)
240 write(fname,
'(a,a)') path(1:kname),
'propoi.wr'
241 open(1,file=fname,form=
'formatted')
244 read(1,*) ( rpro(i), i=1,npro)
245 read(1,*) ( zpro(i), i=1,npro)
246 read(1,*) (fipro(i), i=1,npro)
251 c***********************************************************************
252 c--- input of positions of
"FL_LOOP" points:
254 SUBROUTINE loopnt( NOUT, NTER, NINFW, NGRA1,
259 dimension rloo(*), zloo(*)
264 write(fname,
'(a,a)') path(1:kname),
'fl_loop.dat'
265 open(ninfw,file=fname,form=
'formatted')
281 READ(ninfw,*) rloo(l), zloo(l)
282 c
WRITE(nout,*) l, rloo(l), zloo(l)
284 c--------------------------------------------------------------------
285 c--------------------------------------------------------------------
289 write(fname,
'(a,a)') path(1:kname),
'loopoi.wr'
290 open(ngra1,file=fname,form=
'formatted')
293 write(ngra1,*) (rloo(i), i=1,nloo)
294 write(ngra1,*) (zloo(i), i=1,nloo)
296 c--------------------------------------------------------------------
299 c***********************************************************************
300 c--- input of positions of
"FL_LOOP" points:
305 dimension rloo(*), zloo(*)
308 write(fname,
'(a,a)') path(1:kname),
'loopoi.wr'
309 open(1,file=fname,form=
'formatted')
312 read(ngra1,*) (rloo(i), i=1,nloo)
313 read(ngra1,*) (zloo(i), i=1,nloo)
318 c***********************************************************************
320 c..... toroidal currents of passive conductor structures
322 SUBROUTINE pascur( NOUT, NTER, NEQUI, NFW, NBP, NVV,
323 * pjk, fwcurr, bpcurr, vvcurr )
330 IF( nfw .NE. 0 )
THEN
332 fwcurr = fwcurr + pjk(nequi+i)
336 IF( nbp .NE. 0 )
THEN
338 bpcurr = bpcurr + pjk(nequi+nfw+i)
342 IF( nvv .NE. 0 )
THEN
344 vvcurr = vvcurr + pjk(nequi+nfw+nbp+i)
348 c--------------------------------------------------------------------
351 c***********************************************************************
352 c--- printing and writing of numbers and positions of limiter points:
361 IF( nctrl .NE. 0 )
THEN
370 IF( nblm .NE. 0 )
THEN
373 c
WRITE(nout,*) l, rblm(l), zblm(l)
378 write(fname,
'(a,a)') path(1:kname),
'limpoi.wr'
379 open(ngra1,file=fname,form=
'formatted')
382 write(ngra1,*) (rblm(i), i=1,nblm), (zblm(i), i=1,nblm)
388 c-----------------------------------------------------------------------
391 c***********************************************************************
392 c--------------------- writing in disk files ---------------------------
394 SUBROUTINE wrtd1( NOUT, NTER, NFRWR1, NVAR, NGAV1,
395 * ngra1, ngra2, nboun, nbran, nprob, nloop,
396 * kstep, knel, tstep, timev,
398 * erps , errcu2, delps2, delaxr,
399 * tokout, psiout, psibou, psidel,
400 * betpol, zli3, alpnew, numlim,
401 * pvolum, fwcurr, bpcurr, vvcurr,
402 * npfc, ncop, nequi, nc, ncpfc, ncequi,
403 * nfw, nbp, nvv, nsegfw, cfwseg,
404 * npro, brpro , bzpro , bpcom , bp_exp,
405 * nloo, psloo , ps_exp,
406 * n_volt, pfvol1, v_full,
407 * n_cp, cp_com, cp_exp)
413 common /comus1/ rus1(nbndp2), zus1(nbndp2), nus1
414 common /comus2/ rus2(nbndp2), zus2(nbndp2), nus2
415 common /comlop/ rxb(nbndp2), zxb(nbndp2), nxb
417 common /equili/ bettot, rmx, zzrmx, rmn, zzrmn,
418 * zmx, rrzmx, zmn, rrzmn,
419 * r0cen, z0cen, radm, aspect,
420 * eupper, elower, delup, dellw, bfvakc
421 common /volpla/ vol_pl
424 dimension brpro(*), bzpro(*), bpcom(*), psloo(*)
425 dimension bp_exp(*), ps_exp(*)
426 dimension cp_com(*), cp_exp(*)
427 dimension pfvol1(*), v_full(*)
428 c.......................................................................
430 pvolum = 2.d0*pi*vol_pl
433 open(ngra1,file=
'nsteps.wr')
435 write(ngra1,*) nvar, kstep1
438 open(ngra2,file=
'tvalues.wr')
439 write(ngra2,*) kstep , timev , tstep , knel , ngav1,
440 * erps , errcu2, delps2, delaxr,
441 * rm , zm , rx0 , zx0 ,
442 * tokout, psiout, betpol, zli3 ,
443 * alpnew, numlim, psibou, psidel,
444 * pvolum, fwcurr, bpcurr, vvcurr
447 open(ngra2,file=
'bou_geom_t.wr')
448 write(ngra2,*) kstep , timev,
449 * bettot, rmx, zzrmx, rmn, zzrmn,
450 * zmx, rrzmx, zmn, rrzmn,
451 * r0cen, z0cen, radm, aspect,
452 * eupper, elower, delup, dellw
455 open(ngra2,file=
'z_axis_t.wr')
456 write(ngra2,*) timev , zm
459 open(ngra1,file=
'ncurrs.wr')
460 write(ngra1,*) npfc, ncop, nequi, nc, ncpfc, ncequi,
463 c---------------------------------------------------------------
464 IF( nfrwr1.NE.0 )
THEN
467 open(ngra1,file=
'n_voltage.wr')
468 write(ngra1,*) nvar, n_volt, label1
470 open(ngra2,file=
'voltage.wr')
471 write(ngra2,*) kstep, timev, tstep
472 write(ngra2,*) (pfvol1(i), i=1,n_volt)
473 write(ngra2,*) (v_full(i), i=1,n_volt)
476 open(ngra1,file=
'n_cp.wr')
477 write(ngra1,*) nvar, n_cp, label1
479 open(ngra2,file=
'cp_com.wr')
480 write(ngra2,*) kstep, timev, tstep
481 write(ngra2,*) (cp_com(i), i=1,n_cp)
482 write(ngra2,*) (cp_exp(i), i=1,n_cp)
485 open(ngra1,file=
'ncurse.wr')
486 write(ngra1,*) nvar, nsegfw, label1
488 open(ngra2,file=
'tcurse.wr')
489 write(ngra2,*) kstep, timev, tstep
490 write(ngra2,*) (cfwseg(i), i=1,nsegfw)
494 open(ngra1,file=
'n_probf.wr')
495 write(ngra1,*) nvar, npro, label1
497 open(nprob,file=
'probf.wr')
498 write(nprob,*) kstep, timev, tstep
499 write(nprob,*) (brpro(i), i=1,npro)
500 write(nprob,*) (bzpro(i), i=1,npro)
501 write(nprob,*) (bpcom(i), i=1,npro)
502 write(nprob,*) (bp_exp(i),i=1,npro)
507 open(ngra1,file=
'n_loopf.wr')
508 write(ngra1,*) nvar, nloo, label1
510 open(nloop,file=
'loopf.wr')
511 write(nloop,*) kstep, timev, tstep
512 write(nloop,*) (psloo(i), i=1,nloo)
513 write(nloop,*) (psloo(i), i=1,nloo)
514 write(nloop,*) (ps_exp(i),i=1,nloo)
518 open(nboun,file=
'plbound.wr')
519 write(nboun,*) nxb, kstep, timev
520 write(nboun,*) rx0, zx0
522 write(nboun,*) rxb(i), zxb(i)
524 c
write(nboun,*) (rxb(i),i=1,nxb)
525 c
write(nboun,*) (zxb(i),i=1,nxb)
528 c
open(nbran,file=
'branchs.wr')
529 c
write(nbran,*) nus1, nus2, kstep, timev
530 c
write(nbran,*) (rus1(i),i=1,nus1)
531 c
write(nbran,*) (zus1(i),i=1,nus1)
532 c
write(nbran,*) (rus2(i),i=1,nus2)
533 c
write(nbran,*) (zus2(i),i=1,nus2)
537 c-----------------------------------------------------------------------
540 c***********************************************************************
541 c--------------------- writing in disk files ---------------------------
543 SUBROUTINE wrtd2( NOUT, NTER, NFRWR1, NVAR, NGAV1,
544 * ngra1, ngra2, nboun, nbran, nprob, nloop,
545 * kstep, knel, tstep, timev,
547 * erps , errcu2, delps2, delaxr,
548 * tokout, psiout, psibou, psidel,
549 * betpol, zli3, alpnew, numlim,
550 * pvolum, fwcurr, bpcurr, vvcurr,
551 * npfc, ncop, nequi, nc, ncpfc, ncequi,
552 * nfw, nbp, nvv, nsegfw, cfwseg,
553 * npro, brpro , bzpro , bpcom , bp_exp,
554 * nloo, psloo , ps_exp,
555 * n_volt, pfvol2, v_full,
556 * n_cp, cp_com, cp_exp )
562 common /comus1/ rus1(nbndp2), zus1(nbndp2), nus1
563 common /comus2/ rus2(nbndp2), zus2(nbndp2), nus2
564 common /comlop/ rxb(nbndp2), zxb(nbndp2), nxb
566 common /equili/ bettot, rmx, zzrmx, rmn, zzrmn,
567 * zmx, rrzmx, zmn, rrzmn,
568 * r0cen, z0cen, radm, aspect,
569 * eupper, elower, delup, dellw, bfvakc
570 common /volpla/ vol_pl
573 dimension brpro(*), bzpro(*), bpcom(*), psloo(*)
574 dimension bp_exp(*), ps_exp(*)
575 dimension cp_com(*), cp_exp(*)
576 dimension pfvol2(*), v_full(*)
577 c.......................................................................
579 pvolum = 2.d0*pi*vol_pl
581 c=======================================================================
583 open(ngra1,file=
'nsteps.wr')
585 write(ngra1,*) nvar, kstep1
588 open(ngra2,file=
'tvalues.wr')
590 write(ngra2,*) kstep , timev , tstep , knel , ngav1,
591 * erps , errcu2, delps2, delaxr,
592 * rm , zm , rx0 , zx0 ,
593 * tokout, psiout, betpol, zli3 ,
594 * alpnew, numlim, psibou, psidel,
595 * pvolum, fwcurr, bpcurr, vvcurr
598 open(ngra2,file=
'bou_geom_t.wr')
600 write(ngra2,*) kstep , timev,
601 * bettot, rmx, zzrmx, rmn, zzrmn,
602 * zmx, rrzmx, zmn, rrzmn,
603 * r0cen, z0cen, radm, aspect,
604 * eupper, elower, delup, dellw
607 open(ngra2,file=
'z_axis_t.wr')
609 write(ngra2,*) timev , zm
611 c-----------------------------------------------------------------------
612 IF( nfrwr1 .NE. 0 )
THEN
613 IF( (kstep/nfrwr1)*nfrwr1 .EQ. kstep )
THEN
618 open(ngra1,file=
'n_voltage.wr')
619 write(ngra1,*) nvar, n_volt, label1
621 open(ngra2,file=
'voltage.wr')
623 write(ngra2,*) kstep, timev, tstep
624 write(ngra2,*) (pfvol2(i), i=1,n_volt)
625 write(ngra2,*) (v_full(i), i=1,n_volt)
628 open(ngra1,file=
'n_cp.wr')
629 write(ngra1,*) nvar, n_cp, label1
631 open(ngra2,file=
'cp_com.wr')
633 write(ngra2,*) kstep, timev, tstep
634 write(ngra2,*) (cp_com(i), i=1,n_cp)
635 write(ngra2,*) (cp_exp(i), i=1,n_cp)
638 open(ngra1,file=
'ncurse.wr')
639 write(ngra1,*) nvar, nsegfw, label1
641 open(ngra2,file=
'tcurse.wr')
643 write(ngra2,*) kstep, timev, tstep
644 write(ngra2,*) (cfwseg(i), i=1,nsegfw)
648 open(ngra1,file=
'n_probf.wr')
649 write(ngra1,*) nvar, npro, label1
651 open(nprob,file=
'probf.wr')
653 write(nprob,*) kstep, timev, tstep
654 write(nprob,*) (brpro(i), i=1,npro)
655 write(nprob,*) (bzpro(i), i=1,npro)
656 write(nprob,*) (bpcom(i), i=1,npro)
657 write(nprob,*) (bp_exp(i),i=1,npro)
662 open(ngra1,file=
'n_loopf.wr')
663 write(ngra1,*) nvar, nloo, label1
665 open(nloop,file=
'loopf.wr')
667 write(nloop,*) kstep, timev, tstep
668 write(nloop,*) (psloo(i), i=1,nloo)
669 write(nloop,*) (psloo(i), i=1,nloo)
670 write(nloop,*) (ps_exp(i),i=1,nloo)
674 c writing in file =
'plbound.wr'
676 c
open(nboun,file=
'plbound.wr')
678 c
write(nboun,*) nxb, kstep, timev
679 c
write(nboun,*) (rxb(i),i=1,nxb)
680 c
write(nboun,*) (zxb(i),i=1,nxb)
683 c writing in file =
'branchs.wr'
685 c
write(nbran,*) nus1, nus2, kstep, timev
686 c
write(nbran,*) (rus1(i),i=1,nus1)
687 c
write(nbran,*) (zus1(i),i=1,nus1)
688 c
write(nbran,*) (rus2(i),i=1,nus2)
689 c
write(nbran,*) (zus2(i),i=1,nus2)
694 c-----------------------------------------------------------------------
697 c***********************************************************************
698 c--------------------- writing in disk files ---------------------------
700 SUBROUTINE wrtd11( NOUT, NTER, NFRWR1, NVAR,
702 * kstep, tstep, timev,
703 * n_volt, pfc_exp, pfc_ref )
709 c-----------------------------------------------------------------------
711 dimension pfc_exp(n_volt_m), pfc_ref(n_volt_m)
712 dimension pfc_ex1(n_volt_m), pfc_re1(n_volt_m)
713 c-----------------------------------------------------------------------
714 IF( nfrwr1.NE.0 )
THEN
717 open(ngra1,file=
'ntcurr.wr')
718 write(ngra1,*) nvar, npfc, label1
720 open(ngra2,file=
'tcurrs.wr')
721 write(ngra2,*) kstep, timev, tstep
722 write(ngra2,*) (pfcur1(i), i=1,npfc)
726 pfc_ex1(i)=pfc_exp(i)*0.000001d0
727 pfc_re1(i)=pfc_ref(i)*0.000001d0
730 open(ngra1,file=
'n_pfceqw.wr')
731 write(ngra1,*) nvar, n_volt, label1
733 open(ngra2,file=
'pfceqw.wr')
734 write(ngra2,*) kstep, timev, tstep
735 write(ngra2,*) (pfceqw(i), i=1,n_volt)
736 write(ngra2,*) (pfc_ex1(i), i=1,n_volt)
737 write(ngra2,*) (pfc_re1(i), i=1,n_volt)
744 c***********************************************************************
745 c--------------------- writing in disk files ---------------------------
747 SUBROUTINE wrtd22( NOUT, NTER, NFRWR1, NVAR,
749 * kstep, tstep, timev,
750 * n_volt, pfc_exp, pfc_ref )
756 c-----------------------------------------------------------------------
758 dimension pfc_exp(n_volt_m), pfc_ref(n_volt_m)
759 dimension pfc_ex1(n_volt_m), pfc_re1(n_volt_m)
760 c-----------------------------------------------------------------------
761 IF( nfrwr1 .NE. 0 )
THEN
762 IF( (kstep/nfrwr1)*nfrwr1 .EQ. kstep )
THEN
767 open(ngra1,file=
'ntcurr.wr')
768 write(ngra1,*) nvar, npfc, label1
770 open(ngra2,file=
'tcurrs.wr')
772 write(ngra2,*) kstep, timev, tstep
773 write(ngra2,*) (pfcur2(i), i=1,npfc)
777 pfc_ex1(i)=pfc_exp(i)*0.000001d0
778 pfc_re1(i)=pfc_ref(i)*0.000001d0
781 open(ngra1,file=
'n_pfceqw.wr')
782 write(ngra1,*) nvar, n_volt, label1
784 open(ngra2,file=
'pfceqw.wr')
786 write(ngra2,*) kstep, timev, tstep
787 write(ngra2,*) (pfceqw(i), i=1,n_volt)
788 write(ngra2,*) (pfc_ex1(i), i=1,n_volt)
789 write(ngra2,*) (pfc_re1(i), i=1,n_volt)
REAL *8 function betind(NTYPE1, RC1, ZC1, VC1, HC1, NTYPE2, RC2, ZC2, VC2, HC2)
subroutine wrtd1(NOUT,NTER,NFRWR1, NVAR,NGAV1,
subroutine tramat(P, NJLIM, NC, NCPFC, NEQUI, NECON, WECON)
REAL *8 function selind(NTYPE, RC, VC, HC)
subroutine prtlim(NOUT, NTER, NGRA1)
subroutine loopnt(NOUT, NTER, NINFW, NGRA1,
subroutine rd_loop(NLOO, RLOO, ZLOO)
subroutine l_matr(NOUT,NTER, NC, NCPFC,
subroutine wrtd2(NOUT,NTER,NFRWR1, NVAR,NGAV1,
subroutine pascur(NOUT, NTER, NEQUI, NFW, NBP, NVV,
subroutine wrtd22(NOUT,NTER,NFRWR1, NVAR,
subroutine durs_dat(NOUT,NTER,NINEV,
subroutine propnt(NOUT, NTER, NINFW, NGRA1,
subroutine rd_prob(NPRO, RPRO, ZPRO, FIPRO)
subroutine wrtd11(NOUT,NTER,NFRWR1, NVAR,