from math import pi
import math
# given
Bc=0.8 #flux-density in tesla
Hc=510.0 #magnetic intensity
Bg=0.8 #flux density in the core
A=0.00000125663 #vacuum permeability
lg=0.0015 #air-gap lengths
lc=0.36 #mean-core path
N=500.0 #no.of turns in the coil
# calculations
Fg=Bg/A*(2*lg)
Fc=Hc*lc
F=Fc+Fg #total mmf required
i=F/N #current in the circuit
Pre=Bc/Hc*1000 #permeability of core
RelPre=Pre/A*10**-3 #relative permeability
F=Hc*lc
i=F /N #current required
Pre=round(Pre,3) #permeability of core
RelPre=round(RelPre,2)
i=round(i,3)
print 'permeability of core is ',Pre
print 'relative permeability of core is',RelPre
print 'The current in circuit is ',i,'A'
from math import pi
A=0.00000125663 #vacuum permeability
lc=36.0*10.0**-2.0 #core-length
N=500.0
i=4.0 #current in the circuit
lg=2.0*10.0**-3.0 #air-gap length
m=-A*(lc/lg)
c=(N*i*A)/(lg)
Hc=(N*i)/(lc) #flux density
Hc=round(Hc,0)
print 'The flux density is',Hc,'At/m'
import math
#given
N1=N2=500.0 #no.of turns
I1=I2=10.0 #current
Ibafe=3*52*10**-2
A=4.0*pi*10**-7 #vacuum permeability
b=1200 #relative permeability of theferro-magnetic material
Ag=0.0004
Ac=4*10^-4
lg=5*10^-3 #air-gap length
Ibecore=0.515
c=0.0002067
d=0.0004134 #airgap flux
#calculations
F1=N1*I1
F2=N2*I2
Pre=1200*A #permeability
Rbafe=(Ibafe)/(Pre*Ac)
Rg=lg/(A*Ag)
Rbecore=Ibecore/(Pre*Ac)
Bg=d/(Ag) # airgap fluxdensity
Hg=Bg/A*10**-6 #magnetic intensity
Bg=round(Bg,3)
Hg=round(Hg,3)
print 'the airgap flux density is',Bg,'T'
print 'The magnetic intensity in the air gap is ',Hg,'*10**6 At/m'
from math import pi
# given
Irad=20 #inner-radius of the coil
Orad=25 #outer-radius of the coil
Dia=22.5 #diameter of the coil
N=250 #no.of turns of the coil
i=2.5 #coil current
B=1.225
# calculations
l=2*pi*Dia*10**-2
radius=1/2*(Irad+Orad)
H=(N*i)/l
A=pi*((Orad -Irad)/2)**2*10**-4 # Cross-sectional area
z=(1.225)*(pi*6.25*10**-4)
y=(N*z)
L=(y/i)
core=(B/H)
l=(2*pi*22.5*10**-2)
Rcore=2599.64*10**2 # formula for Rcore=(l)/(core*A)
L=(N**2)/(Rcore)
L=round(L,2)*1000
print 'Inductance in the coil is',L,'mH'
import math
# given
n=500.0 #no.of turns
E=100.0 #amplitude
A=0.001 #cross-sectional area of the core
b=1/120
f=1.2 #given max.flux density value
#calculations
max1=0.833 #Formula for max1=(E/1000)*(b)
max2=(f*A)
E=(120*n*max2*2) # result
max1=round(max1,2)
E=round(E,2)
print 'Maximum flux is',max1,'mWb'
print 'Maximum value of E is',E,'V'
from math import pi
#given
lg=0.4 #air-gap length
Bg=0.8 #flux density
Hm=42.0*10.0**3.0
A=4.0*pi*10.0**-7.0 #vacuum permeability
Ag=2.5*10.0**-4.0
Bm=0.95
#calculations
Hg=Bg/A
lm=(lg/Hm)*Hg
Am=(Bg*Ag)/(Bm)*10000
lm=round(lm,2)
Am=round(Am,3)
print 'The dimension Im is',lm,'cm'
print 'The dimension Am is',Am,'cm**2'