DE-R Full Four Module + Diode Load Simulation
!
! Rick Spielman 2017-09-12
!
Time-step 4.0e-12
Resolution-time 100e-12
End-time 1.0e-6
Number-prints 5
Execute-cycles all
Grids no
Echo-setup no
Max-points 5001
!
!Start circuit definition
!
! DE-R Rev 3a is based on DE-R Rev 2a. We are lowering the WL impedance to 0.4  (1.6/4) and explicitly putting in the water flare impedance of the stack. In addition, the insulator, vacuum flare, and MITL impedances will be rechecked. Goal - explict identification of all impedance and inductance components.
!
! DE-R Rev 2a uses the DE-R Rev 2 deck with 4 parallel modules that are driving an insulator stack, MITL, and e-beam load. We will use 4, separate modules joined to the insulator stack with
! End Branches. This way we can keep the Rev1b structure exactly. We also allow jitter in the 
! Future. Note: the module end branches are in reverse order away from the branch.
!
! DE-R Rev 1 uses the DE Rev 4 as the baseline. We will be changing all the line impedances to
! 2  and will be changing the line lengths. The goal here is to have a driver that delivers a clean 100-ns FWHM pulse to a constant impedance load.
!
! Rev 4 changes the CPL water switch gap to the actual gap 3.75
! also changes the output line to constant 1.3  impedance with a matched load.
!
! Rev 3 Marx switch losses and more accurate water line parameters
! Change marx to 30 stages of 300 nF/stage
!
! Gas switch dimensions from drawings
!
! We start with a total Marx capacitance of 100 nF (exceeds the CPL capacitance). This implies
!   that there will a ringing gain on the CPL. This allows a faster rise time than otherwise to 
!   get to the desired CPL voltage.
!
! CPL capacitance used is 60 nF. This is distributed in a TL that is 85 ns long and
!   has a constant impedance of 1.4 . (C = t/Z = 85/1.4 nF = 60.71 nF)
!
! The sub Marx capacitance is 10 nF at a charge voltage of 100 kV.
! We have a 10-nF sub Marx with 30 cap pairs in series and 15 switches. Vch = 3 MV
! We have 10 sub Marxes in parallel.
! the total Marx capacitance is 100 nF.
! Include 130 m individual cap ESR or 65 m per pair of caps in parallel
!   X 30 stages = 1.95  per sub-Marx
! Assume that there will be 200 nH every two stages. L = 200 nH * 15 = 3.0 H.
!   The total Marx inductance (caps and switches) would be 3.0 H/10 = 300 nH
!
! The matched impedance of a single Marx = sqrt(L/C) = 17.3 .
!   The total Marx impedance is 17.3 /10 = 1.73 
!   Note CPL impedance is 2 .
!   The ESR amounts to ~ 11.3% of the matched impedance.
!
! The switch model will have 15x the length of one switch per sub Marx and then will
! have 10 arc channels (sub Marxes) in parallel.
! 
! We will use a TOTAL inductance of 380 nH for the Marx and L1. This inductance is needed to 
! get the required rise time of the voltage on the CPL.
!
! 
! Main Branch - Branch #1
!
BRANCH
!
! Marx capacitance and charge voltage
!
RCGround 1e+12 100e-9
Initial VC1 3.0e6
UFO VC1
$V_marx
UFO EC1
$E_marx
!
! Cap inductance, case & parasitic inductance, and ESR
! ESR = 0.195 for the total Marx (1.95 /10)
!
RLSeries 0.195 250e-9
!
! Switch resistance - Martin Model and switch inductance - the total gap for a single
!   switch from DWGs is 0.53 (1.346 cm) gap and 93 psig air X15 = 20.19 cm
!
! Initial switch resistance was chosen to be higher than that printed in the first
! few time steps so as to appear monotonically decreasing in R plots
! A careful few runs showed that 10 G looked best. In any event by 1 ns all of the 
! resistance values are the same.
!
RLSeries 10e9 50e-9
Var R2 Switch
!dielectric switchtime gap        pressure     nswitch  nchannels
AIR           0.0               0.2019  7.3                10           1
UFO IR2
$I_marx
UFO R2
$R_switch
UFO ER2
$E_switch
UFO QR2
$Q_switch
!
! Output Marx header inductance
!

RLSeries 0.00 100e-9

!
! Line 1 (CPL), 50 ns, 1.6 , 35 nF
!

TRLine EXP 2.29e-09 4 1.6
TRLine LIN 46e-09 1.6 1.6
TRLine EXP 2.29e-09 1.6 4

