diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | 4a1f703f1c1808d390ebf80e80659fe161f69fab (patch) | |
tree | 31b43ae8895599f2d13cf19395d84164463615d9 /sample_notebooks/AnkitBarot | |
parent | 9d260e6fae7328d816a514130b691fbd0e9ef81d (diff) | |
download | Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.gz Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.bz2 Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.zip |
add books
Diffstat (limited to 'sample_notebooks/AnkitBarot')
-rwxr-xr-x | sample_notebooks/AnkitBarot/ch15.ipynb | 306 |
1 files changed, 306 insertions, 0 deletions
diff --git a/sample_notebooks/AnkitBarot/ch15.ipynb b/sample_notebooks/AnkitBarot/ch15.ipynb new file mode 100755 index 00000000..c5a4b2dd --- /dev/null +++ b/sample_notebooks/AnkitBarot/ch15.ipynb @@ -0,0 +1,306 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:06bc45481e0c8d1fd696ec9d96ac784607ece32d90669bf112f17cc78a27982d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15 : IRRIGATION CHANNEL 2 DESIGN PROCEDURE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 pg : 739" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design the distributory umath.sing Laecey theory\n", + "\t\t\t\t\n", + "#Given\n", + "f = 0.85; \t\t\t\t#silt factor\n", + "AR = 3600.; \t\t\t\t#area for rabi\n", + "AK = 1400.; \t\t\t\t#area for kharif\n", + "delta_r = 0.135; \t\t\t\t#kor depth for rabi\n", + "delta_k = 0.19; \t\t\t\t#kor depth for kharif\n", + "tr = 4.; \t\t\t\t#kor period for rabi\n", + "tk = 2.5; \t\t\t\t#kor period for kharif\n", + "\n", + "# Calculations\n", + "Du_r = 8.64*tr*7/delta_r; \t\t\t\t#duty for rabi\n", + "Du_k = 8.64*tk*7/delta_k; \t\t\t\t#duty for kharif\n", + "q_r = AR/Du_r; \t\t\t\t#discharge for rabi\n", + "q_k = AK/Du_k; \t\t\t\t#discharge for kharif\n", + "Q = q_r; \t\t\t\t#math.since q_r>q_k\n", + "V = (Q*f**2/144)**(1./6);\n", + "A = Q/V;\n", + "P = 4.75*(Q)**0.5;\n", + "D = (P-(P**2-6.944*A)**0.5)/3.472;\n", + "S = f**(5./3)/(3340*Q**(1./6));\n", + "P = round(P*100)/100;\n", + "D = round(D*100)/100;\n", + "\n", + "# Results\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "print \"Perimeter of channel section = %.2f m.\"%(P);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bed slope = 2.03e-04.\n", + "Perimeter of channel section = 6.73 m.\n", + "Depth of channel section = 0.81 m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#design an irrigation channel in alluvial soil by Laecy's theory\n", + "\t\t\t\t\n", + "#Given\n", + "Q = 15.; \t\t\t\t#Full supply discharge\n", + "f = 1.; \t\t\t\t#silt factor\n", + "s = 1./2; \t\t\t\t#side slope of channel\n", + "\n", + "\n", + "# Calculations\n", + "#from Laecey regime channel (Fig.15.4(b)) B and D is obtained as;\n", + "B = 15.1;\n", + "D = 1.38;\n", + "\t\t\t\t#also from Fig.15.5 we get slope as\n", + "S = 0.19/1000;\n", + "\n", + "# Results\n", + "print \"Width of channel section = %.2f m.\"%(B);\n", + "print \"Depth of channel section = %.2f m.\"%(D);\n", + "print \"Bed slope = %.2e.\"%(S);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of channel section = 15.10 m.\n", + "Depth of channel section = 1.38 m.\n", + "Bed slope = 1.90e-04.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 pg : 740" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import array,zeros,linspace,float64\n", + "\n", + "#design and prepare the longitudnal section;schedule of area statistics and channel dimension of irrigation channel\n", + "\t\t\t\t\n", + "#Given\n", + "dl = 157.7; \t\t\t\t#datum level\n", + "fsl = 157.; \t\t\t\t#full supply level of parent channel\n", + "bl = 156.; \t\t\t\t#bed level of parent channel\n", + "kor_r = 4.; \t\t\t\t#kor period of rabi\n", + "kor_k = 2.5; \t\t\t\t#kor period of kharif\n", + "kord_r = 13.4; \t\t\t\t#kor depth of rabi\n", + "kord_k = 19.; \t\t\t\t#kor depth of kharif\n", + "s = 0.5; \t\t\t\t#side slope\n", + "m = 1.; \t\t\t\t#critical velocity ratio\n", + "N = 0.0225; \t\t\t\t#Kutter n\n", + "qo_r = 8.64*7*kor_r*100/kord_r; \t\t\t\t#outlet discharge for rabi(calculation is wrong in book)\n", + "qo_k = 8.64*7*kor_k*100/kord_k; \t\t\t\t#outlet discharge for kharif(calculation is wrong in book)\n", + "ca = 16000.; \t\t\t\t#culturable commanded area\n", + "Ir = 0.3; \t\t\t\t#intensity of irrigation in rabi\n", + "Ik = 0.125; \t\t\t\t#intensity of irrigation in rabi\n", + "\n", + "# Calculations and Results\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "Ak = ca*Ik; \t\t\t\t#area under kharif\n", + "q_r = Ar/qo_r;\n", + "q_k = Ak/qo_k;\n", + "q_r = round(q_r*100)/100;\n", + "q_k = round(q_k*100)/100;\n", + "print \"discharge neede for rabi crop = %.2f cumecs.\"%(q_r);\n", + "print \"discharge neede for kharif crop = %.2f cumecs.\"%(q_k);\n", + "print \"outlet discharge factor adopted = %i hectares per cumecs.\"%(qo_r);\n", + "\t\t\t\t#at km 5\n", + "ca = 8000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss after 5 km\n", + "q = q_r+l; \t\t\t\t#total discharge\n", + "dq = 1.1*q; \t\t\t\t#desigm discharge\n", + "S = 1./4000; \t\t\t\t#slope\n", + "B = array([5.5, 4.9, 4.55]); \t\t\t\t#Bed width\n", + "D = array([0.73, 0.79, 0.84]); \t\t\t\t#water depth\n", + "Vo = array([0.448, 0.472, 0.488]); \t\t\t\t#critical velocity\n", + "A = zeros(3)\n", + "V = zeros(3)\n", + "m = zeros(3)\n", + "print \"Bed width water depth area velocity critical velocity C.V.R\";\n", + "for i in range(3):\n", + " A[i] = B[i]*D[i]+D[i]**2/2;\n", + " V[i] = dq/A[i];\n", + " m[i] = V[i]/Vo[i];\n", + " A[i] = round(A[i]*100)/100;\n", + " V[i] = round(V[i]*1000)/1000;\n", + " m[i] = round(m[i]*100)/100;\n", + " print \"%.2f %.2f %.2f %.2f %.2f %.2f\"%(B[i],D[i],A[i],V[i],Vo[i],m[i]);\n", + "\n", + "B = 4.55;\n", + "D = 0.84;\n", + "print \"hence take B = %.2f .; D = %.2f m.\"%(B,D);\n", + "\t\t\t\t#at km 4\n", + "q = round(q*100)/100;\n", + "print \"discharge at 5 km = %.2f cumecs.\"%(q);\n", + "ca = 10000; \t\t\t\t#culturable area\n", + "Ar = Ir*ca; \t\t\t\t#area under rabi\n", + "q_r = Ar/qo_r;\n", + "l = 0.5 \t\t\t\t#total loss below 5 km\n", + "P = B+D*5**0.5; \t\t\t\t#wetted perimeter\n", + "l1 = P*1000*2/1000000; \t\t\t\t#loss between 5 km and 4km\n", + "l2 = l1+l;\n", + "q = q_r+l2;\n", + "dq = 1.1*q;\n", + "q = round(q*1000)/1000;\n", + "print \"discharge at 4 km = %.2f cumecs\"%(q);\n", + "print \"other discharge are calculated and are tabulated as:\";\n", + "x = linspace(1,5,6)\n", + "A1 = array([4800, 4200, 3600, 3300, 3000, 2400],dtype=float64);\n", + "A2 = array([2000, 1750, 1500, 1375, 1250, 1000],dtype=float64);\n", + "S = array([22.5, 22.5, 22.5, 24, 24, 25]);\n", + "B = array([5.5, 5.2, 4.85, 4.7, 4.55, 4.55]);\n", + "D = array([1.04, 1.007, 0.975, 0.945, 0.915, 0.840]);\n", + "dq = array([3.56, 3.17, 2.8, 2.6, 2.4, 2.02]);\n", + "V = array([0.570, 0.555, 0.538, 0.530, 0.521, 0.484]);\n", + "m = array([1.015, 1, 1, 1, 1, 0.992]);\n", + "print \"Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\";\n", + "for i in range(6):\n", + " print \"%8i %i %i %.2f %.2f %.2f\\\n", + " %.2f %.2f %.2f\"%(x[i],A1[i],A2[i],S[i],B[i],D[i],dq[i],V[i],m[i]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge neede for rabi crop = 2.66 cumecs.\n", + "discharge neede for kharif crop = 2.51 cumecs.\n", + "outlet discharge factor adopted = 1805 hectares per cumecs.\n", + "Bed width water depth area velocity critical velocity C.V.R\n", + "5.50 0.73 4.28 0.47 0.45 1.05\n", + "4.90 0.79 4.18 0.48 0.47 1.02\n", + "4.55 0.84 4.17 0.48 0.49 0.99\n", + "hence take B = 4.55 .; D = 0.84 m.\n", + "discharge at 5 km = 1.83 cumecs.\n", + "discharge at 4 km = 2.17 cumecs\n", + "other discharge are calculated and are tabulated as:\n", + "Below km area to irrigate rabi area to irrigate kharif bed slope bed width water depth design discharge velocity C.V.R\n", + " 1 4800 2000 22.50 5.50 1.04 3.56 0.57 1.01\n", + " 1 4200 1750 22.50 5.20 1.01 3.17 0.56 1.00\n", + " 2 3600 1500 22.50 4.85 0.97 2.80 0.54 1.00\n", + " 3 3300 1375 24.00 4.70 0.94 2.60 0.53 1.00\n", + " 4 3000 1250 24.00 4.55 0.92 2.40 0.52 1.00\n", + " 5 2400 1000 25.00 4.55 0.84 2.02 0.48 0.99\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4 pg : 744" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import roots\n", + "\n", + "#Given\n", + "B = 5.; \t\t\t\t#bed width\n", + "t = 2.; \t\t\t\t#top width of banks\n", + "h = 2.92; \t\t\t\t#heigth of banks from bed\n", + "n = 1.5;\n", + "\n", + "#sectional area of digging = sectional area of two banks\n", + "#By+zy**2 = 2(h-y)+2n(h-y)**2\n", + "#substituting the values and on simplificatio we get\n", + "s = [1,-13.26,18.59]\n", + "y = roots(s)[1];\n", + "#from this we get y = 11.666556 and 1.5934436.\n", + "#taking y = 1.5934436;\n", + "y = round(y*10)/10;\n", + "\n", + "# Results\n", + "print \"economical depth of cutting = %.2f m.\"%(y);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "economical depth of cutting = 1.60 m.\n" + ] + } + ], + "prompt_number": 4 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |