summaryrefslogtreecommitdiff
path: root/Water_and_Wastewater_Engineering/ch5.ipynb
diff options
context:
space:
mode:
authortslee2014-11-27 17:17:59 +0530
committertslee2014-11-27 17:17:59 +0530
commit7b78be04fe05bf240417e22f74b3fc22e7a77d19 (patch)
tree1875acbe01f3225bbfcc1024266dc96e515f3ea0 /Water_and_Wastewater_Engineering/ch5.ipynb
parent8048392490bd2efe0fdfa001945f663cba969841 (diff)
downloadPython-Textbook-Companions-7b78be04fe05bf240417e22f74b3fc22e7a77d19.tar.gz
Python-Textbook-Companions-7b78be04fe05bf240417e22f74b3fc22e7a77d19.tar.bz2
Python-Textbook-Companions-7b78be04fe05bf240417e22f74b3fc22e7a77d19.zip
added books
Diffstat (limited to 'Water_and_Wastewater_Engineering/ch5.ipynb')
-rw-r--r--Water_and_Wastewater_Engineering/ch5.ipynb311
1 files changed, 311 insertions, 0 deletions
diff --git a/Water_and_Wastewater_Engineering/ch5.ipynb b/Water_and_Wastewater_Engineering/ch5.ipynb
new file mode 100644
index 00000000..1946a849
--- /dev/null
+++ b/Water_and_Wastewater_Engineering/ch5.ipynb
@@ -0,0 +1,311 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:d903acbbd579075c20da58df0664f6b615313ecea1f356fbfe69d66ce9759ff7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Water and Wastewater Volumes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page No : 5-6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\n",
+ "#initialisation of variables\n",
+ "t1 = 5.25\t#yr\n",
+ "t2 = 10.00\t#yr\n",
+ "yi = 171000\t#in\n",
+ "ye = 111000\t#in\n",
+ "yt = 5.23300\t#in\n",
+ "yl = 5.04532\t#in\n",
+ "yn = 31500\t#in\n",
+ "ym = 0.09853\t#in\n",
+ "tm = 9.25\t#yr\n",
+ "tn = 10.00\t#yr\n",
+ "\t\n",
+ "#CALCULATIONS\n",
+ "T = t1/t2\t#yr\n",
+ "T1 = tm/tn\t#yr\n",
+ "Y = yi-ye\t#in\n",
+ "Yt = yt-yl\t#in\n",
+ "\t\n",
+ "#RESULTS\n",
+ "print 'the fifth intercensal year = %.3f yr'%(T)\n",
+ "print 'the ninth postcensal year = %.3f yr'%(T1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the fifth intercensal year = 0.525 yr\n",
+ "the ninth postcensal year = 0.925 yr\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page No : 5-8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import Symbol\n",
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "y0 = 30000\t#in\n",
+ "y1 = 172000\t#in\n",
+ "y2 = 292000\t#in\n",
+ "a = 172\t #ft\n",
+ "p = 30.\t #ft\n",
+ "y = 292\t #ft\n",
+ "q = 322000\t#ft\n",
+ "g = 313\t #ft\n",
+ "n = 0.05\t#ft\n",
+ "d = -2.442\t#ft\n",
+ "t = Symbol('t')\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "L = (2*p*a*y2-(a)**2*q)/(p*y-(a)**2)\t#moreover\n",
+ "m = (g-p)/p\t#ft\n",
+ "N = n*d\t#in\n",
+ "Y = g/(1+9.43*math.exp(N)*t)\t#in\n",
+ "\t\n",
+ "#RESULTS\n",
+ "print 'the saturation populations = %.2f moreover'%(round(L,-3))\n",
+ "print 'the coefficients = %.3f in'%(N)\n",
+ "print 'the equation of a logistic curve = ',(Y)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the saturation populations = 313000.00 moreover\n",
+ "the coefficients = -0.122 in\n",
+ "the equation of a logistic curve = 313/(8.34611446180163*t + 1)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 Page No : 5-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\t\n",
+ "#initialisation of variables\n",
+ "p = 100000\t#in\n",
+ "d = 150.\t#in\n",
+ "h = 1000000.\t#in\n",
+ "a1 = 2.0\t#draft\n",
+ "a2 = 3.0\t#draft\n",
+ "a3 = 1.6\t#draft\n",
+ "m = 1.5\t #in\n",
+ "q = 2.5\t #in\n",
+ "v = 1020.\t#in\n",
+ "w = 100. \t#in\n",
+ "t = 0.01\t#in\n",
+ "v1 = 13.2\t#mgd\n",
+ "\t\n",
+ "#CALCULATIONS\n",
+ "A = d*p/h\t#mgd\n",
+ "M = m*A\t#mgd\n",
+ "M1 = q*A\t#mgd\n",
+ "V = v*math.sqrt(w)*(1-t*math.sqrt(w))\t#gpm\n",
+ "D = M+v1\t#mgd\n",
+ "L = a1*A\t#mgd\n",
+ "L1 = (4./3)*M\t#max\n",
+ "H = a2*A\t#mgd\n",
+ "H1 = (4./3)*M1\t#max\n",
+ "F = a3*A\t#mgd\n",
+ "F1 = (1.6)*15\t#max\n",
+ "\t\n",
+ "#RESULTS\n",
+ "print 'the resulting capacities of the four system = %.f max'%(F1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the resulting capacities of the four system = 24 max\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No : 5-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\n",
+ "#initialisation of variables\n",
+ "r = 48\t#in\n",
+ "A = 450\t#gpd/acre\n",
+ "B = 8000.\t#gpd/mile\n",
+ "S = round(5280./350)\t#manholes/mile\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "C = (B-S*100)/12\t#gpd/mile\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'the ground a quarter of it eventually = %.2f gpd/mile'%(C)\n",
+ "\n",
+ "# note : answer in book is wrong. please check."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the ground a quarter of it eventually = 541.67 gpd/mile\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page No : 5-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\n",
+ "#initialisation of variables\n",
+ "p1 = 20.\t#ft\n",
+ "p2 = 30.\t#ft\n",
+ "w = 5. \t#person\n",
+ "s = 17800.\t#in\n",
+ "h = 1200.\t#in\n",
+ "q = 100. \t#in\n",
+ "i = 1.\t#in\n",
+ "\t\n",
+ "#CALCULATIONS\n",
+ "S = p1*p2*i*s/(h*w)\t#gpcd\n",
+ "P = (q*w*10/S)\t#percent\n",
+ "\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'the degree of separation of stormwater = %.0f percent'%(P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the degree of separation of stormwater = 3 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.8 Page No : 5-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\n",
+ "#initialisation of variables\n",
+ "s = 105\t#gpcd\n",
+ "m = 315\t#gpcd\n",
+ "m1 = 35\t#gpcd\n",
+ "Q1 = 360\t#gpcd\n",
+ "Q2 = 30\t#gpcd\n",
+ "p1 = 20\t#pecent\n",
+ "p2 = 15\t#persons/acer\n",
+ "D = 21\t#persons/acre\n",
+ "I = 2000\t#gpd/acre\n",
+ "\t\n",
+ "#CALCULATIONS\n",
+ "A = D*(s+Q2)+I\t#gpd/acre\n",
+ "R = D*(m+Q2)+I\t#gpd/acre\n",
+ "L = D*(m1+Q2)+I\t#gpd/acre\n",
+ "\t\n",
+ "#RESULTS\n",
+ "print 'the average peak and low rates of flow = %.0f gpd/acre'%(round(L,-1))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the average peak and low rates of flow = 3370 gpd/acre\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file