UFO VOUT
$V_CPL_out
UFO IOUT
$I_CPL_out
UFO EOUT
$E_CPL_out
UFO POUT
$P_CPL_out
UFO EOUT
$E_CPL_out
!
! CPL water switches
! 5 output switches, 4 gap + switch inductance
!
! Branch #2 Location

RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime gap         pressure   nswitch  nchannels
H2O          270e-09     0.1016   1.0              5             1

UFO IR2
$I_CPL_sw
UFO R2
$R_CPL_sw
UFO ER2
$E_CPL_sw
UFO QR2
$Q_CPL_sw
TopBranch
!
! Line 2, 72 ns, 1.6  constant impedance
!
TRLine EXP 2.29e-09 4 1.6
UFO VIN
$V_PFL_in
UFO IIN
$I_PFL_in
TRLine LIN 68e-09 1.6 1.6
TRLine EXP 2.29e-09 1.6 4
UFO VOUT
$V_PFL_out
UFO IOUT
$I_PFL_out
UFO POUT
$P_PFL_out
UFO EOUT
$E_PFL_out
!
! Line 2 water switches
! 7 output switches, 0.5 gap + switch inductance
!
! Branch #3 Location
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime gap      pressure     nswitch  nchannels
H2O         360e-09    0.0127   1.0                    7               1
UFO IR2
$I_PFL_sw
UFO R2
$R_PFL_sw
UFO ER2
$E_PFL_sw
UFO QR2
$Q_PFL_sw
TopBranch
!
! Output Line (OL),  72 ns, 1.6  constant impedance
!
TRLine EXP 2.29e-09 4 1.6
UFO VIN
$V_OL_in
UFO IIN
$I_OL_in

TRLine LIN 72e-09 1.6 1.6

UFO VOUT
$V_OL_out
UFO IOUT
$I_OL_out
UFO POUT
$P_OL_out
UFO EOUT
$E_OL_out
! Branch #4 Location
RLSeries 0.0 0.0
EndBranch
! Branch #5 Location
RLSeries 0.0 0.0
EndBranch
! Branch #6 Location
RLSeries 0.0 0.0
EndBranch
!
!  ********* Water flare transition external to the insulator stack ****************
!  Router = 1.165 m , stack outer = 1.1 m, constant 14 cm gap, l = 1.96 ns
!  Zouter = 0.8 , Zinner = 0.85   Divide by 2X
!

TRLine LIN 4.97e-9 0.4 0.425

!
!   ***********************  Insulator stack  *****************************
! The water/vacuum interface Router=1.1 m, Rinner=1.0 m, height=13.35 cm (0.64-cm grading rings) 
!  Plastic height is 11.43 cm. L per side = 2.1788 nH
! Two stacks in parallel - divide L by 2
!

RLS  1.0E-12    1.09E-9

!
UFO VOUT
$V_stack
UFO IOUT
$I_stack
UFO POUT
$P_stack
UFO EOUT
$E_stack
!
!   **************************  First vacuum piece inside insulator  *****************************
!  Constant 13.35 cm height, Router = 1 m, Rinner = 0.975 m
! Inductance = 0.676 nH - divide by 2
!

RLS  1.0E-12    0.338E-9

!
!
!   **************************  Vacuum flares  *****************************
! The flare includes the flare itself and the piece that extends down to the cathode.
! L1=0.58 nH, L2=0.93 nH, L1+L2=1.520 nH
! Two vacuum flares in parallel - divide by 2
!

RLS  1.0E-12    0.76E-9

!
UFO VOUT
$V_vf
UFO IOUT
$I_vf
UFO POUT
$P_vf
UFO EOUT
$E_vf
!
!   *****************************   Constant Z MITLs   ********************************
! Z= 4 , length = 2.15 ns (Router = 79.15 cm gap 5.962cm, Rinner=15 cm gap 1 cm)
! Pick a MITL impedance close to the impedance of the water lines - divide by 2
! Note: This is the vacuum impedane without vacuum electron flow
!

TRLine LIN 2.15e-09 2 2

!
UFO VOUT
$V_mitls
UFO IOUT
$I_mitls
UFO POUT
$P_mitls
UFO EOUT
$E_mitls
!
!   ************************  Inner-MITL-coax  *************************
! Coax dimension matches the electron beam diode (average)
! Match inner coax impedance to MITL impedance if possible
! This is not possible with the small diameter idode used herein
! For this case, 1-cm gap router cathode = 10.16cm, Z=5.6
! Assume average 6 or 15 cm length or 0.5 ns
! Divide by 2
!

