{
 "metadata": {
  "name": "",
  "signature": "sha256:0e14a7576f4038d6474523e0faf6c534de06cbb509045bb799ae70b4aaeef049"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter8-See page"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate rate of water flow\n",
      "##initialisation of variables\n",
      "H1= 12. ##in\n",
      "H2= 20. ##in\n",
      "z= 8. ##in\n",
      "h1= 24. ##in\n",
      "h= 20. ##in\n",
      "k1= 0.026 ##in/sec\n",
      "D= 3. ##in\n",
      "##calculations\n",
      "k2= H2*k1/((z/(1.-h/h1))-H1)\n",
      "i= h1/(H1+H2)\n",
      "A= math.pi/4.*D**2\n",
      "keq= (H1+H2)/((H1/k1)+(H2/k2))\n",
      "q= keq*A*i*3600.\n",
      "##results\n",
      "print'%s %.2f %s'% ('rate of water flow = ',q,' in^3/hr ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "rate of water flow =  330.81  in^3/hr \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg208"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate a)How high (above the ground surface) the water will rise if piezometers are placed at points aandb.\n",
      "#b.The total rate of seepage through the permeable layer per unit length\n",
      "#c. The approximate average hydraulic gradient at c.\n",
      "##initialisation of variables\n",
      "Nd= 6.\n",
      "H1= 5.6 ##m\n",
      "H2= 2.2 ##m\n",
      "k= 5e-5 ##cm/sec\n",
      "dL= 4.1 ##m\n",
      "##calculations\n",
      "H= (H1-H2)/Nd\n",
      "h1= 5.61-H\n",
      "h2= 5.61-5.*H\n",
      "q= 2.38*(H1-H2)*k/Nd\n",
      "i= H/dL\n",
      "##results\n",
      "print'%s %.3f %s'% ('at point a,water will rise to height of = ',h1,' m ')\n",
      "print'%s %.3f %s'% ('at point b,water will rise to height of =',h2,' m ')\n",
      "print'%s %.e %s'% ('total rate of seepage per unit lenghth = ',q,' m^3/sec/m ')\n",
      "print'%s %.3f %s'% ('average hydraulic gradient at c = ',i,' ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "at point a,water will rise to height of =  5.043  m \n",
        "at point b,water will rise to height of = 2.777  m \n",
        "total rate of seepage per unit lenghth =  7e-05  m^3/sec/m \n",
        "average hydraulic gradient at c =  0.138  \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg210"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate average rate of flow\n",
      "##initialisation of variables\n",
      "k1= 5.67 ##ft/day\n",
      "k2= 11.34 ##ft/day\n",
      "##from graph\n",
      "Nd= 8\n",
      "Nf= 2.5\n",
      "H= 20\n",
      "##calculations\n",
      "q= math.sqrt(k1*k2)*H*Nf/Nd\n",
      "##results\n",
      "print'%s %.2f %s'% ('average rate of flow = ',q,' ft^3/day/ft ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "average rate of flow =  50.12  ft^3/day/ft \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg 212"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate seepage under the dam \n",
      "##initialisation of variables\n",
      "B= 6. ##m\n",
      "L= 120. ##m\n",
      "s= 3. ##m\n",
      "T= 6. ##m\n",
      "x= 2.4 ##m\n",
      "H= 5. ##m\n",
      "k= 0.008 ##cm/sec\n",
      "##calculations\n",
      "b=B/2.\n",
      "a1= b/T\n",
      "a2= s/T\n",
      "a3= x/b\n",
      "Q= 0.378*k*H*L*36*24\n",
      "##results\n",
      "print'%s %.2f %s'% ('seepage under the dam = ',Q,' m^3/day ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "seepage under the dam =  1567.64  m^3/day \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg217"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate seepage rate\n",
      "##initialisation of variables\n",
      "b= math.pi/4. ##degrees\n",
      "a= math.pi/6.##degrees\n",
      "B= 10. ##ft\n",
      "H= 20. ##ft\n",
      "h= 25. ##ft\n",
      "k= 2e-4 ##ft/min\n",
      "##calculations\n",
      "r= H/math.tan(b)\n",
      "d= 0.3*r+(h-H)/math.tan(b)+B+h/math.tan(a)\n",
      "L= d/math.cos(a)-math.sqrt((d/math.cos(a))**2-(H/math.sin(a))**2)\n",
      "q= k*L*math.tan(a)*math.sin(a)*24.*60\n",
      "##results\n",
      "print'%s %.4f %s'% ('seepage rate = ',q,' ft^3/day/ft ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "seepage rate =  0.9724  ft^3/day/ft \n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}