Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setcends.f
Go to the documentation of this file.
1  subroutine setup_cendsource (ib, ibk, ics_counter, na, iflgs,
2  & ic_type, ic_counter, itypcs)
3 c
4 c Define passed variables
5 c
6  integer ib, ibk, ics_counter, na, iflgs, ic_type, ic_counter
7  integer itypcs
8 c
9 c Setup for end-of-branch current source or end-of-branch SCL current source.
10 c
11  include 'zdemparm.h'
12  include 'zdemmax.h'
13  include 'zdemcomm.h'
14  include 'zdemwork.h'
15 c
16 c Set for 1 node.
17 c
18  n1 = nr(ib) + 1
19  na = 1
20 c
21 c Set the resistor and capacitor values.
22 c
23  r1 = pin(1,ibk,ib)
24  c1 = pin(2,ibk,ib)
25 c
26 c Set R1 and C1.
27 c
28  g(n1,ib) = 1.0 / (r1 + 1.0e-20)
29  c(n1,ib) = c1
30  rr(n1,ib) = 0.0
31  zlr(n1,ib) = 0.0
32  iflg(n1,ib) = iflgs
33  cechk(n1,ib) = c1
34  zlrechk(n1,ib) = 0.0
35 c
36 c Set the index for this source.
37 c
38  indexcs(1,ics_counter) = n1
39  indexcs(2,ics_counter) = ib
40 c
41 c Set initial voltage if necessary and the corresponding energy.
42 c
43  if (ic_type .eq. vcapacitor1) then
44  vinitial = value_init(ic_counter)
45  v(n1,ib) = vinitial
46  vn(n1,ib) = vinitial
47  ecapsource = ecapsource + 0.5*c(n1,ib)*vinitial*vinitial
48  end if
49 c
50 c Set the current at time zero, depending on the type.
51 c
52  if (itypcs .eq. cendsource) then
53  time = 0.0
54  call set_current(time, ics_counter, czero)
55  zir(n1,ib) = czero
56  zirn(n1,ib) = czero
57  else if (itypcs .eq. csclsource) then
58  time = 0.0
59  call set_sclcurr(time, v(n1,ib), ics_counter, czero)
60  zir(n1,ib) = czero
61  zirn(n1,ib) = czero
62  end if
63 c
64  return
65  end
subroutine set_sclcurr(time, volt, index, current)
Definition: setsclcr.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 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_cendsource(ib, ibk, ics_counter, na, iflgs, ic_type, ic_counter, itypcs)
Definition: setcends.f:1
subroutine set_current(time, index, current)
Definition: setcurrn.f:1