{
 "metadata": {
  "name": "",
  "signature": "sha256:f42166d612e07dd5c211bc7a51c893df5fb381dff9d6c4c0494c5987d5a5f81d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4: Structure of the Atom"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1, Page 129"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "m_e = 0.000549;    # Rest mass of an electron, u\n",
      "m_He = 4.002603;    # Rest mass of a helium, u\n",
      "\n",
      "#Calculations\n",
      "M_alpha = m_He - 2*m_e;    # Mass of alpha particle, u\n",
      "theta_max = 2*m_e/M_alpha;    # Maximum scttering angle for aplha particle, rad\n",
      "\n",
      "#Result\n",
      "print \"The maximum scattering angle for alpha particle = %5.3f degrees\"%(theta_max*180/math.pi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum scattering angle for alpha particle = 0.016 degrees\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2, Page 137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "rho = 19.3;    # Density of gold, g/cc\n",
      "N_A = 6.02e+023;    # Avogadro's number\n",
      "N_M = 1;    # Number of atoms per molecule\n",
      "M_g = 197;    # Gram atomic mass of gold, g/mol\n",
      "n = rho*N_A*N_M/(M_g*1e-006);    # Number density of gold atoms, atoms/metre-cube\n",
      "Z1 = 79;    # Atomic number of gold\n",
      "Z2 = 2;    # Atomic number of He nucleus\n",
      "t = 1e-006;    # Thickness of the gold foil, m\n",
      "e = 1.602e-019;    # Charge on an electron, C\n",
      "k = 9e+009;    # Coulomb constant, N-Sq.m/C^2\n",
      "theta = 90.;    # Angle of deflection of alpha particle, degrees\n",
      "K = 7.7;    # Kinetic energy of alpha particles, MeV\n",
      "\n",
      "#Calculations\n",
      "f = math.pi*n*t*(Z1*Z2*e**2*k/(2*1.6e-013*K))**2*(1./math.tan(theta*math.pi/180/2))**2; # The fraction of alpha particles deflected\n",
      "\n",
      "#Result\n",
      "print \"The fraction of alpha particles deflected = %1.0e\"%f"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fraction of alpha particles deflected = 4e-05\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3, Page 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "rho = 19.3;    # Density of gold, g/cc\n",
      "N_A = 6.02e+023;    # Avogadro's number\n",
      "N_M = 1;    # Number of atoms per molecule\n",
      "M_g = 197;    # Gram atomic mass of gold, g/mol\n",
      "Z1 = 79;    # Atomic number of gold\n",
      "Z2 = 2;    # Atomic number of He nucleus\n",
      "t = 2.1e-007;    # Thickness of the gold foil, m\n",
      "e = 1.602e-019;    # Charge on an electron, C\n",
      "k = 9e+009;    # Coulomb constant, N-Sq.m/C^2\n",
      "r = 1e-002;    # Distance of the alpha particles from the target, m\n",
      "theta = 45;    # Angle of deflection of alpha particle, degrees\n",
      "K = 7.7;    # Kinetic energy of alpha particles, MeV\n",
      "\n",
      "#Calculations\n",
      "n = rho*N_A*N_M/(M_g*1e-006);    # Number density of gold atoms, atoms/metre-cube\n",
      "f = n*t*(Z1*Z2*e**2*k)**2/((r*1.6e-013*K)**2*math.sin(theta*math.pi/180/2)**4*16); # The fraction of alpha particles deflected\n",
      "\n",
      "#Result\n",
      "print \"The fraction of alpha particles deflected at %d degrees = %3.1e per mm square\"%(theta, f/1e+006)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fraction of alpha particles deflected at 45 degrees = 3.2e-07 per mm square\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.5, Page 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Z1 = 2;    # Atomic number of He nucleus\n",
      "Z2 = 13;    # Atomic number of aluminium\n",
      "e = 1.602e-019;    # Charge on an electron, C\n",
      "k = 9e+009;    # Coulomb constant, N-Sq.m/C^2\n",
      "K = 7.7;    # Kinetic energy of alpha particles, MeV\n",
      "\n",
      "#Calculations\n",
      "r_min = Z1*Z2*e**2*k/(K*1.6e-013);    # Size of the aluminium nucleus, m\n",
      "\n",
      "#Result\n",
      "print \"The size of the aluminium nucleus = %3.1e m\"%r_min"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The size of the aluminium nucleus = 4.9e-15 m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6, Page 140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "c = 3.00e+008;    # Speed of light, m/s\n",
      "r = 0.5e-010;    # Radius of the atom, m\n",
      "e = 1.6e-019;    # Charge on an electron, C\n",
      "m_e = 9.11e-031;    # Mass of the electron, kg\n",
      "k = 9e+009;    # Coulomb constant, N-Sq.m/C^2\n",
      "\n",
      "#Calculations\n",
      "v = e*k**(1./2)/(m_e*r)**(1./2);    # Speed of the electron, m/s\n",
      "\n",
      "#Result\n",
      "if v < 0.01*c:\n",
      "    print \"The nonrelativistic treatment for calculating speed of the electron = %3.1e m/s is justified\"%v\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The nonrelativistic treatment for calculating speed of the electron = 2.2e+06 m/s is justified\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.7, Page 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy \n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "def check_region(lamda):\n",
      "    if lamda >= 400. and lamda < 700.:\n",
      "        return  \"visible\";\n",
      "    else:\n",
      "        return \"infrared\";\n",
      "    \n",
      "\n",
      "n_l = 3.;    # Lower electron orbit in Paschen series\n",
      "n_u = [4, numpy.inf];    # First and limiting upper orbits in Paschen series\n",
      "R_inf = 1.0974e+007;    # Rydberg constant, per metre\n",
      "\n",
      "#Calculations&Results\n",
      "lambda_max = 1./(R_inf*(1./n_l**2-1./n_u[0]**2)*1e-009);    # The longest wavelength in Paschen series, nm\n",
      "region = check_region(lambda_max);    # Check for the region\n",
      "print \"The maximum wavelength is %d nm and is in the %s region\"%(math.ceil(lambda_max), region)\n",
      "lambda_min = 1./(R_inf*(1./n_l**2-1./n_u[1]**2)*1e-009);    # The shortest wavelength in Paschen series, nm\n",
      "region = check_region(lambda_min);    # Check for the region\n",
      "print \"The minimum wavelength is %d nm and is also in the %s region\"%(lambda_min, region)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum wavelength is 1875 nm and is in the infrared region\n",
        "The minimum wavelength is 820 nm and is also in the infrared region\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.8, Page 149"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "m_e = 0.0005486;    # Mass of an electron u\n",
      "m_p = 1.007276;    # Mass of a proton, u\n",
      "m_d = 2.013553;    # Mass of a deutron, u\n",
      "m_t = 3.015500;    # Mass of a triton, u\n",
      "R_inf = 1.0974e+007;    # Rydberg constant, per metre\n",
      "\n",
      "#Calculations\n",
      "R_H = 1./(1+m_e/m_p)*R_inf;    # Rydberg constant for hydrogen\n",
      "R_D = 1./(1+m_e/m_d)*R_inf;    # Rydberg constant for deuterium\n",
      "R_T = 1./(1+m_e/m_t)*R_inf;    # Rydberg constant for tritium\n",
      "lambda_H = 1./(R_H*(1./2**2-1./3**2)*1e-009);    # Wavelength of H_alpha line for hydrogen, nm\n",
      "lambda_D = 1./(R_D*(1./2**2-1./3**2)*1e-009);    # Wavelength of H_alpha line for deuterium, nm\n",
      "lambda_T = 1./(R_T*(1./2**2-1./3**2)*1e-009);    # Wavelength of H_alpha line for tritium, nm\n",
      "\n",
      "#Results\n",
      "print \"The wavelength of H_alpha line for hydrogen = %6.2f nm\"%lambda_H\n",
      "print \"The wavelength of H_alpha line for deutruim = %6.2f nm\"%lambda_D\n",
      "print \"The wavelength of H_alpha line for tritium = %6.2f nm\"%lambda_T"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength of H_alpha line for hydrogen = 656.45 nm\n",
        "The wavelength of H_alpha line for deutruim = 656.27 nm\n",
        "The wavelength of H_alpha line for tritium = 656.22 nm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.9, Page 150"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy\n",
      "\n",
      "#Variable declaration\n",
      "R = 1.0974e+007;    # Rydberg constant, per metre\n",
      "Z = 3;    # Atomic number of Li\n",
      "n_l = 1;    # Lower orbit of Li++ ion\n",
      "n_u = numpy.inf;    # Limiting orbit of Li++ ion\n",
      "\n",
      "#Calculations\n",
      "lamda = 1./(Z**2*R*(1/n_l**2-1/n_u**2)*1e-009);    # The shortest wavelength emitted by Li++ ion, nm\n",
      "\n",
      "#Result\n",
      "print \"The shortest wavelength emitted by Li++ ion = %4.1f nm\"%lamda"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The shortest wavelength emitted by Li++ ion = 10.1 nm\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}