Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setvoltg.f
Go to the documentation of this file.
1  subroutine set_voltage (time, index, voltage)
2 c
3 c Define passed variables
4 c
5  real time, voltage
6  integer index
7 c
8 c Change log
9 c
10 c 2014-02-06 RBS: Changed real*4 to real
11 c 2014-05-04 RBS: Changed integer*4 to integer
12 c
13 c Voltage source as a function of time.
14 c
15  include 'zdemparm.h'
16  include 'zdemmax.h'
17  include 'zdemcomm.h'
18  include 'zdemwork.h'
19 c
20 c Sort out the function describing the source.
21 c
22  ifunction = ivoltf(index)
23  if (ifunction .eq. sinsquared) then
24  voltage = fsinsquared(time, voltf_parms(1,index),
25  & voltf_parms(2,index),
26  & voltf_parms(3,index))
27  else if (ifunction .eq. sinfun) then
28  voltage = fsinfun(time, voltf_parms(1,index),
29  & voltf_parms(2,index),
30  & voltf_parms(3,index))
31  else if (ifunction .eq. leastsquares) then
32  voltage = fleastsquares(time, num_voltf_parms(index),
33  & voltf_parms(1,index))
34  else if (ifunction .eq. piecewiselinear) then
35  voltage = fpiecewiselinear(time, num_voltf_parms(index),
36  & voltf_parms(1,index), lastvoltf_time(index))
37  else if (ifunction .eq. table) then
38  scale = voltf_parms(1,index)
39  delay = voltf_parms(2,index)
40  num_tpoints = num_voltf_parms(index) - 2
41  voltage = fpiecewiselinear(time-delay, num_tpoints,
42  & voltf_parms(3,index), lastvoltf_time(index))
43  voltage = voltage * scale
44  end if
45 c
46  return
47  end
function fsinsquared(time, amplitude, halfperiod, delay)
Definition: snsqfunc.f:1
function fpiecewiselinear(time, npts, pts, ltime)
Definition: pwlfunc.f:1
function fsinfun(time, amplitude, period, delay)
Definition: sinefunc.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
subroutine set_voltage(time, index, voltage)
Definition: setvoltg.f:1
function fleastsquares(time, num_coeff, coeff)
Definition: lsffunc.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 scale
Definition: zdemfmt.h:111