Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setvends.f
Go to the documentation of this file.
1  subroutine setup_vendsource (ib, ibk, ivs_counter, na, iflgs,
2  & ic_type, ic_counter)
3 c
4 c Define passed variables
5 c
6  integer ib, ibk, ivs_counter, na, iflgs, ic_type, ic_counter
7 c
8 c Setup for end-of-branch voltage source
9 c
10  include 'zdemparm.h'
11  include 'zdemmax.h'
12  include 'zdemcomm.h'
13  include 'zdemwork.h'
14 c
15 c Set for 2 nodes.
16 c
17  n1 = nr(ib) + 1
18  n2 = n1 + 1
19  na = 2
20 c
21 c Set the voltage at time zero.
22 c
23  r2 = pin(1,ibk,ib)
24  zl2 = pin(2,ibk,ib)
25  time = 0.0
26  call set_voltage(time, ivs_counter, vzero)
27 c
28 c Set R2 and L2
29 c
30  g(n1,ib) = 0.0
31  c(n1,ib) = 0.0
32  rr(n1,ib) = r2
33  zlr(n1,ib) = zl2
34  iflg(n1,ib) = iflgs
35  cechk(n1,ib) = 0.0
36  zlrechk(n1,ib) = zl2
37 c
38  v(n2,ib) = vzero
39  vn(n2,ib) = vzero
40 c
41  g(n2,ib) = 0.0
42  c(n2,ib) = 0.0
43  rr(n2,ib) = 0.0
44  zlr(n2,ib) = 0.0
45  iflg(n2,ib) = iflgs
46  cechk(n2,ib) = 0.0
47  zlrechk(n2,ib) = 0.0
48 c
49 c Set the index for the source.
50 c
51  indexvs(1,ivs_counter) = n2
52  indexvs(2,ivs_counter) = ib
53 c
54 c Set initial current if necessary and the corresponding energy.
55 c
56  if (ic_type .eq. cinductor) then
57  cinitial = value_init(ic_counter)
58  zir(n1,ib) = cinitial
59  zirn(n1,ib) = cinitial
60  eindsource = eindsource + 0.5*zlr(n1,ib)*cinitial*cinitial
61  end if
62 c
63  return
64  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 time
Definition: zdemfmt.h:85
subroutine set_voltage(time, index, voltage)
Definition: setvoltg.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 setup_vendsource(ib, ibk, ivs_counter, na, iflgs, ic_type, ic_counter)
Definition: setvends.f:1