Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Transient fails on RC circuit

34 views
Skip to first unread message

zhengqi gao

unread,
Aug 30, 2024, 1:16:26 PM8/30/24
to xyce-users
Hi, 

I am following up on my previous post. I have a very simple RC circuit, and when I run the transient, it fails with error 'function OneStep::rejectStep: Maximum number of failures at time 4e-13'. My netlist is attached below:

 -----------------------------------------------
* circuit file

Vin1 m1 0 PWL(0 0.0 0.4ps 0.0 0.5ps 0.0125 0.9ps 0.0125)
r1 m1 0 10k
c1 m1 0 100n

* simulation settings

.Tran 0 1e-9 0.0 uic
.options timeint reltol=1e-06 abstol=1e-06

-----------------------------------------------------

zhengqi gao

unread,
Aug 30, 2024, 3:21:16 PM8/30/24
to xyce-users
Hi,

I have tested more. I found an example that works fine in Hspice, but fails in Xyce. I am attaching my netlist in this thread.

`Xyce tmp_xyce.sp` will fail. But `hspice -i tmp_spice.sp` works fine. 

-Zhengqi
tmp_spice.sp
tmp_xyce.sp
param.txt

xyce-users

unread,
Aug 30, 2024, 4:23:02 PM8/30/24
to xyce-users

I think I found the issue with this circuit.  When the voltage source starts to apply a non-zero voltage, it must also supply current.  There is a current variable associated with the voltage source that is part of the solution vector.  As soon as the voltage source turns on the current that needs to be supplied is very large (1.25e4 Amps!).  Given the tolerance set on the problem the solvers can't solve for a variable oder 1.23e4 to an accuracy of 1e-6.

So, there are two ways to help the solver here:

1. Tell the time integrator to not apply the same accuracy limits to currents that is does to voltages with the option: 

.options timeint maskivars=1

2. Use the default time integration abstol and retool.  By using ".options timeint reltol=1e-06 abstol=1e-06" you are putting very tight tolerances on the retol and that will cause problems in this simulation.

Good Luck,
Rich

xyce-users

unread,
Aug 30, 2024, 4:28:14 PM8/30/24
to xyce-users

Likewise with the problem removing the "*.options timeint reltol=1e-06 abstol=1e-06" and using ".options timeint maskivars=1" allows the simulation to work well.  

Good Luck,
Rich
Reply all
Reply to author
Forward
0 new messages