summaryrefslogtreecommitdiff
path: root/Applied_Thermodynamics/Chapter17.ipynb
diff options
context:
space:
mode:
authorhardythe12014-08-13 11:41:01 +0530
committerhardythe12014-08-13 11:41:01 +0530
commit7e82f054d405211e1e8760524da8ad7c9fd75286 (patch)
tree1790cf5a7460b48582da6c35417a85f3a1389a81 /Applied_Thermodynamics/Chapter17.ipynb
parent98bff1c301dd3b8b14983037a8a483e3eae1796d (diff)
downloadPython-Textbook-Companions-7e82f054d405211e1e8760524da8ad7c9fd75286.tar.gz
Python-Textbook-Companions-7e82f054d405211e1e8760524da8ad7c9fd75286.tar.bz2
Python-Textbook-Companions-7e82f054d405211e1e8760524da8ad7c9fd75286.zip
adding book
Diffstat (limited to 'Applied_Thermodynamics/Chapter17.ipynb')
-rwxr-xr-xApplied_Thermodynamics/Chapter17.ipynb591
1 files changed, 591 insertions, 0 deletions
diff --git a/Applied_Thermodynamics/Chapter17.ipynb b/Applied_Thermodynamics/Chapter17.ipynb
new file mode 100755
index 00000000..897d24a0
--- /dev/null
+++ b/Applied_Thermodynamics/Chapter17.ipynb
@@ -0,0 +1,591 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1c2e3038adc30a476d490492d6ffb75ea411a368f94f9012a25719b295c63337"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Introduction to Internal Combustion Engines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page no. 790"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "r1 = 1.2 #L/D ratio:\n",
+ "D = 0.12 #Cylinder diameter(in m):\n",
+ "A = 30*10**(-4) #Area of indicated diagram(in m**2):\n",
+ "k = 20*10**3 #Spring constant(in kN/m**2):\n",
+ "N = 2000 #Rpm of engine:\n",
+ "r = 0.10 #Percentage power lost:\n",
+ "\n",
+ "#Calculations:\n",
+ "L = r1*D #Stroke length(in m):\n",
+ "l = L/2 #Length of indicator diagram(in m):\n",
+ "mep = A*k*10**3/l #Mep(in N/m**2):\n",
+ "A2 = pi*D**2/4 #Cross-sectional area of piston(in m**2):\n",
+ "IP = 4*mep*A2*L*N/(2*60) #Total indicated power for 4 cylinders(in W):\n",
+ "FP = r*IP #Fricitional loss(in W):\n",
+ "BP = IP-FP #Brake power available(in W):\n",
+ "nm = BP/IP*100 #Mechanical efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,1),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 90477.9 W\n",
+ "Mechanical efficiency: 90.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page no. 791"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "A = 40*10**(-4) #Indicator diagram area & length(in m**2 & m):\n",
+ "l = 0.08\n",
+ "D = 0.15 #Bore(in m):\n",
+ "L = 0.20 #Stroke(in m):\n",
+ "N = 100 #Rpm of motor:\n",
+ "\n",
+ "#Calculations:\n",
+ "k = 1.5*10**8 #Spring constant(in Pa/m):\n",
+ "mep = A*k/l #Mep(in Pa):\n",
+ "IP = (pi*D**2/4*L*mep*N/60*2)/10**3 #Indicated power(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Power required to drive: \",round(IP,2),\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power required to drive: 88.36 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page no. 791"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "#Variable Declaration: \n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "BP = 38 #Rating(in kW):\n",
+ "\n",
+ "#Calculations:\n",
+ "IP = BP/nm #Indicated power(in kW):\n",
+ "FP = IP-BP #Fricitional loss(in kW):\n",
+ "BP1 = 0.25*BP #Brake power at quater load(in kW):\n",
+ "nm1 = BP1/(BP1+FP)*100 #Mechanical efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,2),\"W\"\n",
+ "print \"Fricitonal power loss: \",round(FP,2),\"kw\"\n",
+ "print \"Mechanical efficiency: \",round(nm1,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 42.22 W\n",
+ "Fricitonal power loss: 4.22 kw\n",
+ "Mechanical efficiency: 69.23 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page no. 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "m1 = 0.25 #Specific fuel consumption(in kg/kW.h):\n",
+ "pbmep = 1.5*10**3 #Brake mean effective pressure(in kPa):\n",
+ "N = 100 #Speed of engine(in rpm):\n",
+ "D = 0.85 #Bore of cylinder(in m):\n",
+ "L = 2.20 #Stroke(in m):\n",
+ "C = 43*10**3 #Calorific value of diesel(in kJ/kg):\n",
+ "BP = pbmep*L*(pi*D**2/4)*N/60 #Brake power of engine(in kW):\n",
+ "m = m1*BP #Fuel consumption(in kg/hr):\n",
+ "q = m*C/3600 #Heat from fuel(in kJ/s):\n",
+ "nb = BP/q*100 #Brake thermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP/100,2),\"MW\"\n",
+ "print \"Fuel consumption rate: \",round(m,2),\"kg/hr\"\n",
+ "print \"Brake thermal efficiency: \",round(nb,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 31.21 MW\n",
+ "Fuel consumption rate: 780.24 kg/hr\n",
+ "Brake thermal efficiency: 33.49 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page no. 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "pb = 6*10**2 #Effective pressure(in kPa):\n",
+ "N = 600 #Speed:\n",
+ "m1 = 0.25 #Specific fuel consumption(in kg/kW.h)\n",
+ "D = 0.20 #BOre(in m):\n",
+ "L = 0.30 #Stroke length(in m):\n",
+ "r = 26 #Air fuel ratio:\n",
+ "C = 43*10**3 #Calorific value(in kJ/kg):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "p = 1*10**2 #kPa #Ambient conditions:\n",
+ "T = 300 #K\n",
+ "\n",
+ "#Calculation:\n",
+ "nb = 3600/(m1*C)*100 #Brake thermal efficiency:\n",
+ "BP = 4*pb*L*(pi*D**2/4)*N/60 #Brake power(in kW):\n",
+ "ma = m1*BP*r/60 #Air consumption rate(in kg/min):\n",
+ "Va = ma*R*T/p #Volume(in m**3/min):\n",
+ "Vs = pi*(0.3)**2*0.4/4 #Swept volume(in m**3):\n",
+ "nv = Va/(Vs*N/2*4)*100 #Volumetric efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake thermal efficiency: \",round(nb,2),\"%\"\n",
+ "print \"Brake power: \",round(BP,2),\"kW\"\n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake thermal efficiency: 33.49 %\n",
+ "Brake power: 226.19 kW\n",
+ "Volumetric efficiency: 62.18 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page no. 793"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi,sqrt\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "n = 0.7 #Volumetric efficiency\n",
+ "r = 19 #Air fuel ratio:\n",
+ "N = 3000 #Speed(in rpm):\n",
+ "m = 5 #Fuel consumption rate(in litres/hr):\n",
+ "sg = 0.7 #Specific gravity:\n",
+ "s = 500 #Piston speed(in m/min):\n",
+ "p = 6*10**2 #Mep(in kPa):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "nm = 0.8 #Mechanical efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "L = s/(2*N) #Stroke length(in m):\n",
+ "ma = r*m*sg/60 #Air requirement(in kg/min):\n",
+ "Va = ma*R*288/(1.013*10**2) #Volume of air sucked(in m**3/min):\n",
+ "D = sqrt(Va*4/(pi*L*N*2*n)) #Bore diameter(in m):\n",
+ "IP = p*L*(pi*D**2/4*N*2)/60 #Indicated power(in kW):\n",
+ "BP = IP*nm #Brake power(in kW):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 10.34 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page no. 794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "FP = 5 #Friction power(in kW):\n",
+ "N = 3000 #Rpm:\n",
+ "D = 0.20 #Bore(in m):\n",
+ "L = 0.30 #Stroke(in m):\n",
+ "m = 0.15 #Fuel supplied at rate(in kg/min):\n",
+ "F = 20 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "\n",
+ "#Calculations:\n",
+ "BP = 2*pi*N*(F*g*r*10**(-3))/60 #Brake power(in kW):\n",
+ "IP = BP+FP #Indicated power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n",
+ "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n",
+ "nith = nbth/nm #Indicated thermal efficiency:\n",
+ "Pimep = IP/(L*(pi*D**2/4)*N/60) #Indicated mep(in kPa):\n",
+ "Pbmep = Pimep*nm #Brake mep(in kPa):\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"KW\"\n",
+ "print \"Indicated power: \",round(IP,2),\"KW\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n",
+ "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n",
+ "print \"Indicated thermal efficiency: \",round(nith,2),\"%\"\n",
+ "print \"Brake mean effective pressure: \",round(Pbmep,2),\"kPa\"\n",
+ "print \"Indicated mean effective pressure: \",round(Pimep,2),\"kPa\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 30.82 KW\n",
+ "Indicated power: 35.82 KW\n",
+ "Mechanical efficiency: 86.04 %\n",
+ "Brake thermal efficiency: 28.67 %\n",
+ "Indicated thermal efficiency: 33.32 %\n",
+ "Brake mean effective pressure: 65.4 kPa\n",
+ "Indicated mean effective pressure: 76.01 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page no. 795"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 300 #Speed(in rpm):\n",
+ "BP = 250 #Brake power(in kW):\n",
+ "D = 0.30 #Bore diameter(in m):\n",
+ "L = 0.25 #Stroke length(in m):\n",
+ "m = 1 #Fuel consumption rate(in kg/min):\n",
+ "r = 10 #Air fuel ratio:\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "\n",
+ "#Calculations:\n",
+ "Pimep = 0.8*10**3 #Indicated mep(in kPa):\n",
+ "R = 0.287 #Gas constant(in kJ/kg.K):\n",
+ "IP = Pimep*L*(pi*D**2/4)*N*4/60\t#Indicated power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n",
+ "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n",
+ "Vs = pi*D**2*L/4 #Swept volume(in m**3):\n",
+ "ma = round(1.013*10**2*Vs/(R*300),2)#Mass of air(in kg):\n",
+ "nv = m*r/(ma*4*N/2)*100\t#Volumetric efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n",
+ "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n",
+ "print \"Volumetric efficiency: \",round(nv,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 282.74 kW\n",
+ "Mechanical efficiency: 88.42 %\n",
+ "Brake thermal efficiency: 34.88 %\n",
+ "Volumetric efficiency: 83.33 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ " \n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 25 #Indicator constant(in kN/m**2):\n",
+ "N = 300 #Rpm:\n",
+ "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n",
+ "F = 60 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "m = 0.12 #Fuel supplied at rate(in kg/min):\n",
+ "Pimep = 10*k #Indicatedmep(in kPa):\n",
+ "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n",
+ "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 9.38 kW\n",
+ "Brake power: 4.62 W\n",
+ "Mechanical efficiency: 49.31 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page no. 796"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "k = 25 #Indicator constant(in kN/m**2):\n",
+ "N = 300 #Rpm:\n",
+ "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n",
+ "F = 60 #Load(in kg):\n",
+ "r = 0.5 #Radius(in m):\n",
+ "C = 43000 #Calorific value of fuel(in kJ/kg):\n",
+ "g = 9.81 #Acceleration due to gravity(in m/s**2):\n",
+ "m = 0.12 #Fuel supplied at rate(in kg/min):\n",
+ "Pimep = 10*k #Indicatedmep(in kPa):\n",
+ "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n",
+ "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n",
+ "nm = BP/IP #Mechanical efficiency:\n",
+ "\n",
+ "#Results:\n",
+ "print \"Indicated power: \",round(IP,2),\"kW\"\n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Mechanical efficiency: \",round(nm*100,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Indicated power: 9.38 kW\n",
+ "Brake power: 4.62 W\n",
+ "Mechanical efficiency: 49.31 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page no. 797"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "from math import pi\n",
+ "\n",
+ "#Variable Declaration: \n",
+ "N = 1500 #Speed of engine(in rpm):\n",
+ "T = 300 #Brake torque(in Nm):\n",
+ "m = 4 #Fuel consumed(in kg):\n",
+ "m1 = 15 #Cooling water circulated(in kg/min):\n",
+ "C = 42000 #Calorific value of fuel(in kJ/kg):\n",
+ "nm = 0.90 #Mechanical efficiency:\n",
+ "\n",
+ "#Calculations:\n",
+ "BP = 2*pi*N*T/(60*10**3) #Brake power(in kW):\n",
+ "BSFC = m*60/(m1*BP) #BSFC(in kg/kW.hr):\n",
+ "IP = BP/nm #Indicated power(in kW):\n",
+ "nith = IP/(m*C/(m1*60))*100#Indicated thermal efficiency:\n",
+ "\n",
+ "#Results: \n",
+ "print \"Brake power: \",round(BP,2),\"W\"\n",
+ "print \"Brake specific fuel consumption: \",round(BSFC,2),\"kg/kW.hr\"\n",
+ "print \"Indicated thermal efficiency: \",round(nith,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Brake power: 47.12 W\n",
+ "Brake specific fuel consumption: 0.34 kg/kW.hr\n",
+ "Indicated thermal efficiency: 28.05 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file