Qucs / qucs

Qucs Project official mirror
http://qucs.sourceforge.net/
GNU General Public License v2.0
1.15k stars 211 forks source link

Simple LCR-circuit transient simulation fails #34

Closed ra3xdh closed 9 years ago

ra3xdh commented 10 years ago

I am trying to simulate simple LCR-circuit. For Qucs0.0.17 all works fine. Qucs0.0.18 has very strange behavior. Schematic under simulation is here: sch If DC voltage is 12 V, simualtion results are incorrect. Pr1.Vt voltage always is zero. You cannot obtain voltage waveform. If transient simulation stop time is 20ms, simulation process hangs. Here is voltage waveform plot: volatge-1 If we set less V1 voltage value (for example 5V), simulation works properly. Voltage waveform is damped oscillations. Here is circuit and waveform plot. sch-2 volt-2 Qucs schematic file is attached: https://gist.github.com/ra3xdh/9df9d0694d9a4ca6a954/download

So, simulation results are dependent from voltage value even for simple LCR-circuit. What reasons can cause this strange behavior?

guitorri commented 10 years ago

Confirmed in 0.0.18. Are you sure it worked in 0.0.17?

It might be related with known issues with switches: https://sourceforge.net/p/qucs/bugs/128/

For the moment, try to add a small Ron to the switch. I added Ron=1e-2 and the the simulation completes.

Right now I can only speculate about the reasons...

ra3xdh commented 10 years ago

Yes, with Ron=0.01Ohm all works properly.

The simulation results for Qucs0.0.17 are here: induct sch-induct

broucaries commented 9 years ago

I have a good book about simulating switch. Will try to add it in reference