summaryrefslogtreecommitdiff
path: root/Applied_Thermodynamics/Chapter16.ipynb
diff options
context:
space:
mode:
authorhardythe12014-08-13 11:41:01 +0530
committerhardythe12014-08-13 11:41:01 +0530
commit728bf707ac994b2cf05a32d8985d5ea27536cf34 (patch)
tree5530b1509900ca8d6d21384e33036f50734de927 /Applied_Thermodynamics/Chapter16.ipynb
parentf3e94078a83634b4353ab0cd2de3b0e204a48ac7 (diff)
downloadPython-Textbook-Companions-728bf707ac994b2cf05a32d8985d5ea27536cf34.tar.gz
Python-Textbook-Companions-728bf707ac994b2cf05a32d8985d5ea27536cf34.tar.bz2
Python-Textbook-Companions-728bf707ac994b2cf05a32d8985d5ea27536cf34.zip
adding book
Diffstat (limited to 'Applied_Thermodynamics/Chapter16.ipynb')
-rwxr-xr-xApplied_Thermodynamics/Chapter16.ipynb899
1 files changed, 899 insertions, 0 deletions
diff --git a/Applied_Thermodynamics/Chapter16.ipynb b/Applied_Thermodynamics/Chapter16.ipynb
new file mode 100755
index 00000000..d678e85b
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter16.ipynb
@@ -0,0 +1,899 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:989996224965b46a7f7acf7a19fb2013a5188045b934aa862e6400be6d28d97c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: Reciprocating and Rotary Compressor"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 742"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1*10**2 #Pressure of air entering(in kPa):\n",
+ "n = 1.2 #Index of compression:\n",
+ "p2 = 12*10**2 #Delivery pressure(in kPa):\n",
+ "N = 240 #Speed(in rpm):\n",
+ "T1 = 20+273 #Initial temperature(in K):\n",
+ "r1 = 1.8 #L/D ratio:\n",
+ "nm = 0.88 #Mechanical efficiency:\n",
+ "V1 = 1 #m**3\n",
+ "R = 0.287#Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "m = p1*V1/(R*T1) Mass of air delivered per minute:\n",
+ "T2 = T1*(p2/p1)**((n-1)/n)#Temperature at the end of compression(in K)\n",
+ "W = (n/(n-1))*m*R*(T2-T1)#Work required during compression process(in kJ/min):\n",
+ "Whp = W/60/0.7457 #Work required during compression process(hp): \n",
+ "C = Whp/nm#Capacity of drive required to run compressor(in hp):\n",
+ "Wiso = m*R*T1*log(p2/p1) #Isothermal work required for same compression(in kJ/min):\n",
+ "niso = Wiso/W*100#Isothermal efficiency:\n",
+ "v = 1/N#Volume of aur entering per cycle:\n",
+ "D = (v*4/(pi*r1))**(1/3)*100#Bore diameter(in cm):\n",
+ "L = r1*D#Stroke length(in cm):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Isothermal efficiency: \",round(niso,2),\"%\"\n",
+ "print \"Cylinder dimension, D: \",round(D,2),\"cm\"\n",
+ "print \" L: \",round(L,3),\"cm\"\n",
+ "print \"Rating of drive: \",round(C,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isothermal efficiency: 80.72 %\n",
+ "Cylinder dimension, D: 14.34 cm\n",
+ " L: 25.808 cm\n",
+ "Rating of drive: 7.82 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 745"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r = 7 #Compression ratio:\n",
+ "r1 = 1.2 #L/D ratio:\n",
+ "N = 240 #Speed(in rpm):\n",
+ "p1 = 0.97 #Pressure(in bar):\n",
+ "T1 = 35+273 #Temperature(in K):\n",
+ "V = 20 #Volume(in m**3):\n",
+ "V3 = 0.05\n",
+ "V1 = 1.05\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "n = 1.25 #Index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "p2 = r*p1\n",
+ "m = 10**2*V/(R*300) #Mass of air delivered(in kg/min):\n",
+ "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n",
+ "V4 = V3*r**(1/n) #Volume at state 4(in m**3):\n",
+ "nv = p1*300/T1*(V1-V4)*100 #Volumetric efficiency:\n",
+ "Vs = V/(4*N) #Swept volume(in m**3/cycle):\n",
+ "D = (Vs*4/(pi*r1))**(1/3) #Bore(in m):\n",
+ "L = r1*D #Stroke(in m):\n",
+ "W = n/(n-1)*m*R*(T2-T1)/(60*0.7457) #Work required in reciprocating compressor(in hp):\n",
+ "Wiso = m*R*T1*log(r)/(60*0.7457) #Work done in isothermal process(in hp):\n",
+ "ni = Wiso/W*100 #Isothermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n",
+ "print \"Bore: \",round(D*100,2),\"cm\"\n",
+ "print \"Stroke: \",round(L*100,2),\"cm\"\n",
+ "print \"Isothermal efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 76.8 %\n",
+ "Bore: 28.06 cm\n",
+ "Stroke: 33.68 cm\n",
+ "Isothermal efficiency: 81.8 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 749"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p = 10**2 #Atmospheric pressure(in kPa):\n",
+ "p1 = 1\n",
+ "p3 = 8\n",
+ "Ta = 300 #Temperature(in K):\n",
+ "Va = 4\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "n = 1.2 #Index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T1 = Ta\n",
+ "T2a = 273+30\n",
+ "V1 = Va\n",
+ "m = p*Va/(R*Ta) #Mass of air compressed(in kg/min):\n",
+ "Wi = n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/n)-1)/(60*0.7457)#Work input(in hp):\n",
+ "p2 = sqrt(p1*p3) #Optimum intercooling pressure(in bar):\n",
+ "Wii = 2*n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/(2*n))-1)/(60*0.7457)#Work input for 2nd stage compression(in hp):\n",
+ "Wii = 20.29\n",
+ "V2a = p1*V1/T1*T2a/p2 #Volume of air inlet of HP cylinder(in m**3/min):\n",
+ "W2 = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)/(60*0.7457)+n/(n-1)*p2*10**2*V2a*((p3/p2)**((n-1)/n)-1)/(60*0.7457)\t\t\t\t#Work required(in hp):\n",
+ "W2 = 20.42\n",
+ "ps = (Wi-Wii)/Wi*100 #Percentage saving in work:\n",
+ "pe = (W2-Wii)/W2*100 #% excess work to be done:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Percentage saving in work: \",round(ps,2),\"%\"\n",
+ "print \"Percentage excess work to be done: \",round(pe,3),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage saving in work: 8.68 %\n",
+ "Percentage excess work to be done: 0.637 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 750"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m = 2 #Rate at which air is delivered(in m**3/min):\n",
+ "p1 = 1 #Initial pressure(in bar):\n",
+ "T1 = 300 #K\n",
+ "p = 150 #bar\n",
+ "n = 1.25 #Polytropic index of compression:\n",
+ "p2 = 3.5\n",
+ "p3 = 12.25\n",
+ "p4 = 42.87\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T = T1*(p2/p1)**((n-1)/n) #Temperature at the end of fourth stage(in K):\n",
+ "m = p*10**2*2/(R*T) #Mass of air(in kg):\n",
+ "W = n/(n-1)*m*R*T1*((p2/p1)**((n-1)/n)-1)*4/(60*0.7457) #Work required(in kW):\n",
+ "\n",
+ "print \"Intermediate pressure: \",round(p2,2),\"bar\",round(p3,2),\"bar\",round(p4,2),\"bar respectively\"\n",
+ "print \"Work input: \",round(W,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate pressure: 3.5 bar 12.25 bar 42.87 bar respectively\n",
+ "Work input: 2972.1 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 751"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2 = 4\n",
+ "p3 = 16\n",
+ "n = 1.3 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "T1 = 17+273 #Temperature(in K):\n",
+ "nv = 0.90 #Volumetric efficiency:\n",
+ "Dhp = 0.06 #Bore diameters(in m):\n",
+ "Dlp = 0.12\n",
+ "\n",
+ "#Calculations:\n",
+ "W = n/(n-1)*R*T1*((p2/p1)**((n-1)/n)+(p3/p2)**((n-1)/n)-2) #Work required(in kJ/kg):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Work: \",round(W,2),\"kJ/kg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work: 271.95 kJ/kg\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 752"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import sqrt,log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 200 #Speed(in rpm):\n",
+ "m = 4 #Mass flow rate(in kg/min):\n",
+ "p1 = 1 #Pressure(in bar):\n",
+ "p6 = 25\n",
+ "T1 = 17+273 #Temperatures(in K):\n",
+ "Clp = 0.04 #Clearance volumes:\n",
+ "Chp = 0.05\n",
+ "n = 1.25 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "r = sqrt(p6/p1) #Pressure ratio:\n",
+ "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n",
+ "T6 = T5*r**((n-1)/n) #Temperature at state 6(in K):\n",
+ "W = 2*n/(n-1)*m*R*T1*(r**((n-1)/n)-1) #Actual compression work requirement(in kJ/min):\n",
+ "Wi = m*R*T1*log(p6/p1) #Work required if process is isothermal(in kJ/min):\n",
+ "ni = Wi/W #Isothermal efficiency:\n",
+ "Vf = m*R*T1/(p1*10**2)#Free air delivered(in m**3/min):\n",
+ "Q = W/2-m*Cp*(T2-T1) #Heat transferred in HP & LP cylinder(in kJ/min):\n",
+ "nvhp = 1+Chp-Chp*r**(1/n) #Volumetric efficiency of HP cylinder:\n",
+ "nvlp = 1+Clp-Clp*r**(1/n) #Volumetric efficiency of LP cylinder:\n",
+ "Vshp = Vf/(r*N*nvhp) #Stroke volume of HP cylinder(in m**3):\n",
+ "Vchp = Chp*Vshp #Clearance volume Of HP cylinder(in m**3):\n",
+ "Vthp = Vshp+Vchp #Total HP cylinder volume(in m**3):\n",
+ "Vslp = Vf/(N*nvlp) #Stroke volume of LP cylinder(in m**3):\n",
+ "Vclp = Clp*Vslp #Clearance volume of LP cylinder(in m**3):\n",
+ "Vtlp = Vslp+Vclp #Total LP cylinder volume(in m**3):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required: \",round(W/(60*0.7457),2),\"hp\"\n",
+ "print \"Isothermal efficiency: \",round(ni*100,2),\"%\"\n",
+ "print \"Free air delivered: \",round(Vf,2),\"m^3/min\"\n",
+ "print \"Heat transferred in HP & LP cylinder: \",round(Q,2),\"kJ/min\"\n",
+ "print \"HP cylinder volume: \",round(Vthp*10**3,3),\" x 10^-3 m^3\"\n",
+ "print \"LP cylinder volume: \",round(Vtlp,6),\"m**3\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required: 28.26 hp\n",
+ "Isothermal efficiency: 84.77 %\n",
+ "Free air delivered: 3.33 m^3/min\n",
+ "Heat transferred in HP & LP cylinder: 190.2 kJ/min\n",
+ "HP cylinder volume: 4.024 x 10^-3 m^3\n",
+ "LP cylinder volume: 0.019342 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 755"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import sqrt,pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 200 #Speed(in rpm):\n",
+ "n = 1.2 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "D = 0.30 #Bore(in m):\n",
+ "L = 0.40 #Stroke(in m):\n",
+ "C = 0.05 #Clearance volume:\n",
+ "p1 = 1 #Pressure(in bar):\n",
+ "p5 = 2.9\n",
+ "p6 = 9\n",
+ "T1 = 25+273 #Temperatures(in K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "p2 = sqrt(p6/p1) #Optimum intercooling pressure(in bar):\n",
+ "Vlp = pi*D**2/4*L*N*2 #Volume of LP cylinder(in m**3/min):\n",
+ "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n",
+ "V1 = Vlp*nvlp #Volume of air inhaled in LP stage(in m**3/min):\n",
+ "m = p1*10**2*V1/(R*T1) #Mass of air per minute(in kg/min):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature after compression(in K):\n",
+ "V5 = m*R*T5/(p5*10**2) #Volume of air going into HP cylinder(in m**3/min):\n",
+ "nvhp = nvlp\n",
+ "Vhp = V5/nvhp #Volume of HP cylinder(in m**3/min):\n",
+ "Dhp = sqrt(Vhp*4/(pi*L*2*N)) #Diameter of bore(in m):\n",
+ "Q = m*Cp*(T2-T5) #Heat rejected in intercooler(in kJ/min):\n",
+ "T6 = T5*(p6/p5)**((n-1)/n) #Temperature at state 6(in K):\n",
+ "Whp = n/(n-1)*m*R*(T6-T5)/(60*0.7457)#Work input required for HP stage(in kJ/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Heat rejected in intercooler: \",round(Q,2),\"kJ/min\"\n",
+ "print \"Bore of HP cylinder: \",round(Dhp*100,2),\"cm\"\n",
+ "print \"Horse power required to drive HP stage: \",round(Whp,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat rejected in intercooler: 734.86 kJ/min\n",
+ "Bore of HP cylinder: 17.62 cm\n",
+ "Horse power required to drive HP stage: 29.15 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi, sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "h = 75.6 #Barometer reading(in cm):\n",
+ "d = 0.013591 #Density of mercury(in kg/cm**3):\n",
+ "d1 = 15*10**(-3) #Diameter of orifice(in m):\n",
+ "r1 = 0.65 #Coefficient of discharge:\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "T = 25+273 #Atmospheric temperature(in K):\n",
+ "h1 = 13 #Manometer reading(in cm):\n",
+ "R = 0.287\n",
+ "\n",
+ "#Calculations:\n",
+ "A = pi*d1**2/4 #Cross-sectional area of orifice(in m**2):\n",
+ "p = h*d*g*10 #Atmospheric pressure(in kPa):\n",
+ "v = (R*T)/p #Specific volume at atmospheric conditions(in m**3/kg):\n",
+ "da = 1/v #Density of air(in kg/m**3):\n",
+ "pd = h1*d*g*10 #Pressure difference across orifice(in kPa):\n",
+ "ha = pd*10**3/(da*g) #Height of air column(in m):\n",
+ "f = r1*A*sqrt(2*g*ha)*60 #Free air delivery(in m**3/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Free air delivery: \",round(f,3),\"m**3/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Free air delivery: 1.182 m**3/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page no. 757"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "#Variable Declaration: \n",
+ "D = 0.10 #Bore(in m):\n",
+ "L = 0.08 #Stroke(in m):\n",
+ "N = 500 #Speed(in rpm):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "T = 27+273 #Atmospheric temperature(in K):\n",
+ "r = 0.30 #Radius of arm of spring balance(in m):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "f = 15/60 #Free air delivery(in m**3/min):\n",
+ "\n",
+ "#Calculations:\n",
+ "V = pi*D**2*L/4 #Volume of cylinder(in m**3):\n",
+ "nv = f/(V*N)*100 #Volumetric efficiency:\n",
+ "W = 2*pi*N*100*g*r*10**(-3)/(60*0.7457) #Shaft output(in hp):\n",
+ "W1 = W/f #Shaft output per m**3 of free air per min:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n",
+ "print \"Shaft output per m**3 of free air: \",round(W1,2),\"hp per m**3 of free air per minute\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 79.58 %\n",
+ "Shaft output per m**3 of free air: 82.66 hp per m**3 of free air per minute\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page no. 758"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p2 = 180 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "T1 = 300 #Temperatures(in K):\n",
+ "T2 = 273+150\n",
+ "n = 1.25 #Index of polytropic compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "i = (n-1)/n*log(p2/p1)/log(T2/T1) #Number of stages:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Number of stages: \",round(i) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Number of stages: 3.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page no. 759"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p10 = 20\n",
+ "T1 = 300 #Temperatures(in K):\n",
+ "C = 0.04 #Clearance:\n",
+ "D = 0.30 #Bore(in m):\n",
+ "L = 0.20 #Stroke(in m):\n",
+ "n = 1.25 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "T5 = T1\n",
+ "T9 = T1\n",
+ "p2 = p1*(20)**(1/3) #Pressure at stage 2(in bar):\n",
+ "p6 = p10/(20**(1/3))\n",
+ "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency of LP stage:\n",
+ "Vs = pi*D**2/4*L #LP swept volume(in m**3):\n",
+ "Vsa = nvlp*Vs #Effective swept volume(in m**3):\n",
+ "T10 = T9*(p10/p6)**((n-1)/n) #Temperature of air delivered(in K):\n",
+ "Vd = p1/p10*Vsa*T10/T1 #Volume of air delivered(in m**3):\n",
+ "W = 3*(n/(n-1))*R*T1*((p2/p1)**((n-1)/n)-1) #Total work done(in kJ/kg of air):\n",
+ "\n",
+ "#Results:\n",
+ "print \"Intermediate pressure: \",round(p2,3),\"bar\",round(p6,3),\"bar\"\n",
+ "print \"Effective swept volume of LP cylinder: \",round(Vsa,5),\"m**3\"\n",
+ "print \"Temperature of air delivered: \",round(T10,2),\"K\"\n",
+ "print \"Volume of air delivered: \",round(Vd*10**4,4),\" x 10^-4 m**3\"\n",
+ "print \"Work done: \",round(W,2),\"kJ/kg of air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Intermediate pressure: 2.714 bar 7.368 bar\n",
+ "Effective swept volume of LP cylinder: 0.01345 m**3\n",
+ "Temperature of air delivered: 366.32 K\n",
+ "Volume of air delivered: 8.2089 x 10^-4 m**3\n",
+ "Work done: 285.49 kJ/kg of air\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page no. 760"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import log\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2 = 6\n",
+ "p6 = 30\n",
+ "T6 = 273+150 #Temperatures(in K):\n",
+ "T5 = 273+35\n",
+ "T1 = 300\n",
+ "Clp = 0.05 #Clearance volumes:\n",
+ "Chp = 0.07\n",
+ "m = 2 #Mass flow rate(in kg/s):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n",
+ "Cv = 0.72\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "p5 = p2\n",
+ "n = 1/(1-log(T6/T5)/log(p6/p5)) #Index of compression:\n",
+ "nvlp = 1+Clp-Clp*(p2/p1)**(1/n) #Volumetric efficiency of LP cylinder:\n",
+ "nvhp = 1+Chp-Chp*(p6/p5)**(1/n) #Volumetric efficiency of HP cylinder:\n",
+ "Vslp = m*R*T1*60/(p1*10**2*nvlp) #Swept volume of LP cylinder(in m**3/min):\n",
+ "Vshp = m*R*T5*60/(p2*10**2*nvhp) #Swept volume of HP cylinder(in m**3/min):\n",
+ "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "Q = m*Cp*(T2-T5)#Cooling required in intercooler(in kW):\n",
+ "W = n/(n-1)*m*R*((T1*((p2/p1)**((n-1)/n)-1))+(T5*((p6/p5)**((n-1)/n)-1)))#Work input required(in kW):\n",
+ "Qlp = m*(r-n)/(n-1)*Cv*(T2-T1)#Heat transferred in LP cylinder(in kW):\n",
+ "Qhp = m*(r-n)/(n-1)*Cv*(T6-T5) #Heat transferred in HP cylinder(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Swept volume of LP cylinder: \",round(Vslp,2),\"m**3/min\"\n",
+ "print \"Swept volume of HP cylinder: \",round(Vshp,2),\"m**3/min\"\n",
+ "print \"Heat picked up in the intercooler: \",round(Q,2),\"kW\"\n",
+ "print \"Total work required: \",round(W,2),\"kW\"\n",
+ "print \"Amount of cooling required in LP cylinder: \",round(Qlp,2),\"kW\"\n",
+ "print \"Amount of cooling required in HP cylinder: \",round(Qhp,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Swept volume of LP cylinder: 123.11 m**3/min\n",
+ "Swept volume of HP cylinder: 21.69 m**3/min\n",
+ "Heat picked up in the intercooler: 238.94 kW\n",
+ "Total work required: 704.91 kW\n",
+ "Amount of cooling required in LP cylinder: 115.13 kW\n",
+ "Amount of cooling required in HP cylinder: 104.18 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 15, page no. 763"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "p2 = 2 #Pressures(in bar):\n",
+ "p1 = 1\n",
+ "V1 = 0.5 #Volume(in m**3):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "Wr = (p2-p1)*10**2*V1 #IP required(in kW):\n",
+ "Wi = r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)#IP when isentropic compression occurs(in kW):\n",
+ "ni = Wi/Wr*100 #Isentropic efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power of roots blower: \",round(Wr/0.7457,2),\"hp\"\n",
+ "print \"Isentropic efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power of roots blower: 67.05 hp\n",
+ "Isentropic efficiency: 76.65 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16, page no. 764"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V1 = 0.6 #Volume flow rate(in m**3/kg):\n",
+ "p1 = 1 #Pressures(in bar):\n",
+ "p2a = 2.3\n",
+ "r = 1.4\n",
+ "r1 = 0.7#Ratio of V1/V2:\n",
+ "\n",
+ "#Calculations: \n",
+ "p2 = p1*(1/r1)**r #Pressure at state 2(in bar):\n",
+ "Wv = (r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)+(p2a-p2)*10**2*V1*r1)/0.7457#IP required for vaned compressor(in hp):\n",
+ "Wi = (r/(r-1)*p1*10**2*V1*((p2a/p1)**((r-1)/r)-1))/0.7457 #Power requirement when compression occurs isentropically(in hp):\n",
+ "ni = Wi/Wv*100 #Isentropic efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power required: \",round(Wv,3),\"hp\"\n",
+ "print \"Isentropic efficiency: \",round(ni,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power required: 79.928 hp\n",
+ "Isentropic efficiency: 94.66 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17, page no. 765"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "T0 = 300 #Temperature(in K):\n",
+ "V1 = 50 #Velocity(in m/s):\n",
+ "m = 18 #Mass flow rate(in kg/min):\n",
+ "Cp = 1.0032 #Specifc heat(in kJ/kg.K):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "ni = 0.75 #Isentropic efficiency:\n",
+ "r1 = 4 #Pressure ratio:\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "\n",
+ "#Calculations:\n",
+ "T1 = T0+V1**2/(2*Cp*10**3) #Stagnation temperature(in K):\n",
+ "T2a = T1*r1**((r-1)/r)\n",
+ "T2 = (T2a-T1)/ni+T1\n",
+ "BP = m*Cp*(T2-T1)/(60*nm*0.7457) #Brake power required(in hp):\n",
+ " \n",
+ "#Results: \n",
+ "print \"Total head temperature at exit: \",round(T2,2),\"K\"\n",
+ "print \"Brake power required: \",round(BP,2),\"hp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total head temperature at exit: 496.45 K\n",
+ "Brake power required: 87.54 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18, page no. 766"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "V = 0.015 #Piston printlacement per revolution(in m**3/rev):\n",
+ "N = 500 #Speed(in rpm):\n",
+ "C = 0.05 #Clearance:\n",
+ "p2 = 6 #Pressures(in bar):\n",
+ "n = 1.3 #Index of compression:\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "T1 = 20+273 #Temperature(in K):\n",
+ "r = 1.4 #Adiabatic index of compression:\n",
+ "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n",
+ "\n",
+ "#Calculations:\n",
+ "p1 = 1\n",
+ "nv = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n",
+ "Vs = V*2*N #Swept volume(in m**3/min):\n",
+ "V1 = Vs*0.85 #Actual air inhaled(in m**3/min):\n",
+ "m = p1*10**2*V1/(R*T1) #Mass of air entering(in kg/min):\n",
+ "P = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)#Power required(in kJ/min):\n",
+ "T2 = 298*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n",
+ "Q = m*Cv*(r-n)/(n-1)*(T2-T1) #Heat transferred during compression(in kJ/min):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Volumetric efficiency: \",round(nv*100,2),\"%\"\n",
+ "print \"Power required: \",round(P,2),\"kJ/min\"\n",
+ "print \"Heat rejected during compression: \",round(Q,2),\"kJ/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric efficiency: 85.16 %\n",
+ "Power required: 2829.21 kJ/min\n",
+ "Heat rejected during compression: 571.89 kJ/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file