{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6: Mechanical Properties of Metal"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.1 Page No 140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "E=110*10**3  #Young's modulus of Copper in MPa\n",
      "sigma=276.0    #Applied stress in MPa\n",
      "lo=305.0       #Original length in mm\n",
      "\n",
      "dl=sigma*lo/E\n",
      "\n",
      "print\"Elongation obtained is  \",round(dl,2),\"mm\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Elongation obtained is   0.77 mm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.2 Page No 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "del_d=-2.5*10**-3  #Deformation in dia  in mm\n",
      "d0=10.0             #Initial dia  in mm\n",
      "v=0.34           #Poisson ratio for brass\n",
      "\n",
      "ex=del_d/d0\n",
      "ez=-ex/v\n",
      "E=97*10**3        #Modulus of elasticity in MPa\n",
      "sigma=ez*E\n",
      "F=sigma*math.pi*(d0**2)/4.0\n",
      "\n",
      "print\"Applied force is \",round(F,0),\"N\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Applied force is  5602.0 N\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.3 Page No 146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "si2=150           # in MPa\n",
      "si1=0\n",
      "e2=0.0016\n",
      "e1=0\n",
      "d0=12.8*10**-3    #Initial Diameter in m\n",
      "\n",
      "E=(si2-si1)/(e2-e1)\n",
      "\n",
      "A0=math.pi*d0**2/4.0\n",
      "sig=450*10**6     #tensile strength in MPa\n",
      "F=sig*A0\n",
      "l0=250     #Initial lengt in mm\n",
      "e=0.06     #strain\n",
      "dl=e*l0\n",
      "\n",
      "print\"Modulus of elasticity is \",round(E/10**3,1),\"GPa\"\n",
      "print\"From the graph the Yield strength is\",l0,\"MPa\"\n",
      "print\"Maximum load sustained is \",round(F,0),\"N/n\"\n",
      "print\"Change in length is \",dl,\"mm\"\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Modulus of elasticity is  93.8 GPa\n",
        "From the graph the Yield strength is 250 MPa\n",
        "Maximum load sustained is  57906.0 N/n\n",
        "Change in length is  15.0 mm\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.4 Page No 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "di=12.8     #Initial dia in mm\n",
      "df=10.7     #Final dia  in mm\n",
      "\n",
      "import math\n",
      "RA = ((di**2-df**2)/di**2)*100\n",
      "Ao=math.pi*di**2*10**-6/4.0\n",
      "sig=460*10**6    #Tensile strength\n",
      "\n",
      "F=sig*Ao\n",
      "\n",
      "Af=math.pi*df**2/4.0\n",
      "sig_t=F/Af\n",
      "\n",
      "print\"percent reduction in area is \",round(RA,0),\"%\"\n",
      "print\"True stress is \",round(sig_t,1),\"MPa\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "percent reduction in area is  30.0 %\n",
        "True stress is  658.3 MPa\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.5 Page No 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "sig_t=415       #True stress in MPa\n",
      "et=0.1          #True strain\n",
      "K=1035.0         # In MPa\n",
      "\n",
      "n=(math.log(sig_t)-math.log(K))/math.log(et)\n",
      "\n",
      "print\"Strain - hardening coefficient is \",round(n,2)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Strain - hardening coefficient is  0.4\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.6 Page No 162"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "n=4.0        #No of points\n",
      "T1=520\n",
      "T2=512\n",
      "T3=515\n",
      "T4=522\n",
      "\n",
      "Tav=(T1+T2+T3+T4)/n\n",
      "s=(((T1-Tav)**2+(T2-Tav)**2+(T3-Tav)**2+(T4-Tav)**2)/(n-1))**(0.5)\n",
      "\n",
      "print\"The average Tensile strength is\",round(Tav,0),\"MPa\"\n",
      "print\"The standard deviation  is\",round(s,1),\"MPa\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The average Tensile strength is 517.0 MPa\n",
        "The standard deviation  is 4.6 MPa\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Design Example 6.1 ,Page No 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "sig_y=310.0      #Minimum yield strength in MPa\n",
      "N=5.0            # Conservative factor of safety\n",
      "\n",
      "F=220000/2.0    #Two rods must support half of the total force\n",
      "sig_w=sig_y/N\n",
      "d=2*math.sqrt(F/(math.pi*sig_w))\n",
      "\n",
      "print\"Diameter of each of the two rods is \",round(d,1),\"mm\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diameter of each of the two rods is  47.5 mm\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}