{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: Flow Over Weirs Notches" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.10: depth_of_water.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 3 //ft\n", "H= 6 //in\n", "Cd= 0.62\n", "Cd1= 0.59\n", "a= 45 //degrees\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "H= ((2/3)*Cd*sqrt(2*g)*L*(H/12)^1.5/((8/15)*Cd1*sqrt(2*g)))^0.4\n", "//RESULTS\n", "printf ('depth of water = %.3f ft ',H)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.11: percentage_error_of_discharge_over_the_weir.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "V= 20 //litres\n", "g= 981 //cm/sec^2\n", "Cd= 0.593\n", "r= 2.5\n", "r1= 1.5\n", "e= 2 //mm\n", "Cd1= 0.623\n", "L= 30 //cm\n", "//CALCULATIONS\n", "H= (V*1000*15/(8*Cd*sqrt(2*g)))^0.4\n", "dH1= e/10\n", "p= r*dH1*100/H\n", "H1= (V*3*1000/(2*Cd1*sqrt(2*g)*L))^(2/3)\n", "p1= r1*dH1*100/H1\n", "//RESULTS\n", "printf ('percentage error of discharge over the weir = %.2f per cent ',p)\n", "printf ('\n percentage error of discharge over the weir = %.2f per cent ',p1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.12: Discharge.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 16 //in\n", "H= 9 //in\n", "h= 18 //in\n", "g= 32.2 //ft/sec^2\n", "w= 2 //ft\n", "Cd= 0.63\n", "W= 62.4 //lbs/ft^3\n", "//CALCULATIONS\n", "Q= 2*Cd*sqrt(2*g)*(L/12)*(H/12)^1.5/3\n", "v= Q/(w*(h/12))\n", "H1= v^2/(2*g)\n", "Q1= 2*Cd*sqrt(2*g)*(L/12)*(((H/12)+H1)^1.5-H1^1.5)*W*6/3\n", "//RESULTS\n", "printf ('Discharge = %.f gpm ',Q1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.13: Discharge.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 100 //ft\n", "H= 2.25 //ft\n", "Cd= 0.95\n", "w= 120 //ft\n", "h= 2 //ft\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "Q= 3.087*Cd*L*H^1.5\n", "v0= Q/(w*(h+H))\n", "Q1= 3.087*Cd*L*((H+(v0^2/(2*g)))^1.5-(v0^2/(2*g))^1.5)\n", "//RESULTS\n", "printf ('Discharge = %.f cuses ',Q1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.14: Discharge.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 6 //ft\n", "H1= 0.5 //ft\n", "H2= 0.25 //ft\n", "g= 32.2 //ft/sec^2\n", "Cd1= 0.58\n", "Cd2= 0.8\n", "w= 6.24 //lb/ft^3\n", "//CALCULATIONS\n", "Q1= 2*Cd1*sqrt(2*g)*L*(H1-H2)^1.5/3\n", "Q2= Cd2*L*H2*sqrt(2*g*(H1-H2))\n", "Q= (Q1+Q2)*w*3600\n", "//RESULTS\n", "printf ('Discharge = %.f cuses ',Q)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.15: height_of_anicut_which_is_drowned.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "W= 100 //ft\n", "h= 10 //ft\n", "v= 4 //ft/sec\n", "h1= 3 //ft\n", "g= 32.2 //ft/sec^2\n", "H= 5.4 //ft\n", "Cd1= 0.58\n", "Cd2= 0.8\n", "//CALCULATIONS\n", "v0= (W*h*v)/(W*(h+h1))\n", "h0 =v0^2/(2*g)\n", "H2= (W*h*v-(2*Cd1*W*sqrt(2*g)*((h1+h0)^1.5-h0^1.5)/3))/(Cd2*W*sqrt(2*g*(h1+h0)))\n", "dh= h-H2\n", "//RESULTS\n", "printf ('height of anicut which is drowned = %.f ft ',dh)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.16: length.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "x= 6 //in\n", "l= 200 //ft\n", "d= 10 //ft\n", "v= 4 //ft/sec\n", "Ce= 0.95\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "l1= sqrt(l^2/(Ce^2*(((x/12)*2*g/v^2)+(d^2/(d+(x/12))^2))))\n", "//RESULTS\n", "printf ('length = %.f ft ',l1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.17: Volume_of_extra_water_stored.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc \n", "//initialisation of variables\n", "g= 32.2 //ft/sec^2\n", "H= 25 //ft\n", "l= 2.5 //ft\n", "b= 5 //ft\n", "Cd= 0.64\n", "Q= 3200 //cuses\n", "L=150 //ft\n", "C=3.2\n", "depth=0.5 //ft\n", "A1=5000000 //sq yards\n", "//CALCULATIONS\n", "Q1= Cd*l*b*sqrt(2*g*H)\n", "n= Q/Q1\n", "h= (Q/(3.2*L))^(2/3)\n", "hr=h-depth\n", "Area=A1*9\n", "V=Area*hr\n", "//RESULTS\n", "printf ('number of spilways = %.f ',n)\n", "printf('\n Volume of extra water stored = %d cu ft',V)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.1: length_of_the_weir.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "p= 70 //per cent\n", "Cd= 0.6\n", "Q= 50 //million gallons\n", "H= 2 //ft\n", "w= 62.4 //lb/ft^3\n", "g= 32.2 //ft/sec^2\n", "//CALCULATIONS\n", "Q1= p*Q*10^6*10/(100*w*24*3600)\n", "L= Q1*3/(2*Cd*sqrt(2*g)*H^1.5)\n", "//RESULTS\n", "printf ('length of the weir = %.2f ft ',L)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.2: HP.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 15 //ft\n", "H= 1 //ft\n", "Cd= 0.6\n", "v= 80 //ft/min\n", "g= 32.2 //ft/sec62\n", "w= 62.4 //lb/ft^3\n", "//CALCULATIONS\n", "vo= v/60\n", "Q= 2*Cd*sqrt(2*g)*L*((1+(vo^2/(2*g)))^1.5-(vo^2/(2*g))^1.5)*w*100/(3*550)\n", "//RESULTS\n", "printf ('HP = %.f HP ',Q)\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.3: discharge_percent.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 11 //ft\n", "H= 0.7 //ft\n", "Cd= 0.6\n", "g= 32.2 //ft/sec^2\n", "h= 1.95 //ft\n", "Q= 20.65 //cuses\n", "Q1= 21.2 //cfs\n", "//CALCULATIONS\n", "Q= 2*Cd*sqrt(2*g)*L*H^1.5/3\n", "vo= Q/(h*L)\n", "h1= vo^2/(2*g)\n", "Q1= 2*Cd*sqrt(2*g)*L*((H+(vo^2/(2*g)))^1.5-(vo^2/(2*g))^1.5)/3\n", "v1= Q1/(L*h)\n", "Q2= 2*Cd*sqrt(2*g)*L*((H+(v1^2/(2*g)))^1.5-(v1^2/(2*g))^1.5)/3\n", "p= (Q2-Q1)*100/Q1\n", "//RESULTS\n", "printf ('discharge percent = %.3f per cent ',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.4: K.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "b= 3 //ft\n", "H= 1 //ft\n", "Q= 9 //cfs\n", "k= 1.105\n", "h= 0.1 //ft\n", "//CALCULATIONS\n", "K= Q/b\n", "n= (k-log10(3*K))/h\n", "//RESULTS\n", "printf ('K = %.f ',K)\n", "printf ('\n n = %.1f ',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.5: Q.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", "Cd= 0.62\n", "L= 7.573 //ft\n", "H= 1.2 //ft\n", "S= 2.85 //ft\n", "//CALCULATIONS\n", "Q1= 2*Cd*sqrt(2*g)*L*H^1.5/3\n", "Q2= 3.33*L*H^1.5\n", "Q3= sqrt(2*g)*L*H^1.5*(0.405+(0.00984/H))\n", "He= H+0.004\n", "Q4= (3.227+0.435*(He/S))*L*He^1.5\n", "//RESULTS\n", "printf ('Q = %.2f cuses ',Q1)\n", "printf ('\n Q = %.2f cuses ',Q2)\n", "printf ('\n Q = %.2f cuses ',Q3)\n", "printf ('\n Q = %.2f cuses ',Q4)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.6: .sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "H= 2.5 //ft\n", "L= 10 //ft\n", "A= 10 //miles\n", "p= 30 //per cent\n", "a= 2 //in/hr\n", "w= 2 //ft\n", "//CALCULATIONS\n", "Q= L*1760^2*3^2*a*p/(60*60*12*100)\n", "n= ((Q/(3.33*H^1.5))-(L-0.1*w*H))/(L-0.1*w*H)\n", "//RESULTS\n", "printf ('n = %.f ',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.7: Total_discharge.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc \n", "//initialisation of variables\n", "L= 2.5 //ft\n", "H= 1 //ft\n", "g= 32.2 //ft/sec^2\n", "Cd= 0.61\n", "L1= 1.75 //ft\n", "L2= 2.25 //ft\n", "//CALCULATIONS\n", "Q1= 2*Cd*sqrt(2*g)*L*H/3\n", "Q2= 2*Cd*sqrt(2*g)*L1*(L1^1.5-1)/3\n", "Q3= 2*Cd*sqrt(2*g)*H*(L2^1.5-L1^1.5)/3\n", "Q= Q1+Q2+Q3\n", "//RESULTS\n", "printf ('Total discharge = %.1f cfs ',Q)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.8: Percent_decrease_in_discharge.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", "h1= 16.63 //cm\n", "h2= 10.18 //cm\n", "h3= 16.53 //cm\n", "//CALCULATIONS\n", "H1= h1-h2\n", "H2= h3-h2\n", "p= (H1^1.5-H2^1.5)*100/H1^1.5\n", "//RESULTS\n", "printf ('Percent decrease in discharge = %.2f per cent ',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 4.9: time_required_to_lower_level_of_reservoir.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc \n", "//initialisation of variables\n", "Cd= 0.6\n", "a= 20000 //yd^2\n", "H2= 12 //in\n", "L= 5 //ft\n", "H1= 2 //ft\n", "g=32.2 //ft/s^2\n", "//CALCULATIONS\n", "t= 2*a*9*(L-H1)*((1/sqrt(H2/12))-(1/sqrt(H1)))/(2*60*Cd*sqrt(2*g)*L)\n", "//RESULTS\n", "printf ('time required to lower level of reservoir = %.2f min ',t)" ] } ], "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 }