For RLC and diode circuit:$V_C=V_{diode}+V_L+V_R$,
where $V_L=L\frac{dI}{dt}, V_R=IR,V_C=Q_C/C , I=-\frac{dQ_C}{dt}$

For example:
At t=0; V_L=V_C-I R-V_{diode}=20-0.12*(9+1)-0.8
this can be used to calculate $\frac{dI}{dt}=V_L/L$ which will give us I(t+dt).
With I(t) we can calculate $Q_C(t+dt)=Q_C(t=0)-I dt$
We can repeat the above step to calculate the charge Q(t+dt) and current I(t+dt) for each time step t.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/RLCdiode_pkg/RLCdiode.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list