Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
rstmitl.f
Go to the documentation of this file.
1  subroutine reset_mitl (index)
2 c
3 c Define passed variables
4 c
5  integer index
6 c
7 c ---------------------------------------------------------------------
8 c
9 c Resets the conductances in an MITL.
10 c This model uses circumference of feed and gap, where gap is assumed
11 c constant.
12 c
13 c ---------------------------------------------------------------------
14 c
15 c Modifications:
16 c KWS, 08/12/97, Changed 'esat' parameter, definitions of v1 and i2
17 c KWS, 03/02/94, Based on a simple LC network. Checked physics, Looks OK.
18 c KWS, 05/30/95, Added loss current density to the anode for Zflow Plasma
19 c loss model
20 c 2014-05-02 RBS: Changed integer*4 to integer
21 c
22 c ---------------------------------------------------------------------
23 c
24  include 'zdemmax.h'
25  include 'zdemcomm.h'
26  include 'zdemwork.h'
27 c
28  parameter(pi = 3.1415927)
29  parameter(zmuo = 4.0e-7 * pi)
30  parameter(epso = 8.8541878e-12)
31  parameter(cspeed = 2.99792458e+8)
32 c parameter (esat = 4.0e+7)
33  parameter(esat = 6.0e+7)
34  parameter(con1 = 0.0625 * zmuo * zmuo)
35  parameter(bm = 0.5)
36  parameter(xy = 0.9 * bm)
37  dimension gg(max_nodes)
38 c
39  ibranch = indexmitl(1,index)
40  iblock = indexmitl(2,index)
41  node1 = indexmitl(3,index)
42  node2 = indexmitl(4,index)
43  circum = pin(1,iblock,ibranch)
44  gap = pin(2,iblock,ibranch)
45  tau = pin(3,iblock,ibranch)
46  rcircum2 = pin(6,iblock,ibranch)
47  rgap = pin(7,iblock,ibranch)
48  rgap2 = pin(8,iblock,ibranch)
49  eturnon = pin(9,iblock,ibranch)
50 
51  elec_len = tau * cspeed
52  elec_area = elec_len * circum
53  if (eturnon .lt. esat) then
54  edenom = 1.0 / (esat - eturnon)
55  else
56  edenom = 1.0e-12
57  endif
58 c
59 c Reset the conductances.
60 c
61  do node = node1, node2
62  area = elec_area
63  v1 = 0.5 * abs(v(node,ibranch)+vold(node,ibranch))
64  e1 = v1 * rgap
65 c
66 c
67  if (e1 .ge. eturnon) then
68  if (e1 .gt. esat) then
69  emp1 = 1.0
70  else
71  emp1 = (e1-eturnon) * edenom
72  end if
73  v1mv = 0.00001 + 1.0e-6*v1
74  if (v1mv .gt. 0.09855) then
75  a1 = 1.38 * (v1mv+0.0001)**(-0.036)
76  else
77  a1 = 1.5
78  end if
79  zir1 = zir(node-1,ibranch) + zir(node,ibranch)
80  zir2 = zirn(node-1,ibranch) + zirn(node,ibranch)
81  zir1 = zir1 + zir2
82  argp = area * rgap2
83  con2 = 1.113e-5 * rgap2
84  b1s = con1 * zir1 * zir1 * rcircum2 + 1.0e-6
85  bc1s = con2 * (1.022*v1mv + v1mv*v1mv + 0.0001)
86 c
87 c ref: R. V. Lovelace and E. Ott, Pys. Fluids, 17, 1263 (1974) (Gaussian);
88 c also, J. M. Creedon, J. Appl. Phys, 48, 1072 (1977) (MKS).
89 c
90  rbc1s = 1.0 / bc1s
91 c
92 c exp with no attenuated tail - nominal parameters
93 c
94  arg1 = 1.21 * b1s * rbc1s
95  g1x = arg1**2.5
96 c
97 c super exponential g model with attenuated tail
98 c
99  if (g1x .gt. 40.0) then
100  fung1 = 0.0
101  else if (g1x .lt. -40.0) then
102  fung1 = 2.35e17
103  else
104  fung1 = exp(-g1x)
105  endif
106  xx = bm * (b1s * rbc1s)
107  if (xx .gt. xy) then
108  if ((xx-xy).gt. 4.0) then
109  ftail = 0.0
110  else
111  ftail = exp(-10.0*(xx-xy))
112  endif
113  else
114  ftail = 1.0
115  end if
116  fung1 = fung1 * ftail
117  g1y = 1.99e-3 * (v1mv**(a1-1.0)) * argp * fung1
118  g(node,ibranch) = g1y * emp1
119  else
120  g(node,ibranch) = 0.0
121  end if
122 c
123  end do
124 c
125 c --- KWS Zflow Plasma Loss Model ---
126 c
127 c Calculate loss current density to the anode
128 c
129  cup = zir(node1-1,ibranch)
130  cdn = zir(node2,ibranch)
131  anodeloss = cup-cdn
132  alossden = anodeloss/(area*float(node2-node1+1))
133  pin(10,iblock,ibranch) = alossden
134 c
135 c ------------------------------------
136 c
137  return
138  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 gap
Definition: zdemfmt.h:84
subroutine reset_mitl(index)
Definition: rstmitl.f:1