{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 19: Superconductivity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.1, Page 19.13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Given \n",
      "T_c = 7.2 # critical temperature in K\n",
      "T = 5.1 # temperature in K\n",
      "lambda_ = 380 # penetration depth at 0 K in A\n",
      "\n",
      "#Calculations\n",
      "lamda = lambda_ * (1 - (T / T_c)**4)**(-1./2)\n",
      "\n",
      "#Result\n",
      "print \"Penetration depth is %.2f A\"%lamda"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Penetration depth is 439.30 A\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.2, Page 19.13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "Hc1 = 1.41e5 # first critical field at 14.1K\n",
      "Hc2 = 4.205e5 # second critical field at 12.9K \n",
      "T1 = 14.11 # temperature in K\n",
      "T2 = 12.9 # temperature in K \n",
      "T = 4.2 # temperature in K\n",
      "lambda_ = 380 # penetration depth at 0 K in A\n",
      "\n",
      "#Calculations\n",
      "Tc = sqrt((Hc2*T1**2 - Hc1*T2**2) / (Hc2 - Hc1))\n",
      "H_ = Hc1 / (1 - (T1 / Tc)**2)\n",
      "Hc = H_ * (1 - (T/Tc)**2)\n",
      "\n",
      "#Result\n",
      "print \"Transition temperature is %.2f K\\nCritical field at temperate at 4.2 k is %.2e A/m\"%(Tc,Hc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transition temperature is 14.68 K\n",
        "Critical field at temperate at 4.2 k is 1.69e+06 A/m\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.3, Page 19.14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import *\n",
      "\n",
      "# Given \n",
      "d = 1e-3 # diameter of wire in m\n",
      "T1 = 4.2 # temperature in K\n",
      "T2 = 7.18 # temperature in K\n",
      "H_ = 6.51e4 # critical magnetic field at 0 K\n",
      "\n",
      "#Calculations\n",
      "r = d / 2\n",
      "Hc = H_ * (1 - (T1 / T2)**2)\n",
      "Jc = (2 * pi * r * Hc) / (pi * r**2)\n",
      "\n",
      "#Result\n",
      "print \"Critical current density is %.3e A/m^2\"%Jc"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical current density is 1.713e+08 A/m^2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.4, Page 19.15"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "w = 199.5 # isotopic mass of Hg\n",
      "Tc = 4.186 # critical temperature in K \n",
      "w_ = 203.4 # increased isotope mass of Hg\n",
      "\n",
      "#Calculations\n",
      "Tc_ = Tc * (w / w_)**(1./2)\n",
      "\n",
      "#Result\n",
      "print \"Critical temperature is %.4f K\"%Tc_"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical temperature is 4.1457 K\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.5, Page 19.15"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "T_c = 4.2 # critical temperature in K\n",
      "T = 2.9 # temperature in K\n",
      "lamda = 57 # penetration depth at 2.9 K in nm\n",
      "\n",
      "#Calculations\n",
      "lambda_ = lamda * (1 - (T / T_c)**4)**(1./2)\n",
      "\n",
      "#Result\n",
      "print \"Penetration depth at 0 K is %.2f nm\"%lambda_"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Penetration depth at 0 K is 50.10 nm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.6, Page 19.15"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given\n",
      "T1 = 2.18 # temperature in first case in K\n",
      "lambda1 = 16 # penetration depth at 2.18 K in nm\n",
      "T2 = 8.1 # temperature in second case in K\n",
      "lambda2 = 96 # penetration depth at 8.1 K in nm\n",
      "\n",
      "#Calculations\n",
      "Tc = (((lambda2**2 * T2**4) - (T1**4 * lambda1**2)) / (lambda2**2 - lambda1**2))**(1./4)\n",
      "\n",
      "#Result\n",
      "print \"Critical temperature is %.2f K\"%Tc"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical temperature is 8.16 K\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.7, Page 19.16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "w = 26.91 # isotopic mass of superconducting sample\n",
      "Tc = 1.19 # first critical temperature in K \n",
      "w_ = 32.13 # increased isotope mass of superconducting sample\n",
      "\n",
      "#Calculations\n",
      "Tc_ = Tc * (w / w_)**(1./2)\n",
      "\n",
      "#Result\n",
      "print \"Critical temperature is %.3f K\"%Tc_"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical temperature is 1.089 K\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 19.8, Page 19.16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "k = 1.38e-23 # Boltzmann's constant in J/K\n",
      "h = 6.62e-34 # Planck constant in J sec\n",
      "Tc = 4.2 # critical temperature of Hg in K\n",
      "c = 3e8 # speed of light in m/sec \n",
      "\n",
      "#Calculations\n",
      "E = 3 * k * Tc\n",
      "lamda = h * c / E\n",
      "\n",
      "#Result\n",
      "print \"Energy gap is %.2e eV\\nWavelength of photon is %.2e m\"%(E/1.6e-19,lamda)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Energy gap is 1.09e-03 eV\n",
        "Wavelength of photon is 1.14e-03 m\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}