summaryrefslogtreecommitdiff
path: root/Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb')
-rw-r--r--Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb700
1 files changed, 700 insertions, 0 deletions
diff --git a/Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb b/Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb
new file mode 100644
index 0000000..b434c3b
--- /dev/null
+++ b/Hydraulics_by_J_Lal/6-Flow_Through_Open_Channels.ipynb
@@ -0,0 +1,700 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Flow Through Open Channels"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: example_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"n= 1.5\n",
+"Q= 800 //cuses\n",
+"i= 2.5/5280\n",
+"n1= 9.24\n",
+"r= 0.6\n",
+"k= 1.49\n",
+"//CALCULATIONS\n",
+"d= (k*10^7*4/n1)^(1/8)\n",
+"//RESULTS\n",
+"printf ('Depth of channel = %.1f ft ',d)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: example_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"d= 8 //ft\n",
+"i= 1/1200\n",
+"C= 90\n",
+"a= 308 //degrees\n",
+"//CALCULATIONS\n",
+"h= 0.95*d\n",
+"A= (d/2)^2*(a*(%pi/180)-sind(a))/2\n",
+"m= 0.29*d\n",
+"Q= A*C*sqrt(m*i)\n",
+"//RESULTS\n",
+"printf ('Discharge = %.f cuses ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: example_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"v= 5 //ft/sec\n",
+"Q= 500 //cuses\n",
+"w= 25 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"h= (Q/v)/w\n",
+"E= h+(v^2/(2*g))\n",
+"//RESULTS\n",
+"printf ('Specific energy = %.2f ft ',E)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: example_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"i= 1/5000\n",
+"C= 100\n",
+"b= 50 //ft\n",
+"h= 10 //ft\n",
+"Q= 1000 //cuses\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"f= 2*g/C^2\n",
+"m= (b*h)/(b+2*h)\n",
+"v= Q/(b*h)\n",
+"r= (i-(f*4/(2*g*m)))/(1-(2^2/(g*h)))\n",
+"s= i-r\n",
+"//RESULTS\n",
+"printf ('Slope = %.6f ',s)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: example_14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"//Initialization of variables\n",
+"B=48 //ft\n",
+"D=5 //ft\n",
+"f=0.005\n",
+"i=1/1000\n",
+"g=32.2\n",
+"//calculations\n",
+"C=sqrt(2*g/f)\n",
+"m=B*D/(B+2*D)\n",
+"V=C*sqrt(m*i)\n",
+"Q=B*D*V\n",
+"Dc=(Q^2 /(g*B^2))^(1/3)\n",
+"d1=2.25 //ft\n",
+"Q1=1*D*V\n",
+"d2=-d1/2 + sqrt(2*Q1^2 /(g*d1) + d1^2 /4)\n",
+"hd=d2-d1\n",
+"//results\n",
+"printf('height required = %.3f ft',hd)\n",
+"//The answer is a bit different due to rounding off error in textbook"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: example_15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc \n",
+"//initialisation of variables\n",
+"Q= 360 //cfs\n",
+"d1= 1 //ft\n",
+"B= 18 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"w1= 624. //lb/ft^3\n",
+"d2=4.5 //ft\n",
+"//CALCULATIONS\n",
+"w= Q/B\n",
+"v1= w/d1\n",
+"v2= v1/d2\n",
+"d2= -0.5+sqrt((2*v1^2*d1/(g))+(d1^2/4))\n",
+"El= (d1+(w^2/(2*g)))-(d2+(v2^2/(2*g)))\n",
+"EL= w1*Q*El\n",
+"//RESULTS\n",
+"printf ('loss in energy = %.f lb ',EL)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: example_16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"d1= 4 //ft\n",
+"v1= 60 //ft/sec\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALULATIONS\n",
+"d2= d1*(sqrt(1+8*v1^2/(g*d1))-1)/2\n",
+"//RESULTS\n",
+"printf ('d2 = %.f ft ',d2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.17: example_17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"b= 150 //ft\n",
+"d= 12 //ft\n",
+"N= 0.03\n",
+"i= 1/10000\n",
+"h= 10 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"A= b*d\n",
+"P= b+2*d\n",
+"m= A/P\n",
+"v= m^(2/3)*1.49*i^0.5/N\n",
+"A1= b*(h+d)\n",
+"P1= b+2*(h+d)\n",
+"m1= A1/P1\n",
+"C1= 1.49*m1^(1/6)/N\n",
+"v1= A*v/A1\n",
+"s= (i-(v1^2/(C1^2*m1)))/(1-(v1^2/(g*(h+d))))\n",
+"L= 2*h/s\n",
+"//RESULTS\n",
+"printf ('Length of back water = %.f ft ',L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: example_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"b1= 3.2 //ft\n",
+"b2= 1.3 //ft\n",
+"h1= 1.86 //ft\n",
+"h2= 1.63 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"a1= b1*h1\n",
+"a2= b2*h2\n",
+"Q= a1*a2*sqrt(2*g)*sqrt(h1-h2)/(sqrt(a1^2-a2^2))\n",
+"//RESULTS\n",
+"printf ('Discharge = %.1f cuses ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: example_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"b1= 4 //ft\n",
+"b2= 2 //ft\n",
+"h1= 2 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"Qmax= 3.09*b2*h1^1.5\n",
+"v1= Qmax/(b1*h1)\n",
+"H= h1+(v1^2/(2*g))\n",
+"Qmax2= 3.09*b2*H^1.5\n",
+"h2= 2*H/3\n",
+"//RESULTS\n",
+"printf ('Qmax = %.2f cfs ',Qmax)\n",
+"printf ('\n Qmax = %.2f cfs ',Qmax2)\n",
+"printf ('\n h2 = %.3f ft ',h2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: example_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"i= 0.000146\n",
+"v= 2.8 //ft/sec\n",
+"m= 7 //ft\n",
+"//CALCULAIONS\n",
+"C= v/sqrt(m*i)\n",
+"K= (157.6-C)*sqrt(m)/C\n",
+"//RESULTS\n",
+"printf ('K = %.3f ',K)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.20: example_20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"h1= 8 //ft\n",
+"b1= 32 //ft\n",
+"h= 1 //ft\n",
+"b2= 24 //ft\n",
+"g= 32.2 //ft/sec^2\n",
+"//CALCULATIONS\n",
+"H= h1-h\n",
+"Q= 3.09*H^1.5*b2\n",
+"v1= Q/(b1*h1)\n",
+"Q1= 3.09*(H+(v1^2/(2*g)))^1.5*b2\n",
+"hc= (Q1^2/(g*b2^2))^(1/3)\n",
+"d2= -(hc/2)+sqrt(9*hc^2/2)+h\n",
+"//RESULTS\n",
+"printf ('Q = %.f cfs ',Q1)\n",
+"printf ('\n hc = %.2f ft ',hc)\n",
+"printf ('\n max depth = %.2f ft ',d2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: example_2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"b= 10 //ft\n",
+"n= 1\n",
+"i= 1/1000\n",
+"d= 1.5 //ft\n",
+"C= 110\n",
+"w= 62.4 //lb/ft^3\n",
+"//CALCULATIONS\n",
+"L= sqrt(2*d^2)\n",
+"P= b+2*L\n",
+"A= d*(b+n*d)\n",
+"m= A/P\n",
+"v= C*sqrt(m*i)\n",
+"Q= A*v*w*60*60*24/10\n",
+"//RESULTS\n",
+"printf ('Discharge = %.2e gal/day ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: example_3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"b= 10 //ft\n",
+"n= 2\n",
+"d= 3.5 //ft\n",
+"i= 1/625\n",
+"//CALCULATIONS\n",
+"A= d*(b+(d/n))\n",
+"L= sqrt(d^2+(d/2)^2)\n",
+"P= b+2*L\n",
+"m= A/P\n",
+"v= 1.486*m^(2/3)*i^0.5/0.03\n",
+"Q= A*v\n",
+"//RESULTS\n",
+"printf ('Discharge = %.1f cuses ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: example_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"d= 3 //ft\n",
+"i= 1/4500\n",
+"C= 80\n",
+"//CALCULATIONS\n",
+"A= 0.5*(%pi*d^2/4)\n",
+"P= %pi*d/2\n",
+"m= A/P\n",
+"v= C*sqrt(m*i)\n",
+"Q= v*A\n",
+"//RESULTS\n",
+"printf ('Discharge = %.2f cuses ',Q)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: example_5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"A= 2500 //acres\n",
+"n= 20\n",
+"Q= 40 //gal/head\n",
+"C= 130\n",
+"i= 1/3000\n",
+"p = 7 //per cent\n",
+"w= 62.4 //lb/ft^3\n",
+"//CALCULATIONS\n",
+"Q1= Q*50000*p/(60*100*60*w)\n",
+"Q2= Q1+(A*4840*9/(12*24*60*60))\n",
+"d= (Q2*8*sqrt(4/i)/(%pi*C))^0.4\n",
+"//RESULTS\n",
+"printf ('Diameter = %.3f ft ',d)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: example_6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"Qt= 150000 //cuses\n",
+"i= 1/10000\n",
+"n1= 1\n",
+"n2= 2/3\n",
+"d1= 30 //ft\n",
+"C1= 100\n",
+"C2= 75\n",
+"b1= 600 //ft\n",
+"b2= 2000 //ft\n",
+"r= 2\n",
+"A1= (b1+d1)*d1\n",
+"P1= b1+(2*d1*sqrt(2))\n",
+"m1= A1/P1\n",
+"v1= C1*sqrt(m1*i)\n",
+"Q1= A1*v1\n",
+"Q2= Qt-Q1\n",
+"v2= v1/2\n",
+"A2= Q2/v2\n",
+"d2= (-b2+sqrt(b2^2+4*1.5*A2))/(2*1.5)\n",
+"//RESULTS\n",
+"printf ('depth of water = %.f ft ',d2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: example_7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"d= 3 //ft\n",
+"i= 1/1000\n",
+"C= 65\n",
+"Cd= 0.56\n",
+"g= 32.2 //ft/sec^2\n",
+"h1= 7.5 //ft\n",
+"h2= 3 //ft\n",
+"//CALCULATIONS\n",
+"m= d\n",
+"v= C*sqrt(m*i)\n",
+"Q= v*d\n",
+"H= (Q*d/(2*sqrt(2*g)*Cd))^(2/3)\n",
+"h= h1+h2-H\n",
+"//RESULTS\n",
+"printf ('Height of dam = %.2f ft ',h)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: example_8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"Q=100//cuses\n",
+"v= 2 ///ft/sec\n",
+"n= 1.5\n",
+"A= 50 //ft^2\n",
+"C= 120\n",
+"//CALCULATIONS\n",
+"d= sqrt((Q/v)/(2*sqrt(n^2+1)-n))\n",
+"m= A/d\n",
+"h1= m-n*d\n",
+"h2= m+n*d\n",
+"i= (v/C)^2*(2/d)\n",
+"//RSULTS\n",
+"printf ('Depth = %.2f ft ',d)\n",
+"printf ('\n Bottom width = %.2f ft ',h1)\n",
+"printf ('\n Top width = %.2f ft ',h2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: example_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc \n",
+"//initialisation of variables\n",
+"Q= 1100 //cuses\n",
+"i= 1/1800\n",
+"C= 95\n",
+"n= 1.5\n",
+"//CALCULATIONS\n",
+"d= ((Q*sqrt(3600)/C)/(n+0.6))^0.4\n",
+"b= 0.6*d\n",
+"ht= b+2*(n*d)\n",
+"//RESULTS\n",
+"printf ('Depth = %.2f ft ',d)\n",
+"printf ('\n Bottom width = %.2f ft ',b)\n",
+"printf ('\n Top width = %.2f ft ',ht)"
+ ]
+ }
+],
+"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
+}