summaryrefslogtreecommitdiff
path: root/backup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'backup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb')
-rwxr-xr-xbackup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb626
1 files changed, 626 insertions, 0 deletions
diff --git a/backup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb b/backup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb
new file mode 100755
index 00000000..e6b94086
--- /dev/null
+++ b/backup/Fluid_Mechanics-Fundamentals_&_Applications_version_backup/Chapter05.ipynb
@@ -0,0 +1,626 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8bd11344481cd08353414df9b95ff36a77bcdb1a4b70dab675e71546fa1a4453"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 05:Mass, Bernoulli and Energy Equations"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-1, Page No:190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Vairable Decleration\n",
+ "V=10#Volume of the bucket in Gal\n",
+ "r_in=1 #Radius of the hose in cm\n",
+ "r_e=0.4 #Radius of the hose at the nozzle exit in cm\n",
+ "t=50 #Time taken to fill the bucket in s\n",
+ "C_gl=3.7854 #Conversion factor gal to Lit\n",
+ "rho=1 #Denisty of water in kg/Lit\n",
+ "C_v=10**-3 #Conersion factor in m^3/lit\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Part (a)\n",
+ "V_dot=(V*C_gl)/t #Volume flow rate in Lit/s\n",
+ "m_dot=rho*V_dot #Mass flow rate in kg/s\n",
+ "\n",
+ "#Part(b)\n",
+ "A_e=pi*r_e**2*10**-4 #Cross-Sectional Area of the nozzle at exit in m^2\n",
+ "V_e=(V_dot*C_v)/A_e #Average Velocity of water at nozzle exit in m/s\n",
+ "\n",
+ "#Result\n",
+ "print \"The Volume Flow rate is\",round(V_dot,3),\"L/s and the mass flow rate is\",round(m_dot,3),\"kg/s\"\n",
+ "print \"The area of cross section at nozzle exit is\",round(A_e,5),\"m^2\"\n",
+ "print \"The Average Velocity of water is\",round(V_e,1),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Volume Flow rate is 0.757 L/s and the mass flow rate is 0.757 kg/s\n",
+ "The area of cross section at nozzle exit is 5e-05 m^2\n",
+ "The Average Velocity of water is 15.1 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-2, Page No:191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "h_o=1.2 #Original Height in m\n",
+ "h_2=0.6 #Water level drop in m\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "D_tank=0.9 #Diameter of the tank in m\n",
+ "D_jet=0.013 #Diameter at the jet in m\n",
+ "\n",
+ "#Calculations\n",
+ "#After carrying out the theroetical calculations and integration we arrive to obtain\n",
+ "t_min=((h_o**0.5-h_2**0.5)/((g/2)**0.5))*((D_tank/D_jet)**2) #Time required to reach a level 0.6m in s\n",
+ "t=t_min/60 #Converting time from sec to min\n",
+ "\n",
+ "#Result\n",
+ "print \"The time it takes to half empty the tank is\",round(t,1),\"min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time it takes to half empty the tank is 11.6 min\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-3, Page No:195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "##Note:The symbols in the textbook are cumbersome to code hence a different one has been used in this coding\n",
+ "\n",
+ "#Variable Decleration\n",
+ "h=50 #Elevation difference in m\n",
+ "m_dot=5000 #Mass flow rate at which the water is to be supplied in kg/s\n",
+ "W_dot_out=1862 #Electric Power generated in kWh\n",
+ "n_generator=0.95 #Efficiency of the generator in fraction\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "C=10**-3 #Conversion factor in kJ/kg/m^2/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Part(a)\n",
+ "\n",
+ "#Calling e_mech_in-e_mech_out as del_e for convienence \n",
+ "del_e=g*h*C #Change in water's mechanical energy per unit mass in kJ/kg\n",
+ "delta_E_fluid=m_dot*del_e # Change in energy of the fluid in kW\n",
+ "\n",
+ "n_overall=W_dot_out/delta_E_fluid #Overall Efficiency in fraction\n",
+ "\n",
+ "#Part(b)\n",
+ "n_turbine_gen=n_overall/n_generator #Mechanical efficiency os the turbine in fraction\n",
+ "\n",
+ "#Part(c)\n",
+ "W_dot_shaft_out=n_turbine_gen*delta_E_fluid #Shaft power output in kW\n",
+ "\n",
+ "#Result\n",
+ "print \"The overall efficiency is\",round(n_overall,2)\n",
+ "print \"The mechanical efficiency of the turbine is\",round(n_turbine_gen,1)\n",
+ "print \"The shaft power output is\",round(W_dot_shaft_out,1),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The overall efficiency is 0.76\n",
+ "The mechanical efficiency of the turbine is 0.8\n",
+ "The shaft power output is 1960.0 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-5, Page No:205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "P1=400 #Pressure at upstream of the jet in kPa\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "rho=1000 #Density of water in kg/m^3\n",
+ "C1=1000 #Conversion factor in N/m^2.kPa\n",
+ "C2=1 #Conversion factor in kg.m/s^2.N\n",
+ "\n",
+ "#Calculations\n",
+ "#Applying the Bernoulli Equation\n",
+ "z2=(P1*C1*C2)/(rho*g) #maximun height the water jet reaches in m\n",
+ "\n",
+ "#Result\n",
+ "print \"The water jet rises up to\",round(z2,1),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The water jet rises up to 40.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-6, Page No:206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "h=5 #Height at which the water tank is filled in m\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "z1=h #Decleration in terms of datum in m\n",
+ "#Applying the Bernoulli Equation\n",
+ "V2=(2*g*z1)**0.5 #Maximum velocity that the water jet can attain in m/s\n",
+ "\n",
+ "#Result\n",
+ "print \"The maximum velocity that the water jet can attain is\",round(V2,1),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum velocity that the water jet can attain is 9.9 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-7, Page No:207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "P_atm=101.3 #Atmospheric pressure in kPa\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "rho=750 #Denisty of gasoline in kg/m^3\n",
+ "z1=0.75 #Location of point 2 w.r.t point 1\n",
+ "D=5*10**-3 #Diameter of the siphon pipe in m\n",
+ "V=4 #Volume of gasoline to be siphoned in Lit\n",
+ "z3=2.75 #Height of point 3 w.r.t to point 2 in m\n",
+ "C1=1 #conversion factor in N.s^2/kg.m\n",
+ "C2=10**-3 #Conversion factor in kPa.m^2/N\n",
+ "#Calculations\n",
+ "\n",
+ "#Part (a)\n",
+ "#Applying the Bernoulli Equation\n",
+ "V2=(2*g*z1)**0.5 #Velocity in m/s\n",
+ "A=(pi*D**2)/4 #Cross-Sectional Area in m^2\n",
+ "V_dot=V2*A*1000#Volume flow rate in L/s\n",
+ "delta_t=V/V_dot #Time required to siphon gasoline in s\n",
+ "\n",
+ "#Part(b)\n",
+ "#Applying Bernoulli Equations\n",
+ "P3=P_atm-(rho*g*z3*C1*C2) #Pressure at point 3 in kPa\n",
+ "\n",
+ "#result\n",
+ "print \"The time requires to siphon 4L gasoline is\",round(delta_t,1),\"s\"\n",
+ "print \"The pressure at point 3 is\",round(P3,1),\"kPa\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The time requires to siphon 4L gasoline is 53.1 s\n",
+ "The pressure at point 3 is 81.1 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-8, Page No:208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Declerations\n",
+ "g=9.81 #Acceleration due to Gravity in m/s^2\n",
+ "h3=0.12 #Difference in level in m\n",
+ "\n",
+ "#Calculations\n",
+ "#Applying Bernoulli Equations\n",
+ "V1=(2*g*h3)**0.5 #Velocity of Fluid in m/s\n",
+ "\n",
+ "#Result\n",
+ "print \"The velocity of fkuid is\",round(V1,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of fkuid is 1.53 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-9, Page No:209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "rho_hg=13600 #density of mercury in kg/m^3\n",
+ "rho_sw=1025 #density of sea-water in kg/m^3\n",
+ "rho_atm_air=1.2 #Density of air in kg/m^3\n",
+ "P_atm_air=762 #Atmospheric pressure 320km away from the eye in mm oh Hg\n",
+ "P_air=560 #Atmospheric pressure at the eye of the strom in mm og Hg\n",
+ "C=10**-3 #Conversion factor in m/mm\n",
+ "V_A=250 #Hurricane Wind Velocity in km/hr\n",
+ "C_k=1/3.6 #Conversion Factor from km/hr to m/s \n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#part(a)\n",
+ "h3=(rho_hg*(P_atm_air-P_air)*C)/rho_sw #Pressure difference in m\n",
+ "\n",
+ "#Part(b)\n",
+ "#Applying Bernoulli Equations\n",
+ "h_air=(V_A**2*C_k**2)/(2*g) #Height of air column in m\n",
+ "rho_air=(P_air*rho_atm_air)/P_atm_air #Density of Air in the hurricane in kg/m^3\n",
+ "h_dynamic=(rho_air*h_air)/rho_sw #Sea-Water column equivalent to air-column in m\n",
+ "h2=h3+h_dynamic #Total storm surge at point 2 in m\n",
+ "\n",
+ "#Result\n",
+ "print \"The pressure difference between point's 1 and 3 in terms of sea-water column is\",round(h3,2),\"m\"\n",
+ "print \"The total Storm Surge at point2 is\",round(h2,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure difference between point's 1 and 3 in terms of sea-water column is 2.68 m\n",
+ "The total Storm Surge at point2 is 2.89 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-12, Page No:221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "V_dot=50 #Volumetric Flow rate in L/s\n",
+ "rho=1 #Density of water \n",
+ "n_motor=0.9 #efficiency of the electric motor in fraction\n",
+ "W_dot_electric=15 #Power of the electric motor in kW\n",
+ "P2=300 #Absolute pressure at the outlet in kPa\n",
+ "P1=100 #Absolute pressure at the inlet in kPa\n",
+ "c=4.18 #Specific heat of water in kJ/kg C\n",
+ "#Calculations\n",
+ "\n",
+ "#Part(a)\n",
+ "m_dot=rho*V_dot #Mass flow rate in kg/s\n",
+ "W_dot_pump=n_motor*W_dot_electric #Mechanical shaft power delivered in kW\n",
+ "delta_E_dot_mech_fluid=(m_dot*((P2-P1)/rho))/1000 #Increase in mechanical energy in kW\n",
+ "n_pump=delta_E_dot_mech_fluid/W_dot_pump #Efficiency in fraction\n",
+ "\n",
+ "#part (b)\n",
+ "E_dot_loss=W_dot_pump-delta_E_dot_mech_fluid #Lost mechanical energy in kW\n",
+ "delta_T=(E_dot_loss)/(m_dot*c) #Temperature rise of water due to mechanical inefficiency in degree C\n",
+ "\n",
+ "#Result\n",
+ "print \"The Mechanical efficiency of the pump is\",round(n_pump,3)\n",
+ "print \"The temperature rise of water due to mechanical inefficiency is\",round(delta_T,3),\"Degree Centigrade\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Mechanical efficiency of the pump is 0.741\n",
+ "The temperature rise of water due to mechanical inefficiency is 0.017 Degree Centigrade\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-13, Page No:222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "V_dot=100 #Discharge through the power plant in m^3/s\n",
+ "rho=1000 #Density of water in kg/m^3\n",
+ "z1=120 #Elevation from which the water flows in m\n",
+ "h_l=35 #Elevation of point 2 in m\n",
+ "n_turbine_gen=0.8 #Overall efficiency of the generator in fraction\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "C=10**-3 #Conversion Factor\n",
+ "\n",
+ "#Calculations\n",
+ "m_dot=rho*V_dot #mass flow rate through the turbine in kg/s\n",
+ "\n",
+ "#Applying Bernoullis principle and taking point 2 as reference point z2=0\n",
+ "h_turbine=z1-h_l #extracted turbine head in m\n",
+ "W_dot_turbine=m_dot*g*h_turbine*C #Turbine Power in kW\n",
+ "W_dot_electric=C*n_turbine_gen*W_dot_turbine #Electrical Power Generated by the actual Unit in MW\n",
+ "\n",
+ "#Result\n",
+ "print \"The electrical Power generated is\",round(W_dot_electric,1),\"MW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The electrical Power generated is 66.7 MW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-14, Page No:223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "void_fraction=0.5 #Void Fraction\n",
+ "l=12 #Dimension of the fan in cm\n",
+ "w=40 #Dimension of the fan in cm\n",
+ "h=40 #Dimension of the fan in cm\n",
+ "delta_t=1 #time in s\n",
+ "rho=1.2 #Ddensity of air in kg/m^3\n",
+ "D=0.05 #Diameter of opening in the case in m\n",
+ "alpha2=1.1 #kinetic correction factor\n",
+ "n_fan=0.3 #Efficiency of the fan-motor\n",
+ "#Calculations\n",
+ "#Part(a)\n",
+ "V=void_fraction*l*w*h #Volume in cm^3\n",
+ "V_dot=(V/delta_t)*10**-6 #Volumetric flow rate in m^3/s\n",
+ "m_dot=rho*V_dot #mass flow rate in kg/s\n",
+ "A=(pi*D**2)/4 #Area of the opening is the case in m^2\n",
+ "\n",
+ "#Notation has been changed to avoid conflict\n",
+ "Vel=V_dot/A #Velocity of the air thorught the opening in m/s\n",
+ "\n",
+ "#Applying Bernoullis principle\n",
+ "W_dot_fan=m_dot*alpha2*Vel**2*0.5 #Work done in W\n",
+ "W_dot_electric=W_dot_fan/n_fan #Electric Work done in W\n",
+ "\n",
+ "#Part(b)\n",
+ "#Applying Brnoullis principle\n",
+ "#Notation has been changed here\n",
+ "delta_P=(rho*W_dot_fan)/m_dot #Pressure rise across fan in Pa\n",
+ "\n",
+ "#Result\n",
+ "print \"Wattage of the fan to be purchased is\",round(W_dot_electric,4),\"W\"\n",
+ "print \"The pressure difference across the fan is\",round(delta_P,1),\"Pa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wattage of the fan to be purchased is 0.5049 W\n",
+ "The pressure difference across the fan is 15.8 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5-15, Page No:225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable Decleration\n",
+ "W_shaft=5 #Shaft Power in kW\n",
+ "n_pump=0.72 #Efficiency of the pump in fraction\n",
+ "g=9.81 #Acceleration due to gravity in m/s^2\n",
+ "h_l=4 #Head loss in m\n",
+ "z2=25 #Datum in m\n",
+ "rho=1000 #Density of water in kg/m^3\n",
+ "\n",
+ "#Calculations\n",
+ "W_dot_pump=n_pump*W_shaft #Useful mechanical power returned in kW\n",
+ "\n",
+ "#Applying Bernoullis Principle\n",
+ "m_dot=(W_dot_pump/(g*(z2+h_l)))*1000 #mass floe rate in kg/s\n",
+ "V_dot=(m_dot/rho) #Volumetric flow rate in m^3/s\n",
+ "delta_P=W_dot_pump/V_dot #Pressure difference in kPa\n",
+ "\n",
+ "#Result\n",
+ "print \"Discharge of water is\",round(V_dot,4),\"m^3/s\"\n",
+ "print \"The pressure difference across the pump is\",round(delta_P),\"kPa\"\n",
+ "#Answer in the coding is off by 1 kPa due to decimal point accuracy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge of water is 0.0127 m^3/s\n",
+ "The pressure difference across the pump is 284.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file