Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
setcurrn.f
Go to the documentation of this file.
1  subroutine set_current (time, index, current)
2 c
3 c Define passed variables
4 c
5  real time, current
6  integer index
7 c
8 c Change log
9 c
10 c 2014-02-06 RBS: Changed real*4 to real
11 c
12 c current source as a function of time.
13 c
14  include 'zdemparm.h'
15  include 'zdemmax.h'
16  include 'zdemcomm.h'
17  include 'zdemwork.h'
18 c
19 c Sort the functions describing this source.
20 c
21  ifunction = icurrf(index)
22  if (ifunction .eq. sinsquared) then
23  current = fsinsquared(time, currf_parms(1,index),
24  & currf_parms(2,index),
25  & currf_parms(3,index))
26  else if (ifunction .eq. sinfun) then
27  current = fsinfun(time, currf_parms(1,index),
28  & currf_parms(2,index),
29  & currf_parms(3,index))
30  else if (ifunction .eq. leastsquares) then
31  current = fleastsquares(time, num_currf_parms(index),
32  & currf_parms(1,index))
33  else if (ifunction .eq. piecewiselinear) then
34  current = fpiecewiselinear(time, num_currf_parms(index),
35  & currf_parms(1,index), lastcurrf_time(index))
36  else if (ifunction .eq. table) then
37  scale = currf_parms(1,index)
38  delay = currf_parms(2,index)
39  num_tpoints = num_currf_parms(index) - 2
40  current = fpiecewiselinear(time-delay, num_tpoints,
41  & currf_parms(3,index), lastcurrf_time(index))
42  current = current * scale
43  end if
44 c
45  return
46  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
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
subroutine set_current(time, index, current)
Definition: setcurrn.f:1