Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
zflssmdl.f
Go to the documentation of this file.
1  Subroutine zflowloss (time, node, ib, parms, gvar)
2 c
3 c Changes for version 2.1 (KWS):
4 c Allows both forward and reverse direction of current.
5 c Time-averaged current and voltage values are now used.
6 c Zflow turn-on loss model improved.
7 c
8 c Written by Ken Struve, April 20, 1995
9 c
10 c This routine forces a plasma loss current in a magnetically insulated
11 c transmission line consistent with the zflow definition and the user
12 c specified zflow. The loss is only turned on after Child-Langmuir
13 c emission is turned off. The criterion is consistent with the
14 c calculation in the MITL model.
15 c
16 c
17 c Inputs to the model are:
18 c
19 c zflow: The zflow impedance in Ohms
20 c gap: The gap separation in meters, either disk or coaxial
21 c radius: The cathode radius (coaxial), or disk radius, in meters
22 c gmin: The minimum conductance, units of mhos (inverse ohms)
23 c gmax: The maximum conductance, units of mhos
24 c xni: The number of parallel lines being calculated
25 c
26 c Outputs are:
27 c
28 c gvar The time-varying conductance in mhos
29 c calczflow The calculated zflow in ohms, available are user output
30 c
31 c Define passed variables
32 c
33 
34  include 'zdemmax.h'
35  include 'zdemwork.h'
36  include 'zdemcomm.h'
37 c
38 c Define internal variables
39 c
40  real parms(max_var_parms)
41  real pi, cvac, zmuo, con1, bm, xy, emin, tthreshold, xmcsqd
42  parameter(pi = 3.1415927)
43  parameter(cvac = 2.9979e8)
44  parameter(zmuo = 4.0e-7 * pi)
45  parameter(con1 = zmuo * zmuo)
46  parameter(bm = 0.5)
47  parameter(xy = 0.9 * bm)
48  parameter(emin = 3.0e7)
49  parameter(tthreshold = 5.0e-9)
50  parameter(xmcsqd = 0.511e6)
51 c
52  zflow = parms(1)
53  gap = parms(2)
54  radius = parms(3)
55  gmin = parms(4)
56  gmax = parms(5)
57  emissionflag = parms(8)
58  tintegral = parms(9)
59  xni = parms(10)
60  forward = parms(11)
61 c
62 c
63 c Get the currents and voltage
64 c
65  if (forward .eq. 1.0) then
66  cup = 0.5*(zir(node-1,ib)+zirold(node-1,ib))
67  cdn = 0.5*(zir(node,ib)+zirold(node,ib))
68  else
69  cup = 0.5*(zir(node,ib)+zirold(node,ib))
70  cdn = 0.5*(zir(node-1,ib)+zirold(node-1,ib))
71  endif
72  cdn = 0.999999 * cdn
73  csw = cup-cdn
74  vsw = 0.5*(v(node,ib)+vold(node,ib))
75  vx = abs(vsw) + 1.0
76  efield = vx/gap
77 c
78 c
79 c First find the Child-Langmuir emission threshold. Don't bother
80 c calculating zflow losses until the C-L emission threshold is exceeded.
81 c The criterion for emission is that the field exceeds the minimum
82 c field for a time tthreshold. Usually emin is 300 kV/cm and
83 c tthreshold is 5 ns.
84 c
85  if (emissionflag .eq. 0.0) then
86  if (efield .ge. emin) then
87  tintegral = tintegral+ht
88  endif
89  if (tintegral .ge. tthreshold) then
90  emissionflag = 1.0
91 c write(*,*) 'Emission threshold exceeded at t = ', time
92  go to 100
93  else
94  gvar = gmin
95  calczflow = 1.0/gmin
96  go to 200
97  endif
98  endif
99 c
100 c
101 c
102 c Calculate the zflow loss turn on criterion. This is based on the
103 c magnetic insulation of the Child-Langmuir emission. This uses the same
104 c formulism of the MITL model. It is:
105 c
106 c c**2 B**2 / E**2 > 1 + 2 mc**2 / eV
107 c
108 c
109  100 continue
110  bs = (zmuo*cup/(2.0*xni*pi*radius))**2 + 1.0e-6
111  es = efield * efield + 1.0
112  critval = 1.0 + 2.0 * xmcsqd / vx
113  turnon = cvac * cvac * bs / (es * critval)
114 c
115 c
116 c
117 c exponential with no attenuated tail - nominal parameters
118 c
119  gx = (1.21 * turnon) ** 2.5
120 c
121 c super exponential g model with attenuated tail
122 c
123  if (gx .gt. 15.0) then
124  f = 0.0
125  else if (gx .lt. -15.0) then
126  f = 3.269e6
127  else
128  f = exp(-gx)
129  endif
130 c
131  xx = bm * turnon
132  if (xx .gt. xy) then
133  if ((xx-xy).gt. 4.0) then
134  tail = 0.0
135  else
136  tail = exp(-10.0*(xx-xy))
137  endif
138  else
139  tail = 1.0
140  end if
141 c
142  factor = 1.0 - f * tail
143 c
144 c
145 c
146 c Calculate zflow
147 c
148  if ((vsw. gt. 0.0) .and. (abs(cup).gt.abs(cdn))) then
149  gvar = abs(csw/sqrt(cup**2-cdn**2)) / zflow
150  calczflow = vsw/(sqrt(cup**2-cdn**2)+ 1.0e-12)
151  if (factor .ge. 0.0) then
152  gvar = gvar * factor
153  else
154  gvar = gmin
155  endif
156  else
157  gvar = gmin
158  calczflow = 1.0 / gmin
159  endif
160 c
161 c
162 c Bound the switch conductance by gmin and gmax
163 c
164 c
165  gvar = min(gvar,gmax)
166  gvar = max(gvar,gmin)
167 c
168 c Save the output values
169 c
170  200 continue
171 c if(((time.ge. 110.0e-9).and.(time.le.110.1e-9)).or.
172 c & ((time.ge. 120.0e-9).and.(time.le.120.1e-9)).or.
173 c & ((time.ge. 130.0e-9).and.(time.le.130.1e-9)).or.
174 c & ((time.ge. 140.0e-9).and.(time.le.140.1e-9)))
175 c & then
176 c write(*,201)time,cup,cdn,vsw,turnon,gx,xx,f,tail,factor,gvar
177 c endif
178 c 201 format(20e10.4)
179  parms(6) = calczflow
180  parms(7) = gvar
181  parms(8) = emissionflag
182  parms(9) = tintegral
183 c
184  return
185 c
186  end
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 c c c158 MFI Insulator CB c c & gmax
Definition: zdemfmt.h:154
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 gap
Definition: zdemfmt.h:84
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 c c c158 MFI Insulator CB c & gmin
Definition: zdemfmt.h:153
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 radius
Definition: zdemfmt.h:84
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
Definition: zdemfmt.h:133
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 c c c158 MFI Insulator CB c c xni
Definition: zdemfmt.h:154
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 & forward
Definition: zdemfmt.h:135
subroutine zflowloss(time, node, ib, parms, gvar)
Definition: zflssmdl.f:1