{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 15: Superconductivity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 1, Page number 442"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical field at 3K is 0.006281 Tesla\n",
      "answer given in the book is wrong\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "H0=0.0106;          #critical field at 0K(Tesla)\n",
    "T=3;                #temperature(K)\n",
    "Tc=4.7;             #temperature(K)\n",
    "\n",
    "#Calculation\n",
    "Hc=H0*(1-(T/Tc)**2);     #critical field at 3K(Tesla)\n",
    "\n",
    "#Result\n",
    "print \"critical field at 3K is\",round(Hc,6),\"Tesla\"\n",
    "print \"answer given in the book is wrong\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 2, Page number 442"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "temperature of superconductor is 1.701 K\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "H0=5*10**5/(4*math.pi);          #critical field at 0K(Tesla)\n",
    "Tc=2.69;                         #temperature(K)\n",
    "Hc=3*10**5/(4*math.pi);          #critical field(Tesla)\n",
    "\n",
    "#Calculation\n",
    "T=Tc*math.sqrt(1-(Hc/H0));       #temperature(K)\n",
    "\n",
    "#Result\n",
    "print \"temperature of superconductor is\",round(T,3),\"K\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 3, Page number 443"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical field is 4.3365 *10**4 A/m\n",
      "critical current of the wire is 408 A\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "H0=6.5*10**4;          #critical field at 0K(Tesla)\n",
    "Tc=7.28;               #temperature(K)\n",
    "T=4.2;                 #temperature(K)\n",
    "r=1.5*10**-3;          #radius(m)\n",
    "\n",
    "#Calculation\n",
    "Hc=H0*(1-(T/Tc)**2);          #critical field(Tesla)\n",
    "Ic=2*math.pi*r*Hc;            #critical current of the wire(A)\n",
    "\n",
    "#Result\n",
    "print \"critical field is\",round(Hc/10**4,4),\"*10**4 A/m\"\n",
    "print \"critical current of the wire is\",int(Ic),\"A\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 4, Page number 443"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical temperature is 4.124 K\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "m1=199.5;             #isotopic mass\n",
    "m2=205.4;             #change in mass \n",
    "Tc1=4.185;            #temperature of mercury(K)\n",
    "\n",
    "#Calculation\n",
    "Tc2=Tc1*math.sqrt(m1/m2);     #critical temperature(K)\n",
    "\n",
    "#Result\n",
    "print \"critical temperature is\",round(Tc2,3),\"K\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example number 5, Page number 444"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "superconducting transition temperature is 8.106 K\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T1=3;            #temperature(K)\n",
    "T2=8;            #temperature(K)\n",
    "lamda1=39.6;     #penetration depth(nm)\n",
    "lamda2=173;      #penetration depth(nm)\n",
    "\n",
    "#Calculation\n",
    "x=(lamda1/lamda2)**2;\n",
    "Tc4=(T2**4-(x*T1**4))/(1-x);\n",
    "Tc=Tc4**(1/4);   #superconducting transition temperature(K)\n",
    "\n",
    "#Result\n",
    "print \"superconducting transition temperature is\",round(Tc,3),\"K\""
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
