Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
pos1mdl.f
Go to the documentation of this file.
1  subroutine sps1_model (timestep, timehalf, current, voltage,
2  & parms, gvar)
3 c
4 c Define passed variables
5 c
6  real timestep, timehalf, current, voltage, parms(*), gvar
7 c
8 c December 10, 1992; hnw
9 c 2014-02-06 RBS: Changed real*4 to real
10 c
11 c Calculates value of variable shunt conductance based on a PEOS model
12 c from a SCEPTRE model of DHM and LXS.
13 c Switches by time pointer.
14 c parms is an array containing parameters of the specific switch,
15 c gvar is the returned conductance.
16 c voltage is the voltage across the switch,
17 c current is the current flowing into the switch.
18 c
19  real ig
20 c
21  tswitch = parms(1)
22  constant = parms(2)
23  gmin = parms(3)
24  gmax = parms(4)
25  charge = parms(5)
26  vold = parms(6)
27  vnew = voltage
28  parms(6) = vnew
29 c
30 c If already switched, then integrate the current to get the charge to
31 c find the conductance.
32 c
33  if (timehalf .gt. tswitch) then
34  ig = abs(current)
35  charge = charge + ig*timestep
36  parms(5) = charge
37  end if
38 c
39 c Now find the conductance and limit if necessary.
40 c
41  if (charge .lt. 1.0e-10) then
42  gvar = gmax
43  else
44 c
45 c Use the voltage at the previous half time step for stability.
46 c
47  vg = 0.5 * abs(vnew + vold)
48  gvar = (constant * sqrt(vg)) / (charge*charge)
49  if (gvar .lt. gmin) then
50  gvar = gmin
51  else if (gvar .gt. gmax) then
52  gvar = gmax
53  end if
54  end if
55 c
56  return
57  end
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 c c c &used with this model c Exponential model of a resistive c c c Rise model of a resistive c c Z FLOW POS c c c c SW1 c c c158 MFI Insulator CB c c & gmax
Definition: zdemfmt.h:154
subroutine sps1_model(timestep, timehalf, current, voltage, parms, gvar)
Definition: pos1mdl.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 c c c &used with this model c Exponential model of a resistive c c c Rise model of a resistive c c Z FLOW POS c c c c SW1 c c c158 MFI Insulator CB c & gmin
Definition: zdemfmt.h:153