Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
bldoutfl.f
Go to the documentation of this file.
1  subroutine build_out (tim, timehalf, timestep, rtimstep)
2 c
3 c-------Description-----------------------------------------------------
4 c
5 c Source File : bldoutfl.f
6 c
7 c Author/Date : Kelley Fugelso, 1265 (SEA) 12/89
8 c
9 c Purpose : Write the SCREAMER output parameter file.
10 c
11 c Called by : program zdem
12 c
13 c Calls : Subroutine GET_VARIABLE
14 c
15 c Modifications:
16 c
17 c MLK, 03/07/95, Change include filenames to be 8 characters or less
18 c MLK, 01/16/96, Added argument to get_variable call for referencing
19 c the "pin" array directly within that subroutine
20 c 2014-02-06 RBS: Changed real*4 to real
21 c
22 c-------Include Files---------------------------------------------------
23 c
24  include 'zdemparm.h'
25  include 'zdempprm.h'
26  include 'zdemmax.h'
27  include 'zdemcomm.h'
28  include 'zdemwork.h'
29  include 'zdemout.h'
30 c
31 c-------Input Parameters------------------------------------------------
32 c
33  real tim, ! Current problem time at whole time step
34  + timehalf, ! Current problem time at half time step
35  + timestep, ! delta t
36  + rtimstep ! 1/delta t
37 c
38 c-------Output Parameters-----------------------------------------------
39 c
40 c NONE
41 c
42 c-------Local Variables-------------------------------------------------
43 c
44  integer vartype, branch, node, blktype, block, lastnode
45  integer ipin, ipinsav, ibrnsav, iblksav
46 c
47 c-------Subroutine Body-------------------------------------------------
48 c
49 c Loop over each output request
50 c and set the branch and node index, the type of variable, the type of block,
51 c and the value saved (if any) from the last time step.
52 c
53 c Variables needed to calculate block number used in "pin" array
54 c to pass to get_variable:
55 c ibrnsav is the number of the branch associated with the last output request
56 c iblksav is the number of the block associated with the last output request
57 c ipinsav is the number of output requests in this branch
58 c ipin is the block number used in "pin"
59 c
60  ibrnsav = 0
61  iblksav = 0
62  ipin = 0
63  ipinsav = 0
64  do iout = 1, numout
65  node = ixnodout(iout)
66  lastnode= ixlstnodout(iout) !Needed for energy or power stored or
67 c ! lost on a trans.line only
68  branch = ixbrnout(iout)
69  block = ixblkout(iout) ! Needed for user variable retrieval only
70  vartype = itypout(iout)
71  blktype = iblkout(iout)
72  if (ibrnsav .ne. branch) then
73  ibrnsav = branch
74  iblksav = 0
75  ipin = 0
76  ipinsav = 0
77  end if
78  if (iblksav .ne. block) then
79  iblksav = block
80  ipin = ipinsav + block
81  end if
82  ipinsav = ipinsav + 1
83 c
84 c Find the variable value (at the half time step and the
85 c the whole time step) and the saved value and write them to the
86 c SCREAMER output parameter file
87 c
88 c 06/89 klf Added BLOCK argument for user variable retrieval
89 c
90  time_flag = half_step
91  valsave = saveout1(iout)
92  valsave2= saveout2(iout) ! Needed for plotting energy or power
93 c ! stored on transmission line only
94  call get_variable(vartype, branch, node, lastnode,
95  & blktype, timestep, rtimstep, timehalf,
96  & valsave, valsave2, value1,
97  & time_flag, block, ipin)
98  val1(iout) = value1
99  saveout1(iout) = valsave
100  saveout2(iout) = valsave2 ! Needed for plotting energy or power
101 c ! stored on transmission line only
102  time_flag = whole_step
103  valsave = saveout3(iout)
104  valsave2= saveout4(iout) ! Needed for plotting energy or power
105 c ! stored on transmission line only
106  call get_variable(vartype, branch, node, lastnode,
107  & blktype, timestep, rtimstep, timehalf,
108  & valsave, valsave2, value2,
109  & time_flag, block, ipin)
110  val2(iout) = value2
111  saveout3(iout) = valsave
112  saveout4(iout) = valsave2 ! Needed for plotting energy or power
113 c ! stored on transmission line only
114 c
115  end do
116 c
117 c Write out the current halftime step, the current whole time step,
118 c and the values of each output variable (at the halftime step
119 c and the whole time step)
120 c
121  write(outunit) timehalf,tim,(val1(jj),val2(jj),jj=1,numout)
122 c write(9,*) 'Time = ',tim, ' First output = ',val1(1),val2(1)
123 c
124 c-------End of Subroutine-----------------------------------------------
125 c
126  return
127  end
c *****************************************************************************c Common blocks for SCREAMER output and tabling c & numout
Definition: zdemout.h:47
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
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character & saveout3
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character val2
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character & ixlstnodout
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character saveout2
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character & ixblkout
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character & val1
Definition: zdemout.h:59
subroutine build_out(tim, timehalf, timestep, rtimstep)
Definition: bldoutfl.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 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
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character ixnodout
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character saveout4
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character itypout
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character ixbrnout
Definition: zdemout.h:59
c *****************************************************************************c Common blocks for SCREAMER output and tabling c numsfc character & iblkout
Definition: zdemout.h:59
subroutine get_variable(vtype, branch, node, lastnode, blktype, dt, rdt, time, savev, savev2, value, time_flag, block, ipinblk)
Definition: getvar.f:1