From: Andreas Stumbauer <andreas.stumbauer@gm...>  20130802 05:20:59

Hello NGSpice developers, I'm new to this forum. I'm analysing some simple networks with DC analysis. Now i'm not shure if there is a bug in ngspice or not. When i simulate a simple network with an open current source i get strange current values on each node in the network (measured with voltage sources). for example: I1 0 1 DC 10 V1 1 2 0 R1 2 3 2 R2 3 4 1 R4 4 5 1 R5 5 6 11 .DC I1 10 10 10 .control run print i(V1) print v(1,1) print v(1,2) print v(1,3) print v(1,4) print v(1,5) print v(1,6) result: Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 i(v1) = 1.000000e+001 v(1,1) = 0.000000e+000 v(1,2) = 0.000000e+000 v(1,3) = 1.600000e+001 v(1,4) = 2.400000e+001 v(1,5) = 3.200000e+001 v(1,6) = 3.200000e+001 ngspice 1 > Is there an explanation for this behavior? Can anyone help? Thanks, Andi 
From: Les Howell <hlhowell@pa...>  20130802 06:38:49

On Fri, 20130802 at 07:20 +0200, Andreas Stumbauer wrote: > Hello NGSpice developers, > > I'm new to this forum. > > I'm analysing some simple networks with DC analysis. > > Now i'm not shure if there is a bug in ngspice or not. > When i simulate a simple network with an open current source > i get strange current values on each node in the network (measured with voltage sources). > > > for example: > > I1 0 1 DC 10 > V1 1 2 0 > R1 2 3 2 > R2 3 4 1 > R4 4 5 1 > R5 5 6 11 > > .DC I1 10 10 10 > .control > run > print i(V1) > print v(1,1) > print v(1,2) > print v(1,3) > print v(1,4) > print v(1,5) > print v(1,6) > > > result: > > Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 > > No. of Data Rows : 1 > i(v1) = 1.000000e+001 > v(1,1) = 0.000000e+000 > v(1,2) = 0.000000e+000 > v(1,3) = 1.600000e+001 > v(1,4) = 2.400000e+001 > v(1,5) = 3.200000e+001 > v(1,6) = 3.200000e+001 > ngspice 1 > > > > Is there an explanation for this behavior? > > Can anyone help? > > Thanks, > > Andi > Hi, Andi, Draw your circuit and I think you will see the problem. A line breaks down as follows: device, 1st connection, 2nd connection value... this line R1 2 3 2 means R1 resistor 1 in your schematic where R1 is the Reference Designation. it is connected between nodes 2 and 3 and has a value of 10 ohms. I guess I1 is a current source (I haven't used this yet.) so current source I1 connected between nodes 1 and 0 with a value of 10A. V1 would be dc voltage source 1 connected between nodes 1 and 2 with a value of 0v. If you follow around a series string, for example with a voltage source and three resistors: V1 0 1 1v r1 1 2 100k r2 2 3 10k r3 3 0 1k now draw this out and compare it to your circuit. Regards, Les H 
From: Les Howell <hlhowell@pa...>  20130802 06:51:01

On Thu, 20130801 at 23:23 0700, Les Howell wrote: > On Fri, 20130802 at 07:20 +0200, Andreas Stumbauer wrote: > > Hello NGSpice developers, > > > > I'm new to this forum. > > > > I'm analysing some simple networks with DC analysis. > > > > Now i'm not shure if there is a bug in ngspice or not. > > When i simulate a simple network with an open current source > > i get strange current values on each node in the network (measured with voltage sources). > > > > > > for example: > > > > I1 0 1 DC 10 > > V1 1 2 0 > > R1 2 3 2 > > R2 3 4 1 > > R4 4 5 1 > > R5 5 6 11 > > > > .DC I1 10 10 10 > > .control > > run > > print i(V1) > > print v(1,1) > > print v(1,2) > > print v(1,3) > > print v(1,4) > > print v(1,5) > > print v(1,6) > > > > > > result: > > > > Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 > > > > No. of Data Rows : 1 > > i(v1) = 1.000000e+001 > > v(1,1) = 0.000000e+000 > > v(1,2) = 0.000000e+000 > > v(1,3) = 1.600000e+001 > > v(1,4) = 2.400000e+001 > > v(1,5) = 3.200000e+001 > > v(1,6) = 3.200000e+001 > > ngspice 1 > > > > > > > Is there an explanation for this behavior? > > > > Can anyone help? > > > > Thanks, > > > > Andi > > > Hi, Andi, > Draw your circuit and I think you will see the problem. > A line breaks down as follows: > device, 1st connection, 2nd connection value... this line > R1 2 3 2 > means R1 resistor 1 in your schematic where R1 is the Reference > Designation. it is connected between nodes 2 and 3 and has a value of > 10 ohms. > > I guess I1 is a current source (I haven't used this yet.) so current > source I1 > connected between nodes 1 and 0 with a value of 10A. > > V1 would be dc voltage source 1 connected between nodes 1 and 2 with a > value of 0v. > > If you follow around a series string, for example with a voltage source > and three resistors: > > V1 0 1 1v > r1 1 2 100k > r2 2 3 10k > r3 3 0 1k > > now draw this out and compare it to your circuit. > > Regards, > Les H > > OOPS, R1 is 2 ohms, not 10. I am almost a touch typist. 