Import the PyLab namespace (provides set of useful commands and constants like Pi)
In [1]:
%pylab inline
Define all the parameters:
In [2]:
l1 = 0.45 # Length of region 1
l2 = 1.3 # Length of region 2
a1 = 0.01 # Area of region 1
a2 = 0.015 # Area of region 2
ur = 2500 # Relative permeability
u0 = 4*pi*1e-7 # Permeability of free space
n = 200 # Number of turns on core
i = 1 # Current in amps
Calculate the first reluctance:
In [3]:
r1 = l1 / (ur * u0 * a1)
Calculate the second reluctance:
In [4]:
r2 = l2 / (ur * u0 * a2)
Calculate the total reluctance
In [5]:
rtot = r1 + r2
Calculate the mmf
In [6]:
mmf = n * i
Finally, get the flux in the core:
In [7]:
flux = mmf / rtot
In [8]:
print('r1 = {}'.format(r1))
print('r2 = {}'.format(r2))
print('Flux = {}'.format(flux))
(I'm using the new style PyFormat in order to make the output above a bit nicer.)