{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 15:Doubly Reinforced Sections"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.1:pg-792"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Moment of resistance of the beam =  556.299941443  kN-m\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=300 #width, in mm\n",
    "d=800 #effective depth, in mm\n",
    "Ast=3940 #in sq mm\n",
    "Asc=795 #in sq mm\n",
    "top_cover=40 #in mm\n",
    "fck=15 #in MPa\n",
    "fy=250 #in MPa\n",
    "Xc=0.531*d #in mm\n",
    "fcc=0.446*fck #in MPa\n",
    "fsc=0.87*fy #in MPa\n",
    "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
    "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.2:pg-793"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Moment of resistance of the beam =  281.483345273  kN-m\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=230 #width, in mm\n",
    "d=600 #effective depth, in mm\n",
    "Asc=554 #in sq mm\n",
    "Ast=1524 #in sq mm\n",
    "top_cover=30 #in mm\n",
    "fck=15 #in MPa\n",
    "fy=415 #in MPa\n",
    "Xc=0.479*d #in mm\n",
    "fcc=0.446*fck #in MPa\n",
    " #for d'/d=30/600=0.05 and Fe415 grade steel,\n",
    "fsc=355 #in MPa\n",
    "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
    "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.3:pg-794"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "As factored moment is less than limiting moment, no steel is required on compression side (as per LSM)\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=250 #width, in mm\n",
    "d=550 #effective depth, in mm\n",
    "fck=15 #in MPa\n",
    "fy=250 #in MPa\n",
    "M=95 #in kN-m\n",
    "Mu=1.5*M #factored moment, in kN-m\n",
    "Mulim=0.149*fck*b*d**2/10**6 #in kN-m\n",
    " #as Mu<Mulim, no steel required on compression side\n",
    "print \"As factored moment is less than limiting moment, no steel is required on compression side (as per LSM)\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.4:pg-794"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Moment of resistance of the beam =  135.03389454  kN-m\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=225 #width, in mm\n",
    "d=500 #effective depth, in mm\n",
    "Asc=125 #in sq mm\n",
    "Ast=754 #in sq mm\n",
    "top_cover=50 #in mm\n",
    "fck=15 #in MPa\n",
    "fy=500 #in MPa\n",
    "Xc=0.456*d #in mm\n",
    "fcc=0.446*fck #in MPa\n",
    " #for d'/d=50/500=0.1 and Fe500 grade steel,\n",
    "fsc=412 #in MPa\n",
    "Mu=(0.36*fck*b*Xc*(d-0.416*Xc)+(fsc-fcc)*Asc*(d-top_cover))/10**6 #in kN-m\n",
    "print \"Moment of resistance of the beam = \",Mu,\" kN-m\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.5:pg-795"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Compression steel =  267.0  sq mm\n",
      "Tension steel =  1907.0  sq mm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=250 #width, in mm\n",
    "d=500 #effective depth, in mm\n",
    "Mu=165 #in kN-m\n",
    "top_cover=50 #in mm\n",
    "fck=15 #in MPa\n",
    "fy=250 #in MPa\n",
    "Xc=0.531*d #in mm\n",
    "Mulim=0.149*fck*b*d**2/10**6 #in kN-m\n",
    "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
    "M1=Mu-Mulim #in kN-m\n",
    "fcc=0.446*fck #in MPa\n",
    "fsc=0.87*fy #in MPa\n",
    "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
    "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
    "Ast=Ast1+Ast2 #in sq mm\n",
    "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.6:pg-796"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Compression steel =  262.0  sq mm\n",
      "Tension steel =  823.0  sq mm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=200 #width, in mm\n",
    "d=300 #effective depth, in mm\n",
    "Mu=74 #in kN-m\n",
    "top_cover=30 #in mm\n",
    "fck=20 #in MPa\n",
    "fy=415 #in MPa\n",
    "Xc=0.479*d #in mm\n",
    "Mulim=0.138*fck*b*d**2/10**6 #in kN-m\n",
    "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
    "M1=Mu-Mulim #in kN-m\n",
    "fcc=0.446*fck #in MPa\n",
    " #for d'/d=30/300=0.1 and Fe415 grade steel,\n",
    "fsc=353 #in MPa\n",
    "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
    "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
    "Ast=Ast1+Ast2 #in sq mm\n",
    "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex15.7:pg-797"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Compression steel =  163.0  sq mm\n",
      "Tension steel =  447.0  sq mm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "b=200 #width, in mm\n",
    "d=200 #effective depth, in mm\n",
    "Mu=32 #in kN-m\n",
    "top_cover=30 #in mm\n",
    "fck=20 #in MPa\n",
    "fy=500 #in MPa\n",
    "Xc=0.456*d #in mm\n",
    "Mulim=0.133*fck*b*d**2/10**6 #in kN-m\n",
    "Ast1=round(0.36*fck*b*Xc/0.87/fy) #in sq mm\n",
    "M1=Mu-Mulim #in kN-m\n",
    "fcc=0.446*fck #in MPa\n",
    " #for d'/d=30/200=0.15 and Fe500 grade steel,\n",
    "fsc=395 #in MPa\n",
    "Asc=round(M1*10**6/(fsc-fcc)/(d-top_cover)) #in sq mm\n",
    "Ast2=round((fsc-fcc)*Asc/0.87/fy) #in sq mm\n",
    "Ast=Ast1+Ast2 #in sq mm\n",
    "print \"Compression steel = \",Asc,\" sq mm\\nTension steel = \",Ast,\" sq mm\"\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
}
