Oops, plain forgot to include that.
Just uploaded a new version with it included.
Basically, 0.7855 was the lowest value I measured, and the expected value is
0.77324 according to Jon's program ((8-PI)/(2*PI)).
The (8-pi)/(2pi) comes from a closed solution of the integrals done on
paper with pencil, not a software program. There are at least three
usefully different ways to approach the solution. The one I used was
the Fourier approach, where a constant factor of (1/2pi)^D appears in
the front and D is 2 for a 2-dimensional grid. [In other words, there
is always a common factor of 1/(4*pi^2) in all answers for a 2D grid,
before worrying about the result of the integrals/sums.]
That's a 1.5% error minimum.
With the other arrangements I was getting much less error than that in all
the central locations, e.g. the single resistor one measured around an
average of about 0.6% error or so in the central region, not a single one
was over 1%.
The single diagonal averaged around the 0.9% mark or so.
So it looks like the "knights move" one shows greater error with a fixed
sized grid (or else, Jon's calculated value is slightly wrong?).
Jon's program spat out 0.05% error for a 30x30 grid, I wonder what it gives
for a 14x14 like mine?
The program was set up to only use odd numbers for the width and
height (so that [0,0] could be directly in the center.) The grid I
used earlier was 121x121 and I had selected points [0,0] and [1,2] in
a grid going from -60 to +60 on each side. (I had been playing with
different sizes and when I wrote, I only pointed out that using a grid
that spans 30 or more seems to work pretty well -- not that I was
actually using a 30x30 in producing those values.)
That isn't exactly centered on the grid. Centering it on that large
grid provided (today) a value of 0.7730 instead of the .77284 that I'd
reported earlier.
Using a 15x15 node matrix (which is exactly what you'd get with a
14x14 resistor matrix), it settles down to a value of 0.7578 ohms
before the program terminates saying there is little remaining change
going on.
In these calculations, the software is using the relaxation algorithm
as I earlier mentioned. It is NOT using a Spice simulation with an
exact matrix solution to a finite resistor problem, which likely will
provide a different result.
In fact, just a second and I'll try it in LTSpice.
Ah. LTSpice provides 0.78561 Ohms for a 14x14 matrix of resistors,
with the battery placed so that the mid-point node is straddled. You
mentioned seeing nothing less than 0.7855, which is darned close to
what Spice says, too.
Take note that the relaxation algorithm on a finite grid is NOT the
same as an exact matrix solution that Spice uses. It is just an easy
way to write some simple code that is very effective in a broad set of
circumstances. In fact, the relaxation algorithm can be easily
applied to electric field potentials in a vaccum with varying types of
electrode shapes and enclosures and so on. It's got its own areas
where it is very effective (Laplace solutions.)
In fact, now that I've mentioned this I was easily able to find this
site:
http://www.av8n.com/physics/laplace.htm
Which has a nice spreadsheet you can use for exactly what I'm doing
with the tiny bit of code I wrote, earlier. I modified both the first
and second spreadsheet they offer to change the electrode and add a
cell that easily displays the same results that my program provides.
If you want my thoughts on changing those spreadsheets, I'll gladly
write them up. (It's not much, but there are some details to worry
about.)
Jon