{ "metadata": { "name": "", "signature": "sha256:af736a02c1f2601e59ec790e080728198307e957dded2cfbca28aa79de429565" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 : Water Systems" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.1 Page No : 2-5" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialisation of variables\n", "w = 3000.\t#sq ft\n", "w1 = 2000.\t#sq ft\n", "w2 = 1000.\t#sq ft\n", "r = 15. \t#in\n", "a = 12.\t #in\n", "h = 7.5\t #in\n", "\t\n", "#CALCULATIONS\n", "G = w*(r/a)*h\t#gal\n", "g = w1*(r/a)*h\t#gal\n", "g1 = w2*(r/a)*h\t#gal\n", "\t\n", "#RESULTS\n", "print 'the normally be stored to tide the supply over dry spells = %.0f gal'%(G)\n", "#wrong ans in book" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the normally be stored to tide the supply over dry spells = 28125 gal\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.2 Page No : 2-9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialisation of variables\n", "m = 17.378 \t#mg\n", "h = 20. \t #in/sq mile \n", "d = 365.\t #in\n", "s = 0.75\t #percent\n", "a = 100.\t #sq miles\n", "p = 750000.\t #gpd per sq mile\n", "t = 180.\t #in\n", "c = 150.\t #gpcd\n", "n = 64600. \t #gpd per sq mile\n", "\t\n", "#CALCULATIONS\n", "R = h*m\t#mg\n", "A = R/d\t#mgd\n", "S = s*a*t\t#billion gal\n", "Q = a*p/c\t#gpd\n", "P = a*n/c\t#people against\n", "\t\n", "#RESULTS\n", "print 'the surface water sheds and storage requirements = %.0f mg'%(R)\n", "print 'the well watered sections of north america = %.1f billion gal'%(S/1000)\n", "print 'the average consumption populations = %.0f gpd'%(Q)\n", "print 'the presence of proper storage = %.0f people against'%(round(P,-3))\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the surface water sheds and storage requirements = 348 mg\n", "the well watered sections of north america = 13.5 billion gal\n", "the average consumption populations = 500000 gpd\n", "the presence of proper storage = 43000 people against\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.3 Page No : 2-14" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialisation of variables\n", "w = 20 \t#ft\n", "r = 3\t #ft a day\n", "g = 500\t #ft\n", "g1 = 1000\t #ft\n", "h = 7.5/1440\t#ft\n", "p = 7.5/1000000\t#ft\n", "r1 = 2\t #ft a day\n", "\t\n", "#CALCULATIONS\n", "W1 = w*g1*r*h\t#gpm\n", "W2 = w*g1*r1*r*p\t#mgd\n", "\t\n", "#RESULTS\n", "#wrong ans in book\n", "print 'the ground water laterally = %.2f gpm'%(W1)\n", "print 'the water from both sides = %.2f mgd'%(W2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the ground water laterally = 312.50 gpm\n", "the water from both sides = 0.90 mgd\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.4 Page No : 2-18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\n", "#initialisation of variables\n", "p1 = 10.\t #mgd\n", "p2 = 6940.\t#gpm\n", "w = 67000.\t#people\n", "d = 2.\t #min\n", "v = d*p2/d\t#gal\n", "v1 = 98.2\t#cu ft each\n", "q = 30.\t #min\n", "q1 = q*p2/d\t#gal\n", "q2 = 13900.\t#cu ft\n", "a = 1390.\t#sq ft\n", "s = 2.\t #hr\n", "s1 = 120*p2/d\t#gal\n", "s2 = 55700.\t#cu ft \n", "s3 = s2/8.\t#sq ft\n", "r = 3\t #gpm/sq ft\n", "r1 = 6\t #rapid\n", "\t\n", "#CALCULATIONS\n", "D = math.sqrt(v1*4/math.pi)\t#ft\n", "S = p2/s3\t#gpm/sq ft\n", "A = p2/(r1*r)\t#sq ft\n", "\t\n", "#RESULTS\n", "print 'the capacity of the components of a rapid sand filtration plant = %d sq ft'%(A)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the capacity of the components of a rapid sand filtration plant = 385 sq ft\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.5 Page No : 2-21" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\n", "#initialisation of variables\n", "r = 10000.\t#ft\n", "l = 400000\t#people\n", "q = 1000000.\t#mgd\n", "w = 100\t#gpcd\n", "w1 = 150\t#gpcd\n", "m = 50\t#percent\n", "g = 1.5\t#ft\n", "h1 = 2.32\t#cfs\n", "h2 = 139\t#cfs\n", "d = 12\t#ft\n", "c = 100\t#ft\n", "l = 10.8\t#ft\n", "l2 = 0.85\t#ft\n", "l1 = 1000\t#ft\n", "\t\n", "#CALCULATIONS\n", "a = r*w/q\t#mgd\n", "b = l*w1/q\t#mgd\n", "a1 = a*g\t#mgd\n", "b1 = b*g\t#mgd\n", "D = d*math.sqrt(h1/math.pi)\t#in\n", "D1 = d*math.sqrt(h2/math.pi)\t#in\n", "L = l/l1\t#ft\n", "L1 = l2/l1\t#ft\n", "\t\n", "#RESULTS\n", "print 'the higher loss of head in small conduits at equal velocity = %f ft'%(L1)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the higher loss of head in small conduits at equal velocity = 0.000850 ft\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.6 Page No : 2-25" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialisation of variables\n", "a = 12\t#in\n", "b = 24\t#in\n", "r = 500\t#gpm\n", "d = 200.\t#gpcd\n", "d1 = 150.\t#gpcd\n", "p1 = 113\t#sq in\n", "p2 = 425\t#sq in\n", "v1 = 3\t #fps\n", "v2 = 2.35\t#cfs\n", "v3 = 9.42\t#cfs\n", "h = 646000\t#gpd\n", "w = 720000\t#gpd\n", "\t\n", "#CALCULATIONS\n", "D1 = v2*h\t#gpd\n", "D2 = v3*h\t#gpd\n", "W1 = D1-w\t#gpd\n", "W2 = D2-w\t#gpd\n", "R1 = D1/d\t#people\n", "R2 = D2/d\t#people\n", "S = W1/d1\t#people\n", "S1 = W2/d1\t#people\n", "\t\n", "#RESULTS\n", "print 'the absence of fire service for a maximum draft = %d gpd'%(round(D2,-3))\n", "print 'The residential fire flow requirements = %.0f gpd'%(round(W2,-3))\n", "\n", "# note: answers are correct. please check using calculator." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the absence of fire service for a maximum draft = 6085000 gpd\n", "The residential fire flow requirements = 5365000 gpd\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.7 Page No : 2-28" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\t\n", "#initialisation of variables\n", "w = 100000.\t#ft\n", "c = 250. \t#per capita\n", "p1 = 0.3\t#percent\n", "p2 = 0.1\t#percent\n", "p3 = 0.60\t#percent\n", "w1 = 15.\t#mgd\n", "\t\n", "#CALCULATIONS\n", "T = c*w\t#$\n", "W = p1*T\t#$\n", "W1 = p2*T\t#$\n", "W2 = p3*T\t#$\n", "W3 = ((w1)**(2./3))*(T/100)\t#$\n", "\n", "#RESULTS\n", "print 'the replacement cost of the water of a city = %.0f $'%(round(W3,-5))\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the replacement cost of the water of a city = 1500000 $\n" ] } ], "prompt_number": 23 } ], "metadata": {} } ] }