Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setcurrs.f
Go to the documentation of this file.
1  subroutine setup_currsource (ib, ibk, ics_counter, na, iflgs,
2  & ic_type, ic_counter)
3 c
4 c Define passed variables
5 c
6  integer ib, ibk, ics_counter, na, iflgs, ic_type, ic_counter
7 c
8 c Setup for current 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 current at time zero.
22 c
23  time = 0.0
24  call set_current(time, ics_counter, czero)
25  zir(n1,ib) = czero
26  zirn(n1,ib) = czero
27  r3 = pin(1,ibk,ib)
28  c3 = pin(2,ibk,ib)
29 c
30 c Set R3 and C3.
31 c
32  g(n1,ib) = 0.0
33  c(n1,ib) = 0.0
34  rr(n1,ib) = 0.0
35  zlr(n1,ib) = 0.0
36  iflg(n1,ib) = iflgs
37  cechk(n1,ib) = 0.0
38  zlrechk(n1,ib) = 0.0
39 c
40 c Set the index for this source.
41 c
42  indexcs(1,ics_counter) = n1
43  indexcs(2,ics_counter) = ib
44 c
45  g(n2,ib) = 1.0 / (r3 + 1.0e-20)
46  c(n2,ib) = c3
47  rr(n2,ib) = 0.0
48  zlr(n2,ib) = 0.0
49  iflg(n2,ib) = iflgs
50  cechk(n2,ib) = c3
51  zlrechk(n2,ib) = 0.0
52 c
53 c Set initial voltage if necessary and the corresponding energy.
54 c
55  if (ic_type .eq. vcapacitor3) then
56  vinitial = value_init(ic_counter)
57  v(n2,ib) = vinitial
58  vn(n2,ib) = vinitial
59  ecapsource = ecapsource + 0.5*c(n2,ib)*vinitial*vinitial
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
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_currsource(ib, ibk, ics_counter, na, iflgs, ic_type, ic_counter)
Definition: setcurrs.f:1
subroutine set_current(time, index, current)
Definition: setcurrn.f:1