Code to compute the magnetic field of different geometries using the finite-wire approach. The notebook uses a hybrid methodology to evaluated the magnitude of the magnetic field of different shapes (designed by the user/student). It uses an iterative method based on the analytical solution of the traditional exercise of finding the magnetic field created by a current carrying wire.
This Jupyter notebook reproduce all figures of the paper "Beyond the magnetic field of a finite wire: a teaching approach using the superposition principle" by García-Farieta & A. Hurtado-Márquez (2021) published in The Physics Teacher journal (Vol. 59, 2021).
Please free fell to use, re-use, modify and distribute this code for your own purposes under the MIT Licence. If you find this code useful in your research, please cite:
@article{jegarfa2021wire,
title={Beyond the magnetic field of a finite wire: a teaching approach using the superposition principle},
author={Garc\'ia-Farieta, J.E. and Hurtado-M\'arquez, A.},
journal={The Physics Teacher},
volume={59},
number={5},
pages={210--212},
year={2021},
publisher={American Association of Physics Teachers}
}