import math
# GIVEN DATA
A = 0.0001; # The Cross-sectional area of core in metre-square
Mo = 4*math.pi*(10)**(-7); # Permeability of air in Henre/metre
Mr = 1000; # Relative permeability of core
N1 = 10;N2=20;N3=10; # Number of turns
I1 = 1.0;I2=0.5;I3=1.5; # Currents in Amphere
d = 2.5; # Dimension of inner window in centimetre
w = 1.0; # Each limb wide in centimeter
# CALCULATIONS
F = (N1*I1)+(N2*I2)-(N3*I3); # MMF in Amphere-turns (minus because third coil produces the flux in opposite direction to that of other to coils)
L = ((d*4)+(I2*2*4))*10**-2; # Length of the Magnetic path in metre (4-is sides of the windows)(2-Going and returning of current I2)
R = L/(Mr*Mo*A); # Relucmath.tance of the Magnetic path in MKS unit of Relucmath.tance
phi = (F*10**3)/R; # Flux in milli-Weber
B = phi/A; # Flux Density in Weber/metre Square
H = F/L; # Magnetic Field Intensity in Amphere-turns/Metre
# DISPLAY RESULTS
print ("EXAMPLE : 2.1 : SOLUTION :-") ;
print " a) Flux in the core, phi = %.6f mWb "%(phi);
print " b) Flux Density in the core, B = %.2f Wb/metre square "%(B);
print " c) Magnetic Field Intensity in the core, H = %.2f At/m "%(H);
import math
# GIVEN DATA
N = 100; # Number of turns
La = 0.3; # Mean arc length of material "a" is a Nickel-iron alloy in Metre
Lb = 0.2; # Mean arc length of material "b" is a Steel in Metre
Lc = 0.1; # Mean arc length of material "c" is a Cast Steel in Metre
a = 0.001; # Area of the all Materials "a,b,c" in Metre-Square
phi = 6*10**-4; # Magnetic Flux in Weber
mue_0 = 4*math.pi*10** -7; # Permeability of the air in Henry/Meter
# CALCULATIONS
B = phi/a; # Flux Density in Telsa (Here Flux Density same for all the Materials "a,b,c" because Area of Cross Section is Same)
Ha = 10; # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material "a" obtained from the Smath.degrees(math.atanard B-H curve
Hb = 77; # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material "b" obtained from the Smath.degrees(math.atanard B-H curve
Hc = 270; # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material "c" obtained from the Smath.degrees(math.atanard B-H curve
F = (Ha*La)+(Hb*Lb)+(Hc*Lc); # The Total MMF Required in Amphere-Turns
I = F/N; # Current flowing through the Coil in Amphere
mue_r_a = B/(Ha*mue_0); # Relatative permeability of the Material "a"
mue_r_b = B/(Hb*mue_0); # Relatative permeability of the Material "a"
mue_r_c = B/(Hc*mue_0); # Relatative permeability of the Material "a"
Ra = (Ha*La)/phi; # Relucatnce of the Material "a" in MKS unit
Rb = (Hb*Lb)/phi; # Relucatnce of the Material "b" in MKS unit
Rc = (Hc*Lc)/phi; # Relucatnce of the Material "c" in MKS unit
L = (N*phi)/I; # Inducmath.tance of the Coil in Henry
# DISPLAY RESULTS
print ("EXAMPLE : 2.2 : SOLUTION :-") ;
print " a) The Total MMF , F = %.1f At "%(F);
print " b) Current flowing through the Coil , I = %.3f A "%(I);
print " c.1) Relatative permeability of the Material a, mue_r_a = %.f "%(mue_r_a);
print " c.2) Relatative permeability of the Material b, mue_r_b = %.f "%(mue_r_b);
print " c.3) Relatative permeability of the Material c, mue_r_c = %.f "%(mue_r_c);
print " c.4) Relucatnce of the Material a, Ra= %.f MKS unit "%(Ra);
print " c.5) Relucatnce of the Material b, Rb= %.1f MKS unit "%(Rb);
print " c.6) Relucatnce of the Material c, Rc= %.f MKS unit "%(Rc);
print " d) Inductance of the Coil , L = %.4f H "%(L);
import math
# GIVEN DATA
F = 35; # Total MMF in Amphere-Turns
Lc = 0.1; # Inducmath.tance of The Material "c" in Henry
a = 0.001; # Area of the all Materials "a,b,c" in Metre-Square
# CALCULATIONS
Hc = F/Lc; # Field Intensity in Amphere-Turns/Meter (Given that entire MMf apperas on Material "c" Because of the highest relucmath.tance about 45000 MKS unit From Example 2.2)
Bc = 0.65; # Flux density of material "c" in in Telsa obtained from the Smath.degrees(math.atanard B-H curve
phi = Bc*a; # Flux in the core in Weber
Ba = Bc; # Flux density of material "a" in in Telsa Same because Area of Cross Section is Same
Bb = Bc; # Flux density of material "b" in in Telsabecause Area of Cross Section is Same
# DISPLAY RESULTS
print ("EXAMPLE : 2.3 : SOLUTION :-") ;
print " a) Flux in the core , phi = %.5f Wb "%(phi);
print " b) Flux density of material a,b, c , Ba = Bb = Bc %.2f T "%(Ba);
import math
# GIVEN DATA
# Refer figure 2.7:- Page no. 41
a = 0.0001; # Cross Sectional Area of the Core in Meter-Square
Li = 0.158; # Total length of the Path abcdef in Meter (4.0*4.0 - 0.2 = 15.8cm = 0.158m)
Lg = 0.002; # Length of the air gap in Meter
mue_0 = 4*math.pi*10**-7; # Permeability of the air in Henry/Meter
mue_r = 10000; # Permeability of the core
N = 10; # Number of Turns
I = 1.0; # Current in the Coil in Amphere
v = 50; # hall effect sensor generates volatge produces in milli volt per 1 Telsa
Li_new = 0.16; # Length of the Flux path in Absence of the Air gap in Meter
# CALCUALTIONS
F = N*I; # MMF of the Coil in Amphere-turn
Ri = Li/(mue_0*mue_r*a); # Relucatnce of the Iron Coil in MKS unit
Rg = Lg/(mue_0*a); # Relucatnce of air gap in MKS unit
R = Ri+Rg; # Total Relucmath.tance in MKS unit
phi = F/R; # Flux in the Core in Weber
B = phi/a; # FLux density in the core(Presence of the Air gap) in Weber/Meter-Square
HEV = B*50; # Output of the Hall effect Sensor device in Milli-Volt
R_new = Li_new/(mue_0*mue_r*a) # Relucamath.tance of the Magnetic Circuit in Absence of the Air gap
phi_new = F/R_new; # New Flux in the Core in Weber
B_new = phi_new/a; # New FLux density in the core in Weber/Meter-Square
Ratio = B_new/B; # Ratio of the Flux Density in Absence of the Air gap and in the presence of the Air gap
# DISPLAY RESULTS
print ("EXAMPLE : 2.4 : SOLUTION :-") ;
print " a) Flux density in the corePresence of the Air gap) , B = %.8f Wb/Meter-Square "%(B);
print " b) Output of the Hall effect Sensor device , HEV = %.7f mV "%(HEV);
print " c) Ratio of the Flux Density in Absence of the Air gap and in the presence of the Air gap , Ratio = %.2f "%(Ratio);
import math
# GIVEN DATA
# Refer figure 2.3(a):- Page no. 36
B = 1.0; # Flux Density in the Core in Weber/Meter-Square
Liron = 0.55; # Mean length of the flux path of Iron in Meter
Lair = 0.002; # Mean length of the flux path of Air Gap in Meter
I = 20; # Coil Current in Amphere
H = 200; # Field Intensity in Amphere-Turns/Meter
mue_r = 20000; # Relative permeability of Ferrite core
mue_0 = 4*math.pi*10**-7; # Permeability of the air in Henry/Meter
a = 0.0025; # Area of the Cross sectional of the core oin Metre-Square
# CALCULATIONS
phi = B*a; # Toatl Flux in the core in Weber
Rair = Lair/(mue_0*a); # Relucatnce in the Air gap
Fair = Rair*phi; # MMf in the Air gap in Amphere-Turns
Firon = H*Liron; # MMf in the Iron core in Amphere-Turns
F = Firon+Fair; # Total MMF in Amphere-Turns
N = F/I; # Number of turns in the Coil
F_new = B/(mue_0*mue_r); # Field Intensity in Amphere-Turns/Meter
F_new_total = (Fair+F_new); # Total MMF in Amphere-Turns
N_new = F_new_total/I; # Number of turns in the Coil
# DISPLAY RESULTS
print ("EXAMPLE : 2.5 : SOLUTION :-") ;
print " a) Number of turns in the Coil in air gap made of Silicon Steel having an field intensity \
\n200At/m corresounds to 1.0 T Flux Density , N = %.2f appoximately 85 "%(N);
print " b) Number of turns in the Coil for a ferrite core of having Relative premeability of 20000 and\
\n magnetic Field Density corresponnds to 1.0 T , N_new = %.2f appoximately 82 "%(N_new);