{
 "metadata": {
  "name": "",
  "signature": "sha256:7d21feb46ef90fdbbfbaad4563a2c375000b58700df6f4805ecd9fd8506686a5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8:Shear Stresses in Beams"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 8.6,page no.355"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "#Given\n",
      "#Variable declaration\n",
      "D=100           #Diameter in mm\n",
      "R=D/2           #Radius in mm\n",
      "F=5*10**3       #Shear force in N\n",
      "y=40            #given distance from N.A. in mm\n",
      "\n",
      "#Calculation\n",
      "#case(i):Average shear stress \n",
      "A=math.pi*R**2\n",
      "tau_avg=round(F/A,4)\n",
      "#case(ii):Maximum shear stress for a circular section\n",
      "tau_max=round(4/3*tau_avg,4)\n",
      "#case(iii):Shear stress at a distance 40mm from N.A.\n",
      "I=math.pi/64*D**4\n",
      "tau=float(str(F/(3*I)*(R**2-y**2))[:6])\n",
      "\n",
      "#Result\n",
      "print \"Average shear stress =\",tau_avg,\"N/mm^2\"\n",
      "print \"Maximum shear stress =\",tau_max,\"N/mm^2\"\n",
      "print \"Shear stress at a distance 40mm from N.A. =\",tau,\"N/mm^2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average shear stress = 0.6366 N/mm^2\n",
        "Maximum shear stress = 0.8488 N/mm^2\n",
        "Shear stress at a distance 40mm from N.A. = 0.3055 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 8.12,page no.369"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#Given\n",
      "#Variable declaration\n",
      "F=50*10**3              #Shear force in N\n",
      "b=250                   #Base width in mm\n",
      "h=200                   #height in mm\n",
      "\n",
      "#Calculation\n",
      "tau_max=int((3*F)/(b*h))     #Maximum shear stress in N/sq.mm\n",
      "tau=round((8*F)/(3*b*h),2)   #Shear stress at N.A. in N/sq.mm\n",
      "\n",
      "#Result\n",
      "print \"Maximum shear stress =\",tau_max,\"N/mm^2\"\n",
      "print \"Shear stress at N.A. =\",tau,\"N/mm^2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum shear stress = 3 N/mm^2\n",
        "Shear stress at N.A. = 2.67 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}