Yeah, I'm looking at the paper,
http://atkinson.fmns.rug.nl/public_html/resist.pdf, although not in minute detail. It seems to be essentially the same approach. The integrals are 1D with a Fourier series inside, as you said, because it's analytically doable, and this should amount to the 2D transform that I am doing.
Just to clarify: I am only injecting the current in one node, same as what they do in the paper; this is accounted for by the kroenecker delta. The current conservation should hold.
I *still* can't find an error though, and it's driving me nuts. I'm at my wits' end. Someone please help.
The basic equation is this:
4 * i_[m,n] = i_[m+1,n] + i_[m-1,n] + i_[m,n+1] + i_[m,n-1] + DeltaFunction[m,n] (1)
This is the same as the paper above (cf the unnumbered equation before Eq. 1 in the paper. They use V, I use i, but since V = I R, R=1, it's the same thing). Delta function represents their assumption (that they use later) that there's a 1A current source at the (0,0) node.
Finally, I know the equation is correct, because writing it as a system of m*n equations (in actuality less because i used symmetry) and solving it in matlab gives a solution that converges to the analytic one for m*n -> large.
Now, we follow the definitions of the DTFT from here:
http://ccrma.stanford.edu/~jos/mdft/Dis ... sform.htmlassuming i[m,n] and F[u,v] are transform pairs. Let j be the imaginary unit.
Now transform (1) and use (a) the fact that xform of the delta fn is 1, and (b) "time shift -> phase shift" property
we get 4 * F[u,v] = 2 cos(u) F[u,v] + 2 cos(v) F[u,v] + 1
Trying to solve for F and transform back yields a diverging integral. But what quantity do we actually want? Well, we assume injecting 1A of current into the (0,0) node, so to find equivalent resistance at node (m,n) we just need to know the voltage drop. So, tracing the route from (0,0) to (m,n) we have
net voltage drop = ( i[0,0] - i[0,1] ) + ( i[0,1] - i[0,2] ) + .... + (i[m-1,n] - i[m,n]) = i[0,0] - i[m,n].
Now, i[0,0] = (1/2) integral 1 / (2 - cos[u] - cos[v]) du dv
and i[m,n] = (1/2) integral exp[j(u m+ v n)] / (2 - cos[u] - cos[v]) du dv
at the end of the day, we have (1/2) integral (1-exp[j(u |m|+ v |n|)]) / (2 - cos[u] - cos[v]) du dv from -pi to pi
Note that absolute values were put in around m and n to enforce symmetry. I'm not very happy that I had to do this by hand.
This integral converges and can be evaluated numerically. So, what does it give?
For m=0, n = anything, (or n=0, m=anything) it gives the answer that is exactly a factor of 4 off from the known analytical answer. For m!=0, it plain doesn't work -- wrong answer.
I cannot find the error here. Tried multiple numerical integration routines, so it's not computational. I'm giving up... someone figure this out pls
