2 c ************************************************************************
3 c this
subroutine reads in a properly formatted screamer data
file
4 c see the screamer documentation for the proper form of the
data file.
5 c hnw february 26, 1993.
8 c changed the
switch model to point to just one routine, initialized
9 c variables in several of the routines to be used later for output,
10 c added an indexing array which saved the variable element number for
11 c an output request, plus other minor changes.
14 c mlk, 03/07/95, change include filenames to be 8 characters or less
15 c and split
line 1387 so
it is two lines, each less
17 c mlk, 03/15/95 correct bug in mitl with constant impedance to
18 c set eturnon
if not entered in input
file
19 c kws, 05/30/95 added input processing for
zflow plasma loss
model
21 c mlk, 07/19/95 add handling of detail_prints option
22 c mlk, 07/11/95, simplify output to log
file
23 c mlk, 08/10/95, clean-up opening of input
file(inpfile) and added
24 c writing error message to stdout
if open failed
26 c kws, 10/25/95, added flag to input to zloss and zpos models to
27 c allow a backward
line application. also modified
28 c to zloss and zpos to handel negative currents.
29 c kws, 08/13/97, added recognition of output requests for measure
31 c mlk, 01/05/98, added changes to handle sfc output requests
32 c kws, 07/27/98, changed
rwall model to stygar formulation
33 c kls, 01/27/99, added code so that sfc output requests with half_step
34 c time_flag reports that whole
time step will be used
35 c kws, 02/09/99, added code for n shell implosion
model and measure
37 c mb, 06/01/2006, split the code into subroutines. several files have
38 c been created, both .f and .h
39 c rbs, 2008/11/07, removed ref to echoln - moved to rdscreleminit
40 c rbs, 2008-12-08, included
write formats, removed ref to zdenfmt.h
41 c **********************************************************************
43 c include the
common blocks which are to be filled by the
50 c include the files with the keywords and the
integer flags as parameters.
58 c define passed variables
62 c various
data types for this subroutine.
65 character(len=80)::buffer
66 page1 = screamer_version //
' Circuit Analysis Code: '
68 c ======================================================
70 c Write a
banner page with screamer title and name.
73 c Read the general run parameters of the simulation
74 c initialize a few parameters(in
common blocs)
76 if (status .eq. 1000)
then
82 c initialize counters for number of branches, blocks ...
85 c ======================================================
86 c Read and process circuit elements
89 c Read in one
line and
strip the blanks and commas.
90 call
get_next_line(currline, field, nlines, eofflg, max_fields)
91 if (eofflg .eq. err) go to 1000
92 keyword = field(1)(1:keyword_len)
93 c Read element according to keyword
95 if (status .eq. k_found) goto 305
96 if (status .eq. 305) goto 305
97 if (status .eq. 1000) goto 1000
98 c the keyword was for an output
101 if (status .eq. 305) goto 305
102 if (status .eq. 1000) goto 1000
104 c ======================================================
107 c set some variables to values determined in this
subroutine for future
108 c use with a different name.
114 c check that no limits have been exceeded
119 c If no errors encountered, tell the status is ok, set
switch and
branch
120 c counters and the
block counter array, and
return to calling program.
121 c otherwise, tell
read errors encountered and stop.
123 900
if (numerr .eq. 0)
then
124 write(buffer,
'(A)')
' Input file read with no errors.'
125 call writebuffer(buffer)
129 &
' ### Errors found in input file, execution halted.'
130 call writebuffer(buffer)
subroutine printscreamerparameters
subroutine readscreleminit
c *****************************************************************************c Common blocks for SCREAMER output and tabling c & numout
c *****************************************************************************c Parameters for output selections c Added MFI CB parameters c Added callouts for the radiation yield in the c cylindrical foil model c Added line
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 branch
subroutine readscreamerparameters(status)
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 rwall(dt, time, parms, rvar)
subroutine get_next_line(currline, field, nlines, eofflg, max_fields)
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 model
subroutine get_env_var(inpfile, clen)
subroutine readscreamerdata(status)
subroutine readscreameroutputs(status)
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 it(branch ', i2, ')*****') c 17 format(' '
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 c c161 Z FLOW Plasma Loss Current c c c Applied B Diode c &Ion Ion c c c c Initial c PRINT Output Request for block
subroutine strip(text, start, end)
subroutine checkscreamerlimits
c *****************************************************************************c Common blocks for SCREAMER output and tabling c maxout
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
c *****************************************************************************c Common blocks for SCREAMER output printing
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
subroutine user(timestep, time, p1, p2, p3, p4, v1, v2, v3)
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 switch
subroutine readscreamerelements(status)
c This is a Fortran header file