PIthon Marx Model
!
! Rick Spielman 2017-02-07
!
Time-step 2.0e-12
Resolution-time 0.2e-9
End-time 1.0e-6
Number-prints 5
Execute-cycles all
Grids no
Echo-setup no
Max-points 5001
!
!Start circuit definition
!
! Rev 2 Marx switch losses and accurate water line parameters
! We will be optimizing the number of stages and sub-Marxes
! Number of stages = 44
! Number of switches = 22
! Number of sub-Marxes = 8
! Stage capacitance = 300 nF
! Vcharge = 100 kV
! Initial Marx charge = 44 * 100 kV = 4.4 MV
!
! Gas switch dimensions from drawings
!
! Total Marx Capacitance = 300 nF * 8 / 44 = 54.5 nF
!
! PFL capacitance is 28.2 nF. This is distributed in a TL that is 36.6 ns long and
!   has a constant impedance of 1.3 .
!
! Include 130 m indivudual cap ESR or 65 m per pair of caps in parallel
!   X 44 stages = 2.86  per sub-Marx or 0.3575 total
! Assume that there will be 200 nH every two stages. L = 200 nH * 22 = 4.4 H.
! The total Marx inductance (caps and switches) would be 4.4 H/8 = 550 nH
!
! The matched impedance of a sub-Marx = sqrt(L/C) = 25.4 .
! The total Marx impedance is 25.4 /8 = 3.18 
! The ESR amounts to ~ 11.2% of the matched impedance.
!
! The switch model will have 22x the length of one switch per sub Marx and then will
! have 8 arc channels (sub Marxes) in parallel.
! 
! We will use a total inductance of 630 nH for the Marx and L1. This inductance is needed to 
! get the required rise time of the voltage on the PFL. This is a very conservative approacb=h.
!
!
BRANCH
!
! Capacitor capacitance and charge voltage
!
RCGround 1e+12 60e-9
Initial VC1  4.4e6
UFO VC1
$V_marx
!
! Cap inductance, case & parasitic inductance, and ESR
! ESR = 0.3575 for the total Marx
!
RLSeries 0.3575 500e-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 X20 = 26.92 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.2692   7.3              8            1
UFO IR2
$I_marx
UFO R2
$R_switch
UFO ER2
$E_switch
UFO QR2
$Q_switch

!
! Output Marx header inducatance
!
RLSeries 0.00 80e-9

!
! Line 1 (PFL), 28.2 nF, 36.6 ns, 1.3 
!
TRLine LIN 36.6e-09 1.3 1.3
UFO VOUT
$V_PFL_out
UFO IOUT
$I_PFL_out
UFO EIN
$E_PFL_in
UFO EOUT
$E_PFL_out
UFO POUT
$P_PFL_out

!
! PFL Output water switches
! 24 output switches, 16-cm gap, 240 nH each
!
RLSeries 10e9 5e-9
Var R2 Switch
!dielectric switchtime  gap         pressure   nswitch    nchannels
H2O          290e-09      0.16       1.0              24             1
UFO IR2
$I_PFL_sw
UFO R2
$R_PFL_sw
UFO ER2
$E_PFL_sw
UFO QR2
$Q_PFL_sw

!
! Line 2 (TFMR_1), 59.5 nF, 59.5 ns, 1.0  constant impedance
!
TRLine LIN 59.5e-09 1.0 1.0
UFO VIN
$V_TFMR1_in
UFO VOUT
$V_TFMR1_out
UFO IOUT
$I_TFMR1_out
UFO EIN
$E_TFMR1_in
UFO EOUT
$E_TFMR1_out
UFO POUT
$P_TFMR1_out

!
! TFMR_1 Output water switches
! 10 output switches, 1.25-cm gap, 40 nH each
!
RLSeries 10e9 4e-9
Var R2 Switch
!dielectric switchtime  gap           pressure     nswitch  nchannels
H2O         370e-09       0.0125    1.0                10           1
UFO IR2
$I_TFMR1_sw
UFO R2
$R_TFMR1_sw
UFO ER2
$E_TFMR1_sw
UFO QR2
$Q_TFMR1_sw

!
! Output Transmission Line (OTL), 71.2 nF, 53.4 ns, 0.75 
!
TRLine LIN 53.4e-09 0.75 0.75
UFO VIN
$V_OTL_in
UFO VOUT
$V_OTL_out
UFO IOUT
$I_OTL_out
UFO EIN
$E_OTL_in
UFO EOUT
$E_OTL_out
UFO POUT
$P_OTL_out

!
! Load resistance - Designed to match the output impedance of the OTL.
!
RCGround 0.75 0.0
UFO IR1
$I_load
UFO VR1
$V_load
UFO PR1
$P_load
UFO ER1
$E_load

!
! End circuit
!