diff options
Diffstat (limited to 'Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke')
9 files changed, 3249 insertions, 0 deletions
diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/1-Fluid_Statics.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/1-Fluid_Statics.ipynb new file mode 100644 index 0000000..d8e3f4c --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/1-Fluid_Statics.ipynb @@ -0,0 +1,488 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Fluid Statics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"dp=20*10^3; //N/m^2\n", +"rho_Hg=13600; //kg/m^3\n", +"rho=700; //kg/m^3\n", +"g=9.81; //m/s^2\n", +"d=0.02; //m\n", +"\n", +"H=dp/(rho_Hg-rho)/g;\n", +"\n", +"V=%pi/4*d^2*H;\n", +"disp('Quantity of mercury to be removed =')\n", +"disp(V)\n", +"disp('m^3')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=800; //kg/m^3\n", +"g=9.81; //m/s^2\n", +"L=0.12;\n", +"theta=%pi/180*20; // radians\n", +"\n", +"dp=rho*g*L*sin(theta);\n", +"disp('The gauge pressure across the filter =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=924; //kg/m^3\n", +"g=9.81; //m/s^2\n", +"H=2; //m\n", +"d=2; //depth in m\n", +"\n", +"p=rho*g*H;\n", +"a=d*H;\n", +"\n", +"F=p*a/2;\n", +"disp('Total force exerted over the wall =')\n", +"disp(F)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: 12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"mc=100; //kg\n", +"g=9.81; //m/s^2\n", +"rho=1000; //kg/m^3\n", +"rho_c=7930; //kg/m^3\n", +"\n", +"m=mc*rho/rho_c;\n", +"\n", +"F=mc*g-m*g;\n", +"disp('The tension in the cable =')\n", +"disp(F)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: 13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=1000;\n", +"x=0.06;\n", +"rho_0=800;\n", +"x_0=0.04;\n", +"\n", +"L=(rho*x-rho_0*x_0)/(rho-rho_0);\n", +"\n", +"rho_L=900;\n", +"x_L=L-rho/rho_L*(L-x);\n", +"disp('Length of the stem above the liquid of SG 0.9 =')\n", +"disp(x_L)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: 14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"m_s=5*10^6; //kg\n", +"T2=4.5; //m\n", +"T1=3; //m\n", +"rho_hc=950; //kg/m^3\n", +"Q=125; //m^3/h\n", +"\n", +"m_hc=m_s*(T2/T1-1);\n", +"disp('Quantity delivered =')\n", +"disp(m_hc)\n", +"disp('kg')\n", +"\n", +"t=m_hc/rho_hc/Q;\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('hours')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"p_v=50*10^3; //N/m^2\n", +"r=1; //m\n", +"p_atm=101.3*10^3; //N/m^2\n", +"rho=1000; //kg/m^3\n", +"H=2.5; //m\n", +"g=9.81; //m/s^2\n", +"\n", +"F=p_v*%pi*r^2;\n", +"disp('Total vertical force tending to lift the dome =')\n", +"disp(F)\n", +"disp('N')\n", +"\n", +"p=p_atm+p_v+rho*g*H;\n", +"disp('Absolute pressure at the bottom of the vessel =')\n", +"disp(p)\n", +"disp('N/m^2')\n", +"\n", +"Fd=(p_v+rho*g*H)*%pi*r^2+rho*g*2*%pi*r^2/3;\n", +"disp('Downward force imposed by the gas and liquid =')\n", +"disp(Fd)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"a1=0.3; //m^2\n", +"m=1000; //kg\n", +"a2=0.003; //m^2\n", +"rho_oil=750; //kg/m^3\n", +"H=2; //m\n", +"g=9.81; //m/s^2\n", +"\n", +"F1=m*g;\n", +"F2=a2*(F1/a1-rho_oil*g*H);\n", +"disp('The force on the plunger =')\n", +"disp(F2)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho_0=800; //kg/m^3\n", +"rho_aq=1100; //kg/m^3\n", +"\n", +"// rho_0*g*H=rho_aq*g*(H-0.5);\n", +"\n", +"H=0.5*rho_aq/(rho_aq-rho_0);\n", +"disp('H=')\n", +"disp(H)\n", +"disp('m')\n", +"\n", +"// For a fixed length of chamber of 3 m, the interface between the two phases is determined from the pressure in the chamber and discharge point.\n", +"// rho_0*g*H1+rho_aq*g*H2=rho_aq*g*(H-0.5);\n", +"// H=H1+H2\n", +"\n", +"rho_0=600; //kg/m^3\n", +"\n", +"H1=0.5*rho_aq/(rho_aq-rho_0);\n", +"disp('The lowest possible position of the inteiface in the chamber below the overflow.')\n", +"disp(H1)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho_o=900; //kg/m^3\n", +"rho_n=1070; //kg/m^3\n", +"H=1; //m\n", +"g=9.81; //m/s^2\n", +"dp=10*10^3; //N/m^2\n", +"\n", +"// H=H1+H2\n", +"\n", +"H1=(dp-rho_n*g*H)/(rho_o-rho_n)/g;\n", +"disp('The position of the interface between the legs =')\n", +"disp(H1)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"dp=22*10^3; //N/m^2\n", +"g=9.81; //m/s^2\n", +"H=1.5; //m\n", +"rho=1495; //kg/m^3\n", +"rho_s=1270; //kg/m^3\n", +"rho_c=2698; //kg/m^3\n", +"\n", +"p=dp/g/H;\n", +"disp('the density of the solution with crystal =')\n", +"disp(p)\n", +"disp('kg/m^3')\n", +"\n", +"// rho=f1*rho_s+f2*rho_c\n", +"// f1+f2=1\n", +"\n", +"f2=(rho-rho_s)/(rho_c-rho_s);\n", +"disp('The fraction of crystals =')\n", +"disp(f2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"p_atm=101.3*10^3; // N/m^2\n", +"rho=1000; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"H1=3; //m\n", +"a=0.073; // N/m\n", +"r1=5*10^(-4); //m\n", +"\n", +"p1=p_atm+rho*g*H1+2*a/r1;\n", +"\n", +"// p2=p_atm+rho*g*H2+2*a/r2;\n", +"\n", +"// p1*4/3*%pi*r1^3=p2*4/3*%pi*r2^3\n", +"\n", +"// Solving above two equations we get\n", +"r2=0.053; //mm\n", +"disp('Radius of the bubble =')\n", +"disp(r2)\n", +"disp('mm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"H=0.2; //m\n", +"rho=1000; //kg/m^3\n", +"rho_Hg=13600; //kg/m^3\n", +"g=9.81; //m/s^2\n", +"\n", +"dp=(rho_Hg-rho)*g*H;\n", +"disp('Differential pressure =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"\n", +"// p1-rho*g*(H+H1)=p2-rho*g*H1-rho_air*g*H\n", +"\n", +"rho=1000;\n", +"g=9.81; // m/s^2\n", +"H=0.4; //m\n", +"dp=rho*g*H;\n", +"disp('Pressure drop in the pipe =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/2-Continuity_Momentum_and_Energy.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/2-Continuity_Momentum_and_Energy.ipynb new file mode 100644 index 0000000..9734582 --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/2-Continuity_Momentum_and_Energy.ipynb @@ -0,0 +1,326 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Continuity Momentum and Energy" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Q1=0.02; //m^3/s\n", +"d1=0.15; //m\n", +"d2=0.05; //m\n", +"d3=0.1; //m\n", +"v2=3; //m/s\n", +"\n", +"\n", +"v3=(4*Q1/%pi-d2^2*v2)/d3^2;\n", +"disp('velocity at pipe 3 =')\n", +"disp(v3)\n", +"disp('m/s')\n", +"\n", +"Q3=%pi*d3^2/4*v3;\n", +"disp('Flowrate at pipe 3 =')\n", +"disp(Q3)\n", +"disp('m^3/s')\n", +"\n", +"Q2=%pi*d2^2/4*v2;\n", +"disp('Flowrate at pipe 2')\n", +"disp(Q2)\n", +"disp('m^3/s')\n", +"\n", +"disp('Velocity at pipe 2')\n", +"disp(v2)\n", +"disp('m/s')\n", +"\n", +"v1=4*(Q2+Q3)/%pi/d1^2;\n", +"disp('Velocity at pipe 1 =')\n", +"disp(v1)\n", +"disp('m/s')\n", +"\n", +"disp('Flowrate at pipe 1')\n", +"disp(Q1)\n", +"disp('m^3/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d1=0.2; //m\n", +"d2=d1;\n", +"p1=1*10^5; //N/m^2\n", +"p2=80*10^3; //N/m^2\n", +"Q=150; //m^3/h\n", +"rho=900; //kg/m^3\n", +"theta1=0; //radians\n", +"theta2=%pi; //radians\n", +"\n", +"a1=%pi*d1^2/4;\n", +"a2=%pi*d2^2/4;\n", +"\n", +"F1=p1*a1; // Upstream force\n", +"F2=p2*a2; // Downstream force\n", +"\n", +"v1=4*Q/3600/%pi/d1^2;\n", +"v2=v1;\n", +"\n", +"flux=rho*Q/3600*v2; //Momentum flux\n", +"\n", +"Fx=F1*cos(theta1)-F2*cos(theta2)+flux*(cos(theta2) - cos(theta1));\n", +"Fy=F1*sin(theta1)-F2*sin(theta2)-flux*(sin(theta2)-sin(theta1));\n", +"\n", +"F=sqrt(Fx^2+Fy^2);\n", +"disp('Force exerted by the liquid on the bend =')\n", +"disp(F)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=1000; //kg/m^3\n", +"d=0.05; //m\n", +"L=500; //m\n", +"v=1.7; //m/s\n", +"\n", +"a=%pi*d^2/4;\n", +"F=rho*a*L*v;\n", +"\n", +"P=F/a/10^3;\n", +"disp('Average pressure =')\n", +"disp(P)\n", +"disp('kN/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"g=9.8; //m/s^2\n", +"dz=0.2; //m ; dz1=z1-z2=z1-z2\n", +"rho=1000; //kg/m^3\n", +"dz1=2; //m ; dz1=z1-z_A\n", +"dz2=0; //m ; dz2=z1-z_B\n", +"dz3=-1.5; //m ; dz3=z1-z_C\n", +"\n", +"v2=sqrt(2*g*dz);\n", +"\n", +"v_A=v2;\n", +"v_B=v2;\n", +"v_C=v2;\n", +"\n", +"p_A=rho*g*(dz1-v_A^2/2/g);\n", +"p_B=rho*g*(dz2-v_B^2/2/g);\n", +"p_C=rho*g*(dz3-v_C^2/2/g);\n", +"\n", +"disp('Velocity at pt. A =')\n", +"disp(v_A)\n", +"disp('m/s')\n", +"\n", +"disp('Velocity at pt. B =')\n", +"disp(v_B)\n", +"disp('m/s')\n", +"\n", +"disp('Velocity at pt. C =')\n", +"disp(v_C)\n", +"disp('m/s')\n", +"\n", +"disp('Pressure at pt. A =')\n", +"disp(p_A)\n", +"disp('kN/m^2')\n", +"\n", +"disp('Pressure at pt. B =')\n", +"disp(p_B)\n", +"disp('kN/m^2')\n", +"\n", +"disp('Pressure at pt. C =')\n", +"disp(p_C)\n", +"disp('kN/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Q=10; // m^3/hr\n", +"d1=0.05; //m\n", +"d2=0.1; //m\n", +"rho=1000; //kg/m^3\n", +"\n", +"a1=%pi*d1^2/4;\n", +"a2=%pi*d2^2/4;\n", +"\n", +"v1=Q/3600/a1;\n", +"v2=(d1/d2)^2*v1;\n", +"\n", +"PD=rho*Q/3600*(v1-v2)/a2;\n", +"disp('Pressure drop =')\n", +"disp(PD)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Q=100; //m^3/hr\n", +"d1=0.2; //m\n", +"d2=0.15; //m\n", +"p1=80*10^3; //N/m^2\n", +"rho=1000; //kg/m^3\n", +"g=9.8; //m/s^2\n", +"\n", +"a1=%pi*d1^2/4;\n", +"a2=%pi*d2^2/4;\n", +"v1=Q/3600/a1;\n", +"v2=Q/3600/a2;\n", +"H_L=0.2*v2^2/2/g;\n", +"p2=p1+rho/2*(v1^2-v2^2)-rho*g*H_L;\n", +"\n", +"F_u=p1*a1; // Upstream force\n", +"F_d=p2*a2; // Downstream force\n", +"\n", +"F_x=rho*Q/3600*(v2-v1)-F_u+F_d;\n", +"disp('Force required =')\n", +"disp(F_x)\n", +"disp('N')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"N=60; //rpm\n", +"r2=0.25; //m\n", +"g=9.8; //m/s^2\n", +"\n", +"w=2*%pi*N/60;\n", +"dz_12=(w*r2)^2/2/g; // dz_12=z2-z1\n", +"c=w*r2^2;\n", +"dz_23=c^2/2/g/r2^2;// dz_23=z3-z2\n", +"\n", +"dz_13=dz_23+dz_12;\n", +"disp('Total depression =')\n", +"disp(dz_13)\n", +"disp('m')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/3-Laminar_Flow_and_Lubrication.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/3-Laminar_Flow_and_Lubrication.ipynb new file mode 100644 index 0000000..4a4f98a --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/3-Laminar_Flow_and_Lubrication.ipynb @@ -0,0 +1,417 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Laminar Flow and Lubrication" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=1000; //kg/m^3\n", +"u=0.1; //Ns/m^2\n", +"g=9.81; //m/s^2\n", +"L=10; //m\n", +"H=2; //m\n", +"Q=14/3600; //m^3/s\n", +"d=0.05; //m\n", +"\n", +"dp=rho*g*(L+H) - (128*Q*u*L/%pi/0.05^4);\n", +"disp('Pressure drop across the valve =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: 12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Q=3*10^(-6); // m^3/s\n", +"u=0.001; // Ns/m^2\n", +"W=1;\n", +"rho=1000; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"d=1.016*10^(-4); // m\n", +"\n", +"theta=asind(3*Q*u/W/rho/g/d^3);\n", +"disp('Exact angle of inclination =')\n", +"disp(theta)\n", +"\n", +"d1=1.25*10^(-4); // m\n", +"\n", +"u1=W*rho*g*sind(theta)*(d1^3)/(3*Q);\n", +"disp('Viscosity of the second liquid =')\n", +"disp(u1)\n", +"disp('Ns/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: 17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"u=1.5; // Ns/m^2\n", +"v=0.5; // m/s\n", +"H=0.02/2; // m\n", +"\n", +"t=-u*3*v/H;\n", +"disp('The shear stress =')\n", +"disp(t)\n", +"disp('N/m^2')\n", +"disp('It acts in the opposite direction to the flow.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: 18.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"N=600/60; // revolutions per sec \n", +"r=0.025; // m \n", +"t=400; // N/m^2\n", +"l=0.002; // m\n", +"\n", +"w=2*%pi*N;\n", +"\n", +"u=t*l/w/r;\n", +"disp('Viscosity =')\n", +"disp(u)\n", +"disp('Ns/m^2')\n", +"\n", +"T=integrate('2*%pi*u*w/l*r^3', 'r', 0, r);\n", +"disp('Torque =')\n", +"disp(T)\n", +"disp('Nm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: 19.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"u=0.153; //Ns/m^2\n", +"r=0.05; // m\n", +"N=30; // rps\n", +"t=2/10^5; //s\n", +"L=0.2; // m\n", +"\n", +"tau=u*(2*%pi*N*r/t);\n", +"\n", +"F=tau*2*%pi*r*L;\n", +"\n", +"T=F*r;\n", +"\n", +"w=2*%pi*N;\n", +"P=T*w;\n", +" \n", +"disp('The torque on the bearing is found to be ');\n", +"disp(T);\n", +"disp('Nm');\n", +"disp('and the power required to overcome the frictional resistance is ');\n", +"disp(P);\n", +"disp('W');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: 20.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"t=0.0005; // s\n", +"P=22; // \n", +"r=300/60; // \n", +"R_1=0.1; // \n", +"R_2=0.0625; // \n", +"\n", +"w=2*%pi*r;\n", +"\n", +"u=2*t*P/(%pi*w^2*((R_1)^4-(R_2)^4));\n", +"disp('The viscosity of the oil is found to be ');\n", +"disp(u);\n", +"disp('Nsm-2.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Re=2000; \n", +"d=0.008; //m\n", +"\n", +"L1=0.058*Re*d;\n", +"disp('The furthest distance the fluid can flow into the 8 mm inside diameter pipe before fully developed laminar flow can exist is ');\n", +"disp(L1);\n", +"disp('m');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"del_p=90*10^3; // N/m^2\n", +"d=0.126; // m\n", +"R=0.126/2; // m\n", +"u=1.2;\n", +"L=60; // m\n", +"Rho=1260;\n", +"\n", +"Q=%pi * del_p * R^4 / (8*u*L);\n", +"disp('The glycerol delivery rate is ');\n", +"disp(Q);\n", +"disp('m^3/s');\n", +"\n", +"Re=4*Rho*Q/(u*%pi*d);\n", +"disp('The Reynolds number is ');\n", +"disp(Re);\n", +"disp('As Re is below 2000, therefore confirming laminar flow.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"u=0.015; //Ns/m^2\n", +"Q=0.004/60; //m^3/s\n", +"dp=100;\n", +"rho=1100; //kg/m^3\n", +"\n", +"R=(8*u*Q/(%pi*dp))^(1/4);\n", +"Re=(4*rho*Q/(%pi*u*(2*R)));\n", +"\n", +"disp('Diameter of the pipe =')\n", +"disp(R)\n", +"disp('m')\n", +"\n", +"disp('Reynolds number =')\n", +"disp(Re)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"u=0.03; //Ns/m^2\n", +"Q=10^(-7); //m^3/s\n", +"dp=integrate('8*u*Q/%pi/0.005^4/(1-L)^4', 'L', 0, 0.5)\n", +"disp('Pressure difference =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"u=0.1; // Ns/m^2\n", +"d=0.1; //m\n", +"R=0.05; // m\n", +"Rho=900; //kg/m^3\n", +"\n", +"v_max=2; // m/s\n", +"v=v_max/2; // m/s\n", +"\n", +"disp('At the pipe wall (r =R), therefore, the shear stress is');\n", +"Tw=-2*u*v_max/R;\n", +"disp(Tw);\n", +"disp('N/m^2');\n", +"disp('The negative sign indicates that the shear stress is in the opposite direction to flow.');\n", +"\n", +"disp('pressure drop per metre length of pipe is');\n", +"\n", +"del_p=4*u*v_max/R^2;\n", +"disp(del_p);\n", +"disp('N/m');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"u=0.032; // Ns/m^2\n", +"Re=2000; // maximum value\n", +"Rho=854;\n", +"del_p=150; // N/m^2\n", +"\n", +"d=(32*u^2*Re/(Rho*del_p))^(1/3);\n", +"disp('The maximum inside diameter is found to be ')\n", +"disp(d)\n", +"disp('m')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/4-Dimensional_Analysis.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/4-Dimensional_Analysis.ipynb new file mode 100644 index 0000000..59c9adf --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/4-Dimensional_Analysis.ipynb @@ -0,0 +1,65 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Dimensional Analysis" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Rho_full=800; // kg/m^3\n", +"v_full=1.8; // m/s\n", +"u_full=9*10^(-4);// Nm/s^2\n", +"Rho_model=1000; // kg/m^3\n", +"u_model=10^(-3); // Ns/m^2\n", +"d_full= 2;\n", +"d_model=1;\n", +"del_p_fmodel=4000; // N/m^2\n", +"\n", +"v_model = (((Rho_full * v_full)/u_full)/(Rho_model/u_model))*(d_full/d_model);\n", +"\n", +"del_p_f=del_p_fmodel*Rho_full*(v_full)^2/Rho_model/(v_model)^2;\n", +"disp('The pressure drop per unit length in the full-scale pipe is expected to be ')\n", +"disp(del_p_f)\n", +"disp('kN/m^2');" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/5-Flow_measurement_by_differential_head.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/5-Flow_measurement_by_differential_head.ipynb new file mode 100644 index 0000000..10d8ed2 --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/5-Flow_measurement_by_differential_head.ipynb @@ -0,0 +1,361 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Flow measurement by differential head" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho_m=840; //kg/m^3\n", +"g=9.8; //m/s^2\n", +"H=0.03; //m\n", +"rho=1.2; //kg//m^3\n", +"\n", +"dp=rho_m*g*H;\n", +"\n", +"v1=sqrt(2*dp/rho);\n", +"disp('Velocity =')\n", +"disp(v1)\n", +"disp('m/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"r=[0 0.05 0.10 0.15 0.20 0.225 0.25];\n", +"v=[19 18.6 17.7 16.3 14.2 12.9 0];\n", +"\n", +"// We define a new variable dQ=v*2*%pi*r. According to the given values of r, v, we get dQ as follows\n", +"dQ=[0 5.8 11.1 15.4 17.8 18.2 0];\n", +"plot(r,dQ)\n", +"xtitle('', 'Radius', 'v*2*%pi*r')\n", +"// From the graph area under the curve comes out to be 2.74\n", +"Q=2.74; // m^3/s\n", +"disp(' Rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')\n", +"\n", +"d=0.5; // m\n", +"\n", +"v=4*Q/%pi/d^2;\n", +"disp('Average velocity =')\n", +"disp(v)\n", +"disp('m/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d1=0.1; //m\n", +"rho_Hg=13600; //kg/m^3\n", +"rho=1000; //kg/m^3\n", +"g=9.81; //m/s^2\n", +"H=0.8; //m\n", +"Cd=0.96;\n", +"Q=0.025; //m^3/s\n", +"\n", +"a=%pi*d1^2/4;\n", +"dp=(rho_Hg-rho)*g*H;\n", +"\n", +"B=((2*dp/(rho*((Q/Cd/a)^2)))+1)^(1/4);\n", +"\n", +"d2=d1/B;\n", +"disp('Throat diameter =')\n", +"disp(d2)\n", +"disp('m')\n", +"\n", +"// The shortest possible overall length of venturi is therefore an entrance cone of 7.1 cm length (20 degrees), a throat of 2.5 cm(0.25 pipe-diameters) and an exit cone of 19.7 cm (7.5 degrees) giving an overall length of 29.3 cm.\n", +"\n", +"L=29.3; //cm\n", +"disp('Overall Length =')\n", +"disp(L)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Cd_o=0.65;\n", +"d=0.05;\n", +"d_o=0.025;\n", +"Cd_v=0.95;\n", +"d_v=0.038;\n", +"\n", +"// (Q_o/Cd_o)^2*((d/d_o)^4 - 1)=(Q_v/Cd_v)^2*((d/d_v)^4 - 1)\n", +"\n", +"// Q_v=4*Q_o\n", +"// Q = Q_v + Q_o\n", +"// Q = 5*Qv\n", +"Q1=20;\n", +"Q2=100-Q1;\n", +"\n", +"disp('Flow through orifice =')\n", +"disp(Q1)\n", +"disp('%')\n", +"\n", +"disp('Flow through venturi =')\n", +"disp(Q2)\n", +"disp('%')\n", +"disp('Thus 20 % of the flow passes through the orifice meter while 80 % of the flow passes through the venturi.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Qa=0.003/60; // m^3/s\n", +"Ca=20; // g/l\n", +"Co=0.126; // g/l\n", +"dp=3700; // N/m^2\n", +"p=1000; // N/m^2\n", +"d=0.1; // m\n", +"\n", +"a=%pi*d^2/4;\n", +"Qi=Qa*((Ca-Co)/Co);\n", +"Q=Qi+Qa;\n", +"B=10/6;\n", +"\n", +"Cd=Q/a/sqrt(2*dp/p/(B^4-1));\n", +"disp('Coefficient of discharge =')\n", +"disp(Cd)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=850; // kg/m^3\n", +"Q=0.056; // m^3/s\n", +"Cd=0.98;\n", +"d1=0.2; // m\n", +"d2=0.1; // m\n", +"g=9.81; // m/s^2\n", +"dz=0.3; // m\n", +"\n", +"a=%pi*(d1)^2/4;\n", +"\n", +"dp=rho/2*((Q/Cd/a)^2*((d1/d2)^4 - 1) + 2*g*(dz));\n", +"disp('The differential pressure =')\n", +"disp(dp)\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"g=9.81; // m/s^2\n", +"H=0.5; // m\n", +"rho_m=1075; // kg/m^3\n", +"rho=860; // kg/m^3\n", +"B=0.225/0.075;\n", +"a1=%pi/4*(0.225)^2;\n", +"Cd=0.659;\n", +"\n", +"v_t=sqrt(2*g*H*(rho_m-rho)/rho/(B^4-1));\n", +"\n", +"Q=Cd*a1*v_t;\n", +"disp('Rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"m_f=0.03; // kg\n", +"rho_f=5100; // kg/m^3\n", +"d_l=0.3; // m\n", +"d_b=0.22; // m\n", +"H_tube=0.2; // m\n", +"Cd=0.6;\n", +"H=0.1; // m\n", +"g=9.81; // m/s^2\n", +"rho=1000; // kg/m^3\n", +"\n", +"V_f=m_f/rho_f;\n", +"\n", +"theta=2*atan((d_l-d_b)/2/H_tube);\n", +"\n", +"m=Cd*H*tan(theta/2)*sqrt(8*V_f*g*rho*(rho_f-rho)*%pi);\n", +"disp('Mass flowrate =')\n", +"disp(m)\n", +"disp('kg/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d1=0.05; // m\n", +"d2=0.025; // m\n", +"Cd=0.97;\n", +"dp=1200; // N/m^2\n", +"rho=1000; // kg/m^3\n", +"H=0.15; // m\n", +"theta=2; // degrees\n", +"V_f=10^(-4); // m^3\n", +"g=9.81; // m/s^2\n", +"rho_f=8000; // kg/m^3\n", +"\n", +"B=d1/d2;\n", +"a=%pi/4*d1^2;\n", +"\n", +"Q=Cd*a*sqrt(2*dp/rho/(B^4-1));\n", +"disp('Flow rate of water =')\n", +"disp(Q)\n", +"disp('m^3/s')\n", +"\n", +"Cd=Q/(H/rho*tand(theta/2)*sqrt(8*V_f*g*rho*(rho_f-rho)*%pi));\n", +"disp('Coefficient of discharge of the rotameter =')\n", +"disp(Cd)" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/6-Tank_drainage_and_variable_head_flow.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/6-Tank_drainage_and_variable_head_flow.ipynb new file mode 100644 index 0000000..bc9d245 --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/6-Tank_drainage_and_variable_head_flow.ipynb @@ -0,0 +1,311 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Tank drainage and variable head flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"H1=1.5; // m\n", +"V=0.75; // m^3\n", +"d1=1.2; // m\n", +"u=0.08; // Ns/m^2\n", +"L=3; // m\n", +"rho=1100; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"d=0.025; // m\n", +"\n", +"a=%pi*d^2/4;\n", +"A=%pi*d1^2/4;\n", +"H2=H1-(V/A);\n", +"\n", +"t=-32*u*L*A/(a*rho*g*d^2)*log(H2/H1);\n", +"\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: 1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Q=5000/3600/24; // m^3 per second\n", +"C_d=0.6; \n", +"r=0.01/2; // m\n", +"g=9.8; // m/s^2\n", +"H=0.2; // m\n", +"a_o=%pi*r^2;\n", +"\n", +"n=Q/C_d/a_o/sqrt(2*g*H);\n", +"disp('The number of orifices required are')\n", +"disp(n);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"x=0.86; // m\n", +"g=9.8; // m/s\n", +"y=0.96; // m\n", +"H=0.2; // m\n", +"\n", +"\n", +"v_act=x*sqrt(g/2/y);\n", +"\n", +"v=sqrt(2*g*H);\n", +"\n", +"Cv=v_act/v;\n", +"disp('The coefficient of velocity for the orifice is found to be')\n", +"disp(Cv);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Vt=1; // m^3\n", +"d_t=1; // m\n", +"C_d=0.6; \n", +"d_o=0.02; // m\n", +"g=9.8; // m/s^2\n", +"a_o=%pi*(d_o)^2/4;\n", +"\n", +"A=%pi*(d_t)^2/4;\n", +"\n", +"H1=4*Vt/%pi/(d_t)^2;\n", +"\n", +"t=A/C_d/a_o*sqrt(2*H1/g);\n", +"disp('Total drainage is found to take ')\n", +"disp(t)\n", +"disp(' seconds');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"C_d=0.6;\n", +"d_o=0.05; // m\n", +"g=9.8; // m/s^2;\n", +"R=2; //\n", +"H1=1.5; // \n", +"\n", +"a_o=%pi*d_o^2/4;\n", +"\n", +"t=%pi/C_d/a_o/sqrt(2*g)*(4/3*R*H1^(3/2)-2/5*H1^(5/2));\n", +"disp('The time to drain the tank is found to be ')\n", +"disp(t);\n", +"disp('seconds');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Cd=0.62;\n", +"a=0.01; // m^2\n", +"g=9.81; // m/s^2\n", +"H=0.3; // m\n", +"A1=4*2; // m^2\n", +"H1=0.3; // m\n", +"H2=0.1; // m\n", +"A2=2*2; // m^2\n", +"\n", +"Q=Cd*a*sqrt(2*g*H);\n", +"disp('The rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')\n", +"\n", +"t=2*A1*(H1^(1/2)-H2^(1/2))/(Cd*a*sqrt(2*g)*(1+A1/A2));\n", +"disp('The time taken to reduce the difference in levels to 10 cm is ')\n", +"disp(t)\n", +"disp('s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Qs=0.4; // m^3/s\n", +"H1=1.5; // m\n", +"Q=0.2; // m^3/s\n", +"H2=0.5; // m\n", +"l=15; // m\n", +"b=10; // m\n", +"A=l*b; \n", +"\n", +"k=Qs*H1^(-1/2);\n", +"\n", +"\n", +"t=-2*A/k^2 *(Q*log((Q-k*(H2)^0.5)/(Q-k*(H1)^0.5))+k*((H2)^0.5-(H1)^0.5));\n", +"disp('The time required for the level in the tank to fall to 1 m is ')\n", +"disp(t)\n", +"disp('second')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Cd=0.62;\n", +"d=0.05;\n", +"a_o=%pi*d^2/4;\n", +"g=9.81; // m/s^2\n", +"\n", +"k=Cd*a_o*sqrt(2*g);\n", +"\n", +"// We have got two simultaneous equations\n", +"\n", +"// Q-k*0.65^(1/2)=0.1/90*A\n", +"// Q-k*1.225^(1/2)=0.05/120*A\n", +"\n", +"M=[1 -0.1/90;1 -0.05/120];\n", +"N=[k*0.65^(1/2);k*1.225^(1/2)];\n", +"\n", +"X=inv(M)*N;\n", +"\n", +"Q=X(1,1);\n", +"A=X(2,1);\n", +"\n", +"disp('The Area of the tank =')\n", +"disp(A)\n", +"disp('m^2')\n", +"\n", +"disp('Flowrate =')\n", +"disp(Q)\n", +"disp('m^3/s')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/7-Open_channels_notches_and_weirs.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/7-Open_channels_notches_and_weirs.ipynb new file mode 100644 index 0000000..ab8e669 --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/7-Open_channels_notches_and_weirs.ipynb @@ -0,0 +1,348 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Open channels notches and weirs" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Cd=0.62;\n", +"g=9.81; // m/s^2\n", +"H=0.03; // m\n", +"\n", +"Q=8/15*Cd*sqrt(2*g)*H^(5/2);\n", +"disp('Rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"l=4; // m\n", +"b=2; // m\n", +"H1=0.15; // m\n", +"H2=0.05; // m\n", +"\n", +"t=integrate('-l*b/1.5*H^(-5/2)', 'H', H1, H2);\n", +"disp('Time taken to reduce the head in the the tank =')\n", +"disp(t)\n", +"disp('s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=1; // m\n", +"b=0.3; // m\n", +"n=0.014; // s/m^(1/3)\n", +"i=1/1000;\n", +"\n", +"A=l*b;\n", +"P=2*b+l;\n", +"m=A/P;\n", +"\n", +"Q=A/n*m^(2/3)*sqrt(i);\n", +"disp('The delivery of water through the channel is found to be ')\n", +"disp(Q)\n", +"disp('m^3/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: 3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"n=0.015; // m^(-1/3)s\n", +"i=1;\n", +"H=[4.0 4.1 4.2 4.13];\n", +"\n", +"A=12*H;\n", +"P=12+2*H;\n", +"m=A/P;\n", +"C=m^(1/6)/n;\n", +"\n", +"Q=C*A*sqrt(m*i);\n", +"\n", +"// An analytical solution for depth H is not possible. It is therefore necessary to use a graphical or trial and error approach.\n", +"\n", +"// The corresponding values of A, P, MHD (m), Q are given below as per the taken values of H.\n", +"A=[48 49.2 50.4 49.56];\n", +"P=[20 20.2 20.4 20.26];\n", +"m=[2.4 2.44 2.47 2.45];\n", +"Q=[57.36 59.38 61.39 59.98];\n", +"\n", +"plot(H,Q)\n", +"\n", +"r=[4.13 4.13];\n", +"s=[57 60];\n", +"plot(r,s,'r')\n", +"\n", +"t=[4 4.13];\n", +"u=[60 60];\n", +"plot(t,u,'r')\n", +"\n", +"xtitle('', 'Depth H', 'Flowrate Q')\n", +"\n", +"// Therefore the depth is found to be approximately 4.13\n", +"\n", +"depth=4.13; //m\n", +"disp('Depth = ')\n", +"disp(depth)\n", +"disp('m')\n", +"\n", +"C1=(2.45)^(1/6)/n;\n", +"disp('Chezy Coefficient =')\n", +"disp(C1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Q=300/60; // m^3/s\n", +"i=1/1600;\n", +"\n", +"H=(Q/140*sqrt(2/i))^(2/3);\n", +"\n", +"A=2*H^2;\n", +"disp('The minimum flow area is found to be ')\n", +"disp(A)\n", +"disp('m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d=0.9144; // m\n", +"C=100; // m^(1/2)s^(-1)\n", +"R=d/2;\n", +"\n", +"H=[0.1 0.15 0.2 0.25 0.201];\n", +"\n", +"theta=acos((R-H)/R);\n", +"A=R^2*(theta-sin(2*theta)/2);\n", +"P=2*R*theta;\n", +"m=A/P;\n", +"\n", +"// An analytical solution for depth H is not possible. It is therefore necessary to use a graphical or trial and error approach.\n", +"\n", +"// The corresponding values of theta, A, P, MHD (m), Q are given below as per the taken values of H.\n", +"\n", +"theta=[0.674 0.834 0.973 1.101 0.975];\n", +"A=[0.039 0.070 0.106 0.146 0.107];\n", +"P=[0.616 0.763 0.890 1.006 0.891];\n", +"m=[0.063 0.092 0.119 0.145 0.120];\n", +"Q=[248.7 543.2 932.2 1412.9 940.0];\n", +"\n", +"plot(H,Q)\n", +"\n", +"i=[0.201 0.201];\n", +"j=[0 940];\n", +"plot(i,j,'r')\n", +"\n", +"k=[0 0.201];\n", +"l=[940 940];\n", +"plot(k,l,'r')\n", +"\n", +"xtitle('', 'Depth H', 'Flowrate Q')\n", +"\n", +"Depth=0.201; // m\n", +"disp('The depth in the channel =')\n", +"disp(Depth)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Cd=0.56;\n", +"B=1.2; // m\n", +"g=9.8; // m/s^2\n", +"H=0.018; // m\n", +"\n", +"Q=2/3*Cd*B*sqrt(2*g)*H^(3/2);\n", +"disp('The rate of flow of liquid over the weir is ')\n", +"disp(Q)\n", +"disp('m^3/h')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"H2=5.5;\n", +"Q1=217;\n", +"Q2=34;\n", +"H1=8.5;\n", +"\n", +"H0=(H2*(Q1/Q2)^(2/3)-H1)/((Q1/Q2)^(2/3)-1);\n", +"disp('The height of the weir crest above the surface of the river is found to be ')\n", +"disp(H0)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"H=0.07; // average head \n", +"rate=-0.02/600; // (dH/dt)\n", +"H1=0.08; // m\n", +"H2=0.01; // m\n", +"\n", +"k=-rate/H^(3/2);\n", +"\n", +"t=integrate('-1/k*H^(-3/2)', 'H', H1, H2);\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('s')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/8-Pipe_friction_and_turbulent_flow.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/8-Pipe_friction_and_turbulent_flow.ipynb new file mode 100644 index 0000000..64ba7a6 --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/8-Pipe_friction_and_turbulent_flow.ipynb @@ -0,0 +1,534 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Pipe friction and turbulent flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"m=12*10^3/3600; // kg/s\n", +"Rho=815; // kg/m^3\n", +"d=0.05; // m\n", +"e=0.02;\n", +"d1=50; // m\n", +"d2=0.038; // m\n", +"g=9.8; // m\n", +"\n", +"v=4*m/Rho/%pi/d^2;\n", +"\n", +"f1=1/(2*log10(d1/e)+2.28)^2;\n", +"\n", +"L_eq=d1+2*d1*d;\n", +"\n", +"H_50mm=4*f1*L_eq*v^2/(d*2*g);\n", +"\n", +"v=4*m/(Rho*%pi*d2^2);\n", +"\n", +"f2=1/(2*log10(38/e)+2.28)^2;\n", +"\n", +"L_eq=d1+2*d1*d2;\n", +"H_38mm=4*f2*L_eq*v^2/(d2*2*g);\n", +"\n", +"Hr=0.2*v^2/(2*g);\n", +"\n", +"H_L=H_50mm+H_38mm+Hr;\n", +"\n", +"del_p_f=Rho*g*H_L;\n", +"disp('The total pressure drop due to friction through the pipe system is ')\n", +"disp(del_p_f);\n", +"disp('N/m^2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// H_L=1.2*v^2/2/g\n", +"\n", +"// H_L=4*f*L_eq/d*V^2/2/g\n", +"\n", +"// L_eq=60*d\n", +"\n", +"// H_L=240*f*v^2/2/g\n", +"// Combining the two equations for head loss \n", +"// 1.2*v^2/2/g=240*f*v^2/2/g\n", +"\n", +"f=1.2/240;\n", +"disp('Friction factor =')\n", +"disp(f)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12: 12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// dp_AB+dp_BC=dp_AD+dp_DC\n", +"\n", +"// dp_AD=2*f*rho*v^2*L/d\n", +"\n", +"// dp_AD=16600*(3-Q)^2\n", +"// Likewise \n", +"// dp_AB=16600*Q^2\n", +"// dp_BC=16600*(Q+0.5)^2\n", +"// dp_DC=16600*(2.1-Q)^2\n", +"// By solving above 5 equations, we get\n", +"\n", +"Q=1.175; //litres per second\n", +"\n", +"disp('The rate of flow from B to C =')\n", +"disp(Q+0.5)\n", +"disp('litres per second')\n", +"\n", +"dp_AD=16600*(3-Q)^2;\n", +"dp_AB=16600*Q^2;\n", +"dp_BC=16600*(Q+0.5)^2;\n", +"dp_DC=16600*(2.1-Q)^2;\n", +"\n", +"disp('dp_AD =')\n", +"disp(dp_AD/1000)\n", +"disp('kN/m^2')\n", +"\n", +"disp('dp_AB =')\n", +"disp(dp_AB/1000)\n", +"disp('kN/m^2')\n", +"\n", +"disp('dp_BC =')\n", +"disp(dp_BC/1000)\n", +"disp('kN/m^2')\n", +"\n", +"disp('dp_DC =')\n", +"disp(dp_DC/1000)\n", +"disp('kN/m^2')\n", +"\n", +"\n", +"disp('The lowest pressure drop is in the pipe connecting C and D')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13: 13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"H2=0.5; //m\n", +"H1=2; //m\n", +"A=4; //m^2\n", +"f=0.005; \n", +"L=20; //m\n", +"d=0.025; //m\n", +"g=9.81; // m/s^2\n", +"\n", +"a=%pi*d^2/4;\n", +"\n", +"t=integrate('-A*sqrt((4*f*L/d)+2.5)/a/(sqrt(2*g))*(H)^(-1/2)', 'H', H1, H2);\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14: 14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"\n", +"d0=0.15; // m\n", +"d1=0.1; // m\n", +"Q=50/3600; // m^3/s\n", +"f=0.0052;\n", +"Rho=972;\n", +"\n", +"a=%pi/4*((d0)^2-(d1)^2);\n", +"\n", +"P=%pi*((d0)+(d1));\n", +"\n", +"d_eq=4*a/P;\n", +"\n", +"v=Q/a;\n", +"\n", +"del_p_f=2*f*Rho*v^2/d_eq;\n", +"disp('the pressure drop due to friction per metre length of tube is found to be ')\n", +"disp(del_p_f)\n", +"disp('Nm^2/m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15: 15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"f=0.005;\n", +"Q=0.07; // m^3/s\n", +"g=9.81; // m/s^2\n", +"\n", +"H_f=integrate('32*f*(Q)^(2)/(%pi)^(2)/g/(0.3-0.0666*L)^(5)', 'L', 0, 3);\n", +"disp('Fractional head loss =')\n", +"disp(H_f)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16: 16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"g=9.81; // m/s^2\n", +"H=4; // m\n", +"f=0.006;\n", +"L=50; // m\n", +"d=0.1; // m\n", +"\n", +"v1=sqrt(2*g*H/(4*f*L/d + 1.3));\n", +"\n", +"t=integrate('4/(v1^2-v^2)', 'v', 0, 0.99*v1);\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: 4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"rho=867; // kg/m^3\n", +"Q=12/3600; // m^3/s\n", +"u=7.5*10^(-4); // Ns/m^2\n", +"L=200; // m\n", +"H=10; // m\n", +"g=9.81; // m/s^2\n", +"\n", +"d=(H*2*g/(4*0.079*(4*rho*Q/%pi/u)^(-1/4)*L*(4*Q/%pi)^2))^(-4/19);\n", +"disp('Internal diameter of the pipeline =')\n", +"disp(d)\n", +"disp('m')\n", +"\n", +"Re=4*rho*Q/%pi/d/u;\n", +"disp('Re =')\n", +"disp(Re)\n", +"disp('The value of Reynolds number lies between 4000 and 10^5, confirming the validity of using the Blasius equation for smooth-walled pipes')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: 5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"m=40/60; // kg/s\n", +"rho=873; // kg/m^3\n", +"d=0.025; // m\n", +"u=8.8*10^-4; // Ns/m^2\n", +"dp=55*10^3; //N/m^2\n", +"L=18; // m\n", +"g=9.81; // m/s^2\n", +"\n", +"v2=4*m/rho/%pi/d^2;\n", +"Re=rho*v2*d/u;\n", +"\n", +"// According to this value of Re, Prandtl's equation is satisfied. \n", +"// 1/sqrt(f)=4*log(Re*sqrt(f))-0.4\n", +"// By trial and error method we get friction factor equal to\n", +"f=0.0055;\n", +"\n", +"H=dp/rho/g + v2^2/2/g + v2^2/2/g*(4*f*L/d+1.5);\n", +"disp('The minimum allowable height =')\n", +"disp(H)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Q=15/3600; // m^3/s\n", +"d=0.05; // m\n", +"Rho=780;\n", +"u=1.7*10^(-3); // Ns/m^2\n", +"f=0.0065;\n", +"L=100; // m\n", +"g=9.8; // m^2/s\n", +"\n", +"v=4*Q/%pi/d^2;\n", +"\n", +"del_pf=2*f*Rho*v^2*L/d;\n", +"disp('The pressure drop due to friction is ')\n", +"disp(del_pf);\n", +"disp('kNm-2')\n", +"\n", +"H_f=4*f*L*v^2/(d*2*g);\n", +"H_exit=v^2/2/g;\n", +"H_entrance=v^2/4/g;\n", +"\n", +"H=H_f+H_exit+H_entrance;\n", +"disp('and the difference in levels is')\n", +"disp(H);\n", +"disp('m');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: 7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"f=0.005; \n", +"L=10; // m\n", +"d=0.025; // m\n", +"g=9.81; // m/s^2\n", +"\n", +"// H_L=4*f*L/d*v^2/2/g+0.5*v^2/2/g\n", +"// H_L=8.5*v^2/2/g\n", +"\n", +"// By Bernoulli equation we get\n", +"// H=2.62+9.5*v2^2/2/g\n", +"\n", +"// Applying the Bernoulli equation between the liquid surface and discharge point \n", +"// H_L=33.5*v2^2/2/g\n", +"\n", +"// Solving above two we get\n", +"v2=1.9; // m/s\n", +"\n", +"Q=%pi*d^2/4*v2;\n", +"disp('Rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')\n", +"\n", +"H=2.62+9.5*v2^2/2/g;\n", +"disp('The minimum allowable height =')\n", +"disp(H)\n", +"disp('m')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"d_A=0.025; // m\n", +"v_A=1.21; // m/s\n", +"d_B=0.05; // m\n", +"v_B=1.71; // m/s\n", +"\n", +"Q_A=%pi*d_A^2*v_A/4;\n", +"disp('The rate of flow through parallel pipes A is ')\n", +"disp(Q_A);\n", +"disp('m^3/s')\n", +"\n", +"Q_B=%pi*d_B^2*v_B/4;\n", +"disp('The rate of flow through parallel pipes B is ')\n", +"disp(Q_B);\n", +"disp('m^3/s')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: 9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d2=0.06; // m\n", +"d1=0.12; // m\n", +"k=0.44;\n", +"f=0.05;\n", +"L1=500; // m\n", +"g=9.81; // m/s^2\n", +"\n", +"// v1=d2^2/d1^2*v2\n", +"\n", +"// H_f=4*f*L1/16/d*v2^2/2/g\n", +"// H_c=k*v2^2/2/g\n", +"// H_f=4*f*L2/d*v2^2/2/g\n", +"// H_exit=v2^2/2/g\n", +"\n", +"v2=sqrt(30*2*g/173.4);\n", +"\n", +"Q=%pi*d2^2/4*v2;\n", +"disp('The rate of flow =')\n", +"disp(Q)\n", +"disp('m^3/s')" + ] + } +], +"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 +} diff --git a/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/9-Pumps.ipynb b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/9-Pumps.ipynb new file mode 100644 index 0000000..1a4440b --- /dev/null +++ b/Fluid_Mechanics_Worked_Examples_For_Engineers_by_C_Schaschke/9-Pumps.ipynb @@ -0,0 +1,399 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Pumps" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: 10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"dz=10; // z2-z1\n", +"g=9.81; // m/s^2\n", +"d=0.05; // m\n", +"f=0.005; \n", +"L=100; // m\n", +"N1=1200; // rpm\n", +"\n", +"// H=z2-z1+16*Q^2/2/g/%pi^2/d^4*(4*f*L/d+1)\n", +"// H=10+5.42*10^5*Q^2\n", +"\n", +"Q=[0.000 0.002 0.004 0.006 0.008 0.010];\n", +"H_p=[40.0 39.5 38.0 35.0 30.0 20.0];\n", +"H_s=[10.0 12.2 18.7 29.5 44.7 64.2];\n", +"\n", +"plot(Q,H_p, 'b')\n", +"plot(Q,H_s, 'r')\n", +"xtitle('', 'Flow', 'Head')\n", +"legend('pump', 'system')\n", +"\n", +"a=[0.0066 0.0066];\n", +"b=[0 33.8];\n", +"plot(a,b, '--')\n", +"e=[0 0.0066];\n", +"f=[33.8 33.8];\n", +"plot(e,f, '--')\n", +"\n", +"i=[0.0049 0.0049];\n", +"h=[0 23];\n", +"plot(i,h, '--')\n", +"l=[0 0.00495];\n", +"m=[23 23];\n", +"plot(l,m, '--')\n", +"\n", +"// From graph\n", +"H1=34; // m\n", +"H2=23; // m\n", +"Q1=0.0066; // m^3/s\n", +"Q2=0.00495; // m^3/s\n", +"\n", +"disp('Duty point =')\n", +"disp(Q1)\n", +"disp('m^3/s')\n", +"\n", +"N2=N1*(H2/H1)^(1/2);\n", +"disp('The speed of the pump to reduce the flow by 25% =')\n", +"disp(N2)\n", +"disp('rpm')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11: 11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Q=0.05; // m^3/s\n", +"v=2; // m/s\n", +"f=0.005;\n", +"L_s=5; // m\n", +"d=0.178; // m\n", +"g=9.81; // m/s^2 \n", +"L_d=20; // m\n", +"p2=1.5*10^5; // N/m^2\n", +"p1=0.5*10^5; // N/m^2\n", +"rho=1000; //kg/m^3\n", +"z2=15; // m\n", +"z1=5; // m\n", +"N1=1500/60; // rps\n", +"\n", +"\n", +"\n", +"\n", +"d=(4*Q/%pi/v)^(1/2);\n", +"H_f_s=4*f*L_s/d*v^2/2/g;\n", +"H_f_d=4*f*L_d/d*v^2/2/g;\n", +"\n", +"H=1/(1-0.25)*((p2-p1)/rho/g + v^2/2/g + z2 - z1 + H_f_s + H_f_d);\n", +"\n", +"// n=rho*g*Q*H/P\n", +"\n", +"Q=[0 5 10 15 20 25];\n", +"H=[9.25 8.81 7.85 6.48 4.81 2.96];\n", +"P=[- 0.96 1.03 1.19 1.26 1.45];\n", +"n=[0 45 75 800 75 50]; \n", +"\n", +"H=27.96; // m\n", +"H1=6.48; // m\n", +"Q1=0.015; // m^3/s\n", +"Q=0.05; // m^3/s\n", +"D1=0.15; // m\n", +"n=0.80;\n", +"\n", +"disp('Differential Head =')\n", +"disp(H)\n", +"disp('m')\n", +"\n", +"N=N1*(H/H1)^(3/4)*(Q1/Q)^(1/2);\n", +"\n", +"D=D1*(Q*N1/Q1/N)^(1/5);\n", +"disp('The impeller diameter =')\n", +"disp(D)\n", +"disp('m')\n", +"\n", +"disp('The rotational speed at maximum efficiency =')\n", +"disp(N)\n", +"disp('rps')\n", +"\n", +"P=rho*g*Q*H/n;\n", +"disp('Power input to the pump =')\n", +"disp(P)\n", +"disp('W')\n", +"\n", +"N_s=N1*Q1^(1/2)/H1^(3/4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12: 12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"N=2000/60; // rps\n", +"Q=50/3600; // m^3/s\n", +"g=9.81; // m/s^2\n", +"H=5; // m\n", +"\n", +"S_n=N*Q^(1/2)/(g*H)^(3/4);\n", +"disp('Suction specific speed =')\n", +"disp(S_n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14: 14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"A=0.01; // m^2\n", +"L=0.3; // m\n", +"N=60/60; // rps\n", +"V_act=10.6/3600; // m^3/s\n", +"rho=1000; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"Q=10.6/3600; // m^3/s\n", +"H=15; // m\n", +"\n", +"V=A*L*N;\n", +"\n", +"Cd=V_act/V;\n", +"disp('Coefficient of discharge =')\n", +"disp(Cd)\n", +"\n", +"P=rho*g*Q*H;\n", +"disp('The power required =')\n", +"disp(P)\n", +"disp('W')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.15: 15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// x=r*(1-cos(wt))\n", +"// v=r*wsin(wt)\n", +"// V=2*A*w*r\n", +"// Q=V/2/%pi\n", +"// Q=A*w*r/%pi\n", +"\n", +"// Q_peak=A*w*r\n", +"\n", +"// Q_peak/Q=%pi\n", +"\n", +"disp('The ratio of peak to average flow =')\n", +"disp(%pi)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: 2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"d=0.1; // m\n", +"v_r=2; // m/s\n", +"f=0.005;\n", +"g=9.81; // m/s^2\n", +"L_s=2; // m\n", +"L_r=10; // m\n", +"Q1=1.1*10^(-2); // m^3/s\n", +"z_t=12; // m\n", +"z_s=5; // m\n", +"L1=20; // m\n", +"\n", +"Q=%pi*d^2/4*v_r;\n", +"H=12-70*Q-4300*Q^2;\n", +"k=2*g*H/v_r^2 - (4*f*(L_s+L_r)/d) - 1;\n", +"disp('The head loss across the restriction orifice =')\n", +"disp(k)\n", +"disp('velocity heads')\n", +"\n", +"// For the case of the valve being fully open\n", +"v_t=4*Q1/%pi/d^2;\n", +"v_r=((2*g*(z_t-z_s) + (4*f*L1/d + 1)*v_t^2)/(4*f*L_r/d + k + 1))^(1/2);\n", +"\n", +"H1=4*f*L_r/d*v_r^2/2/g + 4*f*L_s/d*(v_r^2+v_t^2)/2/g + k*v_r^2/2/g + v_r^2/2/g;\n", +"\n", +"Q=%pi*d^2/4*(v_t+v_r);\n", +"\n", +"H2=12-70*Q-4300*Q^2;\n", +"\n", +"disp('System head =')\n", +"disp(H1)\n", +"disp('m')\n", +"\n", +"disp('Delivered head =')\n", +"disp(H2)\n", +"disp('m')\n", +"\n", +"disp('The delivered head therefore closely matches the system head at the flow rate of 1.1*10^(-2) m^3/s, corresponding to the duty point')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: 6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"NPSH=5; // m\n", +"p_v=18*10^3; // N/m^2\n", +"p_l=0.94*101.3*10^3; // N/m^2 \n", +"rho=970; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"z_s=3; // m\n", +"H_L=0.5; // m\n", +"d=3; // m\n", +"h=2.5; // m\n", +"Q=5; // m^3/h\n", +"\n", +"z1=NPSH+(p_v-p_l)/rho/g + z_s + H_L;\n", +"V=%pi/4*d^2*(h-z1);\n", +"t=V/Q;\n", +"\n", +"disp('Quantity of liquid delivered =')\n", +"disp(V)\n", +"disp('m^3')\n", +"\n", +"disp('Time taken =')\n", +"disp(t)\n", +"disp('h')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: 8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"N_s=0.14; // m^(3/4)s^(-3/2)\n", +"H=30; // m\n", +"p_v=7.38*10^3; // N/m^2\n", +"p_l=50*10^3; // N/m^2\n", +"rho=992; // kg/m^3\n", +"g=9.81; // m/s^2\n", +"H_L=0.2; // m\n", +"\n", +"NPSH=2.8*N_s^(4/3)*H;\n", +"z1=NPSH+(p_v-p_l)/rho/g+H_L;\n", +"disp('The minimum level of the alarm =')\n", +"disp(z1)\n", +"disp('m')" + ] + } +], +"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 +} |