#example 1
#to calculate value of Temperature
import math
Bc=105.0*10**3 #magnetic field in amp/m
Bo=150.0*10**3 #critical field of the metal in amp/m
Tc=9.2 #critical temperature of the metal in K
T=Tc*math.sqrt(1-(Bc/Bo))#temperature
print"\n the value of temperature is",round(T,3),"K"
#example 2
#to calculate temperature
import math
Tc=7.18 #critical temperature in K
Bc=4.5*10**3 #critical field in A/m
Bo=6.5*10**3 #critical magnetic field in A/m
T=Tc*math.sqrt(1-(Bc/Bo))# temperature
print"\n the temperature is",round(T,3),"K"
#to calculate critical current density at that temperature
r=1*10**-3 #diameter of the wire in mm
TJc=(Bc*2*math.pi*r)/(math.pi*r**2)# critical current density
print"\n the critical current density at that temperature is","{:.3e}".format(TJc),"A/m^2"