
Initial Polywell Simulation
You have to realize though that where the field vectors all seem to be 90deg to each other, the field magnitude is vanishing.
I may post the code someday (in C++). It is not really in presentation form right now, with a serious lack of comments and full of relic and specialized code to things I have been doing. Its a simple code conceptually. It integrates particle paths based on lorentz forces, then bins the particles on a cylindrical grid, and regenerates the fields by integrating over the sources, at least for the electric field.
The magnetic field was trouble, because currents require resolution in both velocity and position, and there just were not enough particles to do a good job of that. So I had to cave and use a fluid approximation to get decent current sources. Now that added the second problem that the diamagnetic current equation is nonlinear because it is something like J = Bx\grad(n)/B^2, and B is sourced by J. I used recursion to get a solution but small errors tend to build up doing that.
I may post the code someday (in C++). It is not really in presentation form right now, with a serious lack of comments and full of relic and specialized code to things I have been doing. Its a simple code conceptually. It integrates particle paths based on lorentz forces, then bins the particles on a cylindrical grid, and regenerates the fields by integrating over the sources, at least for the electric field.
The magnetic field was trouble, because currents require resolution in both velocity and position, and there just were not enough particles to do a good job of that. So I had to cave and use a fluid approximation to get decent current sources. Now that added the second problem that the diamagnetic current equation is nonlinear because it is something like J = Bx\grad(n)/B^2, and B is sourced by J. I used recursion to get a solution but small errors tend to build up doing that.
Carter
First rule of open source: Release early, release often.
In theory there is no difference between theory and practice, but in practice there is.