Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
rdscrdat.f
Go to the documentation of this file.
1  subroutine readscreamerdata(status)
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.
6 c
7 c modified march 7, 1994, kws. added rwall model, added mfi model,
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.
12 c
13 c modifications:
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
16 c than 72 characters
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
20 c mlk, 06/09/95 skip over printing out user subroutine names
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
25 c mlk, 08/18/95, moved opening of input file(inpfile) to get_env_var
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
30 c zflow and cathode current block
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 **********************************************************************
42 c
43 c include the common blocks which are to be filled by the
44 c this subroutine.
45 c
46  include 'zdemmax.h'
47  include 'zdemcomm.h'
48  include 'zdemout.h'
49 c
50 c include the files with the keywords and the integer flags as parameters.
51 c
52  include 'zdemparm.h'
53  include 'zdempprm.h'
54  include 'zdemenv.h'
55  include 'rdscrdat.h'
56  include 'version.h'
57 c
58 c define passed variables
59 c
60  integer status
61 c
62 c various data types for this subroutine.
63 c
64  character page1*80
65  character(len=80)::buffer
66  page1 = screamer_version // ' Circuit Analysis Code: '
67 
68 c ======================================================
69 c initializations
70 c Write a banner page with screamer title and name.
71  call banner(page1)
72 
73 c Read the general run parameters of the simulation
74 c initialize a few parameters(in common blocs)
75  call readscreamerparameters(status)
76  if (status .eq. 1000) then
77  goto 1000
78  endif
79 c printing general parameters
81 
82 c initialize counters for number of branches, blocks ...
83  call readscreleminit
84 
85 c ======================================================
86 c Read and process circuit elements
87 c
88  305 continue
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
94  call readscreamerelements(status)
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
99 c print '(i8)', numout
100  call readscreameroutputs(status)
101  if (status .eq. 305) goto 305
102  if (status .eq. 1000) goto 1000
103  goto 305
104 c ======================================================
105  1000 continue
106 c
107 c set some variables to values determined in this subroutine for future
108 c use with a different name.
109 c
110  nbk(nbrns) = nblks
111  nb = nbrns
112  nvar = nvarl
113 
114 c check that no limits have been exceeded
115 c print '(i8,i5)', numout,maxout
117 
118 c
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.
122 c
123  900 if (numerr .eq. 0) then
124  write(buffer,'(A)') ' Input file read with no errors.'
125  call writebuffer(buffer)
126  status=0
127  else
128  write(buffer,'(A)')
129  & ' ### Errors found in input file, execution halted.'
130  call writebuffer(buffer)
131  status=802
132  end if
133  close(unit=lunit)
134 
135  return
136  end
subroutine printscreamerparameters
Definition: prscrparm.f:16
subroutine readscreleminit
Definition: rdscreleminit.f:18
c *****************************************************************************c Common blocks for SCREAMER output and tabling c & numout
Definition: zdemout.h:47
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
Definition: zdempprm.h:7
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
Definition: zdemfmt.h:36
subroutine readscreamerparameters(status)
Definition: rdscrparm.f:13
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 rwall(dt, time, parms, rvar)
Definition: rwallmdl.f:1
subroutine get_next_line(currline, field, nlines, eofflg, max_fields)
Definition: getnxtln.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 model
Definition: zdemfmt.h:131
subroutine get_env_var(inpfile, clen)
Definition: getenvvr.f:1
subroutine readscreamerdata(status)
Definition: rdscrdat.f:1
subroutine readscreameroutputs(status)
Definition: rdscrouts.f:13
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
Definition: zdemfmt.h:192
subroutine strip(text, start, end)
Definition: strpblnk.f:1
subroutine checkscreamerlimits
Definition: rdchklimits.f:13
c *****************************************************************************c Common blocks for SCREAMER output and tabling c maxout
Definition: zdemout.h:40
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 Common blocks for SCREAMER output printing
Definition: zdemout.h:2
subroutine banner(line)
Definition: prtbannr.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 c
Definition: zdemfmt.h:7
subroutine user(timestep, time, p1, p2, p3, p4, v1, v2, v3)
Definition: usrfunc.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 switch
Definition: zdemfmt.h:118
subroutine readscreamerelements(status)
Definition: rdscrelem.f:41
c This is a Fortran header file
Definition: sfc.h:3