{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 7:Slab Design One Way"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.1:pg-298"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design\n",
      "Slab thickness= 104.0  mm\n",
      "Cover=15 mm\n",
      "Main steel = 12 mm dia @  120  mm c/c\n",
      "Alternate bars are bent up @ 45-degree at support at a distance l/7 from support face\n",
      "Distribution steel=8 mm dia @  220  mm c/c\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "sigma_cbc=5 #in MPa\n",
    "sigma_st=140 #in MPa\n",
    "MF=1.6 #modification factor\n",
    " #let a be span to depth ratio\n",
    "l=4 #span, in m\n",
    "a=MF*20\n",
    "D=l*1000/a #in mm\n",
    " #to calculate loading\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "finish=1 #in kN/m\n",
    "live_load=2 #in kN/m\n",
    "W=self_weight+finish+live_load #total load, in kN/m\n",
    "lef=l+D/1000 #in m\n",
    "M=W*lef**2/8.0 #in kN-m\n",
    " #check for depth\n",
    "d=round((M*10**6/(0.87*1000))**0.5) #in mm\n",
    " #assume 12 mm dia bars\n",
    "D=d+12/2+15 #in mm\n",
    " #the calculated value of D is more than its assumed value\n",
    "D=150 #revised value of depth, in mm\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "finish=1 #in kN/m\n",
    "live_load=2 #in kN/m\n",
    "W=self_weight+finish+live_load #total load, in kN/m\n",
    "lef=l+D/1000 #in m\n",
    "M=W*lef**2/8.0 #in kN-m\n",
    " #check for depth\n",
    "d=round((M*10**6/(0.87*1000))**0.5) #in mm\n",
    "D=d+12/2+15 #in mm\n",
    "Ast=round(M*10**6/(sigma_st*0.87*d)) #in sq mm\n",
    "s1=1000*0.785*12**2/Ast #which is less than 3d= 387 mm\n",
    "s1=120 #approximately, in mm\n",
    "Ads=0.15/100*1000*D #distribution steel, in sq mm\n",
    " #assume 8 mm dia bars\n",
    "s2=1000*0.785*8**2/Ads #which is less than 5d= 645 mm\n",
    "s2=220 #approximately, in mm\n",
    " #to calculate development length\n",
    "w=0.345 #support width, in m\n",
    "lef=l+w #in m\n",
    "R=W*lef/2 #reaction at support, in kN\n",
    "M1=R*w/2-W*w**2/2 #bending moment at the face of wall, in kN-m\n",
    "sigma_st=M1*10**6/(Ast/2*0.87*d) #in MPa\n",
    "Tbd=0.6 #in MPa\n",
    "Ld=12*sigma_st/(4*Tbd) #in mm\n",
    "La=w*1000-25 #available length for bar over wall, which is greater than development length\n",
    " #check for shear\n",
    "V=W*4.15/2 #in kN\n",
    "Tv=V*10**3/(1000*d) #in MPa\n",
    "Tc=0.33 #permissible shear in concrete for p=0.71 and M15, in MPa\n",
    "Tc=1.3*Tc #permissible shear for slabs, in MPa\n",
    " #Tc>Tv; hence no shear reinforcement is required\n",
    "print \"Summary of design\\nSlab thickness=\",(D),\" mm\\nCover=15 mm\\nMain steel = 12 mm dia @ \",(s1),\" mm c/c\\nAlternate bars are bent up @ 45-degree at support at a distance l/7 from support face\\nDistribution steel=8 mm dia @ \",(s2),\" mm c/c\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.2:pg-299"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design\n",
      "Slab thickness= 250  mm\n",
      "Cover=15 mm\n",
      "Main steel = 12 dia @  155  mm c/c\n",
      "Alternate bars are bent up at 45-degree at support at a distance of l/7 from support face\n",
      "Distribution steel=8 dia @  165  mm c/c\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "sigma_cbc=5 #in MPa\n",
    "sigma_st=230 #in MPa\n",
    "MF=1.4 #modification factor\n",
    " #let a be span to depth ratio\n",
    "l=4.5 #span, in m\n",
    "a=MF*20\n",
    "D=l*1000.0/a #in mm\n",
    "D=160 #approximately, in mm\n",
    " #to calculate loading\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "finish=1 #in kN/m\n",
    "partitions=1 #in kN/m\n",
    "live_load=4 #in kN/m\n",
    "W=self_weight+finish+partitions+live_load #total load, in kN/m\n",
    "lef=l+D/1000 #in m\n",
    "M=W*lef**2.0/8 #in kN-m\n",
    " #check for depth\n",
    "d=(M*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5 #in mm\n",
    " #assume 12 mm dia bars\n",
    "D=d+12/2+15 #in mm\n",
    " #the calculated value of D is more than its assumed value\n",
    "D=1.1*D #revised value of depth, in mm\n",
    "D=250 #assume, in mm\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "finish=1 #in kN/m\n",
    "partitions=1 #in kN/m\n",
    "live_load=4 #in kN/m\n",
    "W=self_weight+finish+partitions+live_load #total load, in kN/m\n",
    "lef=l+D/1000 #in m\n",
    "M=W*lef**2/8 #in kN-m\n",
    " #check for depth\n",
    "d=round((M*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5) #in mm\n",
    "D=d+12/2+15 #in mm\n",
    "D=250 #approximately, in mm\n",
    "Ast=round(M*10**6/(sigma_st*0.9*d)) #in sq mm\n",
    "s1=1000*0.785*12**2/Ast #which is less than 3d= 690 mm\n",
    "s1=155 #approximately, in mm\n",
    "pt=Ast/1000/d*100 #in %\n",
    "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
    " #assume 8 mm dia bars\n",
    "s2=1000*0.785*8**2/Ads #which is less than 5d= 1150 mm\n",
    "s2=165 #approximately, in mm\n",
    " #to calculate development length\n",
    "w=0.23 #support width, in m\n",
    "l=l+w #in m\n",
    "R=W*l/2.0 #reaction at support, in kN\n",
    "M1=R*w/2-W*w**2/2 #bending moment at the face of wall, in kN-m\n",
    "sigma_st=M1*10**6/(Ast/2*0.9*d) #in MPa\n",
    "Tbd=0.6 #in MPa\n",
    "Ld=12*sigma_st/(4*Tbd) #in mm\n",
    "La=w*1000-25 #available length for bar over wall, which is greater than development length\n",
    " #check for shear\n",
    "V=W*lef/2 #in kN\n",
    "Tv=V*10**3/(1000*d) #in MPa\n",
    "Tc=0.2212 #permissible shear in concrete for p=0.315 and M15, in MPa\n",
    "Tc=1.15*Tc #permissible shear for slabs, in MPa\n",
    " #Tc>Tv; hence no shear reinforcement is required\n",
    "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nCover=15 mm\\nMain steel = 12 dia @ \",s1,\" mm c/c\\nAlternate bars are bent up at 45-degree at support at a distance of l/7 from support face\\nDistribution steel=8 dia @ \",s2,\" mm c/c\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.3:pg-300"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design\n",
      "Slab thickness= 200  mm\n",
      "Main steel = 12 mm dia @  175  mm c/c\n",
      "Alternate bars are bent up at support\n",
      "Distribution steel=8 mm dia @  200  mm c/c\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "sigma_cbc=7 #in MPa\n",
    "sigma_st=230 #in MPa\n",
    "MF=1.22 #modification factor\n",
    " #let a be span to depth ratio\n",
    "l=5 #span, in m\n",
    "a=MF*26\n",
    "D=l*1000/a #in mm\n",
    "D=160 #assume, in mm\n",
    " #to calculate loading\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "finish=0.75 #in kN/m\n",
    "partitions=1 #in kN/m\n",
    "live_load=3 #in kN/m\n",
    "Wd=self_weight #dead load, in kN/m\n",
    "Wl=finish+partitions+live_load #live load, in kN/m\n",
    "lef=5.15 #effective span, in m\n",
    "M1=Wd*lef**2/12+Wl*lef**2/10 #bending moment at mid-span, in kN-m\n",
    "M2=Wd*lef**2/10+Wl*lef**2/9 #bending moment at support next to end support, in kN-m\n",
    " #check for depth\n",
    "d=(M2*10**6/(0.89*1000))**0.5 #in mm\n",
    "dia=12 #assume 12 mm dia bars\n",
    "D=d+12/2+15 #>160, hence depth not suitable\n",
    "D=1.1*D #in mm\n",
    "D=210 #assume, in mm\n",
    "self_weight=25*(D/10**3) #in kN/m\n",
    "Wd=self_weight #in kN/m\n",
    "M1=Wd*lef**2/12+Wl*lef**2/10 #bending moment at mid-span, in kN-m\n",
    "M2=Wd*lef**2/10+Wl*lef**2/9 #bending moment at support next to end support, in kN-m\n",
    " #check for depth\n",
    "d=round((M2*10**6/(0.9*sigma_cbc/2*0.29*1000))**0.5) #in mm\n",
    "D=d+12/2+15 #<210, hence OK\n",
    "D=200 #assume, in mm\n",
    "d=D-dia/2-15 #in mm\n",
    " #main steel at mid-span\n",
    "Ast1=round(M1*10**6/(sigma_st*0.91*d)) #in sq mm\n",
    "s1=1000*0.785*12**2/Ast1 #in mm\n",
    "s1=175 #approximately, in mm\n",
    " #main steel at support\n",
    "Ast2=round(M2*10**6/(sigma_st*0.91*d)) #in sq mm\n",
    " #alternate bars from mid-span are available at the central support as bent up bars; assuming same amount of steel is available from another adjoining mid-span steel\n",
    "Ast2=Ast2-Ast1 #which is nominal, hence no separate steel is required\n",
    "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
    " #assume 8 mm dia bars\n",
    "s2=1000*0.785*8**2/Ads #in mm\n",
    "s2=200 #approximately, in mm\n",
    "print \"Summary of design\\nSlab thickness=\",D,\" mm\\nMain steel = 12 mm dia @ \",s1,\" mm c/c\\nAlternate bars are bent up at support\\nDistribution steel=8 mm dia @ \",s2,\" mm c/c\"\n",
    " #answer given in textbook is incorrect\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex7.4:pg-301"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design\n",
      "Thickness of slab =  100  mm\n",
      "Cover = 15mm\n",
      "Main steel = 12 mm dia @  235  mm c/c\n",
      "Provide development length of  821  mm in the beam from face of beam\n",
      "Distribution steel = 6 mm dia @  235  mm c/c\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "sigma_cbc=5 #in MPa\n",
    "sigma_st=230.0 #in MPa\n",
    "MF=1.4 #modification factor\n",
    " #let a be span to depth ratio\n",
    "l=1 #span, in m\n",
    "a=MF*7\n",
    "D=l*1000/a #in mm\n",
    "D=105 #assume, in mm\n",
    " #to calculate loading\n",
    "self_weight=25*(D/10**3)*1.5 #in kN/m\n",
    "finish=0.5*1.5 #in kN/m\n",
    "live_load=0.75*1.5 #in kN/m\n",
    "W=self_weight+finish+live_load #in kN/m\n",
    "lef=l+0.23/2 #effective span, in m\n",
    "M=W*lef/2 #in kN-m\n",
    " #check for depth\n",
    "d=(M*10**6/(0.65*1500))**0.5 #in mm\n",
    "dia=12 #assume 12 mm dia bars\n",
    "D=d+12/2+15 #<105, hence OK\n",
    "D=100 #assume, in mm\n",
    "d=D-dia/2-15 #in mm\n",
    " #main steel at mid-span\n",
    "Ast=M*10**6/(sigma_st*0.9*d) #in sq mm\n",
    "s1=1500*0.785*12**2/Ast #>3d = 237 mm\n",
    "s1=235 #assume, in mm\n",
    "Ads=0.12/100*1000*D #distribution steel, in sq mm\n",
    " #assume 6 mm dia bars\n",
    "s2=1000*0.785*6**2/Ads #in mm\n",
    "s2=235 #assume, in mm\n",
    "Tbd=0.84 #in MPa\n",
    "Ld=dia*sigma_st/4/Tbd # in mm\n",
    "Ld=821 #round-off, in mm\n",
    "Tv=W*10**3/1500/d #in MPa\n",
    "As=1500*0.785*12**2/235 #in sq mm\n",
    "pt=As/1500/d*100 #in %\n",
    "Tc=0.316 #in MPa\n",
    " #as Tc>Tv, no shear reinforcement required\n",
    "print \"Summary of design\\nThickness of slab = \",D,\" mm\\nCover = 15mm\\nMain steel = 12 mm dia @ \",s1,\" mm c/c\\nProvide development length of \",Ld,\" mm in the beam from face of beam\\nDistribution steel = 6 mm dia @ \",s2,\" mm c/c\"\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
