From 476705d693c7122d34f9b049fa79b935405c9b49 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 14 Apr 2020 10:19:27 +0530 Subject: Initial commit --- .../1-Basic_Concepts.ipynb | 212 +++++ .../10-The_Boundary_Layer.ipynb | 159 ++++ .../11-Forces_on_Immersed_Bodies.ipynb | 215 +++++ .../2-Fluid_Statics.ipynb | 607 +++++++++++++++ .../3-Conservation_Principle_of_Mass.ipynb | 87 +++ .../4-Conservation_Principle_of_Momentum.ipynb | 271 +++++++ .../5-Conservation_Principle_of_Energy.ipynb | 867 +++++++++++++++++++++ .../6-Dimensional_Analysis_and_Similitude.ipynb | 185 +++++ .../7-In_compressible_Flow_through_Conduits_.ipynb | 813 +++++++++++++++++++ .../8-Uniform_Open_Channel_Flow.ipynb | 404 ++++++++++ .../9-Potential_Flow.ipynb | 122 +++ 11 files changed, 3942 insertions(+) create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/1-Basic_Concepts.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/10-The_Boundary_Layer.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/11-Forces_on_Immersed_Bodies.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/2-Fluid_Statics.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/3-Conservation_Principle_of_Mass.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/4-Conservation_Principle_of_Momentum.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/5-Conservation_Principle_of_Energy.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/6-Dimensional_Analysis_and_Similitude.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/7-In_compressible_Flow_through_Conduits_.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/8-Uniform_Open_Channel_Flow.ipynb create mode 100644 Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/9-Potential_Flow.ipynb (limited to 'Principles_Of_Fluid_Mechanics_by_M_K_Natarajan') diff --git a/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/1-Basic_Concepts.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/1-Basic_Concepts.ipynb new file mode 100644 index 0000000..a2adc8b --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/1-Basic_Concepts.ipynb @@ -0,0 +1,212 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Basic Concepts" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"weight = 9800 //Kg\n", +"g=9.81 //m/s^2\n", +"a=2 //m/s^2\n", +"//calculations\n", +"m=weight/g\n", +"Wm=m*a\n", +"//results\n", +"printf('Density on earth =%.2f Kg/m^3',m)\n", +"printf('\n Weight on moon = %.2f N',Wm)\n", +"printf('\n Density on moon remains unchanged and is equal to %.2f Kg/m^3',m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"w=150 //N\n", +"theta=30 //degrees\n", +"l=0.8 //m\n", +"b=0.8 //m\n", +"dy=0.12 //cm\n", +"v=20 //cm/s\n", +"//calculations\n", +"Tau=w*sind(theta) /(l*b)\n", +"rd=v/dy\n", +"vis=Tau/rd\n", +"//results\n", +"printf('Viscosity of the fluid = %.2f N s/m^2',vis)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"clear\n", +"//Initialization of variables\n", +"vis=2.5/10 //N s/m^2\n", +"D=15 //cm\n", +"N=180\n", +"dy=0.0001 //m\n", +"l=0.15 //m\n", +"b=0.25 //m\n", +"r=0.152 //m\n", +"//calculations\n", +"dv=%pi *D*N/60/100\n", +"Tau=vis*dv/dy\n", +"Tor=Tau*%pi*l*b*r/2\n", +"P=Tor*2*%pi*N/60\n", +"//results\n", +"printf('Power required = %d W',P)\n", +"disp('The answer is a bit different due to rounding off error in textbook.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"w=1 //rad/s\n", +"T=0.4 //N/m^2\n", +"//calculations\n", +"mu=T/tan(w)\n", +"//results\n", +"printf('Viscosity = %.2f N s/m^2',mu)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"d=0.05*10^-3 //m\n", +"T=72*10^-3 //N/m\n", +"P=101 //kN/m^2\n", +"//calculations\n", +"Pi=P*1000 + 2*T/(d/2)\n", +"//results\n", +"printf('Pressure = %.2f kN/m^2',Pi/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"gam=981 //dyn/cm^2\n", +"sigma=72 //dyn/cm\n", +"theta=0 //degrees\n", +"d=0.5 //cm\n", +"depth=90 //cm\n", +"//calculations\n", +"h=4*sigma*cosd(theta) /(gam*d)\n", +"Td=depth-h\n", +"//results\n", +"printf('True depth = %.3f cm',Td)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/10-The_Boundary_Layer.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/10-The_Boundary_Layer.ipynb new file mode 100644 index 0000000..1dfb561 --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/10-The_Boundary_Layer.ipynb @@ -0,0 +1,159 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: The Boundary Layer" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"v=30 //m/s\n", +"nu=1.5e-5 //m^2/s\n", +"//calculations\n", +"Re=5*10^5\n", +"xc= Re*nu/v\n", +"//results\n", +"printf('Transistion region = %.2f m',xc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"u=2 //m/s\n", +"x=0.15 //m\n", +"nu=1.5e-5 //m^2/s\n", +"B=0.5 //m\n", +"rho=1.22 //kg/m^3\n", +"//calcualtions\n", +"Rx=u*x/nu\n", +"delta= 4.91*x/sqrt(Rx)\n", +"deltas=1.729*x/sqrt(Rx)\n", +"Cf=1.328/sqrt(Rx)\n", +"Ff=Cf*0.5*rho*u^2 *2*B*x\n", +"//results\n", +"printf('Boundary layer thickness = %.2f cm',delta*100)\n", +"printf('\n Displacement thickness = %.2f cm',deltas*100)\n", +"printf('\n Average drag coeffcient = %.4f',Cf)\n", +"printf('\n Drag force = %.4f N',Ff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"U=172*1000/3600 //m/s\n", +"w=3 //m\n", +"h=3 //m\n", +"L=100 //m\n", +"nu=1.5e-5 //m^2/s\n", +"rho=1.22 //kg/m^3\n", +"//calculations\n", +"Rl=U*L/nu\n", +"Cf=0.074 /(Rl^(1/5))\n", +"Ff=Cf*0.5*rho*U^2 *w*h*L\n", +"power= Ff*U\n", +"//results\n", +"printf('power required = %.1f kW',power/1000)\n", +"//The answer is a bit different due to rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"U=4000 //m/s\n", +"L=8 //m\n", +"nu=3600e-6 //m^2/s\n", +"rho=1000 //kg/m^3\n", +"b=5 //m\n", +"//calculations\n", +"Rl=U*L/nu\n", +"Cf= 0.074/Rl^(1/5) -1700/Rl\n", +"Ff=Cf*0.5*rho*(U/3600)^2 *L*b\n", +"//results\n", +"printf('Skin friction drag = %.2f N',Ff)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/11-Forces_on_Immersed_Bodies.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/11-Forces_on_Immersed_Bodies.ipynb new file mode 100644 index 0000000..bb3e72c --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/11-Forces_on_Immersed_Bodies.ipynb @@ -0,0 +1,215 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Forces on Immersed Bodies" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d=1.2 //m\n", +"w=1 //m\n", +"U=60*1000/3600 //m/s\n", +"nu=1.5e-5 //m^2/s\n", +"Cd=0.4\n", +"rho=1.22 //kg/m^3\n", +"//calculations\n", +"Rn=U*d/nu\n", +"A=d*w\n", +"Fd= Cd*0.5*rho*U^2 *A\n", +"M= 0.5*Fd\n", +"//results\n", +"printf('Bending moment = %.2f h^2 N m',M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d=0.006 //m\n", +"U=0.01 //m/s\n", +"gaml=8000 //N/m^3\n", +"gams=7.9*10^3 *9.81\n", +"mu=13.9 \n", +"//calculations\n", +"mu= d^2 /18 *(gams - gaml)/U\n", +"RN= U*d*(gaml/9.81) /mu\n", +"//results\n", +"printf('Viscosity of oil = %.1f Ns /m^2',mu)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clc\n", +"//Initialization of variables\n", +"s=2.7\n", +"gamw=9810 //N/m^3\n", +"mu=0.001 //Ns/m^2\n", +"d=0.15*10^-3 //m\n", +"rho=1000 //kg/m^3\n", +"//calculations\n", +"gams=s*gamw\n", +"U= d^2 *(gams-gamw)/(18*mu)\n", +"RN= U*d*rho/mu\n", +"Cd = (1+ 3/16 *RN)^0.5 *(24/RN)\n", +"U22 = 4/3 *d*(gams-gamw) /(Cd*rho)\n", +"U2=sqrt(U22)\n", +"//results\n", +"printf('Settling velocity of sand in case 1 = %.2f m/s',U)\n", +"printf('\n Settling velocity of sand in case 2 = %.4f m/s',U2)\n", +"//The answer is a bit different due to rounding off error." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"A=2 //m^2\n", +"U=100*1000/3600 //m/s\n", +"Cd=0.32\n", +"rho=1.24\n", +"//calculations\n", +"Fd= Cd*0.5*rho*U^2 *A\n", +"P= Fd*U\n", +"//results\n", +"printf('Power required = %.1f kW',P/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"ratio=0.15\n", +"//calculations\n", +"VU= (1/(1-ratio))^(1/3)\n", +"percent= (VU-1)*100\n", +"//results\n", +"printf('percent increase in speed = %.1f ',percent)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"U=50*1000/3600 //m/s\n", +"cd1=0.34\n", +"cd2=1.33\n", +"//calculations\n", +"disp('On solving for both convex and concave surfaces,')\n", +"w=18.26 //m/s\n", +"N=w/(2*%pi) *60\n", +"//results\n", +"printf('rotational speed = %.1f rpm',N)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/2-Fluid_Statics.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/2-Fluid_Statics.ipynb new file mode 100644 index 0000000..5652a1f --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/2-Fluid_Statics.ipynb @@ -0,0 +1,607 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Fluid Statics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: Example_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"r=0.75 //m\n", +"gam=8 //kN/m^3\n", +"//calculations\n", +"hp=3*%pi*r/16\n", +"P=gam*2/3 *r^3\n", +"//results\n", +"printf('Total pressure location = %.3f m',hp)\n", +"printf('\n Total pressure = %.2f kN',P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: Example_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"l=3 //m\n", +"b=2 //m\n", +"h1=0.75 //m\n", +"h2=1 //m\n", +"sg=0.9\n", +"//calculations\n", +"IP=sg*9.81*h2\n", +"F1=0.5*IP*h2\n", +"F2=IP*h1\n", +"F3=0.5*(9.81*h1)*h1\n", +"F=l*(F1+F2+F3)\n", +"ybar= (F1*(h1+ 1/3) + F2* h1/2 + F3* h1/3)/(F1+F2+F3)\n", +"//results\n", +"printf('Total force = %.2f kN',F)\n", +"printf('\n Location = %.3f m from the base',ybar)\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: Example_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=1000*9.81 //kg/m^3\n", +"hc=20 //m\n", +"Ax=40*1 //m^2\n", +"y1=0 //m\n", +"y2=40 //m\n", +"//calculations\n", +"Fx=g*hc*Ax\n", +"function[f] =fy(y)\n", +" f=(12*y)^(1/3)\n", +"endfunction\n", +"Fy=intg(y1,y2,fy)\n", +"Fy=g*Fy(1)\n", +"F=sqrt(Fx^2 +Fy^2)\n", +"//results\n", +"printf('Net force = %d kN',F/1000)\n", +"//The answer is a bit different due to rounding off error in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: Example_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //kN/m^2\n", +"hc=1 //m\n", +"l=3 //m\n", +"b=0.5 //m\n", +"//calculations\n", +"Ax=l*b //m^2\n", +"Fx=g*hc*Ax\n", +"Fz=g*(0.5* %pi/4 *b^2)*l\n", +"F=sqrt(Fx^2 + Fz^2)\n", +"theta=atand(Fz/Fx)\n", +"//results\n", +"printf('Magintude of resultant force = %.2f kN',F)\n", +"printf('\n Directionn of the resultant force = %.1f deg',theta)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: Example_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"r1=920 //kg/m^3\n", +"r2=1030 //kg/m^3\n", +"//calculations\n", +"VtbyV2=r2/r1\n", +"V1byV2=VtbyV2-1\n", +"V1byVt=1/(1+1/V1byV2)\n", +"//results\n", +"printf('fraction = %.3f ',V1byVt)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15: Example_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d=3 //m\n", +"rh1=1.19 //kg/m^3\n", +"rh2=0.17 //kg/m^3 \n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"pay=(rh1-rh2)*g*%pi/6 *d^3\n", +"//results\n", +"printf(' Pay load = %.2f N',pay)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16: Example_16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"x=poly(0,'x')\n", +"//calculations\n", +"y=6*x^2 -6*x+1\n", +"z=roots(y)\n", +"//results\n", +"printf('For stability, s must be greater than %.2f and less than %.2f and must be less than 1',z(1),z(2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17: Example_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"ax=1.5 //m/s^2\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"alpha=atand(ax/g)\n", +"//results\n", +"printf('The interface is inclined at %.2f degrees with the horizontal',alpha)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18: Example_18.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d=10 //cm\n", +"h=25 //cm\n", +"hw=15 //cm\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"z=d^2 *d*2/d^2\n", +"w=sqrt(z*2*g/(d/2)^2 *100)\n", +"N=w/(2*%pi) *60\n", +"//results\n", +"printf('Speed of rotation = %d rpm',N)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19: Example_19.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"dia=1 //m\n", +"h=3 //m\n", +"rho=1000 //kg/m^3\n", +"N=80 //rpm\n", +"g=9.81 //m/s^2\n", +"//calculation\n", +"w=2*%pi*N/60\n", +"function y = fun(r)\n", +" y=0.5*rho*w^2 *r^3 *2*%pi\n", +"endfunction\n", +"vec=intg(0,dia/2,fun)\n", +"Pt=vec(1) + %pi/4 *dia^2 *(h-dia)*rho*g\n", +"//results\n", +"printf('Total pressure on base = %.2f kN',Pt/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"h1=1.5 //m\n", +"h2=2 //m\n", +"g1=800 //kg/m^3\n", +"g2=1000 //kg/m^3\n", +"g=9.81\n", +"//calculations\n", +"P=h1*g*g1 + h2*g*g2\n", +"//results\n", +"printf('Pressure at the bottom of the vessel = %.2f kN/m^2',P/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"depth=8000 //m\n", +"sw=10.06 //kN/m^3\n", +"BM=2.05*10^9 //N/m^2\n", +"//calculations\n", +"g=sw*10^3 /(1- sw*10^3 *depth/BM)\n", +"Ph=2.3*BM*log10(BM/(BM-depth*9.81*1025))\n", +"//results\n", +"printf('Specific weight = %.2f kN/m^2',g/1000)\n", +"printf('\n Pressure at depth h = %.2f MN/m^2',Ph/10^6)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"Patm=101.3/9.81 //m of water\n", +"x1=0.45 //m\n", +"x2=0.3 //m\n", +"s1=920 //Kg/m^3\n", +"s2=13600 //Kg/m^3\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"Pa=s1*x1*g + s2*x2*g\n", +"Pa2=Pa/(1000*g)\n", +"Pa3=Pa/(s2)\n", +"//results\n", +"printf('Pressure at A = %.1f kPa',Pa/1000)\n", +"printf('\n Pressure at A = %.3f m of water',Pa2)\n", +"printf('\n Pressure at A = %.3f m of mercury',Pa3)\n", +"printf('\n Pressure at A = %.3f m of water absolute',Pa/1000 +101.3)\n", +"printf('\n Pressure at A = %.3f m of mercury',Pa2+10.3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"sg=1.25\n", +"d=0.5 //m\n", +"d2=13.5*10^-2 //m\n", +"sw=9.81 //kN/m^2\n", +"//calculations\n", +"sl=sg*sw\n", +"sm=13.6*sw\n", +"Pa=sl*d - sm*d2\n", +"//results\n", +"printf('Pressure at A = %.2f kN/m^2 vacuum ',Pa)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"s1=0.85\n", +"s2=13.6\n", +"z1=30\n", +"z2=15\n", +"z3=20\n", +"z4=35\n", +"z5=60\n", +"//calculations\n", +"dHa=s1*(z1+z5+z3-z4) +s2*z4 -z3+s2*z2-s1*(z1+z2)\n", +"Pd=1000*9.81*dHa/100\n", +"//results\n", +"printf('Pressure difference = %.2f kN/m^2',Pd/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"P=450 //kN/m^2\n", +"alt=2000 //m\n", +"r=610 //mm of mercury\n", +"//calculations\n", +"Pat=760-r\n", +"Pat2=Pat*13.6*9.81*10^-3\n", +"Pg=Pat2+P\n", +"//results\n", +"printf('Gauge reading = %.2f kN/m^2',Pg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"g=9.81 //kN/m^2\n", +"hc=16.25 //m\n", +"l=1.5 //m\n", +"b=2.5 //m\n", +"f=0.3\n", +"Pi=50 //kN\n", +"//calculations\n", +"P=g*hc*l*b\n", +"Preq=Pi+f*P\n", +"//results\n", +"printf('Force required to lift the gate = %.2f kN',Preq)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: Example_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"a=6 //m\n", +"b=8 //m\n", +"//calculations\n", +"Ixy=9/32 *b^4 /4\n", +"xp= Ixy/(2/3 *b *1/2 *a*b)\n", +"ICG=1/36 *a*b^3\n", +"yp=2/3*b + ICG/(2/3 *b* 1/2 *a*b )\n", +"//results\n", +"printf('The coordinates of centre of pressure are (%.2f ,%d)',xp,yp)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: Example_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"//Initialization of variables\n", +"z=1.2 //m\n", +"y=1 //m\n", +"//calculations\n", +"hp=0.6 + 1/12 *y*z^3 /(0.6*y*z)\n", +"//results\n", +"printf('Position of hinge = %.1f m',hp)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/3-Conservation_Principle_of_Mass.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/3-Conservation_Principle_of_Mass.ipynb new file mode 100644 index 0000000..01db7b0 --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/3-Conservation_Principle_of_Mass.ipynb @@ -0,0 +1,87 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Conservation Principle of Mass" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d1=60 //cm\n", +"V1=45 //cm/s\n", +"d2=90 //cm\n", +"//calculations\n", +"V2=V1*d1^2 /d2^2\n", +"Q=%pi/4 *d1^2 *V1 *10^-6\n", +"//results\n", +"printf('Velocity at point 2 = %d cm/s',V2)\n", +"printf('\n FLow rate = %.4f m^3/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"dn1=4 //cm\n", +"v1=300 //cm/s\n", +"dn2=2.5 //cm\n", +"//calculations\n", +"v2=v1*dn1/dn2\n", +"//results\n", +"printf('Velocity = %.1f m/s',v2/100)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/4-Conservation_Principle_of_Momentum.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/4-Conservation_Principle_of_Momentum.ipynb new file mode 100644 index 0000000..d6e8932 --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/4-Conservation_Principle_of_Momentum.ipynb @@ -0,0 +1,271 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Conservation Principle of Momentum" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q=0.2 //m^3/s\n", +"v=30 //m/s\n", +"angle=120 //degrees\n", +"rho=1000 //kg/m^3\n", +"//calculations\n", +"Rx=rho*Q*(v-v*cosd(angle))\n", +"Ry=rho*Q*v*sind(angle)\n", +"R=sqrt(Rx^2 +Ry^2)\n", +"//results\n", +"printf('Resultant force = %.2f kN',R/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"angle =45 //degrees\n", +"p1=150*10^3 //N/m^2\n", +"Q=0.5 //m^3/s\n", +"d1=60 //cm\n", +"d2=30 //cm\n", +"rho=1000 //kg/m^3\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"V1=Q/(%pi/4 *(d1/100)^2)\n", +"V2=V1*(d1/d2)^2\n", +"P2=rho*g*(p1/(rho*g) + V1^2 /(2*g) -V2^2 /(2*g))\n", +"Rx=p1*%pi/4*(d1/100)^2 - P2*%pi/4 *(d2/100)^2 *cosd(angle) -rho*Q*(V2*cosd(angle) -V1)\n", +"Ry=P2*%pi/4 *(d2/100)^2 *sind(angle) + rho*Q*(V2*sind(angle))\n", +"R=sqrt(Rx^2 + Ry^2)\n", +"//results\n", +"printf('resultant force = %.2f kN',R/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q=20*10^3 //cc/s\n", +"depth=4 //m\n", +"d=5 //cm\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"//calculations\n", +"V1= Q/(%pi/4 *d^2) /100\n", +"V2= sqrt(2*g*(V1^2/(2*g) + depth))\n", +"W=rho*Q*(V2-V1)/10^6\n", +"//results\n", +"printf('weight of water = %d N',W)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"V=50 //m/s\n", +"u=20 //m/s\n", +"A=6/10^4 //m^2\n", +"angle=180 //degrees\n", +"//calculations\n", +"Vr=V-u\n", +"rq=rho*A*Vr\n", +"Rx=-rq*(Vr*cosd(angle) - Vr)\n", +"Rx2=-rho*A*V*(Vr*cosd(angle) -Vr)\n", +"power=Rx2*u\n", +"//results\n", +"printf('Force exetred on fluid = %d N',Rx)\n", +"printf('\n Force transferred in case 2 = %d N',Rx2)\n", +"printf('\n Power transferred in case 2 = %d kW',power/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Vr=10 //m/s\n", +"u=8.5 //m/s\n", +"A=250/10^4 //m^2\n", +"//calculations\n", +"V=Vr-u\n", +"Q=A*Vr\n", +"R=rho*Q*V\n", +"P=R*u\n", +"eth=1/(1+ V/(2*u))\n", +"//results\n", +"printf('Power required = %.3f kW',P/1000)\n", +"printf('\n Efficiency of jet propulsion = %.2f percent',eth*100)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"v1=20 //m/s\n", +"v2=5 //m/s\n", +"r1=50/100 //cm\n", +"r2=30/100 //cm\n", +"a1=20 //degrees\n", +"a2=80 //degrees\n", +"N=300 //rpm\n", +"Q=5 //m^3/s\n", +"//calculations\n", +"u1=%pi*2*r1*N/60\n", +"u2=%pi*2*r2*N/60\n", +"T=rho*Q*(r1*v1*cosd(a1) - r2*v2*cosd(a2))\n", +"H=1/g *(u1*v1*cosd(a1) - u2*v2*cosd(a2))\n", +"power=rho*g*Q*H\n", +"//results\n", +"printf('torque = %d N m',T)\n", +"printf('\n Heat = %.1f m',H)\n", +"printf('\n Power = %d kW',power/10^3)\n", +"//The answers given in textbook are a bit different due to rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d1=0.05 //m\n", +"d2=0.3 //m\n", +"N=1800 //rpm\n", +"Q=0.425/60 //m^3/s\n", +"//calculations\n", +"u1=%pi*d1*N/60\n", +"u2=%pi*d2*N/60\n", +"T=rho*Q*(d2*u2 - d1*u1)/2\n", +"//results\n", +"printf('Torque supplied = %.1f Nm',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 +} diff --git a/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/5-Conservation_Principle_of_Energy.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/5-Conservation_Principle_of_Energy.ipynb new file mode 100644 index 0000000..084f043 --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/5-Conservation_Principle_of_Energy.ipynb @@ -0,0 +1,867 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Conservation Principle of Energy" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: Example_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=860 //kg/m^3\n", +"P1=20 *10^3 //Pa\n", +"P2=50*10^3 //Pa\n", +"z=2.8 //m\n", +"d1=0.1 //m\n", +"//calculations\n", +"V1=sqrt(2*g*(P2/(rho*g) -z - P1/(rho*g)))\n", +"Q=%pi/4 *d1^2 *V1\n", +"//results\n", +"printf('rate of flow = %.4f m^3/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: Example_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Cv=0.92\n", +"P=210*10^3 //Pa\n", +"d=0.05 //m\n", +"ret=1.5 //m/s^2\n", +"//calculations\n", +"H=P/(g*rho)\n", +"Va=Cv*(2*g*H)\n", +"h=Cv^2 *H\n", +"h2= Cv^2 *2*g*H/(2*(g+ret))\n", +"//results\n", +"printf('The height to which the jet will rise is %.2f m',h)\n", +"printf('\n In case 2., height = %.2f m',h2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: Example_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"h=4 //m\n", +"d=0.03 //m\n", +"Qa=3.8/1000 //m^3/s\n", +"x=2.5 //m\n", +"y=0.41 //m\n", +"//calculations\n", +"Qth = %pi/4 *d^2 *sqrt(2*g*h)\n", +"Cd=Qa/Qth\n", +"Cv=sqrt(x^2 /(4*y*h))\n", +"Cc=Cd/Cv\n", +"//results\n", +"printf('Cd = %.2f',Cd)\n", +"printf('\n Cv = %.3f',Cv)\n", +"printf('\n Cc= %.2f',Cc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: Example_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"rho2=13.6*10^3 //kg/m^3\n", +"d1=3.2 //m\n", +"d2=0.6 //m\n", +"//calculations\n", +"z1=d1*rho/rho2\n", +"head= d2+z1\n", +"V=sqrt(2*g*head)\n", +"//results\n", +"printf('Efflux velocity = %.2f m/s',V)\n", +"//The answer is a bit different due to rounding off error." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: Example_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Cd=0.6\n", +"d=0.04 //m\n", +"h2=2.5 //m\n", +"//calculations\n", +"function y=fun(h)\n", +" y=1/(Cd*%pi/4 *d^2 *sqrt(2*g)) *(4/sqrt(h) + sqrt(64-h^2))\n", +"endfunction\n", +"t=intg(0,h2,fun)\n", +"tmin=31.1\n", +"//results\n", +"printf('Time required = %.1f min',tmin)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: Example_16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=981 //cm/s^2\n", +"Cd=0.6\n", +"Q=1200\n", +"d=3 //cm\n", +"l=30 //cm\n", +"b=30 //cm\n", +"dh=5 //cm\n", +"h1=9 //cm\n", +"//calculations\n", +"function y =fun1(h)\n", +" y= l*b/(Q - Cd*%pi/4 *d^2 *sqrt(2*g*h))\n", +"endfunction\n", +"t=intg(h1,h1+dh,fun1)\n", +"t=126\n", +"//results\n", +"printf('Time required = %d sec',t)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: Example_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"pst=25.2*10^3 //Pa\n", +"h=2.5 //m\n", +"//calculations\n", +"v=sqrt(2/rho *(pst - g*rho*h))\n", +"//results\n", +"printf('velocity = %.2f m/s',v)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: Example_18.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"vel=800*10^3 /3600\n", +"sm=13.57\n", +"sl2=12.2\n", +"//calculations\n", +"sl=sl2/(g*rho)\n", +"y=vel^2 /(2*g*(sm/sl -1))\n", +"//results\n", +"printf('length of manometer = %d cm',y*100)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: Example_19.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"h=3.5 //m\n", +"//calculations\n", +"v=sqrt(2*g*h)\n", +"//results\n", +"printf('Speed necessary = %.1f m/s',v)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"z2=0 //m\n", +"z1=8 //m\n", +"V2=5 //m/s\n", +"V1=3 //m/s\n", +"//calculations\n", +"Hs=(z2-z1) + (V2^2 -V1^2)/(2*g)\n", +"//results\n", +"printf('Work done by fluid = %.3f J/N',Hs)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20: Example_20.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"sm=13.6 \n", +"s=1\n", +"Q=1 //m^3/s\n", +"d2=0.25 //m\n", +"d1=0.5 //m\n", +"nu=1e-6\n", +"//calculations\n", +"RN=Q*d1/(%pi/4 *d1^2 *nu)\n", +"Cv=0.98\n", +"yd= Q^2 *(1-d2^4 /d1^4)/(Cv^2 *%pi/4 *d2^2 *2*g)\n", +"y=yd/(sm/s -1)\n", +"//results\n", +"printf('Mercury manometer reading = %.2f cm',y*100)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21: Example_21.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"sm=13.6\n", +"s=1\n", +"y=0.12 //m\n", +"Cv=0.984\n", +"d1=0.05 //m\n", +"d2=0.1 //m\n", +"nu=1e-6\n", +"//calculations\n", +"Q=Cv*%pi/4 *d1^2 *sqrt(2*g) /sqrt(1- (d1/d2)^4) *sqrt(y*(sm/s -1))\n", +"V1=Q/(%pi/4 *d2^2)\n", +"R=V1*d1/nu\n", +"//results\n", +"printf('Since, reynolds number is in required value, Flow rate = %.4f m^3/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.22: Example_22.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"P1=150*10^3 //Pa\n", +"d0=3 //cm\n", +"d1=6 //cm\n", +"Cv=0.98\n", +"Cc=0.62\n", +"//calculations\n", +"P1g=P1/(g*rho)\n", +"Ar= (d0/d1)^4\n", +"A0=%pi/4 *(d0/100)^2\n", +"Q= Cv*Cc*A0 *sqrt(2*g) /sqrt(1- Cc^2 *Ar) *sqrt(P1g)\n", +"//results\n", +"printf('Discharge = %.2f lps',Q*10^3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23: Example_23.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Cd=0.6\n", +"L=3 //m\n", +"H=0.4 //m\n", +"V0=[0 0.24 0.275]\n", +"//calculations\n", +"Q= Cd*2/3 *sqrt(2*g) *(L-0.2*H) *((H+ V0.^2 ./(2*g) ).^(3/2) - (V0.^2 ./ (2*g)).^(3/2))\n", +"//results\n", +"H=max(Q)\n", +"printf('Flow rate = %.3f m^3/s',H)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24: Example_24.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d=0.5 //m\n", +"vel=1 //m/s\n", +"depth=1.2 //m\n", +"Cd=0.62\n", +"//calculations\n", +"H=(d*3/(2*Cd))^(2/3)\n", +"hw=depth-H\n", +"//results\n", +"printf('height of weir plate = %.2f m',hw)\n", +"//The answer given in textbook is wrong please use a caclculator." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25: Example_25.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Q=0.1*100^2 /(24*3600) //m^3/s\n", +"Cd=0.61\n", +"theta=60 //degrees\n", +"Hd=Q/(Cd*8/15 *sqrt(2*g) *tand(theta/2))\n", +"H=Hd^(2/5)\n", +"//results\n", +"printf('apex of weir must be set %.1f cm below the free surface',H*100)\n", +"//The answer in the textbook is wrong. Please verify it" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26: Example_26.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q1=0.93\n", +"Q2=0.4\n", +"H1=0.7\n", +"H2=0.5\n", +"//calculations\n", +"n=log(Q1/Q2) /log(H1/H2)\n", +"//results\n", +"printf('Shape n = %.1f . hence shape of weir is triangular',n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27: Example_27.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=981 //cm/s^2\n", +"H=20 //cm\n", +"err=3/100\n", +"//calculations\n", +"dH=err/2.5 *H\n", +"v0=sqrt(2*g*dH)\n", +"//results\n", +"printf('Required velocity = %.2f cm/s',v0)\n", +"//The answer is a bit different due to rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28: Example_28.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Q=12000\n", +"f=30\n", +"t1=0.5\n", +"t2=1.2\n", +"//calculations\n", +"function y= fun2(h)\n", +" y=Q/f *(1/h^(3/2))\n", +"endfunction\n", +"t=intg(t1,t2,fun2)\n", +"//results\n", +"printf('Time = %d sec',t)\n", +"//The answer is a bit different due to rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"P1=80*10^3 //N/m^2\n", +"P2=12*10^6 + 101300 //N/m^2\n", +"Hq=-400 //J/N\n", +"//calculations\n", +"g1=g*rho\n", +"Hs= -Hq+ (P2-P1)/(g1)\n", +"//results\n", +"printf('Energy added by pump = %d J/N',Hs)\n", +"disp('The answer given in textbook is wrong. Please verify using a calculator')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d1=15 //cm\n", +"d2=10 //cm\n", +"V1=2.4 //m/s\n", +"P1=450*10^3 //N/m^2\n", +"rho2=900 //kg/m^3\n", +"//calculations\n", +"V2=d1^2 /d2^2 *V1\n", +"P2=g*rho2*(P1/(rho2*g) + V1^2 /(2*g) - V2^2 /(2*g))\n", +"Q=%pi/4*(d2/100)^2 *V2\n", +"//results\n", +"printf('Pressure at 2 = %.2f kN/m^2',P2/1000)\n", +"printf('\n Flow rate = %.4f m^3/s',Q)\n", +"//The answer given in textbook is wrong. Please verify it." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"z=10 //m\n", +"//calculations\n", +"PE=g*rho*%pi*z^2 /2\n", +"//results\n", +"printf('Work obtained = %.2e J',PE)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d1=7.5 //cm\n", +"d2=3 //cm\n", +"P1=300+101.3 //kPa\n", +"P2=25 //kPa\n", +"//calculations\n", +"V1=sqrt(2*g/ ((d1/d2)^4 -1) *(P1*10^3 /(rho*g) -P2*10^3 /(rho*g)))\n", +"Q=%pi/4 *(d1/100)^2 *V1\n", +"//results\n", +"printf('Max discharge = %.4f m^3/s',Q)\n", +"//The answer given in textbook is wrong. Please use a calculator to verify" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"z1=1.2 //m\n", +"z2=4 //m\n", +"d=5 //cm\n", +"//calculations\n", +"Va=sqrt(2*g*(z2-z1))\n", +"Q=%pi/4 *(d/100)^2 *Va\n", +"Pc= - z2*rho*g\n", +"P=25*10^3 //Pa\n", +"Zab=(101325 - P)/rho/g\n", +"//results\n", +"printf('rate of discharge = %.4f m^3/s',Q)\n", +"printf('\n Pressure at C = %.2f kPa',Pc/1000)\n", +"printf('\n Max. permissible length = %.2f m',Zab)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Q=0.09 //m^3/s\n", +"d1=0.12 //m\n", +"d2=0.2 //m\n", +"P1=80 //kN/m^2\n", +"P2=120 //kN/m^2\n", +"//calculations\n", +"V1=Q/(%pi/4 *d1^2)\n", +"TE1 = P1*10^3 /(rho*g) + V1^2 /(2*g)\n", +"V2= d1^2 /d2^2 *V1\n", +"TE2= P2*10^3 /(rho*g) + V2^2 /(2*g)\n", +"//results\n", +"if TE1>TE2 then\n", +" printf('Flow is from section 1 to section 2')\n", +"else\n", +" printf('Flow is from section 2 to section 1')\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: Example_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Q=0.012 //m^3/s\n", +"z=10 //m\n", +"d=0.075 //m\n", +"//calculations\n", +"Vb=Q/(%pi/4 *d^2)\n", +"Hm=z+ Vb^2 /(2*g)\n", +"P=Hm*rho*g*Q\n", +"//results\n", +"printf('Power required = %.3f kW',P/1000)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/6-Dimensional_Analysis_and_Similitude.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/6-Dimensional_Analysis_and_Similitude.ipynb new file mode 100644 index 0000000..5bf386f --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/6-Dimensional_Analysis_and_Similitude.ipynb @@ -0,0 +1,185 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Dimensional Analysis and Similitude" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Example_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"dw=1000 //kg/m^3\n", +"muw=0.001 //N s /m^2\n", +"da=1.225 //kg/m^3\n", +"mua=18*10^-6 //N s /m^2\n", +"lr=1/10\n", +"//calculations\n", +"dr=da/dw\n", +"mur=mua/muw\n", +"vr=mur/dr\n", +"velocity= vr/lr\n", +"discharge =lr*vr\n", +"pressure = mur^2 /(dr*lr^2)\n", +"force = mur^2 /dr\n", +"//results\n", +"printf('Scale ratio for velocity = %d ',velocity)\n", +"printf('\nScale ratio for discharge = %.2f ',discharge)\n", +"printf('\nScale ratio for pressure = %.1f ',pressure)\n", +"printf('\nScale ratio for force = %.3f ',force)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: Example_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"dr=1000\n", +"mur=100\n", +"lr=1/10\n", +"dpm=60\n", +"//calculations\n", +"Vr=mur/dr/lr\n", +"dpr=dr*Vr^2\n", +"dpp=dpm/dpr\n", +"//results\n", +"printf('Pressure drop in prototype = %d N/m^2',dpp*10^3)" + ] + } +, +{ + "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", +"lr=1/25\n", +"Tp=6 //sec\n", +"dr=1/1.025\n", +"Fm=70 //N\n", +"//calculations\n", +"Tr=lr^(0.5)\n", +"Tm=Tr*Tp\n", +"Fr=dr*lr^3\n", +"Fp=Fm/Fr\n", +"//results\n", +"printf('Wave period = %.1f sec',Tm)\n", +"printf('Force = %.3f kN',Fp/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: Example_16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"lr=1/10\n", +"Vp=10 //knots\n", +"Fm=12 //N\n", +"//calculations\n", +"Vm=Vp*sqrt(lr)\n", +"Fp=Fm/lr^3\n", +"//results\n", +"printf('force = %.1f kN',Fp/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: Example_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"lr=1/7200\n", +"//calculations\n", +"Tr=60/(12*3600)\n", +"yr=(lr/Tr)^2\n", +"//results\n", +"printf('vertical scale to be adopted is 1 in %d',1/yr)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/7-In_compressible_Flow_through_Conduits_.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/7-In_compressible_Flow_through_Conduits_.ipynb new file mode 100644 index 0000000..51f0ad5 --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/7-In_compressible_Flow_through_Conduits_.ipynb @@ -0,0 +1,813 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: In compressible Flow through Conduits " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: Example_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"l=1 //m\n", +"b=0.3 //m\n", +"Q=4.2 //m^3/s\n", +"//calculations\n", +"A=l*b\n", +"R=A/(2*(l+b))\n", +"d5=1.62/24.15\n", +"d=d5^(1/5)\n", +"Pr=2*(l+b)/(%pi*d)\n", +"//results\n", +"printf('The rectangular cross section will cost %.2f times that of a circular cross section',Pr)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: Example_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d1=2.5*10^-2 //m\n", +"d2=7.2*10^-2 //m\n", +"Q=100*10^-3 //m^3/hr\n", +"//calculations\n", +"V1=Q/(60*%pi/4*d1^2)\n", +"V2=(d1/d2)^2 *V1\n", +"dp= -(V2^2 -V1^2 + (V1-V2)^2)/(2*g)\n", +"Pdiff=dp*g*rho\n", +"//results\n", +"printf('pressure difference = %.2f kN/m^2',Pdiff/1000)\n", +"//The answers are a bit different due to rounding off error" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: Example_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d2=30/100 //cm\n", +"d1=60/100 //cm\n", +"Pu=105 //kN/m^2\n", +"Pd=75 //kN/m^2\n", +"Cc=0.65\n", +"//calculations\n", +"V22=(2*g/(1 - (d2/d1)^4 + (1/Cc -1)^2)) *(Pu-Pd)*10^3 /(rho*g)\n", +"V2=sqrt(V22)\n", +"Q=%pi/4 *V2 *d2^2\n", +"hl=(1/Cc -1)^2 *V2^2 /(2*g)\n", +"//results\n", +"printf('Flow rate = %.3f m^3/s',Q)\n", +"printf('\n Head loss = %.3f m',hl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: Example_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d=9 //m\n", +"dia=0.3 //m\n", +"//calculations\n", +"V302= 2*g*d/(0.5 + 20 + 2.53+101+0.66+41.47+2.07)\n", +"V30=sqrt(V302)\n", +"Q=%pi/4 *dia^2 *V30\n", +"//results\n", +"printf('Flow rate = %.3f m^3/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: Example_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"h=6 //m\n", +"rho=930 //kg/m^3\n", +"Q=3/60 //m^3/s\n", +"d=0.15 //m\n", +"L=20 //m\n", +"mu=0.006\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"V=Q/(%pi/4 *d^2)\n", +"RN=V*d*rho/mu\n", +"f=0.316/RN^0.25\n", +"hl=f*L/d *V^2 /(2*g)\n", +"Hp=h+hl\n", +"gam=rho*g\n", +"W=gam*Q\n", +"Power= W*Hp\n", +"//results\n", +"printf('Power required = %.3f kW',Power/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15: Example_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d=0.02 //m\n", +"d2=1.2 //m\n", +"f=0.01\n", +"L=250\n", +"ken=0.5\n", +"g=9.81\n", +"h1=8 //m\n", +"h2=4 //m\n", +"//calculations\n", +"V2=2*g/(1+ken+ f*L/d)\n", +"V=sqrt(V2)\n", +"Q=%pi/4 *d^2 *V\n", +"function t=time(h)\n", +" t=-%pi/4 *d2^2 /Q /sqrt(h)\n", +"endfunction\n", +"ti=intg(h1,h2,time)\n", +"//results\n", +"printf('Time required = %d sec',ti)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16: Example_16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"d1=0.1 //m\n", +"d2=0.05 //m\n", +"l1=20 //m\n", +"l2=20 //m\n", +"f=0.02\n", +"//calculations\n", +"Kl=(f*l2/d2 *(d1/d2)^4 - f*l1/d1)\n", +"//results\n", +"printf('Loss coefficient = %d ',Kl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.17: Example_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"g=9.81 \n", +"rati=1.265\n", +"//calculations\n", +"percent = (rati-1)*100\n", +"//results\n", +"printf('Increase in discharge = %.1f',percent)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.18: Example_18.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q=0.6 //m^3/s\n", +"l1=1200 //m\n", +"l2=800 //m\n", +"d1=0.3 //m\n", +"//calculations\n", +"V1=1.02 //m/s\n", +"d5= d1*l2*4^2 *Q^2 /(l1*%pi^2 *V1^2)\n", +"d=d5^(1/5)\n", +"//results\n", +"printf('diameter of the single pipe = %.2f m',d)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.19: Example_19.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81\n", +"Q=0.18 //m^3/s\n", +"d3=0.3//m\n", +"f=0.032\n", +"L3=360 //m\n", +"z=25.5 //m\n", +"z2=30 //m\n", +"L2=450 //m\n", +"d2=0.45//m\n", +"L1=950 //m\n", +"d1=0.45 //m\n", +"zn=18 //m\n", +"rho=1000\n", +"//calculations\n", +"V3=Q/(%pi/4 *d3^2)\n", +"hl3=f*L3/d3 *(V3^2 /(2*g))\n", +"Z2=z+hl3\n", +"hl2=Z2-z2\n", +"V2= sqrt(2*g*d2*hl2/(f*L2))\n", +"Q2=%pi/4 *d2^2 *V2\n", +"V1=V2+ (d3/d2)^2 *V3\n", +"hl1=f*L1/d1*V1^2 /(2*g)\n", +"Hp= hl1+ Z2-zn\n", +"gam=rho*g\n", +"P=gam*Hp\n", +"//results\n", +"printf('Discharge into the reservoir = %.3f m^3/s',Q2)\n", +"printf('\n Pressure maintained by the pump = %.2f kN/m^2',P/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"h1=4 //m\n", +"muw=0.001 //Ns/m^2\n", +"l=1.5 //m\n", +"B=0.15/1000 //m\n", +"len=11.2 //m\n", +"//calculations\n", +"P1=g*rho*h1\n", +"V=P1*B^2 /(12*muw*l)\n", +"A=B*len\n", +"Q=A*V\n", +"Q=7112.4\n", +"tau= B/2 *(P1)/l\n", +"//results\n", +"printf('Average velocity through the crack = %.3f m/s',V)\n", +"printf('\n rate of leakage = %.1f l/hr',Q)\n", +"printf('\n Shear stress = %.3f N/m^2',tau)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.20: Example_20.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"h=[1 2 1.9 1.96]\n", +"z1=10 //m\n", +"z2=5 //m\n", +"z3=7.5 //m\n", +"f=0.04 \n", +"l1=100 //m\n", +"l2=50 //m\n", +"l3=70 //m\n", +"d1=0.1 //m\n", +"d2=0.075 //m\n", +"d3=0.06 //m\n", +"g=9.81 //m/s^2\n", +"//calculations\n", +"Q1=sqrt(d1^5 *(%pi/4)^2 *2*g/(f*l1)) .*sqrt(z1-h)\n", +"Q2=sqrt(d2^5 *(%pi/4)^2 *2*g/(f*l2)) .*sqrt(h+z2)\n", +"Q3=sqrt(d3^5 *(%pi/4)^2 *2*g/(f*l3)) .*sqrt(h+z3)\n", +"len=length(h)\n", +"for i=1:len\n", +" Q=Q2(i)+Q3(i)\n", +" if (Q1(i) == Q) then\n", +" break;\n", +" end\n", +"end\n", +"printf('height h = %.2f m',h(i))\n", +"printf('\nDischarge in BC Q2 = %.2f lps',Q2(i)*1000)\n", +"printf('\nDischarge in BD Q3 = %.2f lps',Q3(i)*1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.21: Example_21.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"e=0.8\n", +"output=400 //kW\n", +"H=150 //m\n", +"rho=1000 \n", +"g=9.81\n", +"f=0.028\n", +"l=1250 //m\n", +"//calculations\n", +"gam=rho*g\n", +"inpu=output/e\n", +"Q=inpu*10^3 /(2/3 *gam*H)\n", +"hl=1/3 *H\n", +"d5= f*l*Q^2 /(2*g* %pi/4 * %pi/4 *hl)\n", +"d=d5^(1/5)\n", +"//results\n", +"printf('Smallest diameter of pen stock = %d cm',d*100)\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.22: Example_22.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"f=0.04\n", +"H=30 //m\n", +"l=200 //m\n", +"d=0.075 //m\n", +"g=9.81\n", +"rho=1000\n", +"gam=rho*g\n", +"//calculations\n", +"h=2/3 *H\n", +"vj=sqrt(2*g*h)\n", +"hl= 1/3 *H\n", +"V= sqrt(hl*d*2*g/(f*l))\n", +"dj= d*(sqrt(V/vj))\n", +"Power= 2/3 *gam*%pi/4 *d^2 *V*H\n", +"//results\n", +"printf('Size of nozzle = %.1f cm',dj*100)\n", +"printf('\n Max power = %.2f kW',Power/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=1200 //kg/m^3\n", +"mu=0.005 //Ns/m^2\n", +"d=0.006 //m\n", +"Re=2000\n", +"V=0.15 //m/s\n", +"//calculations\n", +"Vc=Re*mu/(d*rho)\n", +"Vr=V/Vc\n", +"T0=8*mu*V/d\n", +"//results\n", +"printf('Shear stress = %d N/m^2',T0)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"Q=0.45/(60*1000) //m^3/s\n", +"d=0.003 //m\n", +"depth=0.95 //m\n", +"alpha=2\n", +"len=1.25 //m\n", +"//calculations\n", +"A=%pi/4 *d^2\n", +"V=Q/A\n", +"nu= (depth - alpha*V^2 /(2*g))*g*d^2 /(32*V*len)\n", +"Re=V*d/nu\n", +"//results\n", +"if Re<2000 then\n", +" printf('Flow is laminar')\n", +"else\n", +" printf('Flow is not laminar')\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=787 //kg/m^3\n", +"Q=90*10^-3 //m^3/hr\n", +"d=0.015 //m\n", +"k=0.0045*10^-2 //m\n", +"nu=1.6e-6\n", +"l=5 //m\n", +"//calculations\n", +"V=Q/(60*%pi/4 *d^2)\n", +"Rn=V*d/nu\n", +"e=k/d\n", +"disp('From moody diagram, f=0.028')\n", +"f=0.028\n", +"hl=f*l/d *V^2 /(2*g)\n", +"Power=rho*g*Q/60 *hl\n", +"//result\n", +"printf('Head loss = %.2f m',hl)\n", +"printf('\n power required =%.3f kW',Power/1000)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=870 //kg/m^3\n", +"Q=2*10^-3 //m^3/s\n", +"d=0.03 //m\n", +"mu=5*10^-4\n", +"l=50 //m\n", +"//calculations\n", +"V=Q/(%pi/4 *d^2)\n", +"RN=rho*V*d/mu\n", +"f=0.017\n", +"hl=f*l/d *V^2/(2*g)\n", +"Ploss=rho*g*hl\n", +"//results\n", +"printf('Loss of pressure = %.1f kN/m^2',Ploss/1000)\n", +"//The answers are a bit different due to rounding off error in textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=813 //kg/m^3\n", +"Q=0.007 //m^3/hr\n", +"d=0.01//m\n", +"mu=0.002 //Ns/m^2\n", +"l=30 //m\n", +"//calculations\n", +"V=Q/(60*%pi/4*d^2)\n", +"RN=V*d*rho/mu\n", +"f=0.316/RN^(0.25)\n", +"h=(1+f*l/d)*V^2 /(2*g)\n", +"//result\n", +"printf('Height required = %.2f m',h)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"hl=0.02\n", +"d=1.2 //m\n", +"l=1 //m\n", +"k=0.5 *10^-2 //m\n", +"//calculations\n", +"v2f=hl*(2*g*d)/l\n", +"e=k/d\n", +"f=0.028\n", +"V=sqrt(v2f/f)\n", +"Q=%pi/4 *d^2 *V\n", +"//results\n", +"printf('Rate of flow = %.2f m^3/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: Example_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"e=0.03*10^-2 //m\n", +"l=3000 //m\n", +"Q=300*10^-3 //m^3/s\n", +"nu=10^-5 //m^2/s\n", +"hl=24 //m\n", +"//calculations\n", +"d5f= l*Q/(%pi/4) * Q/(%pi/4) /(hl*2*g)\n", +"f=0.022\n", +"d=(d5f*f)^(1/5)\n", +"//results\n", +"printf('Size of the required pipe = %d cm',d*100)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: Example_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"g=9.81 //m/s^2\n", +"rho=10^3 //kg/m^3\n", +"d=0.3 //m\n", +"per=25/100\n", +"Q=0.1 //m^3/s\n", +"k0=0.025*10^-2 //m\n", +"nu=0.000001\n", +"year=10\n", +"//calculations\n", +"V=Q/(%pi/4 *d^2)\n", +"RN=V*d/nu\n", +"e1=k0/d\n", +"f1=0.019 \n", +"f2=(1+per)*f1\n", +"e2=0.002\n", +"k2=e2*d\n", +"rate = (k2-k0)*100/year\n", +"//results\n", +"printf('Rate of increase =%.4f cm/year',rate)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/8-Uniform_Open_Channel_Flow.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/8-Uniform_Open_Channel_Flow.ipynb new file mode 100644 index 0000000..e28243c --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/8-Uniform_Open_Channel_Flow.ipynb @@ -0,0 +1,404 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Uniform Open Channel Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: Example_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q=12 //m^3/s\n", +"n=0.023\n", +"A=2.472\n", +"b=0.472\n", +"sf=1/8000\n", +"//calculations\n", +"y8= Q*n/A *2^(2/3) /sf^(1/2)\n", +"y=y8^(3/8)\n", +"b2= b*y\n", +"//results\n", +"printf('depth = %.3f m',y)\n", +"printf('\n width = %.2f m',b2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: Example_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"Q=30 \n", +"V=1\n", +"//calculations\n", +"A=Q/V\n", +"y = sqrt(A/(sqrt(2) + 0.5))\n", +"b= (A- 0.5*y^2)/y\n", +"//results\n", +"printf('width = %.2f m',b)\n", +"printf('\n depth = %.2f m',y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"b=4 //m\n", +"y=1.2 //m\n", +"sf=0.001\n", +"n=0.012\n", +"gam=9.81*1000\n", +"//calculations\n", +"A=b*y\n", +"R=A/(b+ 2*y)\n", +"Q=1/n *A*R^(2/3) *sf^(1/2)\n", +"T=gam*R*sf\n", +"//results\n", +"printf('Discharge = %.3f m^3/s',Q)\n", +"printf('\n bed shear = %.2f N/m^2',T)\n", +"//The answer in textbook is wrong for discharge. Please use a calculator." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"b=6 //m\n", +"y=2 //m\n", +"sf=0.005\n", +"slope = 2\n", +"gam=9.81*1000\n", +"Q=65 //m^3/s\n", +"//calculations\n", +"A=(b+ 2*y)*slope\n", +"P=b+ 2*y*sqrt(slope^2 +1)\n", +"R=A/P\n", +"V=Q/A\n", +"n=R^(2/3) *sf^(1/2) /V\n", +"//results\n", +"printf('Value of mannings coefficient = %.3f',n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"b=3 //m\n", +"y=1 //m\n", +"sf=0.005\n", +"n=0.028\n", +"gam=9.81*1000\n", +"Q=0.25 //m^3/s\n", +"slope=1.5\n", +"//calculations\n", +"A= 0.5 *b*y\n", +"P=2*sqrt(1 + (slope)^2)\n", +"R=A/P\n", +"yx= Q*n/(slope * R^(2/3) *sf^(1/2))\n", +"y= yx^(3/8)\n", +"//results\n", +"printf('depth = %.2f m',y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"sf=0.0064\n", +"n=0.015\n", +"Q=6 //m^3/s\n", +"gam=9.81*1000\n", +"//calculations\n", +"AR= n*Q/sqrt(sf)\n", +"disp('On trial and error, ')\n", +"y=0.385 //m\n", +"printf('normal depth = %.3f m',y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\\n", +"sf=0.00007\n", +"n=0.013\n", +"gam=9.81*1000\n", +"V=0.45 //m/s\n", +"Q=1.4 //m^3/s\n", +"//calculations\n", +"by=Q/V\n", +"x=poly(0,'x')\n", +"y=roots(x^2 -2.66*x +1.55)\n", +"b=by ./y\n", +"//results\n", +"printf('y = ')\n", +"disp( y )\n", +"printf('corresponding b=')\n", +"disp(b)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"sf=0.0016\n", +"n=0.02\n", +"Q=0.84 //m^3/s\n", +"gam=9.81*1000\n", +"//calculations\n", +"y53= Q*n/sqrt(sf)\n", +"y=y53^(3/5)\n", +"//results\n", +"printf('depth of flow = %.2f m',y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"n=0.015\n", +"Q=1.3 //m^3/s\n", +"V=0.6 //m/s\n", +"gam=9.81*1000\n", +"//calculations\n", +"alpha=60 //degrees\n", +"A=0.5 *(1/2)^2 *(180-alpha)/180 *%pi -(1/4)^2 *tand(alpha)\n", +"A=0.206\n", +"P=0.5*(180-alpha)/180 *%pi\n", +"R=A/P\n", +"d2=V*n/(R^(2/3))\n", +"d8= Q*n*4*4^(2/3) /%pi\n", +"d=sqrt(d8/d2)\n", +"sf= (d2/d^(2/3))^2\n", +"//results\n", +"printf('Diameter = %.2f m',d)\n", +"printf('\n slope = %.5f ',sf)\n", +"//The answer given in textbook is wrong. please check" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: Example_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"b=0.5 //m\n", +"y=0.35 //m\n", +"sf=0.001\n", +"nc=0.016\n", +"gam=9.81*1000\n", +"Q=0.15 //m^3/s\n", +"//calculations\n", +"A=b*y\n", +"P= b+ 2*y\n", +"R=A/P\n", +"ng=1/Q *A*R^(2/3) *sf^(1/2)\n", +"n= (b*nc^(3/2) + 2*y*ng^(3/2))^(2/3) /(P^(2/3))\n", +"Q2=1/n *A*R^(2/3) *sf^(1/2)\n", +"//results\n", +"printf('flow in case 2 = %.3f m^3/s',Q2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: Example_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"b1=8 //m\n", +"b2=5 //m\n", +"y=5 //m\n", +"b5=15 //m\n", +"b3=3 //m\n", +"b4=3 //m\n", +"y2=2 //m\n", +"y3=3 //m\n", +"n1=0.025\n", +"n2=0.035\n", +"sf=0.0008\n", +"//calcuations\n", +"A= (b1+b2)*y\n", +"P= b1+ sqrt(b2^2 +y^2) + sqrt(b3^2 +b4^2)\n", +"R=A/P\n", +"Q1=1/n1 *A*R^(2/3) *sf^(1/2)\n", +"A2 = b5*y2 - 0.5*y2*y2 + 0.5*y3*y2\n", +"P2= b5 + sqrt(b4^2 + y3^2)\n", +"R2=A2/P2\n", +"Q2= 1/n2 *A2*R2^(2/3) *sf^(1/2)\n", +"Q=Q1+Q2\n", +"//results\n", +"printf('Total discharge = %.1f m^3/s',Q)" + ] + } +], +"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/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/9-Potential_Flow.ipynb b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/9-Potential_Flow.ipynb new file mode 100644 index 0000000..8dbd07e --- /dev/null +++ b/Principles_Of_Fluid_Mechanics_by_M_K_Natarajan/9-Potential_Flow.ipynb @@ -0,0 +1,122 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Potential Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.14: Example_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"T=4.5\n", +"a=0.6\n", +"u=5 //m/s\n", +"rho=1000 //kg/m^3\n", +"//calculations\n", +"sint=0.5*(1- T/(2*%pi*a*u))\n", +"theta= asind(sint)\n", +"dp= 0.5*rho*u^2 *(1 - (2 + T/(2*%pi*a*u))^2)\n", +"//results\n", +"printf('Angle = %.1f %.1f degrees',theta,180-theta)\n", +"printf('\n Min guage pressure = %.2f kN/m^2',dp/1000)\n", +"//The answer in textbook is wrong. please check" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.15: Example_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"T=6*%pi\n", +"r=1/3\n", +"//calculations\n", +"vab=T/(4*%pi)\n", +"vba= T/(2*%pi)\n", +"w=vab/r\n", +"//results\n", +"printf('rate of rotation = %.1f rad/s',w)\n", +"printf('\nspeed of A by B = %.1f m/s',vab)\n", +"printf('\nspeed of B by A = %.1f m/s',vba)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"//Initialization of variables\n", +"k=1.5\n", +"r=40 //cm\n", +"theta=45 //degrees\n", +"//calculations\n", +"vr= -2*k*r*cosd(2*theta)\n", +"vt= 2*k*r*sind(2*theta)\n", +"//results\n", +"printf('velocity in radial direction = %d cm/s',vr)\n", +"printf('\n velcoity in angular direction = %d cm/s',vt)" + ] + } +], +"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 +} -- cgit