TRLine LIN 0.5e-09 2.81 2.81

!
! Inductance of e-beam itself
!   This is the inductance of the outer volume and the inner volume
!  Louter=0.141 nH, Linner=0.211 nH, Lparallel=0.0845
!
!

RLS 0.0       0.0845E-9

!
UFO IR2
$I_coax
!
!  ******************** e-Beam Diode Resistance *******************
! The standard L-3 DE AK gap is 7.5 mm, Router= 4, Rinner=3
!
RCGround 1e6 0.0
VARiable R1 EDIode
!Diode_type Gap      Enhancement  Velocity   Router        (Rinner)
3                     5.5e-3  3.0                       0.5e4       0.1016        0.0762
!
UFO R1
$Z_diode
UFO IR1
$I_diode
UFO VR1
$V_diode
UFO PR1
$P_diode
UFO ER1
$E_diode
!
! End Main Branch (Branch #1)
!
! Level 2 Branches
!
! Branch #2
Branch
RCGround 1.0e12 250.0e-12
!
! End branch #2
!
! Branch #3
Branch
RCGround 1.0e12 100.0e-12
!
! End branch #3
!
!Branch #4
Branch

TRLine LIN 72e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6
RLSeries 10e9 10e-9

Var R2 Switch
!dielectric switchtime gap      pressure     nswitch  nchannels
H2O         360e-09    0.0127   1.0                    7               1
! Branch #7 Location
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 68e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

! Branch #8 Location
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime gap         pressure   nswitch  nchannels
H2O         270e-09     0.1016   1.0              5             1
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 46e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

RLSeries 0.00 100e-9

RLSeries 10e9 50e-9
Var R2 Switch
!dielectric switchtime gap        pressure     nswitch  nchannels
AIR           0.0               0.2019  7.3                10           1

RLSeries 0.195 250e-9

RCGround 1e+12 100e-9
Initial VC1 3.0e6

!
! End branch #4
!
!Branch #5
Branch

TRLine LIN 72e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6
RLSeries 10e9 10e-9

Var R2 Switch
!dielectric switchtime gap      pressure     nswitch  nchannels
H2O         360e-09    0.0127   1.0                    7               1
! Branch #9 Location
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 68e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

! Branch #10 Location
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime gap         pressure   nswitch  nchannels
H2O         270e-09     0.1016   1.0              5             1
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 46e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

RLSeries 0.00 100e-9

RLSeries 10e9 50e-9
Var R2 Switch
!dielectric switchtime gap        pressure     nswitch  nchannels
AIR           0.0               0.2019  7.3                10           1

RLSeries 0.195 250e-9

RCGround 1e+12 100e-9
Initial VC1 3.0e6

!
! End branch #5
!
!Branch #6
Branch

TRLine LIN 72e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6
RLSeries 10e9 10e-9

Var R2 Switch
!dielectric switchtime gap      pressure     nswitch  nchannels
H2O         360e-09    0.0127   1.0                    7               1
! Branch #11 Location
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 68e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

! Branch #12 Location
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime gap         pressure   nswitch  nchannels
H2O         270e-09     0.1016   1.0              5             1
TopBranch

TRLine EXP 2.29e-09 1.6 4
TRLine LIN 46e-09 1.6 1.6
TRLine EXP 2.29e-09 4 1.6

RLSeries 0.00 100e-9

RLSeries 10e9 50e-9
Var R2 Switch
!dielectric switchtime gap        pressure     nswitch  nchannels
AIR           0.0               0.2019  7.3                10           1

RLSeries 0.195 250e-9

RCGround 1e+12 100e-9
Initial VC1 3.0e6

!
! End branch #6
!
!Level 3 Branches
!
!Branch #7
Branch
RCGround 1.0e12 100.0e-12
!
! End branch #7
!
!Branch #8
Branch
RCGround 1.0e12 250.0e-12
!
! End branch #8
!
!Branch #9
Branch
RCGround 1.0e12 100.0e-12
!
! End branch #9
!
!Branch #10
Branch
RCGround 1.0e12 250.0e-12
!
! End branch #10
!
!Branch #11
Branch
RCGround 1.0e12 100.0e-12
!
! End branch #11
!
!Branch #12
Branch
RCGround 1.0e12 250.0e-12
!
! End branch #12
!