summaryrefslogtreecommitdiff
path: root/Water_and_Wastewater_Engineering_by_G_M_Fair/13-Water_distribution.ipynb
blob: 5b3e2f0e5a116c445cad6c6f40b5393174c4ecba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 13: Water distribution"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 13.2: Example_1.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//initialisation of variables\n",
"p1=7.8//ft\n",
"p2=6.0//ft\n",
"p3=7.4//ft\n",
"p4=6.5//ft\n",
"p=7.6//ft\n",
"h=1.0//ft\n",
"h1=6.7//ft\n",
"p5=3.3//ft\n",
"//CALCULATIONS\n",
"D=p1-p2//mgd\n",
"D1=p1-p3//mgd\n",
"D2=p-p4//mgd\n",
"D3=p4+h//mgd\n",
"D4=h1-p5//mgd\n",
"//RESULTS\n",
"printf('the demand is taken =% f mgd',D3)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 13.3: Example_2.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//initialisation of variables\n",
"w=500//ft\n",
"p=20//psig\n",
"h=40//psig\n",
"h1=1000//in\n",
"q=1250//ft\n",
"g=2.308/0.75//ft\n",
"g1=2.308/1.00//ft\n",
"s=5200//gpm\n",
"a=250//gpm\n",
"//CALCULATIONS\n",
"H=[h1-(1/2)*(w)]//ft\n",
"H1=(h-p)*g//percent\n",
"Q=[q-(1/2)*(w)]//ft\n",
"Q1=(h-p)*g1//percent\n",
"S=s/a//gpm\n",
"//RESULTS\n",
"printf('the number of standard fire streams=% f gpm',S)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 13.6: Example_3.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//initialisation of variables\n",
"h1=2.1*3//ft\n",
"h2=2.1//ft\n",
"h=8.4//ft\n",
"p=1000//ft\n",
"h3=5.7//ft\n",
"h4=4.2*3//ft\n",
"q=4.2//ft\n",
"s=1.68//ft\n",
"q1=1.33//ft\n",
"//CALCULATIONS\n",
"A=p*h/h2//ft\n",
"B=p*(h3+h4)/q//ft\n",
"C=p*(h1+h2)/s//ft\n",
"//RESULTS\n",
"printf('the equilent pipe for the Hazen willians coefficent=% f ft',A)\n",
"printf('the equilent pipe for the Hazen willians coefficent=% f ft',B)\n",
"printf('the equilent pipe for the Hazen willians coefficent=% f ft',C)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 13.8: Example_4.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//initialisation of variables\n",
"d=10//hr\n",
"p=50000//in\n",
"a=7.5//mgd\n",
"w=0.75//mg\n",
"s=5.03//mg\n",
"//CALCULATIONS\n",
"S=s/w//mg\n",
"P=S-s//mg\n",
"//RESULTS\n",
"printf('a steady gravity supply equal to maximum daily=% f mg',P)"
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}