SPICE model for a spark plug?...

.SUBCKT SPARK_GAP2 1 2 PARAMS: V_GLOW=1500 V_ARC=150 I_SUS=.002
V_BREAKDN=12000 I_ARC=.2

* SINCE THE STRIKING IS VERY FAST, IT IS STRONGLY ADVISED
* TO SET TRTOL TO 1 VIA: .OPTIONS TRTOL=1 and ITL4=1000. THIS WILL
FORCE
* PSpice TO BE MORE VIGILANT IN THE VICINITY OF TRANSITIONS
*
* Documentation on the Sparkgap model can obtained from AEi Systems,
www.AENG.com, 310-216-1144, In...@AENG.com
*
D_D3 10 11 DZ_ARC
X_SARC 9 0 3 10 SPARK_GAP2_SARC
R_RT1 7 0 50
D_DT2 8 9 D1N4148
E_EBREAKDN_CONTROL 6 0 VALUE = {IF(ABS(V(1,2))>{V_BREAKDN} , 12 ,
+ IF( ABS(I(V_VSENSE)) > {I_SUS} , 12 , 0 ))}
D_D4 5 11 DZ_ARC
E_EARC_CONTROL 8 0 VALUE = { IF( ABS(I(V_VSENSE)) > {I_ARC} , 12 , 0
)}
D_D2 5 4 DZ_GLOW
V_VSENSE 5 2 DC 0
C_CT2 9 0 0.1U
R_RT2 9 0 50
C_CT1 7 0 0.25U
X_SBREAKDN 7 0 1 3 SPARK_GAP2_SBREAKDN
D_D1 3 4 DZ_GLOW
D_DT1 6 7 D1N4148
.MODEL DZ_GLOW D (BV={V_GLOW} IS=1U RS=5 IBV=10U)
.MODEL DZ_ARC D (BV={V_ARC} IS=1U RS=5 IBV=10U)
.MODEL D1N4148 D (RS=.8 CJO=4PF IS=7E-09 N=2 VJ=.6V
+ TT=6E-09 M=.45 BV=100V)
.ENDS
.subckt SPARK_GAP2_SARC 1 2 3 4
XS_SBREAKDN 3 4 1 2 SWhyste Params: Ron=5 Roff=50MEG VT=10 VH=0
RS_SARC 1 2 1G
.ends
.subckt SPARK_GAP2_SBREAKDN 1 2 3 4
XS_SBREAKDN 3 4 1 2 SWhyste Params: Ron=5 Roff=50MEG VT=10 VH=0
RS_SBREAKDN 1 2 1G
.ends
...Jim Thompson

The issue with the syntax is the line that starts \")}\". This is a continuation line, and should be preceded by \"+\". Alternatively if you remove the line break and terminate the previous line \"> {I_ARC}, 12,0,)}\" the spice model will run. Good luck.
 

Welcome to EDABoard.com

Sponsor

Back
Top