{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 6: Orifices" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.10: Meeting_point_of_two_jets.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.10\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "H1=4-1;//meter\n", "H2=4;//meter\n", "Cv1=0.9;//Coefficient of velocity\n", "Cv2=0.9;//Coefficient of velocity\n", "//Cv1=Cv2 & x1=x2 at meeting point\n", "//x1/sqrt(4*H1*y1)=x2/sqrt(4*H2*y2)\n", "y1BYy2=H2/H1;\n", "//y1=1+y2;\n", "y2=1/(y1BYy2-1);//meter\n", "y1=y1BYy2*y2;//meter\n", "x1=Cv1*sqrt(4*H1*y1);//meter\n", "disp(y1,x1,'Meeting point horizontal & vertical co-ordinates are(x1 & y1 in meter) : ');\n", "//Answer in the book are not accurate." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.11: Discharge_through_the_orifice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.11\n", "clc;\n", "clear;\n", "close;\n", "format('v',8);\n", "//Given data :\n", "g=9.81;//constant\n", "Cd=0.6;//Coefficient of discharge\n", "B=1.3;//meter\n", "H1=6-(1.8+1.5);//meter\n", "H2=6-1.5;//meter\n", "Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec\n", "disp(Q,'Discharge through the orifice in m^3/sec : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.12: Discharge_through_orifice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.12\n", "clc;\n", "clear;\n", "close;\n", "format('v',7);\n", "//Given data :\n", "g=9.81;//constant\n", "Cd=0.62;//Coefficient of discharge\n", "B=2;//meter\n", "H1=3;//meter\n", "H2=3+1.5;//meter\n", "Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec\n", "disp(Q,'Discharge through the orifice in cumec : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.13: Calculate_percentage_error.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.13\n", "clc;\n", "clear;\n", "close;\n", "format('v',7);\n", "//Given data :\n", "g=9.81;//constant\n", "Cd=0.6;//Coefficient of discharge\n", "B=1.6;//meter\n", "H1=1500/1000;//meter\n", "H2=(1500+1250)/1000;//meter\n", "Q=2/3*Cd*B*sqrt(2*g)*(H2^(3/2)-H1^(3/2));//m^3/sec or cumec\n", "disp(Q,'Discharge through the opening in cumec : ');\n", "//For small opening\n", "H=1.5+1.25/2;//meter\n", "D=1.25;//meter\n", "Qdash=Cd*(B*D)*sqrt(2*g*H);//cumec\n", "Error=(Qdash-Q)/Q*100;//%\n", "disp(Error,'% of error : ');\n", "//Answer is wrong in the book." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.14: Discharge_through_orifice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.14\n", "clc;\n", "clear;\n", "close;\n", "format('v',6);\n", "//Given data :\n", "g=9.81;//constant\n", "Cd=0.6;//Coefficient of discharge\n", "B=1600/1000;//meter\n", "D=1250/1000;//meter\n", "ao=1.6*1.25;//m^2\n", "H1=2+1.25/2;//meter\n", "H2=0.8+1.25/2;//meter\n", "H=H1-H2;//meter\n", "Q=Cd*ao*sqrt(2*g*H);//m^3/sec or Cumec\n", "disp(Q,'Discharge in Cumec : ');\n", "//Answer is wrong in the book." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.15: Discharge_through_orifice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.15\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "Cd=0.6;//Coefficient of discharge\n", "B=1600/1000;//meter\n", "D=1250/1000;//meter\n", "ao=1.6*1.25;//m^2\n", "H1=2+1.25;//meter\n", "H2=2;//meter\n", "H=H1-0.8;//meter\n", "Q=2/3*Cd*B*sqrt(2*g)*(H^(3/2)-H2^(3/2))+Cd*B*(H1-H)*sqrt(2*g*H);//m^3/sec or Cumec\n", "disp(Q,'Discharge through the orifice in Cumec : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.16: Find_time_taken.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.16\n", "clc;\n", "clear;\n", "close;\n", "format('v',6);\n", "//Given data :\n", "g=9.81;//constant\n", "d=4;//meter\n", "d0=0.5;//meter\n", "H1=5;//meter\n", "H2=2;//meter\n", "Cd=0.6;//Coefficient of discharge\n", "ao=%pi/4*d0^2;//m^2\n", "A=%pi/4*d^2;//m^2\n", "t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))\n", "disp(t,'Time taken to fall from 5m to 2m(in seconds) : ');\n", "//For emptying H2=0;\n", "H2=0;//meter\n", "t=2*A/Cd/ao/sqrt(2*g)*(sqrt(H1)-sqrt(H2))\n", "disp(t,'Time taken for completely emptying(in seconds) : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.17: Time_of_emptying_the_tank.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.17\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "d=1.2;//meter\n", "do=50/1000;//meter\n", "H=3;//meter\n", "Cd=0.6;//Coefficient of discharge\n", "ao=%pi/4*do^2;//m^2\n", "A=%pi/4*d^2;//m^2\n", "t=2*A*sqrt(H)/Cd/ao/sqrt(2*g);//sec\n", "disp('Time taken for emptying the tank is '+string(floor(t/60))+' minute '+string((t/60-floor(t/60))*60)+' seconds.');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.18: Time_required_to_bring_down_the_level.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.18\n", "clc;\n", "clear;\n", "close;\n", "format('v',4);\n", "//Given data :\n", "g=9.81;//constant\n", "A=3.2;//m^2\n", "a=10*10^-4;//m^2\n", "H1=5;//meter\n", "H2=2.5;//meter\n", "Cd=0.6;//Coefficient of discharge\n", "t=2*A*(sqrt(H1)-sqrt(H2))/Cd/a/sqrt(2*g);//sec\n", "disp('Time taken is '+string(floor(t/60))+' minute '+string((t/60-floor(t/60))*60)+' seconds.');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.19: Time_required_to_empty_the_tank.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.19\n", "clc;\n", "clear;\n", "close;\n", "format('v',4);\n", "//Given data :\n", "g=9.81;//constant\n", "A=3.2;//m^2\n", "a=10*10^-4;//m^2\n", "H=5;//meter\n", "Cd=0.6;//Coefficient of discharge\n", "t=2*A*sqrt(H)/Cd/a/sqrt(2*g);//sec\n", "disp('Time taken is '+string(floor(t/3600))+' hour '+string(floor((t/3600-floor(t/3600))*60))+' minute '+string(((t/3600-floor(t/3600))*60-floor((t/3600-floor(t/3600))*60))*60)+' seconds.');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.1: Calculate_Coefficients.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.1\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "Do=25;//mm\n", "Dc=20;//mm\n", "H=85;//mm\n", "x=335;//mm\n", "y=350;//mm\n", "a=%pi/4*Do^2;//m^2\n", "ac=%pi/4*Dc^2;//m^2\n", "Cc=ac/a;\n", "disp(Cc,'Coefficient of contraction : ');\n", "Cv=sqrt(x^2/4/H/y);\n", "disp(Cv,'Coefficient of velocity : ');\n", "Cd=Cc*Cv;\n", "disp(Cd,'Coefficient of discharge : ');\n", "Cr=(1/Cv^2-1);\n", "disp(Cr,'Coefficient of resistance : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.2: Calculate_various_Coefficients.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.2\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "Do=0.125;//m\n", "H=10.5;//mm\n", "Q=6500;//litres/minute\n", "Q=Q/60/1000;//cumec\n", "x=6;//m\n", "y=1;//m\n", "g=9.81;//gravity constant\n", "a=%pi/4*Do^2;//m^2\n", "Qth=a*sqrt(2*g*H);//cumec\n", "Cd=Q/Qth;//\n", "disp(Cd,'Coefficient of discharge : ');\n", "Cv=sqrt(x^2/4/H/y);\n", "format('v',6);\n", "disp(Cv,'Coefficient of velocity : ');\n", "Cc=Cd/Cv;\n", "format('v',5);\n", "disp(Cc,'Coefficient of contraction : ');\n", "Cr=(1/Cv^2-1);\n", "format('v',6);\n", "disp(Cr,'Coefficient of resistance : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.3: Coefficient_of_velocity.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.3\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "h=102;//mm\n", "H=105;//mm\n", "Cv=sqrt(2*g*h)/sqrt(2*g*H);\n", "disp(Cv,'Coefficient of velocity : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.4: Coefficient_of_velocity.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.4\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "Q=180/62;//litres/sec\n", "Q=Q/1000;//cumec\n", "Dc=25/1000;//m\n", "H=1.9;//m\n", "ac=%pi/4*Dc^2;//m^2\n", "g=9.81;//constant\n", "Cv=Q/sqrt(2*g*H)/ac;\n", "disp(Cv,'Coefficient of velocity : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5: Various_hydraulic_coefficients.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5\n", "clc;\n", "clear;\n", "close;\n", "format('v',6);\n", "//Given data :\n", "g=9.81;//constant\n", "d=30/1000;//meter\n", "wl=2;//kgm\n", "w1=148.6/60;//kg/sec\n", "y=1.65;//meter\n", "H=1.3;//meter\n", "Cv=wl/w1/y*sqrt(g)/sqrt(2*H);\n", "disp(Cv,'Coefficient of velocity : ');\n", "Q=w1/1000;//Cumec\n", "a=%pi/4*d^2;//meter^2\n", "Qth=a*sqrt(2*g*H);//Cumec\n", "Cd=Q/Qth;//coeff. of discharge\n", "disp(Cd,'Coefficient of discharge : ');\n", "Cc=Cd/Cv;//coeff. of contraction\n", "format('v',5);\n", "disp(Cc,'Coefficient of contraction : ');\n", "//Answer in the book are not accurate." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6: Various_hydraulic_coefficients.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6\n", "clc;\n", "clear;\n", "close;\n", "format('v',7);\n", "//Given data :\n", "g=9.81;//constant\n", "a=9*10^-4;//m^2\n", "H=3;//meter\n", "x=2.5;//meter\n", "y=54/100;//meter\n", "Qactual=250*10^-3/60;//Cumec\n", "Qth=a*sqrt(2*g*H);//Cumec\n", "Cd=Qactual/Qth;//coeff. of discharge\n", "disp(Cd,'Coefficient of discharge : ');\n", "Cv=sqrt(x^2)/sqrt(4*H*y);//velocity\n", "disp(Cv,'Coefficient of velocity : ');\n", "Cc=Cd/Cv;//coeff. of contraction\n", "disp(Cc,'Coefficient of contraction : ');\n", "//Answer in the book are not accurate." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.7: Coefficient_of_discharge.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.7\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "d=20/1000;//meter\n", "a=%pi/4*d^2;//m^2\n", "H=1;//meter\n", "Qactual=0.85*10^-3;//m^3/sec\n", "v=sqrt(2*g*H);//m/sec\n", "Qth=a*v;//Cumec\n", "Cd=Qactual/Qth;//coeff. of discharge\n", "disp(Cd,'Coefficient of discharge : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.8: Coefficients_of_orifice.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.8\n", "clc;\n", "clear;\n", "close;\n", "format('v',6);\n", "//Given data :\n", "g=9.81;//constant\n", "d=1.5;//meter\n", "h=1;//meter\n", "Volume=%pi/4*d^2*h;//m^3\n", "time=25;//sec\n", "Qactual=Volume/time;//Cumec\n", "H=10;//meter\n", "do=10/100;//meter\n", "x=4.3;//meter\n", "y=0.5;//meter\n", "ao=%pi/4*do^2;//m^2\n", "Qth=ao*sqrt(2*g*H);//cumec\n", "Cd=Qactual/Qth;//Coeff. ofdischarge\n", "disp(Cd,'Coefficient of discharge : ');\n", "format('v',5);\n", "Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity\n", "disp(Cv,'Coefficient of velocity : ');\n", "Cc=Cd/Cv;//coeff. of contraction\n", "disp(Cc,'Coefficient of contraction : ');\n", "Cr_dash=(1/Cv^2-1);//coeff. of resistance\n", "disp(Cr_dash,'Coefficient. of Resistance');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.9: Various_hydraulic_coefficients.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.9\n", "clc;\n", "clear;\n", "close;\n", "format('v',5);\n", "//Given data :\n", "g=9.81;//constant\n", "do=2.5/100;//meter\n", "H=75/100;//meter\n", "x=30/100;//meter\n", "y=3.2/100;//meter\n", "Qactual=1.186*10^-3;//Cumec\n", "ao=%pi/4*do^2;//m^2\n", "Qth=ao*sqrt(2*g*H);//cumec\n", "Cd=Qactual/Qth;//Coeff. ofdischarge\n", "disp(Cd,'Coefficient of discharge : ');\n", "Cv=sqrt(x^2)/sqrt(4*H*y);//Coefficient of velocity\n", "format('v',7);\n", "disp(Cv,'Coefficient of velocity : ');\n", "format('v',6);\n", "Cc=Cd/Cv;//coeff. of contraction\n", "disp(Cc,'Coefficient of contraction : ');\n", "Cr_dash=(1/Cv^2-1);//coeff. of resistance\n", "disp(Cr_dash,'Coefficient. of Resistance');\n", "//Answers in the book are not accurate." ] } ], "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 }