{
 "metadata": {
  "name": "",
  "signature": "sha256:99719b77e4d25d0b510a7e6a71bd4ef254e2672471167e904ef1ad3797b62091"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Expansion \n"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1  Page No : 24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "l = 1.  # The thickness of the crystal in cm\n",
      "w = 5890. - 8  # The wavelength of light used in cm\n",
      "t2 = 50.  # The final temperature of the crystal in degree centigrade\n",
      "t1 = 20.  # The initial temperature of the crystal in degree centigrade\n",
      "p = 14.  # The number of fringes that crossed the field of view\n",
      "\n",
      "# Calculations\n",
      "t = t2 - t1  # The temperature difference in degree centigrade\n",
      "# The coefficient of linear expansion of the crystal in per degree centigrade\n",
      "a = (p * w) / (2 * l * t)\n",
      "\n",
      "# output\n",
      "print 'The coefficient of linear expansion of the crystal is %3.4g degree centigrade' % (a)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The coefficient of linear expansion of the crystal is 1372 degree centigrade\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2  Page No : 31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "L = 500.  # The length of a steel rod in cm\n",
      "t = 40.  # The increase in temperature in degree centigrade\n",
      "y = 2. * 10**12  # The youngs modulus of elasticity of steel in dynes/cm**2\n",
      "e = 12. * 10**-6  # The coefficient of linear expansion of steel in per degree centigrade\n",
      "\n",
      "# Calculations\n",
      "S = y * e * t  # The stress in the rod in dynes/cm**2\n",
      "\n",
      "# Output\n",
      "print 'The stress in the rod is %3g dynes/cm^2' % (S)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The stress in the rod is 9.6e+08 dynes/cm^2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3  Page No : 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Input data\n",
      "L = 800.  # The length of the wire in cm\n",
      "r = 0.2  # The radius of the wire in cm\n",
      "t = 10.  # The temperature fall in degree centigrade\n",
      "a = 12. * 10**-6  # The coefficient of linear expansion of steel wire in per degree centigrade\n",
      "y = 2. * 10**12  # The youngs modulus of elasticity of steel in dynes/cm**2\n",
      "pi = (22. / 7)  # Mathematical constant pi\n",
      "\n",
      "# Calculations\n",
      "I = y * a * t * pi * r**2  # The increase in tension in dynes\n",
      "\n",
      "# Output\n",
      "print 'The increase in tension is %3g dynes' % (I)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The increase in tension is 3.01714e+07 dynes\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4  Page No : 39"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "A = 2. * 10**-6  # The cross section area of a uniform rod in m**2\n",
      "t = 20.  # The change in temperature in degree centigrade\n",
      "y = 10.**11  # The youngs modulus of the rod in newtons/m**2\n",
      "a = 12. * 10**-6  # The coefficient of linear expansion of rod in per degree centigrade\n",
      "\n",
      "# Calculations\n",
      "F = y * a * t * A  # The force required to prevent it from expanding in newtons\n",
      "E = (1. / 2) * y * a * t * a * t  # The energy stored per unit volume in j/m**3\n",
      "\n",
      "# Output\n",
      "print 'The force required to prevent the rod from expanding is %3.0f newtons  \\\n",
      "\\nThe Energy stored per unit volume is %3.0f j/m^3' % (F, E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The force required to prevent the rod from expanding is  48 newtons  \n",
        "The Energy stored per unit volume is 2880 j/m^3\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5  Page No : 41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Input data\n",
      "d = 10.**-3  # The diameter of a steel wire in m\n",
      "t = 20.  # The difference in the temperature in degree centigrade\n",
      "y = 2. * 10**11  # The youngs modulus of a steel wire in newtons/m**2\n",
      "a = 12. * 10**-6  # The coefficient of linear expansion of steel wire in per degree centigrade\n",
      "pi = (22. / 7)  # Mathematical constant value\n",
      "\n",
      "# calculations\n",
      "A = (pi * d**2) / 4  # The cross sectional area of the steel wire in m**2\n",
      "# Force required to maintain the original length in kg wt\n",
      "F = (y * a * t * A) / (9.8)\n",
      "\n",
      "# output\n",
      "print 'Force required to maintain the original length is %3.3f kg wt ' % (F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Force required to maintain the original length is 3.848 kg wt \n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}