from __future__ import division
import math
# Python Code Ex17.1 Variation of critical magnetic field with temp. Page-537
#Variable declaration
T_c = 3.7; # Critical temperature of superconducting transition, kelvin
H_c0 = 0.0306; # Critical magnetic field to destroy superconductivity, tesla
T = 2#Temperature at which critical magnetic field is to be found out, kelvin
#Calculation
H_cT = H_c0*(1-(T/T_c)**2);
#Result
print"\nThe critical magnetic field at",T," K =",round(H_cT,3)," T"
from __future__ import division
import math
# Python Code Ex17.2 Variation of critical magnetic field with temperature
# for tin Page-537 (2010)
#Variable declaration
T_c = 3.69; # Critical temperature of superconducting transition, kelvin
# Critical magnetic field intensity to destroy superconductivity
# at zero kelvin, tesla
B_c0 = 3e+5/(4*math.pi);
# Critical magnetic field at temperature T kelvin
B_cT = 2e+5/(4*math.pi);
#Calculation
# T = 2;Temperature at which critical magnetic field is to be found out, kelvin
# since B_cT = B_c0*(1-(T/T_c)**2);
#Critical magnetic field intensity as a function of temperature
# Solving for T
# Temperature at which critical magnetic field becomes B_cT, kelvin
T = (1-B_cT/B_c0)**0.5*T_c;
#Result
print"\nThe temperature at which critical magnetic field becomes "
print round((B_cT*10**-4),2)*10**4," T = ",round(T,2)," K"
from __future__ import division
import math
# Python Code Ex17.3 Calculating critical current for a lead wire from
#critical temperature of lead Page-537 (2010)
#Variable declaration
# Critical temperature of superconducting transition for Pb, kelvin
T_c = 7.18;
#Critical magnetic field intensity to destroy superconductivity at zero K,A/m
H_c0 = 6.5e+4;
# Temperature at which critical magnetic field becomes H_cT, kelvin
T = 4.2;
d = 1e-03; # Diameter of lead wire, m
#Calculation
# Critical magnetic field intensity at temperature T kelvin, A/m
H_cT = H_c0*(1-(T/T_c)**2)
# Critical current through the lead wire, A
I_c = math.pi*d*H_cT;
#Result
print"\nThe critical current through the lead wire = ",round(I_c,2)," A"
from __future__ import division
import math
# Python Code Ex17.4 Dependence of London penetration depth
#on temperature Page-548 (2010)
#Variable declaration
N = 6.02e+023; # Avogadro's number
rho = 13.55e+03; # Density of mercury, kg per metre cube
M = 200.6e-03; # Molecular mass of mercury, kg
lambda_T = 750e-010; # Penetration depth of mercury at T kelvin, m
T_c = 4.12; # Critical temperature of superconducting transition for Hg, kelvin
T = 3.5;#Temperature at which penetration depth for Hg becomes lambda_T, kelvin
# Calculation
# Penetration depth of mercury at 0 kelvin, m
lambda_0 = lambda_T*(1-(T/T_c)**4)**(1/2);
n_0 = N*rho/M; # Normal electron density in mercury, per metre cube
n_s = n_0*(1-(T/T_c)**4); # Superelectron density in mercury, per metre cube
#Result
print"\nThe penetration depth at 0 K =",round((lambda_0*10**8),2)*10**-8," m"
print"\nThe superconducting electron density ="
print round((n_s*10**-28),2)*10**28,"per metre cube"