Thursday, November 15, 2012

Magic Squares for tokamaks

A quick note about this particular idea: I tried to keep it in secret, in a classified-like status, until I found out that I wasn't the first person to think about it and that much research has been done in this topic...so its not classified anymore, now it simply is "my version of it" - and perhaps, how it came into being.

Have you ever seen a "magic square"? this little puzzles where you have to plug in numbers in an $N \times N$ table such that all the columns and rows add up to some number? - chances are that you know what I'm talking about.

These little puzzles can be very tricky to solve. Lets see for example what would be needed to solve the general $N \times N$ case:

If you think on the table as $N \times N$ matrix, we have precisely $N^2$ variables to solve for. On the other side, we have n-equations for the rows, and n-equations for the columns: a total of $2N$ equations for $N^2$ variables.

As you can see, we need more constrains on the problem for it to be solvable. One such constrain can be the fact that all the numbers are integers, positive  and can only appear once int he puzzle..I'm not sure who many constrains these restrictions represent, but it certainly helps. What else can help us?

Well, some puzzles include also restrictions on the sums of the diagonals and off diagonals of the table....this can also give us a set of constrains on the order ~n, still not enough (for a general value of $N$) to satisfy the $N \times N$ equations.....so what to do about it?

We can see how a diagonal sum can be thought of a line-sum through an angle of $45^\circ$, columns as line-sums at $0^\circ$, and rows as line-sums at $90 ^\circ$ , what about a line-sum at any desired angle?
Even more interesting, is there any finite number of angles [ range $ \( 0^\circ, 90^\circ, \epsilon \) $ --see python's notation] such that the resulting equations ARE enough to solve the table?

Well, I have not write down any calculation, but I thought I was possible to do, so I started a small research on the subject and I found something quite surprising.

Last semester I had a class on nuclear instrumentation, and more specifically, on bolometry for Plasmas. What they do, is to place several light receptors pointing at different angles and at different positions along a cross-section of the tokamak. 



It turns out that what the receptors measure is the continuum equivalent of the line-sums described above, they call them line-averaged values of some quantity (in our case, light intensity~ temperature~ density) then, they have a computer to numerically solve the $N \times N$ system  of equations. 

When I heard about this, I was really exited because it was a brilliant plasma diagnose method, and I came up with it! ~ sort of...; And so, I immediately wanted some details on how the numerics of this computer program worked. Turned out that you can indeed come up with answers (temperature-density fields) that reproduce the line-averaged values, but the solutions are not unique and extra information from other diagnostics is used as a ruling criteria.

So I was happy I came up with the idea, I was also happy to know that the same problem I found while thinking about it was found (and had similar relevance) when the experts took a look at it.
On the other hand, something tells me, that for an infinitely accurate reading of these line-averaged intensities at ALL the possible angles gives enough info about the solution of the problem....in fact I believe it gives all the possible info about the problem. But of course, I can't prove it...=(