{
 "metadata": {
  "name": "chapter 5 som.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5:Bending Stresses in Beams"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.1,Page no.121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "b=100 #mm #width of timber joist\n",
      "d=200 #mm #depth of joist\n",
      "L=3 #m #Length of beam\n",
      "sigma=7 #KN/mm**2 #bending stress\n",
      "w_1=5 #KN/mm**2 #unit weight of timber\n",
      "\n",
      "#Calculations\n",
      "w=0.1*0.2*1*5*100 #N/m #self weight of the joist\n",
      "I_xx=1*12**-1*100*200**3 #mm**4 #M.I of section about N.A\n",
      "\n",
      "#M=W*L+w*L**2*2**-1 #Max Bending moment\n",
      "#Therefore,M=(3*W+450)\n",
      "\n",
      "#using the relation M*I**-1=sigma*y**-1,we get\n",
      "W=(((7*2*10**8)*(100*10**3*3)**-1)-450)*3**-1 #N #Max Load applied\n",
      "\n",
      "#Result\n",
      "print\"The Max value of Load applied is\",round(W,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Max value of Load applied is 1405.56\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.2,Page no.122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "D=160 #mm #Overall Depth\n",
      "B=150 #mm #Width of Flange\n",
      "f_t=40 #mm #Flange thickness\n",
      "W_t=50 #mm #Web thickness\n",
      "sigma_t=20 #N/mm**2 #tension stress\n",
      "sigma_c=75 #N/mm**2 #compression stress\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Rectangle-1\n",
      "a_1=150*40 #mm**2 #Area of Rectangle-1\n",
      "y_1=40*2**-1 #mm #C.G of Rectangle-1\n",
      "\n",
      "#Rectangle-2\n",
      "a_2=120*50 #mm**2 #Area of Rectangle-2\n",
      "y_2=40+120*2**-1 #mm #C.G of Rectangle-2\n",
      "\n",
      "Y_bar=(a_1*y_1+a_2*y_2)*(a_1+a_2)**-1 #mm #Distance of C.G from the bottom flange\n",
      "I=1*12**-1*150*40**3+150*40*(60-40)**2+1*12**-1*50*120**3+50*120*(100-60)**2 #mm**4 #M.I of section about N.A\n",
      "y_t=60 #mm #Permissible tensile stress at the bottom face of flange from N.A\n",
      "y_c=100 #mm #Permissible tensile stress at the top face of flange from N.A\n",
      "\n",
      "#M=W*L*4**-1 #Max bending mooment at the centre\n",
      "\n",
      "#Using the relation M*I**-1=sigma_t*y_t**-1 we get\n",
      "W=(0.333*4*272*10**5)*(2.5*1000)**-1 #N #MAx central load\n",
      "\n",
      "#Result\n",
      "print\"The Max Bending Moment at the centre is\",round(W,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Max Bending Moment at the centre is 14492.16 N\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.3,Page no.123"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "b=10 #cm #width of beam\n",
      "d=20 #cm depth of beam\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#R_a and R_b are the reactions at A and B respectively.\n",
      "#Moment of all forces about A\n",
      "\n",
      "R_b=(4*4*4*2**-1-2*1.5)*(2)**-1 #KN \n",
      "#R_a+R_b=18 \n",
      "R_a=18-R_b\n",
      "\n",
      "#Consider a section at a distance x from A\n",
      "#M_x=9.25*x-2(x-1.5)-4*x*x*2**-1=7.25*x+3-2*x**2 \n",
      "\n",
      "#Taking derivative of above equation to find max value of M_x we get\n",
      "x=1.81 #m\n",
      "\n",
      "M=7.25*x+3-2*x**2 #kN*m \n",
      "I=b*d**3*12**-1 #cm**4 #M.I of the section\n",
      "y=10 \n",
      "sigma=M*I**-1*y*10**8*(10**2)**-1 #Max bending stress\n",
      "\n",
      "#Result\n",
      "print\"The Max Bending stress is\",round(sigma,2),\"KN/m**2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Max Bending stress is 14355.45 KN/m**2\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.4,Page no.124"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "sigma=8 #N/mm**2 #Max bending stress\n",
      "W=5000 #N/m**2 #Load of floor\n",
      "A=450 #cm**2 #Area of joist\n",
      "L=5 #m #span of floor\n",
      "\n",
      "#Calculations\n",
      "#Let x be the centre to centre spacingof the joists\n",
      "\n",
      "#A_1=5*x**2 #m**2 #Area  of floor between any two joists\n",
      "#W_1=5*x*W #N #total load supported by one interior joist\n",
      "#M=W_1*L*8**-1 #Max bending moment \n",
      "I=1*12**-1*b*(d*10**-2)**3*10**-2 #m**4 #M.I of joist\n",
      "y=0.15 #cm #Distance of of farthest fibre\n",
      "M=I*y**-1*sigma #N*m\n",
      "\n",
      "#Now equating to max bending moment we get\n",
      "x=(18000*8)*(25000*5)**-1\n",
      "\n",
      "#Result\n",
      "print\"The Max Bending Moment is\",round(x,2),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Max Bending Moment is 1.15 m\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.7,Page no.126"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "d=12 #m #depth of mast\n",
      "D_1=20 #cm #diameter at the base \n",
      "D_2=10 #cm #diameter at the top\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Consider section at a distance x cm below top of mast and y be the diameter at this section\n",
      "\n",
      "#triangle OAB and ODC are similar,we get\n",
      "#2*AB=x*120**-1\n",
      "#EB=y=10+x*120**-1\n",
      "#after simplifying we get, x=120*(y-10)\n",
      "\n",
      "#Z=pi*64**-1*y**4)*(y*32**-1)**-1 #Section modulus\n",
      "#After simplifying we get\n",
      "#Z=(pi*y**3)*(32)**-1\n",
      "\n",
      "#M=120*P(y-10) #bending moment at that section\n",
      "\n",
      "#From flexural formula we get,\n",
      "#sigma=M*Z**-1\n",
      "#After substituting and simplifying above equation we get,\n",
      "#sigma=3840*P*pi**-1*(1*y**2-1-10*y**3-1)\n",
      "\n",
      "#To find max value of sigma taking derivative of above equation we get\n",
      "y=15 #cm\n",
      "\n",
      "#Now substituting value of y in all equations with variable y\n",
      "x=120*(y-10)\n",
      "#sigma=3840*P*(15-10)*(pi*15**3)**-1 \n",
      "\n",
      "#After implifying above equation we get\n",
      "\n",
      "P=(3500*pi*15**3)*(3840*5)**-1 #N #Magnitude of load causing failure\n",
      "\n",
      "#Result\n",
      "print\"The Magnitude of Load is\",round(P,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Magnitude of Load is 1932.82 N\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.8,Page no.127"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "L=3 #m #span of beam\n",
      "t=20 #mm #Thickness of steel\n",
      "D=200 #mm #overall depth \n",
      "B=140 #mm #overall width\n",
      "b=100 #mm #width of inner rectangle\n",
      "d=160 #mm #depth of inner rectangle\n",
      "w=77 #KN/mm**2\n",
      "sigma=100 #N/mm**2 #Bending stress\n",
      "#Calculations\n",
      "V=((D*10**-3*B*10**-3)-(d*10**-3*b*10**-3)) #m**3 #Volume of rectangular box\n",
      "W=V*3*w #KN #Weight of Beam\n",
      "I=(B*D**3-b*d**3)*12**-1 #mm**4 #M.I of beam section\n",
      "\n",
      "#Now using the relation,M*I**-1=sigma*y**-1\n",
      "\n",
      "y=200 #mm #distance from farthest fibre\n",
      "M=I*sigma*2*y**-1 #N*mm\n",
      "\n",
      "#M=3000*W+2772*3000*2**-1\n",
      "#After sub values in above equation we get\n",
      "\n",
      "W=((59.2*10**6-2772*3000*2**-1)*(3000)**-1)*10**-3 #KN #Max concentrated Load at free end\n",
      "\n",
      "F=W+2.772*2**-1 #KN #shear force at half length\n",
      "\n",
      "#Result\n",
      "print\"The shear force at half length is\",round(F,2),\"KN\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The shear force at half length is 19.73 KN\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.9,Page no.128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "B=24 #mm #width of beam section\n",
      "D=21.7 #mm #depth of beam section\n",
      "E_1=11440 #MN/m**2 #Modulus of Elasticity parallel grain\n",
      "E_2=2860 #MN/m**2 ##Modulus of Elasticity perpendicular grain\n",
      "sigma_1=8.57 #MN/m**2\n",
      "sigma_2=2.14 #MN/m**2\n",
      "L=1.2 #m #span of beam\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Ratio of smaller modulus to larger modulus is E_2:E_1=1:4\n",
      "#Dimension of transformed Beam section\n",
      "b=18 #mm #width of Beam section\n",
      "d=3.1 #mm #depth of beam section\n",
      "\n",
      "I=(1*12**-1*B*10**-3*(D*10**-3)**3)-(3*(1*12**-1*b*10**-3*(d*10**-3)**3)) #m**4 #M.I of transformed section\n",
      "y=21.7*10**-3*2**-1 \n",
      "M=I*sigma_1*10**6*y**-1 #N*m #Safe B.M\n",
      "P=4*M*L**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Safe value of Load is\",round(P,2),\"N\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Safe value of Load is 53.45 N\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.11,Page no.131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "D=4 #cm #Outside diameter\n",
      "d=3 #cm #inside diamter\n",
      "L=2 #m #span of beam\n",
      "W=1000 #N #Max safe Load\n",
      "\n",
      "#Calculations\n",
      "\n",
      "I=pi*64**-1*(D**4-d**4) #cm**4 #M.I\n",
      "A=pi*4**-1*(D**2-d**2) #cm**2 #Area \n",
      "y=2 \n",
      "Z=I*y**-1 #cm**3 #Section modulus\n",
      "\n",
      "M=W*L*4**-1 #N*cm #Max bending moment\n",
      "\n",
      "#From Flexural Formula\n",
      "sigma=M*Z**-1 #N/cm**2\n",
      "\n",
      "#For Tubes\n",
      "#M.I about x-x axis\n",
      "I_1=4*(8.59+5.492*2**2) #cm**4 \n",
      "\n",
      "Z_1=122.32*4**-1 #cm**3 \n",
      "\n",
      "#M=W_1*200*4**-1 #N*cm\n",
      "#After substituting values we get\n",
      "#M=50*W_1 (equation 1)\n",
      "\n",
      "#Again from Flexural Formula\n",
      "M=sigma*Z_1\n",
      "\n",
      "#substitute value of M in equation 1\n",
      "\n",
      "W=11640*30.58*50**-1 #N\n",
      "\n",
      "#Result\n",
      "print\"Max central load is\",round(W,2),\"N\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Max central load is 7119.02 N\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.12,Page no.133"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "b=200 #mm #width of beam\n",
      "d=300 #mm #depth of beam\n",
      "t=12 #mm #thickness of beam\n",
      "E_s=220 #KN/m**2 #modulus of elasticity of steel\n",
      "E_w=11 #KN/m**2 #modulus of elasticity of timber\n",
      "sigma_s=115 #MN/m**2 #stress of steel\n",
      "sigma_w=9.2 #MN/m**2 #stress of timber\n",
      "L=2 #m #Span of beam\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#E_w*E_s**-1=1*20**-1 #ratio of Modulus of elasticity of timber to steel\n",
      "\n",
      "\n",
      "#(Part-1)\n",
      "b_1=b*20**-1 #mm #web thickness of transformed section\n",
      "stress=20*sigma_w #MN/m**2 #Allowable stress in web of equivalen beam\n",
      "#But allowable stress in flanges is sigma_s is 115 KN/m**2 and therefore taken into consideration\n",
      "\n",
      "\n",
      "d_1=324 #mm #depth of beam with thickness in consideration\n",
      "I=1*12**-1*0.2*0.324**3-2*1*12**-1*0.095*0.3**3 #m**4 #M.I of transformed section\n",
      "\n",
      "#Using Relation, M*I**-1=sigma*y**-1 we get\n",
      "\n",
      "#Part-2\n",
      "M_max=I*(324*10**-3*2**-1)**-1*sigma_s*10**6 #N*m #Max allowable Bending moment for steel section\n",
      "\n",
      "#Part-3\n",
      "#As beam is simply supported at the ends and the load is applied at the centre of beam\n",
      "#M_max=W*L*4**-1 #Max Bending moment \n",
      "W=M_max*4*L**-1 #N #Allowable stress Load\n",
      "\n",
      "#Result\n",
      "print\"Web thickness of Equivalent steel section is\",round(b_1,2),\"mm\"\n",
      "print\"Max Allowable bending moment for section is\",round(M_max,2),\"N*m\"\n",
      "print\"Allowable safe Load is\",round(W,2),\"N\"\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Web thickness of Equivalent steel section is 10.0 mm\n",
        "Max Allowable bending moment for section is 98935.78 N*m\n",
        "Allowable safe Load is 197871.56 N\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.13,Page no.135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "d=10 #cm #distance between joists\n",
      "t=2 #cm #thickness of steel plate \n",
      "d_2=20 #cm #depth of beam\n",
      "sigma_t=8.5 #N/mm**2 #stress in timber \n",
      "E_s=2*10**5 #N/mm**2 #Modulus of elasticity of steel\n",
      "E_t=10**4 #N/mm**2 ##Modulus of elasticity of timber\n",
      "L=5 #cm #span of beam\n",
      "\n",
      "#calculation\n",
      "sigma=10*15**-1*sigma_t #stress in timber at distance of 10 cm from XX\n",
      "\n",
      "dell=sigma*E_t**-1 #strain in timber at 10 cm from XX\n",
      "\n",
      "sigma_s=dell*E_s #N/mm**2 #Max stress\n",
      "\n",
      "#For Timber\n",
      "Z_w=1*6**-1*10*30**2*2 #cm**3 #section modulus of timber\n",
      "M_w=sigma_t*100*Z_w #moment of resistance of timber\n",
      "\n",
      "#For steel\n",
      "Z_s=1*6**-1*2*20**2 #cm**3 #section modulus of steel\n",
      "M_s=sigma_s*Z_s*100  #moment of resistance of steel\n",
      "\n",
      "M=(M_w+M_s)*10**-5 #total moment of resistance\n",
      "\n",
      "#M=w*L**2*8**-1 #N*m #Max bending moment\n",
      "w=8*M*(L**2)**-1 #N/m #Max uniform distributed Load\n",
      "\n",
      "#Result\n",
      "print\"Moment of resistance is\",round(M,3),\"N*cm\"\n",
      "print\"Max uniform distributed Load\",round(w,3),\"N/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Moment of resistance is 40.611 N*cm\n",
        "Max uniform distributed Load 12.996 N/m\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.14,Page no.136"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "B=10 #cm #width of timber section\n",
      "D=15 #cm #depth of timber section\n",
      "b=10 #cm #width of steel plate\n",
      "t=12 #mm #thickness \n",
      "w=3 #KN/m #Uniformly distributed Load\n",
      "L=4 #m #Span of beam\n",
      "m=20 #Ratio of modulus of elasticity of steel to timber \n",
      "W=3 #KN/m #Load\n",
      "\n",
      "#Calculations\n",
      "\n",
      "y_1=15*2**-1 #C.G of timber \n",
      "y_2=1.2*2**-1 #C.G of steel plate\n",
      "b_s=10*m**-1 #cm #Equivalent width of steel\n",
      "Y_bar=(10*1.2*0.6+15*0.5*8.7)*(10*1.2+15*0.5)**-1 #cm #distance of C.G from bottom edge\n",
      "\n",
      "I=1*12**-1*10*(1.2)**3+10*1.2*(3.72-0.6)**2+1*12**-1*0.5*(15)**3+0.5*15*(7.5-3.72)**2\n",
      "M=W*10**5*L**2*8**-1 #N*m\n",
      "\n",
      "Y_bar_1=3.72 #cm #C.G from bottom edge\n",
      "Y_bar_2=16.2-Y_bar #cm #C.G from top edge\n",
      "\n",
      "sigma_1=(M*I**-1*Y_bar_1)*10**-2 #N/mm**2 #stress at bottom\n",
      "\n",
      "sigma_2=(M*I**-1*Y_bar_2)*10**-2 #N/mm**2 #stress at top\n",
      "\n",
      "sigma_max=sigma_2*m**-1 \n",
      "\n",
      "#The Answers in book for Moment of Inertia about x-x axis onwards are incorrect\n",
      "\n",
      "#Result\n",
      "print M\n",
      "print\"The Max Stress in steel is\",round(sigma_1,2),\"N/mm**2\"\n",
      "print\"The Max Stress in timber is\",round(sigma_max,2),\"N/mm**2\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "600000.0\n",
        "The Max Stress in steel is 60.98 N/mm**2\n",
        "The Max Stress in timber is 10.23 N/mm**2\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 5.15,Page no.137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "B=20 #cm #width of timber\n",
      "D=30 #cm #depth of timber\n",
      "d=25 #cm #depth of steel plate\n",
      "b=1.2 #cm #width of steel plate\n",
      "sigma_s=90 #N/mm**2 #Bending stress in steel\n",
      "sigma_t=6 #N/mm**2 #Bending stress in timber\n",
      "m=20 #Ratio of modulus of elasticity of of steel to timber\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#Equivalent width of wood section,when 1.2 cm wide steel plate is replaced by steel plate is\n",
      "b_1=1.2*20 #cm\n",
      "d_1=25 #cm #depth of wood section\n",
      "y_1=d*2**-1 #cm #C.G of timber section\n",
      "y_2=D*2**-1 #cm #C.G of steel section\n",
      "\n",
      "Y_bar=(2*d*b_1*y_1+D*B*y_2)*(2*d*b_1+D*B)**-1 #cm #Distance of C.G from Bottom edge\n",
      "I=B*D**3*12**-1+B*D*(y_2-Y_bar)**2+2*(b_1*d_1**3*12**-1+b_1*d_1*(Y_bar-y_1)**2) #M.I of equivalent timber section about N.A\n",
      "Y=30-Y_bar #distance of C.G from top of equivalent wood section\n",
      "\n",
      "#Thus max stress will occur at top and that in steel will occur at bottom\n",
      "#sigma_s=m*Y_bar*Y**-1*sigma_t \n",
      "\n",
      "#After simplifying we get\n",
      "#sigma_s=15.99*sigma_t\n",
      "\n",
      "sigma_t=sigma_s*15.99**-1 #N/mm**2 #Max stress in Equivalent timber section\n",
      "\n",
      "Z_t=I*Y**-1 #Section modulus of equivalent section\n",
      "M=sigma_t*Z_t*10**-5*100 #Moment of resistance of beam\n",
      "\n",
      "#Result\n",
      "print\"Position of N.A is\",round(Y_bar,2),\"cm\"\n",
      "print\"Moment of Resistance of beam is\",round(M,2),\"KN*m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Position of N.A is 13.33 cm\n",
        "Moment of Resistance of beam is 37.15 KN*m\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}