Electrical – nodal analysis, current direction

basiccircuit analysiskirchhoffs-lawsnodal-analysis

Right, first the diagram, I tried using the schematic function,but it never actually added the schematic.

Schematic

I picked this because it illustrates my confusion in the simplest schematic I could find.

We've got three nodes here, with the bottom (N3) being the ground node, current directions are provided for N1, so writing up KCL for the nodes give the following.

$$N1 :2mA – \frac{V1}{3000}\ -\frac{V1-V2}{6000}\ = 0$$ (current enters from the 2mA supply, leaves trough the rest of the legs)

$$N2 : \frac{V1-V2}{6000} – 4mA – \frac{V2}{12000} = 0$$ (current enters from the 6k resistor, leaves trough the rest of the legs)

This in turn gives out the correct node voltages for V1 and V2. (\$\frac{-12}{7}\$ for V1 and \$\frac{-120}{7}\$ for V2)

However, I am supposed to be able to arbitrarily define the direction of the current over the 12k ohm resistor, so if I decide that current flows into node 2 and instead and use the following N2 equation

$$N2 : \frac{V1-V2}{6000}\ – 4mA + \frac{V2}{12000}\ = 0$$

I get the wrong result for both V1 and V2, so clearly the direction of the current across the 12k ohm resistor matters, what am I doing wrong ?

Best Answer

Indeed you can define the current direction in which ever way you want. If you want to get the current going into the node N2, it should be \$\frac{0-v_2}{12k} = -\frac{v_2}{12k}\$. If you add this current, then you get the same equation: $$\frac{(v1-v2)}{6000}\ - 4mA + (\frac{-v2}{12000})\ = 0$$