import math
#variable declaration
d = 2*10**-3; #diameter in m
I = 5*10**-3; #current in A
e = 1.6*10**-19; #charge of electron in coulombs
a = 3.61*10**-10; #side of cube in m
N = 4; #number of atoms in per unit cell
#formula
#J=n*v*e
#calculation
r = d/float(2); #radius in m
n = N/float(a**3); #number of atoms per unit volume in atoms/m**3
A = math.pi*(r**2); #area in m**2
J = I/float(A); #current density in Amp/m**2
v = J/float(n*e); #average drift velocity in m/s
#result
print'velocity=%3.2e'%v,'m/s';
import math
#variable declaration
I = 6; #current in A
d = 1*10**-3; #diameter in m
n = 4.5*10**28; #electrons available in electron/m**3
e = 1.6*10**-19; #charge of electron in coulombs
#calculation
r = d/float(2); #radius in m
A = math.pi*(r**2); #area in m**2
J = I/float(A); #current density in A/m**3
vd = J/float(n*e); #density in m/s
#result
print'velocity=%3.2e'%vd,'m/s';
import math
#variable declaration
V = 63.5; #atomic weight in kg
d = 8.92*10**3; #density of copper in kg/m**3
r = 0.7*10**-3; #radius in m
I = 10; #current in A
e = 1.6*10**-19; #charge of electronin coulomb
h = 6.02*10**28; #planck's constant in (m**2)*kg/s
#calculation
A = math.pi*(r**2); # area in m**2
N = h*d;
n = N/float(V);
J = I/float(A); #current density in m/s
vd = J/float(n*e); #drift velocity in m/s
#result
print'velocity=%2.2e'%vd,'m/s';
import math
#variable declaration
R = 0.182; #resistance in ohm
l = 1; #length in m
A = 0.1*10**-6; #area in m**2
#formula
#R=(p*l)/A
#calculation
p = (R*A)/float(l); #resistivity in ohm m
#result
print'restivity=%3.2e'%p,'ohm m';
import math
#variable declaration
n = 5.8*10**28; #number of silver electrons in electrond/m**3
p = 1.45*10**-8; #resistivity in ohm m
E = 10**2; #electric field in V/m
e = 1.6*10**-19;
#formula
#sigma = n*e*u
#sigma=p
#calculation
u = 1/float(n*e*p);
vd = u*E; #drift velocity in m/s
#result
print'velocity=%3.1f'%vd,'m/s';
import math
#variable declaration
W = 107.9; #atomic weight in amu(atomic mass unit)
p = 10.5*10**3; #density in kg/m**3
sigma =6.8*10**7; #conductivity in ohm**-1.m**-1
e =1.6*10**-19; #charge of electron in coulombs
N = 6.02*10**26; #avagadro number in mol**-1
#calculation
n = (N*p)/float(W); #number of atoms per unit volume
u = sigma/float(n*e); #density of electron in m**2.V**-1.s**-1
#result
print'density=%3.2e'%u,'m**2.V**-1.s**-1';
import math
#variable declaration
#for common metal copper
n = 8.5*10**28; #number of atoms in m**-3
sigma = 6*10**7; #sigma in ohm**-1 m**-1
m = 9.1*10**-31; #mass of electron in kilogram
e = 1.6*10**-19; #charge of electron in coulombs
#calculation
t = (m*sigma)/float(n*(e**2)); #relaxation time in s
#result
print'time=%3.2e'%t,'s';
import math
#variable declaration
t = 3.0*10**-14; #time in s
n = 2.5*10**22; #in electrons per m**3
m = 9.1*10**-31; #mass of electron in kilograms
e = 1.6*10**-19; #charge of electron in coulombs
T = 3.25; #temperature in K
#formula
#K/(sigma*T)=2.44*10**-8 from wiedemann Franz law
#calculation
sigma = (n*(e**2)*t)/float(m*10**-6); #conductivity in m**3
K = (2.44*10**-8)*sigma*T; #thermalconductivity in W/m-K
#result
print'thermal conductivity=%3.4f '%K,'W/m-K';
print' Note: calculation mistake in textbook in calculating K as T value is taken 325 instead of 3.25';
import math
#variable declaration
a = 10**-10; #one dimension in m
m = 9.1*10**-31; #mass of kg
h = 6.62*10**-34; #planck's constant in joule-s
#formula
#En = ((n**2)*(h**2))/float(8*m*(a**2))
#calculation
E1 = (h**2)/float(8*m*(a**2)); #energy in J
E2 = (4*(h**2))/float(8*m*(a**2)); #energy in J
dE = (3*(h**2))/float(8*m*(a**2)); #energy diefference in J
x = dE/float(1.6*10**-19); #energy diefference in eV
#result
print'energy diefference=%3.2e'%x,'eV';
import math
#variable declaration
N =6.02*10**23; #avagadro number in atoms /mole
h = 6.63*10**-34; #planck's constant in joule-s
m = 9.11*10**-31; #mass in kg
M = 23; #atomic weight in grams /mole
p = 0.971; #density in gram/cm**3
#formula
#x=N/V=(N*p)/M
#calculation
x = (N*p)/float(M);
x1 = x*10**6;
eF = (((h**2)/float(2*m)))*(((3*x1)/(8*math.pi))**(2/float(3))); #Fermi energy
eF1 = (eF)/float(1.6*10**-19);
#result
print'fermi energy=%3.2f'%eF1,'eV';
import math
#variable declaration
x = 2.54*10**28; #number of electrons in per m**2
h = 6.63*10**-34; # planck's constant in joule-s
m = 9.11*10**-31; # mass in kg
p = 0.971; #density in grams/cm**3
k = 1.38*10**-23;
#calculation
#x = (N*p)/float(M);
eF = (((h**2)/(2*m)))*(((3*x)/float(8*math.pi))**(2/float(3)));
eF1 = (eF)/float(1.6*10**-19); #Fermi energy in eV
vF = math.sqrt((2*eF)/float(m)); #fermi velocity in m/s
TF = eF/float(k); #fermi temperature in K
#result
print'fermi energy =%3.2f'%eF1,'eV';
print'fermi velocity =%3.2e'%vF,'m/s';
print'femi temperature =%3.2e'%TF,'K';
import math
#variable declaration
M = 65.4; #atomic weight
p = 7.13; #density in g/cm**3
h = 6.62*10**-34; # planck's constant in joules-s
m = 7.7*10**-31; # mass
v = 6.02*10**23; #avagadros number in atoms/gram-atom
#calculation
#x =N/V
V = M/float(p); #volume of one atom in cm**3
n = v/float(V); # number of Zn atoms in volume v
x = 2*n*(10**6); #number of free electrons in unit volume iper m**2
eF = ((h**2)/float(2*m))*(((3*x)/float(8*math.pi))**(2/float(3))); # fermi energy in J
eF1 = eF/float(1.6*(10**-19));
#result
print'fermi energy =%3.2d'%eF1,'eV';
import math
#variable declaration
eF = 4.27; #fermi energy in eV
m = 9.11*10**-31; # mass of electron in kg
h = 6.63*10**-34; # planck's constant J.s
#formula
#x= N/V
#calculation
eF1 = eF*1.6*10**-19; #fermi energy in eV
x = (((2*m*eF1)/float(h**2))**(3/float(2)))*((8*math.pi)/float(3)); #number of electrons per unit volume
#result
print'number of electrons per unit volume =%4.00e'%x,'m**-3';
import math
#variable declaration
eF1 = 4.70; # fermi energy in eV
eF2 = 2.20; #fermi energy in eV
x1 = 4.6*10**28; # electron density of lithium per m**3
#formula
#N/V = (((2*m*eF1)/(h**2))**(3/2))*((8*math.pi)/3);
#N/V = k*(eF**3/2)
#N/V = x
#calculation
x2 = x1*((eF2/float(eF1))**(3/float(2))); #electron density for metal in per m**3
#result
print'electron density for a metal =%4.2e'%x2,'m**-3';
import math
#variable declaration
eF = 5.4; #fermi energy in eV
k = 1.38*10**-23; # k in joule/K
#calculation
e0 = (3*eF)/float(5); #average energy in eV
T = (e0*(1.6*10**-19)*2)/float(3*k); #temperature in K
#result
print'average energy =%3.2f'%e0,'eV';
print'temperature =%3.2e'%T,'K';
import math
#variable declaration
EF = 15; #fermi energy in eV
m = 9.1*10**-31; #mass of electron in kilogarams
#calculation
E0 = (3*EF)/float(5); #average energy en eV
v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed of electron in m/s
#result
print'average energy =%3.1f'%E0,'eV';
print'speed =%3.2e'%v,'m/s';
import math
#variable declaration
EF = 7.5; #fermi energy in eV
m = 9.1*10**-31; #mass of electron in kilograms
#calculation
E0 = (3*EF)/float(5); #average energy en eV
v = math.sqrt((2*E0*1.6*10**-19)/float(m)); #speed in m
#result
print'average energy =%3.2f'%E0,'eV';
print' speed =%3.2e'%v,'m/s';
import math
#variable declaration
m = 9.1*10**-31; #mass of electron in kg
h = 6.62*10**-34; #planck's constant in (m**2)*kg/s
#formula
#x=N/V
x = 2.5*10**28;
#calculation
EF = ((h**2)/float(8*(math.pi**2)*m))*((3*(math.pi**2)*x)**(2/float(3))); #fermi energy in J
EF1 = EF/float(1.6*10**-19); #fermi energy in eV
vF = (h/float(2*m*math.pi))*((3*(math.pi**2)*x)**(1/float(3))); #fermi velocity in m/s
#result
print'energy=%3.2f'%EF1,'eV';
print' speed= =%3.2e'%vF,'m/s';
import math
#variable declaration
Ps = 10**7; #power in W
V = 33*10**3; #power transmitted in W
R = 2; #resistance in ohm
#calculation
I = Ps/float(V); #current in A
Pd = (I**2*R)/float(1000); #power lost in feeder in kW
n = ((Ps-Pd)/float(Ps))*100; #efficiency in %
v = I*R; #voltage drop in V
Vd = (v/float(V))*100; #percentage voltage drop
#result
print'efficiency =%0f '%n,'%';
print'voltage drop =%3.1f'%Vd,'%';
import math
#variable declaration
a1 = 2.76; #a1 in uv/°C
a2 = 16.6; #a2 in uv/°C
b1 = 0.012; #b1 in uv/°C
b2 = -0.03; #b2 in uv/°C
#calculation
#aFe,Pb =a1
#aCu,Pb = a2
#bCu,Fe = b1
#bFe,Pb = b2
#calculation
a3 = a1-a2; #a3 in uv/°C
b3 = b1-b2; #b3 in uv/(°C)**2
#result
print'aCu,Fe = %3.1f'%a3,'uV/°C';
print' bCu,Fe = %3.3f'%b3,'uV/(°C)**2';
import math
#variable declaration
a = 15; #a in uv/°C
b = -1/float(30); #b in uv/°C
#E = at+bt^2
#dE/dT =a+2*b*t
#t=tn
#dE/dT =0
#calculation
tn = -(a/float(2*(b))) #neutral temperature in °C
#t1+t2 = 2*t2;
t2 = 2*tn #inversion temperature in °C
#result
print'neutral temperature =%3.2d '%tn,'°C';
print'temperature of inversin = %3.2d '%t2,'°C';
import math
#variable declaration
p2 = 2.75; #resistivity of alloy 1 percent of Ni in uΩ-cm
p1 = 1.42; #resistivity of pure copper in uΩ-cm
p3 = 1.98; #resistivity of alloy 3 percent of silver in uΩ-cm
#p(Ni+Cu) =p1
#pCu =p2
#p(Cu+silver)=p3
#calculation
pNi = p2-p1;
p4 = (p3-p1)/float(3);
palloy = p1+(2*pNi)+(2*p4); #resistivity of alloy 2 percent of silver and 2 percent of nickel in uΩ-cm
#result
print'resistivity of alloy =%3.4f'%palloy,'uΩ-cm';
import math
#variable declaration
M1 = 202; #mass number
M2 = 200; # mass number
Tc1 = 4.153; # temperature in K
alpha = 0.5;
#formula
#m**alpha*(Tc)= conatant
#calculation
Tc2 = ((M1**alpha)*Tc1)/float(M2**alpha); #transition temperature in K
#result
print'transition temperature =%3.3f'%Tc2,'K';
import math
#variable declaraion
Tc1 = 2.1; #temperature in K
M1 = 26.91; #mass number
M2 = 32.13; #mass number
#formula
#Tc*(M1**2) = constant
#calculation
Tc2 = (Tc1*(M1**(1/float(2))))/float(M2**(1/float(2))); #critical temperature in K
#result
print'critical temperature =%3.2f'%Tc2,'K';
import math
#variable declaration
Hc1 = 1.41*10**5; #critical fields in amp/m
Hc2 = 4.205*10**5; # critical fields in amp/m
T1 = 14.1; #temperature in K
T2 = 12.9; # temperature in K
T3 = 4.2; #temperature in K
#formula
#Hcn =Hc*((1-((T/Tc)**4)))
#calculation
Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #temperature in K
Hc0 = Hc1/float(1-((T1/float(Tc))**2)); #critical field in A/m
Hc2 = Hc0*(1-(T3/float(Tc))**2); #critical field in A/m
#result
print'transition temperature =%3.2f'%Tc,'K';
print'critical field =%3.2e'%Hc2,'A/m';
import math
#variable declaration
Hc0 = 700000; #critical field at 0 K
T = 4; #temperature in K
Tc = 7.26; #temperature in K
#calculation
Hc = Hc0*(1-(T/float(Tc))**2); #critical field n A/m
#result
print'critical field =%3.4e'%Hc,'A/m';
print' Note: calculation mistake in texttbook in calculating Hc';
import math
#variable declaration
Hc0 = 8*10**4; #critical field
T = 4.5; #temperature in K
Tc = 7.2; #temperature in K
D = 1*10**-3; #diameter in m
#calculation
Hc = Hc0*(1-(T/float(Tc))**2);
r = D/float(2); #radius in m
Ic = 2*math.pi*r*Hc; #critical current in A
#result
print'critical current =%3.2f'%Ic,'A';
import math
#variable declaration
Hc0 = 0.0306; #critical field at 0 K
T = 2; #temperature in K
Tc = 3.7; #temperature in K
#calculation
Hc = Hc0*(1-(T/float(Tc))**2); #critical field in tesla
#result
print'critical field =%3.4f'%Hc,'tesla';
import math
#variable declaration
HcT = 1.5*10**5; # critical field for niobium at 0 K
Hc0 = 2*10**5; # critical field for nobium at 0 K
T = 8; # temperature in K
#calculation
Tc = T/((1-(HcT/float(Hc0)))**0.5); #transition temperature in K
#result
print'transition temperature =%3.2f'%Tc,'K';
import math
#variable declaration
Hc1 = 0.176; #critical fields
Hc2 = 0.528; #critical fields
T1 = 14; #temperature in K
T2 = 13; #temperature in K
T3 = 4.2; #temperature in K
#formula
#Hcn =Hc*((1-((T/Tc)**4)))
#calculation
Tc =(((((Hc2*(T1**2))-(Hc1*(T2**2)))/float(Hc2-Hc1)))**(1/float(2))); #transition temperature in K
Hc0 = Hc1/(1-((T1/float(Tc))**2)); #critical field in T
Hc2 = Hc0*(1-((T3/float(Tc))**2)); #critical field in T
#result
print'transition temperature =%3.2f '%Tc,'K';
print' critical field =%3.2f '%Hc2,'T';
import math
#variable declaration
Hc = 7900; #magnetic field in A/m
r = 2.0*10**-3; #radius of super condutor in m
#calculation
I = 2*math.pi*r*Hc; #critical current in A
#result
print'critical current =%4f'%I,'A';
print'Note: calculation mistake in textbook in calculation of I';
import math
#variable declaration
d = 10**-3; #diameter in m
Bc = 0.0548; # Bc in T
#calculation
u0 = 4*math.pi*10**-7; #permiability m**2
r = d/float(2); #radius in m
Ic = (2*math.pi*r*Bc)/float(u0); #current in Amp
#result
print'current =%3.2d '%Ic,'Amp';
import math
#variable declaration
D =8.5*10**3; #density in kg/m**3
W =93; #atomic weight
m =9.1*10**-31; #mass of electron in kilograms
e =2*1.6*10**-19; #charge of electron in coulombs
N =6.023*10**26; #avagadro number in (lb-mol)−1
#calculation
u0 =4*math.pi*10**-7;
ns =(D*N)/float(W); #in per m**3
lamdaL =(m/float(u0*ns*e**2))**(1/float(2)); #London's penetration depth in nm
#result
print'penetration depth=%3.2f'%(lamdaL*10**9),'nm';
import math
#variable declaration
Tc =7.2; #temperature in K
lamda =380; #penetration depth in Å
T =5.5; #temperature in K
#calculation
lamdaT=lamda*((1-((T/float(Tc))**4))**(-1/float(2))); #penetration depth in Å
#result
print'penetration depth=%3.1f'%lamdaT,'Å';
print' Note: calculation mistake in textbook in calculating lamdaT';
import math
#variable declaration
lamda1 = 16; #penetration depth in nm
lamda2 = 96; #penetration depth in nm
T1 = 2.18; #temperature in K
T2 = 8.1; # temperature in K
#formula
#lamdaT =lamda0*((1-((T/Tc)**4))**(-1/4))
#calculation
Tc = ((((lamda2*(T2**4))-(lamda1*(T1**4)))/float(lamda2-lamda1))**(1/float(4))); #critical temperature in K
#result
print'critical temperature =%3.2f '%Tc,'K';
import math
#variable declaration
Eg =30.5*1.6*10**-23; #energy gap in eV
h =6.6*10**-34; #planck's constant in (m**2)*kg/s
c =3.0*10**8; #velocity of light in m
#formula
#Eg=h*v
#calculation
v = Eg/float(h); #velocity in m
lamda = c/float(v); #wavelength in m
#result
print'wavelength=%2.2f'%(lamda*10**3),'mm';
import math
#variable declaration
k =1.38*10**-23;
Tc =4.2; #tempetrature in K
h =6.6*10**-34; #planck's constant in (m**2)*kg/s
c =3*10**8; # velocity of light in m
#calculation
Eg = (3*k*Tc); #energy gap in eV
lamda = h*c/float(Eg); #wavelngth in m
#result
print'region of electromagnetic spectrum=%3.2e'%lamda,'m';