{
 "metadata": {
  "name": "chapter 11 som.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter no 11:Combined Direct And Bending Stresses"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.1,Page no.273"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "P=10 #KN #Load\n",
      "e=0.06 #m #eccentricity\n",
      "b=0.240 #m #width of column\n",
      "d=0.150 #m #depth of column\n",
      "\n",
      "#Calculations\n",
      "\n",
      "sigma_d=P*(b*d)**-1 #KN/m**2\n",
      "M=P*e #KN*m #Moment due to eccentricity\n",
      "Z=(d*(b)**2)*6**-1 #mm**3\n",
      "\n",
      "sigma_b=M*Z**-1 #KN/m**2\n",
      "\n",
      "sigma_CD=sigma_d+sigma_b\n",
      "sigma_AB=sigma_d-sigma_b\n",
      "\n",
      "#Result\n",
      "print\"Stress at face CD is\",round(sigma_CD,2),\"KN/m**2\"\n",
      "print\"Stress at face AB is\",round(sigma_AB,2),\"KN/m**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Stress at face CD is 694.44 KN/m**2\n",
        "Stress at face AB is -138.89 KN/m**2\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.2,Page no.274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "d=2 #cm #Diameter of specimen\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Let P be the Load on the section\n",
      "\n",
      "A=pi*4**-1*d**2 #cm**2 #Area of section\n",
      "I=pi*64**-1*d**4 #cm**4 #M.I of the section\n",
      "y=d*2**-1 #cm\n",
      "Z=I*y**-1 #cm**3 #Section modulus\n",
      "#M=P.e #Moment\n",
      "\n",
      "#Stress due to direct load\n",
      "#sigma_d=(4*P)*(pi*d**2)**-1 #N/cm**2\n",
      "\n",
      "#stress due to moment\n",
      "#sigma_b=(32*P*e)*(pi*d**3)**-1 N/cm**2\n",
      "\n",
      "#Maximum stress\n",
      "#sigma_r_max=(((4*P)*(pi*d**2)**-1)+((32*P*e)*(pi*d**3)**-1))\n",
      "\n",
      "#Mean stress \n",
      "#sigma_r_mean=((4*P)*(pi*d**2)**-1) \n",
      "\n",
      "#Since the maximum stress is 20% greater than the mean stress \n",
      "#(((4*P)*(pi*d**2))+((32*P*e)*(pi*d**3)))=1.2*4*P*(pi*d**2)**-1\n",
      "\n",
      "#After substituing values and simplifyinf we get\n",
      "\n",
      "e=0.2*d*8**-1 #cm #distance of line of thrust from the axis\n",
      "\n",
      "#Result\n",
      "print\"The distance of line of thrust from the axis is\",round(e,2),\"cm\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The distance of line of thrust from the axis is 0.05 cm\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.3,Page no.274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "A=300 #cm**2 #Area of column\n",
      "e=5 #cm #eccentricity\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#sigma_d=P*A**-1  #Direct compressive stress\n",
      "#M=P*e #Bending Moment\n",
      "Z=((20**4-10**4)*(6*20)**-1) #cm**3 #Section modulus\n",
      "\n",
      "#sigma_b=M*Z**-1=P*250**-1 \n",
      "\n",
      "#Now sigma_d+sigma_b=60*10**2\n",
      "\n",
      "#P*300**-1+P*250**-1=6000\n",
      "\n",
      "#After simplifying we get\n",
      "P_1=6000*300*250*550**-1 #N #Load\n",
      "\n",
      "#sigma_b-sigma_d=300 \n",
      "\n",
      "P_2=300*300*250*50**-1 #N #Load \n",
      "\n",
      "#Result\n",
      "print\"The maximum load column can carry\",round(P_2,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum load column can carry 450000.0 N\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.4,Page no.275"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "D=40 #cm #External diameter of column\n",
      "d=30 #cm #Internal diameter of column\n",
      "e=20 #cm #Eccentricity\n",
      "P=150 #KN #Load\n",
      "\n",
      "#calculations\n",
      "\n",
      "A=pi*4**-1*(D**2-d**2) #cm**2 #Area of the column\n",
      "Z=pi*32**-1*((D**4-d**4)*D**-1) #cm**3 #Section modulus\n",
      "M=P*10**3*e #N*cm #Moment\n",
      "\n",
      "sigma_r_max=((P*10**3*A**-1)+(M*Z**-1)) #N/cm**2 #Max stress \n",
      "sigma_r_min=((P*10**3*A**-1)-(M*Z**-1)) #N/cm**2 #Min stress \n",
      "\n",
      "#Result\n",
      "print\"Max intensities of stress in the section is\",round(sigma_r_max,2),\"N/cm**2\"\n",
      "print\"Min intensities of stress in the section is\",round(sigma_r_min,2),\"N/cm**2(tension)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Max intensities of stress in the section is 971.3 N/cm**2\n",
        "Min intensities of stress in the section is -425.63 N/cm**2(tension)\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.5,Page no.277"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "b=4 #m #width of pier\n",
      "d=3 #m #depth of pier\n",
      "e_x=1 #m #distance from y axis\n",
      "e_y=0.5 #m #distance from x axis\n",
      "P=80 #KN #Load\n",
      "\n",
      "#Calculations\n",
      "\n",
      "A=b*d #m**2 #Area of pier\n",
      "I_x_x=b*d**3*12**-1 #m**4 #M.I about x-x axis\n",
      "I_y_y=d*b**3*12**-1 #m**4 #M.I about y-y axis\n",
      "M_x=P*e_y #KN*m #Moment about x-x axis\n",
      "M_y=P*e_x #KN*m #Moment about y-y axis\n",
      "\n",
      "x=2 #m #Distance between y-y axis and corners A and B\n",
      "y=1.5 #m ##Distance between x-x axis and corners A and D\n",
      "\n",
      "#Part-1\n",
      "#Stress developed at each corner\n",
      "\n",
      "\n",
      "sigma_A=P*A**-1+M_x*y*I_x_x**-1-M_y*x*I_y_y**-1 #KN/m**2 #stress at A\n",
      "sigma_B=P*A**-1+M_x*y*I_x_x**-1+M_y*x*I_y_y**-1 #KN/m**2 #stress at B\n",
      "sigma_C=P*A**-1-M_x*y*I_x_x**-1+M_y*x*I_y_y**-1 #KN/m**2 #stress at C\n",
      "sigma_D=P*A**-1-M_x*y*I_x_x**-1-M_y*x*I_y_y**-1 #KN/m**2 #stress at D\n",
      "\n",
      "#Part-2\n",
      "#Let f be the additional load that should be placed at centre\n",
      "\n",
      "#sigma_c=F*A**-1 #KN/m**2 #compressive stress\n",
      "\n",
      "#For no tension in pier section, compressive stress is equal to tensile stress\n",
      "sigma_c=10 #KN/m**2\n",
      "F=sigma_c*A #KN\n",
      "\n",
      "#Part-3\n",
      "\n",
      "sigma=F*A**-1 #KN/m**2 #stress due to additional load of 120 KN\n",
      "\n",
      "sigma_A_1=sigma_A+10 #stress at A\n",
      "sigma_B_1=sigma_B+10 #stress at B\n",
      "sigma_C_1=sigma_C+10 #stress at C\n",
      "sigma_D_1=sigma_D+10 #stress at D\n",
      "\n",
      "#Result\n",
      "print\"Stress at each corner are as follows:stress_A\",round(sigma_A,2),\"KN/m**2\"\n",
      "print\"                                    :stress_B\",round(sigma_B,2),\"KN/m**2\"\n",
      "print\"                                    :stress_C\",round(sigma_C,2),\"KN/m**2\"\n",
      "print\"                                    :stress_D\",round(sigma_D,2),\"KN/m**2(tensile)\"\n",
      "\n",
      "print\"Additional load that should be placed at centre is\",round(F,2),\"KN\"\n",
      "\n",
      "print\"Stresses at the corners with the  additional load in centre are as follows:Stress_A_1\",round(sigma_A_1,2),\"KN/m**2\"\n",
      "print\"                                                                          :Stress_B_1\",round(sigma_B_1,2),\"KN/m**2\"\n",
      "print\"                                                                          :Stress_C_1\",round(sigma_C_1,2),\"KN/m**2\"\n",
      "print\"                                                                          :Stress_D_1\",round(sigma_D_1,2),\"KN/m**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Stress at each corner are as follows:stress_A 3.33 KN/m**2\n",
        "                                    :stress_B 23.33 KN/m**2\n",
        "                                    :stress_C 10.0 KN/m**2\n",
        "                                    :stress_D -10.0 KN/m**2(tensile)\n",
        "Additional load that should be placed at centre is 120.0 KN\n",
        "Stresses at the corners with the  additional load in centre are as follows:Stress_A_1 13.33 KN/m**2\n",
        "                                                                          :Stress_B_1 33.33 KN/m**2\n",
        "                                                                          :Stress_C_1 20.0 KN/m**2\n",
        "                                                                          :Stress_D_1 0.0 KN/m**2\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 11.6,Page no.278"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "#d=Diameter of rod\n",
      "P=500 #KN\n",
      "e=0.75 #cm #eccentricity\n",
      "\n",
      "#calculation\n",
      "\n",
      "#A=pi*d**2*4**-1 #cm**2 #Area of rod\n",
      "#sigma_d=P*A**-1 #KN/cm**2 #stress due to direct load\n",
      "\n",
      "#After substituting value and simplifying we get,\n",
      "#sigma_d=2000*(pi*d**2)**-1 #KN/cm**2 \n",
      "\n",
      "M=P*e #Kn*cm #Moment\n",
      "\n",
      "#Z=pi*d**3*32**-1 #cm**3 #section modulus\n",
      "#sigma_b=M*Z**-1 #KN/cm**2 #Stress due to moment\n",
      "\n",
      "#After substituting value and simplifying we get,\n",
      "#sigma_b=12000*(pi*d**3)**-1 #KN/cm**2\n",
      "\n",
      "#Max stress \n",
      "#sigma=sigma_d+sigma_b \n",
      "\n",
      "#After substituting value and simplifying we get,\n",
      "#2000*(pi*d**2)**-1+12000*(pi*d**3)**-1=12.5\n",
      "\n",
      "#After simplifying we get,\n",
      "#d**3-53.05*d-318.3=0\n",
      "\n",
      "#From Synthetic Division we get d**2+4.73*d-42.918\n",
      "a=1\n",
      "b=-4.73\n",
      "c=-42.918\n",
      "\n",
      "X=b**2-(4*a*c)\n",
      "\n",
      "d_1=(-b+X**0.5)*(2*a)**-1\n",
      "d_2=(-b-X**0.5)*(2*a)**-1\n",
      "\n",
      "#Result\n",
      "print\"The minimum diameter of tie rod is\",round(d_1,2),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum diameter of tie rod is 9.33 cm\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}