{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 11:Column Footing Design"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex11.1:pg-591"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design:\n",
      "Overall depth of footing= 468.0  mm\n",
      "Cover=100 mm bottom; 50 mm side\n",
      "Steel- 16  bars of 12 mm dia both ways\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=0.2 #column width in m\n",
    "D=0.3 #column depth in m\n",
    "fck=15 #in MPa\n",
    "sigma_cbc=5 #in MPa\n",
    "sigma_st=230 #in MPa\n",
    "P1=600 #load on column in kN\n",
    "P2=0.05*P1 #weight of footing, in kN\n",
    "P=P1+P2 #in kN\n",
    "q=150 #bearing capacity of soil in kN/sq m\n",
    "A=P/q #in sq m\n",
    "L=math.sqrt(A) #assuming footing to be square\n",
    "L=2.1 #assume, in m\n",
    "p=P1/L**2 #soil pressure, in kN/sq m\n",
    "p=136 #assume, in sq m\n",
    "bc=b/D\n",
    "ks=0.5+bc #>1\n",
    "ks=1\n",
    "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
    "Tv=Tc\n",
    "#let d be the depth of footing in metres\n",
    "#case I: consider greater width of shaded portion in Fig. 11.3 of textbook\n",
    "d1=L*(L-b)/2*p/(Tc*L+L*p) #in m\n",
    " #case II: refer Fig. 11.4 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
    "e=p+4*Tc\n",
    "f=b*p+D*p+2*(b+D)*Tc\n",
    "g=-(L**2-b*D)*p\n",
    "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
    "d2=0.362 #assume, in m\n",
    " #bending moment consideration, refer Fig. 11.5 of textbook\n",
    "Mx=1*((L-b)/2)**2/2*p #in kN-m\n",
    "My=1*((L-D)/2)**2/2*p #in kN-m\n",
    "d3=math.sqrt(Mx*10**6/0.65/10**3) #<362 mm, hence OK\n",
    "z=0.9*d2*10**3 #lever arm, in mm\n",
    "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
    "Ast=L*Ast1 #steel required for full width of 2.1 m, in sq mm\n",
    " #provide 12 mm dia bars\n",
    "dia=12 #in mm\n",
    "n=Ast/0.785/dia**2 #no. of 12 mm dia bars\n",
    "n=16 #assume\n",
    "Tbd=0.84 #in MPa\n",
    "Ld=dia*sigma_st/4/Tbd #in mm\n",
    "Ld=825 #assume, in mm\n",
    "c=50 #side cover, in mm\n",
    "La=(L-D)/2*10**3-c #>Ld, hence OK\n",
    "D=d2*10**3+dia/2+100 #in mm\n",
    "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-\",(n),\" bars of 12 mm dia both ways\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex11.2:pg-592"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design:\n",
      "Overall depth of footing= 534.0  mm\n",
      "Cover=100 mm bottom; 50 mm side\n",
      "Steel- 15  bars of 18 mm dia both ways\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=0.4 #column width, in m\n",
    "D=0.4 #column depth, in m\n",
    "fck=15 #in MPa\n",
    "sigma_cbc=5 #in MPa\n",
    "sigma_st=140 #in MPa\n",
    "P1=1000 #load on column, in kN\n",
    "P2=0.05*P1 #weight of footing, in kN\n",
    "P=P1+P2 #in kN\n",
    "q=200 #bearing capacity of soil, in kN/sq m\n",
    "A=P/q #in sq m\n",
    "L=math.sqrt(A) #assuming footing to be square\n",
    "L=2.3 #assume, in m\n",
    "p=P1/L**2 #soil pressure, in kN/sq m\n",
    "p=189 #assume, in kN/sq m\n",
    "bc=b/D\n",
    "ks=0.5+bc #>1\n",
    "ks=1\n",
    "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
    "Tv=Tc\n",
    "#let d be the depth of footing in metres\n",
    "#case I: consider greater width of shaded portion in Fig. 11.7 of textbook\n",
    "d1=L*(L-b)/2*p/(Tc*L+L*p) #in m\n",
    "#case II: refer Fig. 11.8 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
    "e=p+4*Tc\n",
    "f=b*p+D*p+2*(b+D)*Tc\n",
    "g=-(L**2-b*D)*p\n",
    "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
    "d2=0.425 #assume, in m\n",
    "d=max(d1,d2) #in m\n",
    "#bending moment consideration, refer Fig. 11.9 of textbook\n",
    "Mx=1*((L-b)/2)**2/2*p #in kN-m\n",
    "d3=math.sqrt(Mx*10**6/0.87/10**3) #<425 mm, hence OK\n",
    "z=0.87*d*10**3 #lever arm, in mm\n",
    "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
    "Ast=L*Ast1 #steel required for full width of 2.3 m, in sq mm\n",
    "#provide 18 mm dia bars\n",
    "dia=18 #in mm\n",
    "n=Ast/0.785/dia**2 #no. of 18 mm dia bars\n",
    "n=15 #assume\n",
    "Tbd=0.6 #in MPa\n",
    "Ld=dia*sigma_st/4/Tbd #in mm\n",
    "c=50 #side cover, in mm\n",
    "La=(L-D)/2*10**3-c #in mm\n",
    " #providing hook at ends\n",
    "La=La+16*dia #>Ld, hence OK\n",
    "D=d2*10**3+dia/2+100 #in mm\n",
    "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-\",(n),\" bars of 18 mm dia both ways\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 11.3:pg-593"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design:\n",
      "Overall depth of footing= 680.0  mm\n",
      "Cover:100 mm bottom; 50 mm side\n",
      "Steel: 9 -20 mm dia bars both ways\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "B=0.5 #column diameter, in m\n",
    "fck=20 #in MPa\n",
    "sigma_cbc=7 #in MPa\n",
    "sigma_st=230 #in MPa\n",
    "P1=1600 #load on column, in kN\n",
    "P2=0.05*P1 #weight of footing, in kN\n",
    "P=P1+P2 #in kN\n",
    "q=300 #bearing capacity of soil, in kN/sq m\n",
    "A=P/q #in sq m\n",
    "L=math.sqrt(A) #assuming footing to be square\n",
    "L=2.4 #assume, in m\n",
    "p=P1/L**2 #soil pressure, in kN/sq m\n",
    "p=278 #assume, in kN/sq m\n",
    "bc=1\n",
    "ks=0.5+bc #>1\n",
    "ks=1\n",
    "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
    "Tv=Tc\n",
    "#let d be the depth of footing in metres\n",
    "#case I: refer Fig. 11.11 of textbook\n",
    "d1=L*(L-B)/2*p/(Tc*L+L*p) #in m\n",
    "#case II: refer Fig. 11.12 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
    "e=math.pi/4*p+math.pi*Tc\n",
    "f=2*math.pi/4*B*p+math.pi*B*Tc\n",
    "g=-(L**2-math.pi/4*B**2)*p\n",
    "d2=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
    "d2=0.57 #assume, in m\n",
    "d=max(d1,d2) #in m\n",
    " #bending moment consideration, refer Fig. 11.13 of textbook\n",
    "M=1*((L-B)/2)**2/2*p #in kN-m\n",
    "d3=math.sqrt(M*10**6/0.88/10**3) #<570 mm, hence OK\n",
    "z=0.9*d*10**3 #lever arm, in mm\n",
    "Ast1=(M*10**6/sigma_st/z) #in sq mm\n",
    "Ast=L*Ast1 #steel required for full width of 2.4 m\n",
    " #provide 20 mm dia bars\n",
    "dia=20 #in mm\n",
    "n=Ast/0.785/dia**2 #no. of 20 mm dia bars\n",
    "n=9 #assume\n",
    "Tbd=1.12 #in MPa\n",
    "Ld=dia*sigma_st/4/Tbd #in mm\n",
    "Ld=1030 #assume, in mm\n",
    "c=50 #side cover, in mm\n",
    "La=(L-B)/2*10**3-c #in mm\n",
    "#bend bar at right angle and provide length, l\n",
    "l=Ld-La #in mm\n",
    "D=d*10**3+dia/2+100 #in mm\n",
    "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover:100 mm bottom; 50 mm side\\nSteel:\",(n),\"-20 mm dia bars both ways\"\n",
    " #answer in textbook is incorrect\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex11.4:pg-595"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Summary of design:\n",
      "Overall depth of footing= 590  mm\n",
      "Cover=100 mm bottom; 50 mm side\n",
      "Steel-long direction\n",
      "12  bars of 18 mm dia in  2  m width equally spaced\n",
      "Short direction\n",
      "Central band  2  m: 13 -12 mm dia bars equally spaced\n",
      "Remaining sides: 2 -12 mm dia bars on each side\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=0.3 #column width in m\n",
    "c1=0.4 #column depth in m\n",
    "fck=20 #in MPa\n",
    "sigma_cbc=7 #in MPa\n",
    "sigma_st=275 #in MPa\n",
    "P1=1200 #load on column, in kN\n",
    "P2=0.05*P1 #weight of footing, in kN\n",
    "P=P1+P2 #in kN\n",
    "q=200 #bearing capacity of soil, in kN/sq m\n",
    "A=P/q #in sq m\n",
    "L1=2 #in m\n",
    "L2=A/L1 #assuming footing to be square\n",
    "L2=3.2 #assume, in m\n",
    "p=P1/L1/L2 #soil pressure, in kN/sq m\n",
    "bc=b/c1\n",
    "ks=0.5+bc #>1\n",
    "ks=1\n",
    "Tc=0.16*math.sqrt(fck)*10**3 #in kN/sq m\n",
    "Tv=Tc\n",
    "#let d be the depth of footing in metres\n",
    "#case I, refer Fig. 11.15 of textbook\n",
    "#short direction\n",
    "d1=L1*(L2-c1)/2*p/(Tc*L1+L1*p) #in m\n",
    " #long direction\n",
    "d2=L2*(L1-b)/2*p/(Tc*L2+L2*p) #in m\n",
    " #case II: refer Fig. 11.16 of textbook; we get a quadratic equation of the form e d**2 + f d + g = 0\n",
    "e=p+4*Tc\n",
    "f=b*p+c1*p+2*(b+c1)*Tc\n",
    "g=-(L1*L2-b*c1)*p\n",
    "d3=(-f+math.sqrt(f**2-4*e*g))/2/e #in m\n",
    "d3=0.47 #assume, in m\n",
    "d=max(d1,d2,d3) #in m\n",
    " #bending moment consideration, refer Fig. 11.17 of textbook\n",
    "Mx=1*((L1-b)/2)**2/2*p #in kN-m\n",
    "My=1*((L2-c1)/2)**2/2*p #in kN-m\n",
    "d4=math.sqrt(My*10**6/0.8/10**3) #in mm\n",
    "d4=480 #>470 mm (provided for shear)\n",
    "d=d4 #in mm\n",
    "z=0.92*d #lever arm, in mm\n",
    " #short direction\n",
    "Ast1=(Mx*10**6/sigma_st/z) #in sq mm\n",
    "Ast=L2*Ast1 #steel required for full width of 3.2 m, in sq mm\n",
    "b1=L1 #central band width, in m\n",
    "beta=L2/L1\n",
    "Astc=L1/(beta+1)*Ast #in sq mm\n",
    " #provide 12 mm dia bars\n",
    "dia=12 #in mm\n",
    "n1=Astc/0.785/dia**2 #no. of 12 mm dia bars\n",
    "n1=13 #assume\n",
    "Astr=Ast-Astc #steel in remaining width, in sq mm\n",
    "n2=Astr/0.785/dia**2\n",
    "n2=4 #assume\n",
    "n2=n2/2 #on each side\n",
    "Tbd=1.12 #in MPa\n",
    "Ld=dia*sigma_st/4/Tbd #in mm\n",
    "c=50 #side cover, in mm\n",
    "La=(L1-b)/2*10**3-c #>Ld, hence OK\n",
    " #long direction\n",
    "Ast1=(My*10**6/sigma_st/z) #in sq mm\n",
    "Ast=L1*Ast1 #steel required for full width of 2 m, in sq mm\n",
    " #provide 18 mm dia bars\n",
    "dia=18 #in mm\n",
    "n=Ast/0.785/dia**2 #no. of 18 mm dia bars\n",
    "n=12 #assume\n",
    "Ld=dia*sigma_st/4/Tbd #in mm\n",
    "c=50 #side cover, in mm\n",
    "La=(L2-c1)/2*10**3-c #>Ld, hence OK\n",
    "D=d+dia/2+100 #in mm\n",
    "D=590 #assume, in mm\n",
    "print \"Summary of design:\\nOverall depth of footing=\",(D),\" mm\\nCover=100 mm bottom; 50 mm side\\nSteel-long direction\\n\",(n),\" bars of 18 mm dia in \",(L1),\" m width equally spaced\\nShort direction\\nCentral band \",(L1),\" m:\",(n1),\"-12 mm dia bars equally spaced\\nRemaining sides:\",(n2),\"-12 mm dia bars on each side\"\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
}
