-
I have a ltspice sim. this is the result(expected result) voltage on C2. and same circuit in qucs-s result is strange normal diode and 1n4007 diode result also different. |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 1 reply
-
Hi @dsm , consider checking the number of point on settings transient, maybe that will help. |
Beta Was this translation helpful? Give feedback.
-
tran 0.001 3 |
Beta Was this translation helpful? Give feedback.
-
You are using a default diode model in the first circuit. LTspice and Qucs-S have the different default diode model. You have The convergence issues with 1N4007 model is not a Qucs-S bug. It is related to Ngspice bug: https://sourceforge.net/p/ngspice/mailman/ngspice-devel/?viewmonth=202205 I have reported this once, but it seems it has appeared again. The workaround is to set |
Beta Was this translation helpful? Give feedback.
-
BV=1000V will solve the problem and number of the point not set to default but not as high as 32768. thank you for your explanation. |
Beta Was this translation helpful? Give feedback.
-
I am transferring this to discussion. The issue with |
Beta Was this translation helpful? Give feedback.
-
It is unclear which ngspice version was used. |
Beta Was this translation helpful? Give feedback.
-
@dwarning I will prepare a minimal netlist reproducing this problem. Maybe some other bug with diode has appeared. |
Beta Was this translation helpful? Give feedback.
-
Here is a minimal netlist reproducing this. issue. The diode models are using default
|
Beta Was this translation helpful? Give feedback.
-
I am using Ngspice-42 too. The Ngspice-39 fails to converge too. The Ngspice-27 works, but gives a wrong waveform. The 1N4007 model works only if an explicit |
Beta Was this translation helpful? Give feedback.
-
There was no IKF in the netlist! Reducing max. timestep in tran, e.g. tran 0.001 3 0 10u will work without IKF, with IKF=0 and IKF=1e-20. BTW - Qucs-S netlister seem to omit IKF if it set to 0. This is dangerous, perhaps a quick workaround from the past, where you found the IKF problem. EDIT: Warning: IKF too small - model effect disabled! |
Beta Was this translation helpful? Give feedback.
-
For me tran 0.001 3 works without IKF, with IKF=0 and IKF=1e-20, both sparse and klu solvers. No need to reduce max step. With Ikf=0 ngspice prints a warning: I am using ngspice-42 compiled from source: |
Beta Was this translation helpful? Give feedback.
-
@ivandi69 EDIT: |
Beta Was this translation helpful? Give feedback.
-
@dwarning |
Beta Was this translation helpful? Give feedback.
-
I am getting convergence error even with omitted
|
Beta Was this translation helpful? Give feedback.
-
OK, it fails with windows build of ngspice-42+ and Ikf=0. It works with Ikf=1e-20. |
Beta Was this translation helpful? Give feedback.
-
On windows ngspice-42+ if I put |
Beta Was this translation helpful? Give feedback.
@dsm
You are using a default diode model in the first circuit. LTspice and Qucs-S have the different default diode model. You have
BV=10V
in Qucs-S by default and diode goes to breakdown producing wrong output. Set theBV=1000V
and everything will work as expected. The another issue is that you have used default transient points number. Ngspice is able to adjust transient time step but only to some extension. You have to set the points numbers manually for long transient simulation durations. Espesially if Tstop is greater than 5-10 waves of the input signal source. You have Tstop=3s and F=50Hz. Ngspice may skip the sine waves and show wrong result.The convergence issues with 1N4007 mod…