Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
dcyswmdl.f
Go to the documentation of this file.
1  subroutine sdecay_model (time, var_parms, resistance)
2 c
3 c-----Description--------------------------------------------------------
4 c
5 c File: sdecay_model.for
6 c
7 c Author/Date: Kelley Fugelso, 1265 (SEA) 05/89
8 c December 10, 1992; hnw
9 c 2014-02-06 RBS: Changed real*4 to real
10 c 2014-04-11 RBS: Added argument to the local variables real definition
11 c
12 c Purpose: Calculates the value for the resistance of a variable
13 c resistor at the current time (half-step). The model used
14 c is the decay model of the variable resistive switch
15 c
16 c r = ropen time <= timsw
17 c
18 c r = rclose + (ropen - rclose) * exp(-a) time > timsw
19 c
20 c where a = (time-timsw)/tau (rtau = 1/tau)
21 c
22 c Called by: Program ZDEM
23 c
24 c Calls: None
25 c
26 c-----Input Parameters---------------------------------------------------
27 c
28  real time, var_parms(*), resistance
29 c
30 c-----Local Variables----------------------------------------------------
31 c
32  real ropen, rclose, timsw, rtau, expa, argument
33 c
34 c-----Subroutine Body----------------------------------------------------
35 
36  ropen = var_parms(1)
37  timsw = var_parms(3)
38 c
39 c Set the resistance.
40 c
41  if (time .le. timsw) then
42  resistance = ropen
43  else
44  rclose = var_parms(2)
45  rtau = var_parms(4)
46  argument = (time-timsw) * rtau
47  if (argument .ge. 50.0) then
48  expa = 0.0
49  else
50  expa = exp(-1.0 * argument)
51  end if
52  resistance = rclose + ( (ropen - rclose) * expa )
53  end if
54 c
55 c-----Return to Program ZDEM---------------------------------------------
56 c
57  return
58  end
subroutine sdecay_model(time, var_parms, resistance)
Definition: dcyswmdl.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