{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#9: Superconductivity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.1, Page number 9.22"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transition temperature is 11.3 K\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T=8;    #temperature(K)\n",
    "Hc=1*10**5;   #critical field(amp/m)\n",
    "H0=2*10**5;   #critical field(amp/m)\n",
    "\n",
    "#Calculation\n",
    "Tc=T/math.sqrt(1-(Hc/H0));     #transition temperature(K)\n",
    "\n",
    "#Result\n",
    "print \"transition temperature is\",round(Tc,1),\"K\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.2, Page number 9.22"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frequency is 4.1 *10**9 Hz\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "h=6.626*10**-34;    #plancks constant\n",
    "e=1.6*10**-19;  \n",
    "V=8.5*10**-6;    #voltage(V)\n",
    "\n",
    "#Calculation\n",
    "new=2*e*V/h;     #frequency(Hz)\n",
    "\n",
    "#Result\n",
    "print \"frequency is\",round(new/10**9,1),\"*10**9 Hz\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.3, Page number 9.22"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical field is 0.02166 Tesla\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T=2;    #temperature(K)\n",
    "H0=0.0306;   #critical field(amp/m)\n",
    "Tc=3.7;     #transition temperature(K)\n",
    "\n",
    "#Calculation\n",
    "Hc=H0*(1-(T/Tc)**2);   #critical field(Tesla)\n",
    "\n",
    "#Result\n",
    "print \"critical field is\",round(Hc,5),\"Tesla\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.4, Page number 9.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "temperature is 7.2 K\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "H0=250*10**3;   #critical field(amp/m)\n",
    "Tc=12;     #transition temperature(K)\n",
    "Hc=200*10**3;   #critical field(Tesla)\n",
    "\n",
    "#Calculation\n",
    "T=Tc*math.sqrt(1-(Hc/H0)**2);    #temperature(K)\n",
    "\n",
    "#Result\n",
    "print \"temperature is\",round(T,1),\"K\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.5, Page number 9.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical field is 0.0163 Tesla\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T=2.5;    #temperature(K)\n",
    "H0=0.03;   #critical field(amp/m)\n",
    "Tc=3.7;     #transition temperature(K)\n",
    "\n",
    "#Calculation\n",
    "Hc=H0*(1-(T/Tc)**2);   #critical field(Tesla)\n",
    "\n",
    "#Result\n",
    "print \"critical field is\",round(Hc,4),\"Tesla\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.6, Page number 9.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frequency is 313.96 *10**9 Hz\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "h=6.625*10**-34;    #plancks constant\n",
    "e=1.6*10**-19;  \n",
    "V=650*10**-6;    #voltage(V)\n",
    "\n",
    "#Calculation\n",
    "new=2*e*V/h;     #frequency(Hz)\n",
    "\n",
    "#Result\n",
    "print \"frequency is\",round(new/10**9,2),\"*10**9 Hz\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 9.7, Page number 9.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "critical field is 3.365 *10**3 A/m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T=5;    #temperature(K)\n",
    "H0=6.5*10**3;   #critical field(amp/m)\n",
    "Tc=7.2;     #transition temperature(K)\n",
    "\n",
    "#Calculation\n",
    "Hc=H0*(1-(T/Tc)**2);   #critical field(Tesla)\n",
    "\n",
    "#Result\n",
    "print \"critical field is\",round(Hc/10**3,3),\"*10**3 A/m\""
   ]
  }
 ],
 "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}