Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setvolts.f
Go to the documentation of this file.
1  subroutine setup_voltsource (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 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  time = 0.0
24  call set_voltage(time, ivs_counter, vzero)
25  v(n1,ib) = vzero
26  vn(n1,ib) = vzero
27  r2 = pin(1,ibk,ib)
28  zl2 = pin(2,ibk,ib)
29 c
30 c Set R2 and L2.
31 c
32  g(n1,ib) = 0.0
33  c(n1,ib) = 0.0
34  rr(n1,ib) = r2
35  zlr(n1,ib) = zl2
36  iflg(n1,ib) = iflgs
37  cechk(n1,ib) = 0.0
38  zlrechk(n1,ib) = zl2
39 c
40 c Set the index for the source.
41 c
42  indexvs(1,ivs_counter) = n1
43  indexvs(2,ivs_counter) = ib
44 c
45  g(n2,ib) = 0.0
46  c(n2,ib) = 0.0
47  rr(n2,ib) = 0.0
48  zlr(n2,ib) = 0.0
49  iflg(n2,ib) = iflgs
50  cechk(n2,ib) = 0.0
51  zlrechk(n2,ib) = 0.0
52 c
53 c Set initial current if necessary and the corresponding energy.
54 c
55  if (ic_type .eq. cinductor) then
56  cinitial = value_init(ic_counter)
57  zir(n1,ib) = cinitial
58  zirn(n1,ib) = cinitial
59  eindsource = eindsource + 0.5*zlr(n1,ib)*cinitial*cinitial
60  end if
61 c
62  return
63  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_voltsource(ib, ibk, ivs_counter, na, iflgs, ic_type, ic_counter)
Definition: setvolts.f:1