Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
expswmdl.f
Go to the documentation of this file.
1  subroutine sexp_model (time, var_parms, resistance)
2 c
3 c December 10, 1992; hnw
4 c 2014-02-06 RBS: Change real*4 to real
5 c
6 c Calculates the value for the resistance of a variable resistor
7 c at time (the half time step). The model used here is the
8 c exponential model of a variable resistive switch.
9 c
10 c r = ropen time < timsw
11 c
12 c r = rclose + zsw*exp(-a)/(1-exp(-a)+zsw*1.0e-6) time > timsw
13 c
14 c where a = (time-timsw)/tau (rtau = 1/tau)
15 c
16 c Define passed variables
17 c
18  real time, var_parms(*), resistance
19 c
20  ropen = var_parms(1)
21  timsw = var_parms(3)
22 CMB write(*,*) 'time=', time, ' var_parms=', var_parms(1),
23 CMB &' resistance=', resistance
24 
25 c
26 c Set the resistance.
27 c
28  if (time .le. timsw) then
29  resistance = ropen
30  else
31  rclose = var_parms(2)
32  rtau = var_parms(4)
33  zsw = var_parms(5)
34  argument = (time - timsw) * rtau
35  if (argument .ge. 50.0) then
36  expa = 0.0
37  else
38  expa = exp(-1.0 * argument)
39  endif
40  resistance = zsw*expa / (1.0 - expa + zsw*1.0e-6) + rclose
41  end if
42 c
43  return
44  end
subroutine sexp_model(time, var_parms, resistance)
Definition: expswmdl.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