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 1 Marx switch losses and accurate water line parameters
! We will be varying the number of stages and sub-Marxes
! Number of stages = 30
! Number of switches = 15
! Number of sub-Marxes = 10
! Stage capacitance = 300 nF
! Vcharge = 100 kV
! Initial Marx charge = 30 * 100 kV = 3 MV
!
! Gas switch dimensions from drawings
!
! Total Marx Capacitance = 300 nF * 10 / 30 = 100 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 30 stages = 1.95  per 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 sub-Marx = sqrt(L/C) = 17.3 .
! The total Marx impedance is 17.3 /10 = 1.73 
! 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 PFL.
!
! 
!
BRANCH
!
! Capacitor capacitance and charge voltage
!
RCGround 1e+12 100e-9
Initial VC1 3.0e6
UFO VC1
$V_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 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 POUT
$P_PFL_out
UFO EOUT
$E_PFLL_out

!
! PFL Output water switches
! 5 output switches, 10-cm gap, 50 nH each
!
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime  gap         pressure   nswitch  nchannels
H2O          300e-09      0.10       1.0              5             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_TFMR_1_in
UFO VOUT
$V_TFMR_1_out
UFO IOUT
$I_TFMR_1_out
UFO POUT
$P_TFMR_1_out
UFO EOUT
$E_TFMR_1_out

!
! TFMR_1 Output water switches
! 8 output switches, 4-cm gap
!
RLSeries 10e9 10e-9
Var R2 Switch
!dielectric switchtime  gap      pressure     nswitch  nchannels
H2O         430e-09       0.04    1.0                8              1
UFO IR2
$I_TFMR_1_sW
UFO R2
$R_TFMR_1_sw
UFO ER2
$E_TFMR_1_sw
UFO QR2
$Q_TFMR_1_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 POUT
$P_OTL_out
UFO EOUT
$E_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
!