Chapter 14 :Magnetism

Example 14.8 , Page no:86

In [1]:
import math
from __future__ import division
 
#initialisation of variables
K=2*10**-7; #constant in N/A square
I=100; #current in Ampere
s=5; #distance in m

#CALCULATIONS
B=(K*I)/s; #calculating magnitude of field

#RESULTS
print"Magnitude of field in Tesla =",round(B,7);
Magnitude of field in Tesla = 4e-06

Example 14.10 , Page no:86

In [2]:
import math
from __future__ import division
 
#initialisation of variables
K=2*10**-7; #constant in N/A square
I=8; #current in Ampere
s=5*10**-2; #distance in m

#CALCULATIONS
B=(K*I)/s; #calculating magnitude of field
B1=2*B;

#RESULTS
print"Magnitude of field in Tesla =",round(B,7);
print"Total field in Tesla =",round(B1,7);
Magnitude of field in Tesla = 3.2e-05
Total field in Tesla = 6.4e-05

Example 14.11 , Page no:86

In [3]:
import math
from __future__ import division
 
#initialisation of variables
K=2*10**-7; #constant in N/A square
N=100; #number of turns
I=4; #current in Ampere
r=5*10**-2; #radius in m

#CALCULATIONS
B=(3.14*K*I*N)/s; #calculating magnitude of field

#RESULTS
print"Magnitude of field in Tesla =",round(B,5);
Magnitude of field in Tesla = 0.00502

Example 14.12 , Page no:86

In [4]:
import math
from __future__ import division
 
#initialisation of variables
K=2*10**-7; #constant in N/A square
N=1000; #number of turns
B=2.5*10**-5; #field in Tesla
l=0.2; #length in m

#CALCULATIONS
I=(B*l)/(2*3.14*K*N); #calculating magnitude of field

#RESULTS
print"Current in Ampere =",round(I,5);
Current in Ampere = 0.00398

Example 14.13 , Page no:86

In [5]:
import math
from __future__ import division
 
#initialisation of variables
I=5; #current in Ampere
L=0.01; #length in m
B=0.8; #magnitude of field in Tesla

#CALCULATIONS
F=B*I*L; #calculating force

#RESULTS
print"Force in Newton =",round(F,3);
Force in Newton = 0.04

Example 14.14 , Page no:87

In [6]:
import math
from __future__ import division
 
#initialisation of variables
P=2000; #power in Watt
V=120; #potential diff in volt
I=P/V; #current in Ampere
s=2*10**-3; #distance in m
K=2*10**-7; #constant in N/A square

#CALCULATIONS
F=(I*I*K)/s; #calculating force per metre

#RESULTS
print"Force in Newton per metre in opposite direction =",round(F,5);
Force in Newton per metre in opposite direction = 0.02778