Lab 8: Electromagnetics Part I

In this notebook, we consider a 3 loop system, consisting of a transmitter loop, receiver loop and target loop.

Using the Notebook

This is the iPython Notebook, an interactive coding and computation environment. For this lab, you do not have to write any code, you will only be running it.

To use the notebook:

  • "Shift + Enter" runs the code within the cell (so does the forward arrow button near the top of the document)
  • You can alter variables and re-run cells
  • If you want to start with a clean slate, restart the Kernel either by going to the top, clicking on Kernel: Restart, or by "esc + 00" (if you do this, you will need to re-run Step 0 before running any other cells in the notebook)

Instructions as to how to set up Python and the iPython notebook on your personal computer are attached in the appendix of the lab

Import Necessary Packages


In [1]:
%pylab inline
from EMimport import *


Populating the interactive namespace from numpy and matplotlib
:0: FutureWarning: IPython widgets are experimental and may change in the future.

Your Default Parameters should be:

Parameter Default value
Inductance: L = 0.1
Resistance: R = 2000
X-center of target loop: xc = 0
Y-center of target loop: yc = 0
Z-center of target loop: zc = 1
Inclination of target loop: dincl = 0
Declination of target loop: ddecl = 90
Frequency: f = 10000
Sample spacing: dx = 0.25

You will need to adjust the initial dx

Run FEM3loop Widget


In [2]:
interact(interactfem3loop,L=(0.0,0.2,0.01),R=(0.0,20000.,1000.),xc=(-10.,10.,1.),yc=(-10.,10.,1.),zc=(0.,20.,2.),dincl=(-90.,90.,1.),ddecl=(0.,180.,1.),f=(10.,19990.,10.),dx=(0.25,10.,0.25))



In [ ]: