I suck at analytical solutions. Fortunately, I'm typing this at a computer rather than a blackboard. Pure mathematicians, stop reading now. I'm about to get computational on your ass.

Attach the network to a constant voltage source connected at the two marked test nodes 1 and 2. Set the voltage at these points equal to +1 volt and -1 volt. (You can pick any voltage, but these are convenient.)

Then the equivalent resistance of the circuit is

Req = 2 / Itotal

Where Itotal is the total current flowing out of node 1.

At any node *except* the test nodes, the sum of currents flowing in and out equals zero:

Inorth + Isouth + Ieast + Iwest = 0

The current Inorth is equal to the voltage drop between "here" and the node just to the north:

(Vnorth - Vhere) = Inorth R = Inorth

...and so on. This gives us:

(Vnorth + Vsouth + Veast + Vwest - 4*Vhere = 0

So we've got an (infinite) series of coupled linear equations which give each voltage in terms of its neighbors. Now, once we get "very far away", all the voltages are near zero and little current flows: one would hope that a large *finite* grid would approximate the answer.

We can rewrite the formula as:

Vhere = (Vnorth + Vsouth + Veast + Vwest)/4

That is, the "correct solution" has the voltage at each point equal to the average of its neighbors. One might guess that one could solve the problem by successive approximation: just set each point (except nodes 1 and 2) equal to the average of its neighbors, keep doing that over and over, and hopefully you'll converge on a consistent solution. (This isn't an idle hope: the equation is equivalent to a finite-difference approximation to Laplace's equation, which can be solved this way.)

So, here's what we're gonna do:

0) Make a large but finite grid of nodes. Set all but nodes 1 and 2 equal to zero voltage to start.

1) Set each node's voltage equal to the average of its neighbors.

2) Exception: set nodes 1 and 2 to the known externally-applied voltages.

3) Repeat 1-2 a whole lot.

4) Itotal = (Vnorthofnode1 + Vsouthofnode1 + ...) - 4*Vnode1

5) Requivalent = 2/Itotal

DONE! But just to make the poor wincing mathematicians happy:

6) Confirm that the solution converges as you increase the number of averaging steps

7) Confirm that the solution converges as you increase the size of the finite grid.

Solution (for a 400x400 grid, 800 averaging steps):

Requivalent = 0.7722

Which is the right answer. Okay, the right answer is a cool algebraic expression with pis in it. I don't care.

400x400x800 is total overkill: for 100x100x200, I get 0.7694, which is pretty close.

MATLAB code: (Ugh, MATLAB!)

Code: Select all

`Nx = 400; Ny = 400; % 400 equals infinity!`

V = zeros(Nx,Ny);

x1 = Nx/2-1; y1 = Ny/2; % If you make Nx or Ny odd, you suck.

x2 = Nx/2+1; y2 = Ny/2+1;

V(x1,y1) = 1; % Set voltages at nodes 1 and 2

V(x2,y2) = -1;

nsteps = 800; % 800 equals infinity too!

for i = 1:nsteps

% averaging step:

V(2:end-1,2:end-1) = (V(1:end-2,2:end-1) + V(3:end,2:end-1) + V(2:end-1,1:end-2)+V(2:end-1,3:end))/4;

% Reset voltages at the test nodes

V(x1,y1) = 1;

V(x2,y2) = -1;

Iatnode1(i) = 4*V(x1,y1) - (V(x1+1,y1) + V(x1,y1+1) + V(x1-1,y1) + V(x1,y1-1));

end

Requiv = 2/Iatnode1(end)

plot(Iatnode1) % to appease paranoid mathematicians