# QUCS simulation of simple capacitor/resistor circuit - strange results.

Hi I have just started to learn electronics. In order to understand the RC constant I have built the following very simple circuit in QUCS simulator.

According to the formula

RC time constant = R x C = 2,000,000 ohms x 0.000015 farads = 30 seconds

I would expect the graph of voltage on capacitor C1 rise steadily till it reaches 2/3 of 1.5 after 30 secs . However as it can be seen the the simulation shows straight graphs of both current and capacitor's voltage without any difference in time.

Can someone explain these results

• Did you try delaying the turn-on of the voltage source? Oct 3, 2016 at 17:11
• @IgnacioVazquez-Abrams Can you please explain what is this? Have a mercy I am completely novice at this. Oct 3, 2016 at 17:12

The circuit simulator is solving for the steady-state initial condition before running the transient sim.

To get your desired behaviour you have to explicitly tell the simulator you want zero volts across the cap at t=0. To do this, double click on the part and set the initial voltage to zero - I've highlighted the line you need to change in the dialog below.

• Worked as a charm... I cannot accept it as an answer immediately. Becuase it says to wait for 8 more minutes. Thanks!!! Oct 3, 2016 at 17:17
• @PeterK Dear Peter, I was wondering, would you be so kind to have a look at this post if time allows: electronics.stackexchange.com/questions/378429/… Thanks in advance. Jun 7, 2018 at 7:34

To simulate charging and discharging a capacitor, we use a voltage pulse.

use .IC Section in the SPICE specific sections can help. I found that setting the initial voltage for the capacitor doesn't work at all.

ps: The software I use is qucs-s instead of qucs.

• You are totally correct. In QUC-S setting the intitial voltage doesn't do a thing. By adding the .IC parameter I was able to set an initial condition. Nov 8, 2023 at 16:17

I have had this same issue.

I had to set the initial value of the capacitor as mentioned by Synchrondyne.

However I also had to turn off the InitialDC calculation of the Transient simulator object. To do this

1. Double click the "Transient Simulation" object.
2. Go to the properties Tab
3. Find the "InitialDC" property and set it to "No"

• Tried that as well and then Spice calculated an awful long time and then Spice reported it crashed. Nov 8, 2023 at 21:10