Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
mfiflmdl.f
Go to the documentation of this file.
1  Subroutine zmfi_model (time, cin, cout, vin, parms, gvar)
2 c
3 c Subroutine MFI
4 c
5 c Written by Ken Struve, Sept. 30, 1993.
6 c
7 c Modified Mar. 7, 1994. Put all variables that are needed from
8 c one time-step to the next in variable element arrays that are
9 c specific to each call of the routine. Therefore, this model may
10 c be called more than once in an input.
11 c
12 c Modifications:
13 c 1997-08-12 KWS: Added a bmin parameter to test bfld against,
14 c rather than testing against 0.0
15 c 2014-02-06 RBS: Changed real*4 to real
16 c 2014-05-05 RBS: Added internal variable definition
17 c
18 c Flash criterion supplied by Dillon McDaniel. See also J. P.
19 c VanDevender, "Power Flow for Vacuum Insulated Inductive Loads,"
20 c Proceedings of the 1981 Pulsed Power Conference, p. 248.
21 c
22 c This routine calculates the criterion for flashover of the MFI
23 c insulator, and then causes the insulator to crowbar once that
24 c criterion is exceeded. Specifically, the insulator will flash
25 c when the quantity Eparallel/(cB) exceeds 0.07, or Estack/(cB)
26 c exceeds 0.09 for a 45 deg insulator. Once the insulator flashes
27 c rest of the run. The routine also checks to see if the E field
28 c is high enough to flash before the test is applied. Once the
29 c insulator flashes, the resistance to ground is identical to the
30 c exponential decay model described in the SCREAMER manual. tsw is
31 c determined at the switch time, and tau is internally set
32 c (see parameter list).
33 c
34 c
35 c Input parameters are:
36 c
37 c rad = inner radius of the MFI insulator (m)
38 c d = insulator thickness (m)
39 c gmin = minimum (switch open) conductance (mhos)
40 c gmax = maximum (switch closed conductance (mhos)
41 c ni = number of insulators in parallel
42 c icbflag = 1 for switch to crowbar, otherwise it will not crowbar
43 c
44 c This allows calculating the MFI criteria without causing the
45 c insulator to flash
46 c
47 c Output parameters are:
48 c
49 c efld = E field across the insulator (V/m) (Not E parallel)
50 c bfld = B field at the insulator (wb/m2)
51 c xmfi = the mfi switch criterion
52 c gvar = the conductance of the insulator
53 c
54 c
55 c Define passed variables
56 c
57  real time, cin, cout, vin, parms(*), gvar
58 c
59 c Define included variables
60 c
61  include 'zdemmax.h' !parameters
62  include 'zdemout.h' !common blocks
63 c
64 c Define internal variables
65 c
66  real c, critvalu, tau, unot, pi, emin, bmin
67  real rad, d, gmin, gmax, xni, cbflag, swclosed, tsw
68  integer icbflag
69  real cperunit, rmin, rmax, rsistanc
70 c
71 c Set variable parameters
72 c
73  parameter(c=2.997925e8,critvalu=0.09,tau=0.5e-9)
74  parameter(unot=1.256637e-6,pi=3.141593,emin=5.0e6)
75  parameter(bmin=1.0e-6)
76 c
77 c
78  rad = parms(1)
79  d = parms(2)
80  gmin = parms(3)
81  gmax = parms(4)
82  xni = parms(5)
83  cbflag = parms(6)
84  swclosed = parms(7)
85  tsw = parms(8)
86 c
87  icbflag = int(cbflag)
88 c
89 c
90 c Find E, B, and the flash condition
91 c
92 c
93  efld = vin/d
94  cperunit=cin/xni
95  bfld = unot*cperunit/(2.0*pi*rad)
96  if (abs(bfld).le. bmin) then
97  xmfi=0.0
98  else
99  xmfi=abs(efld/(c*bfld*critvalu))
100  endif
101 c
102 c Skip tests if you don't want insulator to crowbar
103 c
104  if (icbflag .eq. 1) then
105  continue
106  else
107  goto 400
108  endif
109 c
110 c Test to determine whether insulator has already crowbar'd
111 c
112  if (swclosed .eq. 1.0) then
113  goto 500
114  else
115  continue
116  endif
117 c
118 c Test: determine whether voltage is high enough to flash insulator
119 c
120  if (abs(efld).ge.emin) then
121  continue
122  else
123  goto 400
124  endif
125 c
126 c Determine whether insulator is magnetically insulated or not
127 c
128  if (xmfi .gt. 1.0) then
129  continue
130  else
131  goto 400
132  endif
133 c
134 c Set switch time and switch closed flag
135 c
136  swclosed = 1.0
137  tsw = time
138  goto 500
139 c
140 c
141 c Switch open condition
142 c
143 c
144 400 gvar=gmin
145  goto 600
146 c
147 c
148 c Switch closed condition
149 c
150 c
151 500 rmin=1.0/gmax
152  rmax=1.0/gmin
153  rsistanc=rmin+(rmax-rmin)*exp(-(time-tsw)/tau)
154  gvar=1.0/rsistanc
155  goto 600
156 c
157 c
158 600 continue
159 c
160 c Save values for the next time step
161 c
162  parms(7) = swclosed
163  parms(8) = tsw
164 c
165 c Store output parameters
166 c
167  parms(9) = efld
168  parms(10) = bfld
169  parms(11) = xmfi
170 c
171  return
172  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 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 tsw
Definition: zdemfmt.h:132
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
Definition: zdemfmt.h:85
subroutine zmfi_model(time, cin, cout, vin, parms, gvar)
Definition: mfiflmdl.f:1
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 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 c
Definition: zdemfmt.h:7