import math
##Example 22.1
##calculation of magnetic field
##given values
Tc=7.2;##transition temp in K
T=5.;##temp in K
Hc=3.3*10**4;##magnetic field at T in A/m
##calculation
Hc0=Hc/(1-(T**2/Tc**2));
print'%s %.2f %s'%('max value of H at 0K (in A/m) is ',Hc0,'');
import math
##Example 22.2
##calculation of transition temperature
##given values
T=8.;##temp in K
Hc=1*10**5.;##critical magnetic field at T in A/m
Hc0=2*10**5.;##magnetic field at 0 K in A/m
##calculation
Tc=T/(math.sqrt(1.-Hc/Hc0));
print'%s %.2f %s'%('transition temp in K is',Tc,'');
import math
##Example 22.3
##calculation of temp at which there is max critical field
##given values
Tc=7.26;##critical temp in K
Hc=8*10**5.;##max critical magnetic field at T in A/m
H=4*10**4.;## subjected magnetic field at in A/m
##calculation
T=Tc*(math.sqrt(1.-H/Hc));
print'%s %.2f %s'%('max temp for superconductivity in K is',T,'');