summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-03-09 23:30:21 +0600
committerTrupti Kini2016-03-09 23:30:21 +0600
commit1ab1ae28c5ba41d5159b2f2922447419e2d64eb9 (patch)
tree80c774566b5405892b20e84da74c1143459af1a3 /Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
parent50a467f02f972299984d596c5e12122606fd092a (diff)
downloadPython-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.tar.gz
Python-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.tar.bz2
Python-Textbook-Companions-1ab1ae28c5ba41d5159b2f2922447419e2d64eb9.zip
Added(A)/Deleted(D) following books
A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_1.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:01:00_1.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:01:25_1.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17:02:44_1.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/chapter1.ipynb A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/chapter3.ipynb A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/1.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/2.png A Applied_Chemistry_by_Dr._Mrs.Trupti_Paradkar/screenshots/3.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter10_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter11_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter12_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter13_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter14_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter15_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter1_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter2_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter3_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter4_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter5_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter6_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/chapter7_1.ipynb A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:50:16.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:52:27.png A Basic_Mathematics_for_Electricity_and_Electronics_by_Arthur_Beiser/screenshots/Screenshot_from_2016-03-09_13:53:23.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch1.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch10.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch11.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch12.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch2.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch3.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch4.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch5.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch6.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch8.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch9.ipynb A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/Ch9MolFracNMolVol.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/Ch9_molarFracNMolVol.png A Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/screenshots/ch10_consistency.png A Machine_Design_by_T._H._Wentzell,_P._E/README.txt A Microwaves_and_Radar_Principles_and_Applications_by_A._K._Maini/README.txt A Network_Analysis_and_Synthesis_by_B_R_Gupta/README.txt
Diffstat (limited to 'Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb')
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb597
1 files changed, 597 insertions, 0 deletions
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
new file mode 100644
index 00000000..6e32feac
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G._Halder/Ch7.ipynb
@@ -0,0 +1,597 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 - Thermodynamics to flow processes"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.1 Page: 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.1 - Page: 256\n",
+ "\n",
+ "\n",
+ "Flow rate is 0.1237 m/s\n",
+ "\n",
+ "Velocity of water at the outlet is 3.938 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "print \"Example: 7.1 - Page: 256\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "# *****Data******#\n",
+ "d1 = 0.15## [inlet dia, m]\n",
+ "d2 = 0.20## [outlet dia, m]\n",
+ "U1 = 7## [inlet velocity, m/s]\n",
+ "#****************#\n",
+ "\n",
+ "# From Fig. 7.2 (Pg 256)\n",
+ "# At the inlet:\n",
+ "A1 = (pi/4)*d1**2## [square m]\n",
+ "# At the outlet:\n",
+ "A2 = (pi/4)*d2**2## [square m]\n",
+ "Q = A1*U1## [cubic m/s]\n",
+ "print \"Flow rate is %.4f m/s\\n\"%(Q)#\n",
+ "# Using Continuity Eqn.\n",
+ "# density1*U1*A1 = Density2*U2*A2\n",
+ "# For water: Density1 = Density2. Therefore:\n",
+ "U2 = A1*U1/A2#\n",
+ "print \"Velocity of water at the outlet is %.3f m/s\"%(U2)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.2 Page: 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.2 - Page: 257\n",
+ "\n",
+ "\n",
+ "Discharge through the 10 cm pipe is 0.0942 cubic m/sec\n",
+ "\n",
+ "Average velocity in the 15 cm pipe is 6.38 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.2 - Page: 257\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "d1 = 0.2## [m]\n",
+ "d2 = 0.15## [m]\n",
+ "d3 = 0.1## [m]\n",
+ "U1 = 3## [m/s]\n",
+ "U2 = 2.5## [m/s]\n",
+ "#**************#\n",
+ "\n",
+ "# From Fig. 7.3 (Pg: 257)\n",
+ "# For pipe I:\n",
+ "A1 = (pi/4)*d1**2## [square m]\n",
+ "Q1 = A1*U1## [cubic m/s]\n",
+ "# For pipe II:\n",
+ "A2 = (pi/4)*d2**2## [square m]\n",
+ "Q2 = A2*U2## [cubic m/s]\n",
+ "# For pipe III:\n",
+ "A3 = (pi/4)*d3**2## [square m]\n",
+ "# From continuity Eqn.:\n",
+ "Q3 = Q1 - Q2## [cubic m/s]\n",
+ "U3 = Q3/A3## [m/s]\n",
+ "print \"Discharge through the 10 cm pipe is %.4f cubic m/sec\\n\"%(Q1)#\n",
+ "print \"Average velocity in the 15 cm pipe is %.2f m/s\"%(U3)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.3 Page: 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.3 - Page: 262\n",
+ "\n",
+ "\n",
+ "Pressure at section 2 is 5.20 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.3 - Page: 262\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "d1 = 0.3## [m]\n",
+ "d2 = 0715##[m]\n",
+ "Q = 40/1000## [cubic m/s]\n",
+ "Z1 = 8## [m]\n",
+ "Z2 = 6## [m]\n",
+ "P1 = 5*10**5## [Pa]\n",
+ "density = 1000## [kg/cubic m]\n",
+ "g = 9.81## [m/square s]\n",
+ "#*************#\n",
+ "\n",
+ "# From Fig. 7.3 (Pg: 262)\n",
+ "A1 = (pi/4)*d1**2## [square m]\n",
+ "A2 = (pi/4)*d2**2## [square m]\n",
+ "U1 = Q/A1## [m/s]\n",
+ "U2 = Q/A2## [m/s]\n",
+ "# Applying Bernoulli's equations at sections 1 & 2:\n",
+ "P2 = ((U1**2/(2*g) + Z1 + P1/(density*g)) - (U2**2/(2*g) + Z2))*(density*g)## [Pa]\n",
+ "print \"Pressure at section 2 is %.2f bar\"%(P2/10**5)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.4 Page: 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.4 - Page: 268\n",
+ "\n",
+ "\n",
+ "Power Requirement of the compressor is 3.79 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.4 - Page: 268\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "P1 = 100## [kPa]\n",
+ "T1 = 320## [K]\n",
+ "P2 = 600## [kPa]\n",
+ "T2 = 430## [K]\n",
+ "m_dot = 0.03## [kg/s]\n",
+ "Qout = 15## [kJ/kg]\n",
+ "#*************#\n",
+ "\n",
+ "# The energy balance around the compressor:\n",
+ "# dE_System/dt = Ein - Eout\n",
+ "# Since it is a steady state process:\n",
+ "# dE_Sysytem/dt = 0\n",
+ "# Ein = Eout\n",
+ "# Win + m_dot*H1 = Qout + m_dot*H2\n",
+ "# Since, Qout = Qout/m\n",
+ "# Win = m_dot*(Qout + (H2 - H1))\n",
+ "# From enthalpy chart of air:\n",
+ "H1 = 320.20## [Enthalpy of air at 320 K, kJ/kg]\n",
+ "H2 = 431.43## [Enthalpy of air at 430 K, kJ/kg]\n",
+ "Win = m_dot*(Qout + (H2 - H1))## [kW]\n",
+ "print \"Power Requirement of the compressor is %.2f kW\"%(Win)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.5 Page: 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.5 - Page: 269\n",
+ "\n",
+ "\n",
+ "Work done by reversible adiabatic compression when gama = 1.4 is -96.53 J/g\n",
+ "\n",
+ "Work done by isothermal compression is -76.03 J/g\n",
+ "\n",
+ "Work done in single stage compression is -19.49 kW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log\n",
+ "print \"Example: 7.5 - Page: 269\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "P1 = 100## [kPa]\n",
+ "T1 = 250## [K]\n",
+ "Q = 0.1## [cubic m/s]\n",
+ "P2 = 500## [kPa]\n",
+ "M = 44## [g/mol]\n",
+ "R = 8.314## [J/mol K]\n",
+ "#****************#\n",
+ "\n",
+ "# Solution (a)\n",
+ "# Work done by reversible adiabatic compression, gama = 1.4#\n",
+ "gama = 1.4#\n",
+ "T2 = T1*(P2/P1)**((gama - 1)/gama)## [K]\n",
+ "Wad = (gama*R/(gama - 1))*(T1 - T2)## [J/mol]\n",
+ "Wad = Wad/M## [J/g]\n",
+ "print \"Work done by reversible adiabatic compression when gama = 1.4 is %.2f J/g\\n\"%(Wad)#\n",
+ "\n",
+ "# Solution (b)\n",
+ "# Work done by isothermal compression:\n",
+ "Wiso = - (R*T1)*log(P2/P1)## [J/mol]\n",
+ "Wiso = Wiso/M## [J/g]\n",
+ "print \"Work done by isothermal compression is %.2f J/g\\n\"%(Wiso)#\n",
+ "\n",
+ "# Solution (c)\n",
+ "# Work done in single stage compression, gama = 1.3:\n",
+ "gama = 1.3#\n",
+ "V1 = Q## [cubic m]\n",
+ "Wsingle_stage = (gama*P1*V1/(gama - 1))*(1-(P2/P1)**((gama - 1)/gama))## [kW]\n",
+ "print \"Work done in single stage compression is %.2f kW\"%(Wsingle_stage)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.7 Page: 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.7 - Page: 274\n",
+ "\n",
+ "\n",
+ "The mass flow rate of water is 448.70 kg/min\n",
+ "\n",
+ "The rate of heat transfer is 18777.00 kJ/min\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.7 - Page: 274\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "T_steam1 = 50## [OC]\n",
+ "T_steam2 = 30## [OC]\n",
+ "msteam_dot = 10## [kg/min]\n",
+ "T_water1 = 15## [OC]\n",
+ "T_water2 = 25## [OC]\n",
+ "#***************#\n",
+ "\n",
+ "# Solution (a)\n",
+ "# From the Stem Table:\n",
+ "H1 = 2645.9## [kJ/kg, At 50 OC]\n",
+ "H2 = 768.2## [kJ/kg, At 30 OC]\n",
+ "H3 = 62.982## [kJ/kg, At 15 OC]\n",
+ "H4 = 104.83## [kJ/kg, At 25 OC]\n",
+ "# The mass & Energy balance of the above flow gives:\n",
+ "mwater_dot = msteam_dot*(H1 - H2)/(H4 - H3)## [kg/min]\n",
+ "print \"The mass flow rate of water is %.2f kg/min\\n\"%(mwater_dot)#\n",
+ "\n",
+ "# Solution (b)\n",
+ "Qdot = mwater_dot*(H4 - H3)## [kJ/min]\n",
+ "print \"The rate of heat transfer is %.2f kJ/min\"%(Qdot)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.8 Page: 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.8 - Page: 279\n",
+ "\n",
+ "\n",
+ "Outlrt velocity is 603.3 m/s\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "print \"Example: 7.8 - Page: 279\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "P1 = 500## [kPa]\n",
+ "T1 = 623## [K]\n",
+ "mdot = 12## [kg/s]\n",
+ "P2 = 500## [kPa]\n",
+ "T2 = 523## [K]\n",
+ "Qdot = -120## [kW]\n",
+ "H1 = 3168## [kJ/kg]\n",
+ "H2 = 2976## [kJ/kg]\n",
+ "#************#\n",
+ "\n",
+ "Q = Qdot/mdot## [kJ/kg]\n",
+ "# By energy balance:\n",
+ "# (deltaU**2/2) + g*deltaZ + deltaH = Q - Ws\n",
+ "# Considering negligible change in P.E., deltaZ = 0 & Ws = 0.\n",
+ "# (U2**2 - U1**2)/2 + deltaH = Q\n",
+ "deltaH = H2 - H1## [kJ/kg]\n",
+ "# Neglecting inlet velocity.\n",
+ "U2 = sqrt(2*(Q - deltaH)*1000)## [m/s]\n",
+ "print \"Outlrt velocity is %.1f m/s\\n\"%(U2)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.9 Page: 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.9 - Page: 279\n",
+ "\n",
+ "\n",
+ "Critical Ratio is 0.53\n",
+ "\n",
+ "The discharge velocity is 1174.46 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.9 - Page: 279\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "Pin = 1000## [kPa]\n",
+ "Tin = 600## [K]\n",
+ "Uin = 50## [m/s]\n",
+ "gama = 1.4#\n",
+ "M = 17## [g/mol]\n",
+ "R = 8314## [kJ/mol K]\n",
+ "MachNumber = 2#\n",
+ "#***************#\n",
+ "\n",
+ "# Solution (i)\n",
+ "# Using Eqn. (7.36):\n",
+ "Critical_Ratio = (2/(gama + 1))**(gama/(gama - 1))#\n",
+ "print \"Critical Ratio is %.2f\\n\"%(Critical_Ratio)#\n",
+ "\n",
+ "# Solution (ii)\n",
+ "PV_in = R*Tin/M## [square m]\n",
+ "Uthroat = sqrt(Uin**2 + (2*gama*PV_in/(gama - 1))*(1-(Critical_Ratio)**((gama - 1)/gama)))## [m/s]\n",
+ "Uout = MachNumber*Uthroat## [m/s]\n",
+ "print \"The discharge velocity is %.2f m/s\"%(Uout)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.10 Page: 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.10 - Page: 280\n",
+ "\n",
+ "\n",
+ "(a) Final Velocity is 901.11 m/s\n",
+ "\n",
+ "(b) Final Velocity is 1553.06 m/s\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.10 - Page: 280\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "P1 = 800## [kPa]\n",
+ "T1 = 773## [K]\n",
+ "H1 = 3480## [kJ/kg]\n",
+ "P2 = 100## [kPa]\n",
+ "T2 = 573## [K]\n",
+ "H2 = 3074## [kJ/kg]\n",
+ "#***************#\n",
+ "\n",
+ "# Solution (a)\n",
+ "# Velocity of the fluid exiting the nozzle:\n",
+ "# U2 = sqrt(U1**2 + 2*(H1 - H2))\n",
+ "# Neglecting initial velocity:\n",
+ "U2 = sqrt(2*(H1 - H2)*1000)## [m/s]\n",
+ "print \"(a) Final Velocity is %.2f m/s\\n\"%(U2)#\n",
+ "\n",
+ "# Solution (b)\n",
+ "U1 = 40## [m/s]\n",
+ "U2 = sqrt((U1**2 + 2*(H1 - H2))*1000)## [m/s]\n",
+ "print \"(b) Final Velocity is %.2f m/s\\n\"%(U2)#"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example: 7.11 Page: 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Example: 7.11 - Page: 281\n",
+ "\n",
+ "\n",
+ "Mass flow rate of the steam is 17.50 kg/s\n",
+ "\n",
+ "The temperature of the steam leaving the outlet is 393.38 K\n",
+ "\n",
+ "Area of diffuser outlet is 0.28 square m\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"Example: 7.11 - Page: 281\\n\\n\"\n",
+ "\n",
+ "# Solution\n",
+ "\n",
+ "#*****Data******#\n",
+ "P1 = 100## [kPa]\n",
+ "T1 = 200## [OC]\n",
+ "U1 = 190## [m/s]\n",
+ "A1 = 2000/10**4## [square m]\n",
+ "U2 = 70## [m/s]\n",
+ "P2 = 200## [kPa]\n",
+ "Qdot = 100## [kW]\n",
+ "V1 = 2.172## [cubic m/kg]\n",
+ "H1 = 2875.3## [kJ/kg]\n",
+ "#***************#\n",
+ "\n",
+ "# Solution (a)\n",
+ "mdot = U1*A1/V1## [kg/s]\n",
+ "print \"Mass flow rate of the steam is %.2f kg/s\\n\"%(mdot)#\n",
+ "\n",
+ "# Solution (b)\n",
+ "# Amount of heat transferred to the surrounding per unit steam:\n",
+ "Q = Qdot/mdot## [kJ/kg]\n",
+ "# The Enthalpy at the diffuser outlet can be estimated as:\n",
+ "H2 = Q + H1 + (U1**2 - U2**2)/2## [kJ/kg]\n",
+ "# From the steam table:\n",
+ "T2 = 393.38## [K]\n",
+ "V2 = 1.123## [cubic m/kg]\n",
+ "print \"The temperature of the steam leaving the outlet is %.2f K\\n\"%(T2)#\n",
+ "\n",
+ "# Solution (c)\n",
+ "A2 = V2*mdot/U2## [square m]\n",
+ "print \"Area of diffuser outlet is %.2f square m\\n\"%(A2)#"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}