1 Subroutine findzflow (time, ianode, V, Z,icathode,iplasma,zflow)
11 real time, ianode, v, z, icathode, iplasma,
zflow
15 complex root1, root2, root3
16 double precision a, a1, a2,
a3, d
17 real r(3), root, cur2diff, z2, ve, ve2, zflowlim
21 parameter(ve=2.5549953e5)
23 parameter(ve2=6.5280010e10)
24 parameter(zflowlim=1.0e3)
31 a1 = (v*v - 2.0*v*ve + ve2 - a*z2)/z2
32 a2 = 2.0*ve*a*(v - ve)/z2
36 if((a .gt. 1.) .and. (v .gt. 1.))
then
48 if (r(1) .ge. 0.0)
then
55 if (r(i) .ge. 0.0)
then
56 if((r(i) .le. a) .and. (r(i) .gt. root)) root = r(i)
59 if (root .eq. 0.0) root = a
65 iplasma = abs(ianode) - icathode
66 cur2diff = a - icathode*icathode
67 if (cur2diff.gt.1.0)
then
68 zflow = v / sqrt(cur2diff)
88 600
format(6x,
't',11x,
'Ia',10x,
'Ic',10x,
'Ip',10x,
'zf',10x,
'V'/
90 & 18x,
'Z',11x,
'a1',10x,
'a2',10x,
'a3',10x,
'd'/
92 & 16x,
'root1',19x,
'root2',19x,
'root3'/
127 double precision da1, da2, da3, d
132 double precision q, r, s, t, s3, t3
133 double precision da13,z,theta
134 double precision check1, check2, check3
135 parameter(pi=3.1415926535)
139 q = (3.0*da2 - da1*da1)/9.0
140 r = (9.0*da1*da2 - 27.0*da3 -2.0*da1*da1*da1)/54.0
152 if (s3 .ge. 0.0)
then
155 s = -1.0*(-1.0*s3)**(1.0/3.0)
158 if (t3 .ge. 0.0)
then
161 t = -1.0*(-1.0*t3)**(1.0/3.0)
164 z2 = -0.5*(s+t) - da13 + 0.5*(0.0,1.0)*sqrt(3.0)*(s-t)
172 theta = acos(r/sqrt(-1.0*q*q*q))
174 z1 = z * cos(theta/3.0) - da13
175 z2 = z * cos((theta + 2.0*pi)/3.0) - da13
176 z3 = z * cos((theta - 2.0*pi)/3.0) - da13
c *****************************************************************************c Various format statements for read_screamer_data output c To get these into made format to be characters c for each line corrected spelling errors in format added statement for Zflow Plasma Loss Model added format for CSV output type fixed more lines longer than characters added format for Measure Zflow Block and forward c reverse current directions in Zflow plasma loss c and Zflow POS models added format for SFC output type c removed from all code calls c c c c c a80 c i10 c No grids on plots c Do not write files containing the plotted points c Execute only one cycle c Do not echo the setup parameters and indicies c c &exitting c a13 c c c c c c c c102 c &described as a function of time c c c &described as a function of time c c c &function of time c c shell c &min A K c &trapped field c153 c c c Sin c c c remaining calls in rdscrelem c Tabular a10 Cond c c c &used with this model c Exponential model of a resistive c c c Rise model of a resistive c c Z FLOW POS c c c c SW1 a3
subroutine findzflow(time, ianode, V, Z, icathode, iplasma, zflow)
c *****************************************************************************c Various format statements for read_screamer_data output c To get these into made format to be characters c for each line corrected spelling errors in format added statement for Zflow Plasma Loss Model added format for CSV output type fixed more lines longer than characters added format for Measure Zflow Block and forward c reverse current directions in Zflow plasma loss c and Zflow POS models added format for SFC output type c removed from all code calls c c c c c a80 c i10 c No grids on plots c Do not write files containing the plotted points c Execute only one cycle c Do not echo the setup parameters and indicies c c &exitting c a13 c c c c c c c c102 c &described as a function of time c c c &described as a function of time c c c &function of time c c shell c &min A K c &trapped field time
subroutine cubicroots(da1, da2, da3, d, z1, z2, z3)
c *****************************************************************************c Various format statements for read_screamer_data output c To get these into made format to be characters c for each line corrected spelling errors in format added statement for Zflow Plasma Loss Model added format for CSV output type fixed more lines longer than characters added format for Measure Zflow Block and forward c reverse current directions in Zflow plasma loss c and Zflow POS models added format for SFC output type c removed from all code calls c c c c c a80 c i10 c No grids on plots c Do not write files containing the plotted points c Execute only one cycle c Do not echo the setup parameters and indicies c c &exitting c a13 c c c c c c c c102 c &described as a function of time c c c &described as a function of time c c c &function of time c c shell c &min A K c &trapped field c153 c c c Sin c c c remaining calls in rdscrelem c Tabular a10 Cond c c c &used with this model c Exponential model of a resistive c c c Rise model of a resistive c c Z FLOW POS c & zflow