summaryrefslogtreecommitdiff
path: root/mechanics_of_fluid/Chapter3-.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'mechanics_of_fluid/Chapter3-.ipynb')
-rwxr-xr-xmechanics_of_fluid/Chapter3-.ipynb268
1 files changed, 0 insertions, 268 deletions
diff --git a/mechanics_of_fluid/Chapter3-.ipynb b/mechanics_of_fluid/Chapter3-.ipynb
deleted file mode 100755
index 41b83b2a..00000000
--- a/mechanics_of_fluid/Chapter3-.ipynb
+++ /dev/null
@@ -1,268 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:333c941e92e4c238ee8e681acc0f0427a31d9cb623c5863e0f5d970ef2bcf529"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter3-The Principles Governing Fluids in Motion"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex2-pg105"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Overall efficiency of the pump\n",
- "u_A=1.35; ## m/s\n",
- "d_A=0.225; ## m\n",
- "d_B=0.150; ## m\n",
- "d_C=0.150; ## m\n",
- "d=5.6; ##m\n",
- "friction=2.5; ## kW\n",
- "power_req=12.7; ## kW\n",
- "\n",
- "rho=1000.; ## kg/m^3\n",
- "rho_m=13560.; ## kg/m^3\n",
- "\n",
- "g=9.81; ## m/s^2\n",
- "\n",
- "pC=35000.; ## Pa\n",
- "pA=rho_m*g*(-d_B);\n",
- "\n",
- "Area_A=math.pi*d_A**2/4;\n",
- "Area_B=math.pi*d_B**2/4;\n",
- "Area_C=math.pi*d_C**2/4;\n",
- "\n",
- "u_B=u_A*(Area_A/Area_B);\n",
- "u_C=u_A*(Area_A/Area_C);\n",
- "\n",
- "## Energy_added_by_pump/time = (Mass/time)*((pC-pA)/rho+(u_C^2-u_A^2)/2+g*(zC-zA))\n",
- "\n",
- "Energy_added = Area_A*u_A*(pC-pA+rho/2.*(u_C**2-u_A**2)+rho*g*d)/1000.+friction;\n",
- "\n",
- "Efficiency=Energy_added/power_req*100.;\n",
- "\n",
- "print'%s %.1f %s'%(\"Overall efficiency of the pump =\",Efficiency,\" %\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Overall efficiency of the pump = 67.7 %\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3-pg119"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Rate of discharge\n",
- "d_jet = 0.0086; ## m\n",
- "d_orifice = 0.011; ## m\n",
- "x = 2.; ## m\n",
- "y = 0.6; ## m\n",
- "h = 1.75; ## m\n",
- "g = 9.81; ## m/s^2\n",
- "\n",
- "A2 = math.pi/4.*d_orifice**2;\n",
- "\n",
- "Cc = (d_jet/d_orifice)**2.; ## Coefficient of Contraction\n",
- "\n",
- "Cv = x/2./math.sqrt(y*h); ## Coefficient of velocity\n",
- "\n",
- "Cd = Cv*Cc; ## Coefficient of Discharge\n",
- "\n",
- "Q = Cd*A2*math.sqrt(2.*g*h);\n",
- "\n",
- "print'%s %.4f %s'%(\"Rate of discharge =\",Q,\"m^3/s \")\n",
- "\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Rate of discharge = 0.0003 m^3/s \n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex4-pg122"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Flow rate\n",
- "Cd=0.97;\n",
- "d1=0.28; ## m\n",
- "d2=0.14; ## m\n",
- "\n",
- "g=9.81; ## m/s^2\n",
- "d=0.05; ## difference in mercury level in metre\n",
- "rho=1000.; ## kg/m^3\n",
- "rho_m=13600.; ## kg/m^3\n",
- "\n",
- "A1=math.pi/4.*d1**2.;\n",
- "A2=math.pi/4.*d2**2.;\n",
- "\n",
- "p_diff=(rho_m-rho)*g*d;\n",
- "h=p_diff/rho/g;\n",
- "\n",
- "Q=Cd*A1*((2.*g*h)/((A1/A2)**2-1.))**(1./2.);\n",
- "\n",
- "print'%s %.4f %s'%(\"Flow rate =\",Q,\"m^3/s \")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Flow rate = 0.0542 m^3/s \n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex5-pg125"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "#calculate Mass flow rate\n",
- "Cd=0.62;\n",
- "g=9.81; ## m/s^2\n",
- "d=0.1; ## m\n",
- "d0=0.06; ## m\n",
- "d1=0.12; ## m\n",
- "\n",
- "rho=1000.; ## kg/m^3\n",
- "rho_m=13600.; ## kg/m^3\n",
- "rho_f=0.86*10**3; ##kg/m^3\n",
- "\n",
- "A0=math.pi/4.*d0**2.;\n",
- "A1=math.pi/4.*d1**2.;\n",
- "\n",
- "p_diff=(rho_m-rho_f)*g*d;\n",
- "\n",
- "h=p_diff/rho_f/g;\n",
- "\n",
- "Q=Cd*A0*((2.*g*h)/(1.-(A0/A1)**2))**(1./2.);\n",
- "\n",
- "m=rho_f*Q;\n",
- "\n",
- "print'%s %.2f %s'%(\"Mass flow rate =\",m,\"kg/s \")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Mass flow rate = 8.39 kg/s \n"
- ]
- }
- ],
- "prompt_number": 4
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex6-pg130"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import math\n",
- "Cd=0.61;\n",
- "#calculate Rate of discharge\n",
- "g=9.81; ## m/s^2\n",
- "b=0.6; ## m\n",
- "H=0.155; ## mQ\n",
- "A=0.26; ## m^2\n",
- "u1=0.254; ## m/s\n",
- "\n",
- "Q=2./3.*Cd*math.sqrt(2.*g*b*(H)**3/2);\n",
- "\n",
- "velo=Q/A;\n",
- "\n",
- "H1=H+u1**2/(2.*g);\n",
- "\n",
- "Q1=2./3.*Cd*math.sqrt(2*g*b*(H1)**3/2);\n",
- "\n",
- "print'%s %.3f %s'%(\"Discharge =\",Q1,\"m^3/s\")\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Discharge = 0.062 m^3/s\n"
- ]
- }
- ],
- "prompt_number": 6
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file