Field Simulation

The project will feature a field simulator. This part of the program will calculate the influence of the magnetic field of one coil onto the brain. This information is used to control the coils to imprint an arbitrary field into the brain.
Here is a description of the mathematics behind the field simulation. Mathematics for the field simulator

As a comparison the software Tera Analysis Quickfield is used. (By now I am off by a clear factor of two. I think I messed up the calculation of the current density in a cylindrical coil...)

Basically I try to replicate these graphs from Quickfield. At least I want to get the field strength over distance right.

Simulation of coil

Graph of flux