{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 5: Orifices and Notches" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.11: example_11.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "\n", "clc\n", "//initialisation of variables\n", "Cd= 0.64\n", "g= 32.2 //ft/sec^2\n", "A= 12.5 //ft^2\n", "H= 24.8 //ft\n", "Q= 3200 //cuses\n", "b= 150 //ft\n", "A1= 5*10^6\n", "h= 9 //ft\n", "h1= 6 //in\n", "//CALCULATIONS\n", "N= Q/(Cd*A*sqrt(2*g*H))\n", "H1= (Q/(3.2*b))^(2/3)\n", "ES= (H1-(h1/12))*A1*h\n", "//RESULTS\n", "printf ('number of siphons = %.f ',N) \n", "printf ('\n Extra Storage = %.2e ft^3',ES) " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.1: example_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc\n", "//initialisation of variables\n", "h= 2.5 //ft\n", "a= 45 //degrees\n", "x= 5 //ft\n", "Q= 45 //cuses\n", "v= 2.6 //ft/sec\n", "w= 6.92 //ft\n", "C= 120\n", "//CALCULATIONS\n", "b= (Q/(v*h))-h\n", "p= b+2*(h+sqrt(2))\n", "A= h*w\n", "m= A/p\n", "i= (v/(C*sqrt(m)))^2\n", "//RESULTS\n", "printf ('Width = %.2f ft',b) \n", "printf ('\n Slope = %.6f ',i) " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.2: example_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "\n", "clc\n", "//initialisation of variables\n", "a= 60 //degrees\n", "i= 1/1600\n", "Q= 8*10^6 //gal/hr\n", "M= 110\n", "w= 6.24 //lb/ft^3\n", "//CALCULATIOS\n", "d= ((Q*2^(2/3)*sqrt(1/i))/(w*3600*sqrt(3)*M))^(3/8)\n", "b=6.93 //ft\n", "//RESULTS\n", "printf ('Diameter = %.f ft',d) \n", "printf('\n breadth = %.2f ft',b)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.3: example_3.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear\n", "clc\n", "//initialisation of variables\n", "g= 32.2 //ft/swc^2\n", "Q= 40 //cuses\n", "w= 5.5 //ft\n", "h= 9 //in\n", "d= 0.75 //ft\n", "V= 3 //ft/sec\n", "//CALCULATIONS\n", "D= ((Q*2)^2/(g*(w*2)^2))^(1/3)\n", "v= Q*d/w\n", "D1= sqrt((2*v^2*d/g)+h/64)-(d/2)\n", "dD= D1-d\n", "El= -dD+((v^2*(1-(V/v)^2))/(2*g))\n", "Els= Q*El*62.4/550\n", "//RESULTS\n", "printf('Critical depth = %.2f ft',D)\n", "printf('\n Rise in level = %.f ft',D1)\n", "printf ('\n Horse-power lost = %.3f hp',Els) \n", "\n", "//The answer is a bit different due to rounding off error in textbook\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.6: example_6.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc\n", "//initialisation of variables\n", "b= 3.5 //ft\n", "H= 2.5 //ft\n", "w= 3 //ft\n", "h= 6 //ft\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "Q= 3.09*b*H^1.5\n", "v= Q/(w*h)\n", "H1= H+(v^2/(2*g))\n", "Q1= 3.09*b*H1^1.5\n", "hc= (Q1^2/(b^2*g))^(1/3)\n", "h2= 0.5*(sqrt(hc^2+8*hc^2)-hc)\n", "dh= h2+b-w\n", "//RESULTS\n", "printf('Flow rate = %.1f cusecs',Q)\n", "printf('\n Flow rate = %d cusecs',Q1)\n", "printf ('\n maximum depth of water downstream = %.3f ft',dh) \n", "printf ('\n Shooting flow depth at hump = %.3f ft',h2) \n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.7: example_7.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear\n", "clc\n", "//initialisation of variables\n", "m= 60/26\n", "i= 1/2000\n", "h1= 3 //ft\n", "h2= 5 //ft\n", "m1= 10/3\n", "C= 90\n", "l= 500 //ft\n", "H= 20 //ft\n", "H1= 29.62 //ft\n", "g= 32.2 //ft/s^2\n", "//CALCULATIONS\n", "v= 90*sqrt(m*i)\n", "v1= v*h1/h2\n", "dh= (i-(v1^2/(C^2*m1)))*l/(1-v1^2/(g*h2))\n", "h3= h2-dh\n", "V= h1*v/h3\n", "//RESULTS\n", "printf ('Height of water 1000 ft upstream = %.3f ft',h3) \n", "printf ('\n Height of water upstream = %.3f ft',h3) \n", "\n", "//The answer is a bit different due to rounding off error in textbook\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.8: example_8.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear\n", "clc\n", "//initialisation of variables\n", "v= 5 //ft/sec\n", "m= 60/26\n", "i= 1/2000\n", "h= 5.5 //ft\n", "m1= 110/31\n", "d= 3 //ft\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "C= v/(sqrt(m*i))\n", "v1= v*d/h\n", "r= (i-(v1^2/(C^2*m1)))/(1-(v1^2/(g*h)))\n", "x= 1/r\n", "//RESULTS\n", "printf ('Distance upstream = %.f ft',x) \n", "\n", "//The answer is a bit different due to rounding off error in textbook\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.9: example_9.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "//initialisation of variables\n", "g= 32.2 //ft/sec^2\n", "Q= 12 //cuses\n", "//CALCULATIONS\n", "hc= (Q/(3*sqrt(g)))^(2/3)\n", "Hc=poly(0,'Hc')\n", "vec=roots(Hc^6+6*Hc^5+12*Hc^4+8*Hc^3-8.95*Hc-8.95)\n", "H=vec(3)\n", "//RESULTS\n", "printf ('Critical depth = %.2f ft',hc) \n", "printf ('\n Critical depth = %.2f ft',H) " ] } ], "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 }