summaryrefslogtreecommitdiff
path: root/sample_notebooks/HirenShah
diff options
context:
space:
mode:
Diffstat (limited to 'sample_notebooks/HirenShah')
-rwxr-xr-xsample_notebooks/HirenShah/ch1.ipynb377
1 files changed, 377 insertions, 0 deletions
diff --git a/sample_notebooks/HirenShah/ch1.ipynb b/sample_notebooks/HirenShah/ch1.ipynb
new file mode 100755
index 00000000..e4371040
--- /dev/null
+++ b/sample_notebooks/HirenShah/ch1.ipynb
@@ -0,0 +1,377 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3303c10fbdf0badf34a5e53239631d65156a6198f60e9dc97e75e274501b7ad0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Introduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page No : 3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given:\n",
+ "n = 4. #Number of cylinders\n",
+ "d = 68./10 #Bore in cm\n",
+ "l = 75./10 #Stroke in cm\n",
+ "r = 8. #Compression ratio\n",
+ "\n",
+ "#Solution:\n",
+ "V_s = (math.pi/4)*d**2*l #Swept volume of one cylinder in cm**3\n",
+ "cubic_capacity = n*V_s #Cubic capacity in cm**3\n",
+ "#Since, r = (V_c + V_s)/V_c\n",
+ "V_c = V_s/(r-1) #Clearance volume in cm**3\n",
+ "\n",
+ "#Results:\n",
+ "print \" The cubic capacity of the engine = %.1f cm**3\"%(cubic_capacity)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The cubic capacity of the engine = 1089.5 cm**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page No : 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Given:\n",
+ "ip = 10. #Indicated power in kW\n",
+ "eta_m = 80. #Mechanical efficiency in percent\n",
+ "\n",
+ "#Solution:\n",
+ "#Since, eta_m = bp/ip\n",
+ "bp = (eta_m/100)*ip #Brake power in kW\n",
+ "fp = ip-bp #Friction power in kW\n",
+ "\n",
+ "#Results:\n",
+ "print \" The brake power delivered, bp = %d kW\"%(bp)\n",
+ "print \" The friction power, fp = %d kW\"%(fp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The brake power delivered, bp = 8 kW\n",
+ " The friction power, fp = 2 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page No : 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Given:\n",
+ "bp = 100. #Brake power at full load in kW\n",
+ "fp = 25. #Frictional power in kW (printing error)\n",
+ "\n",
+ "#Solution:\n",
+ "eta_m = bp/(bp+fp) #Mechanical efficiency at full load\n",
+ "#(a)At half load\n",
+ "bp = bp/2 #Brake power at half load in kW\n",
+ "eta_m1 = bp/(bp+fp) #Mechanical efficiency at half load\n",
+ "#(b)At quarter load\n",
+ "bp = bp/2 #Brake power at quarter load in kW\n",
+ "eta_m2 = bp/(bp+fp) #Mechanical efficiency at quarter load\n",
+ "\n",
+ "#Results:\n",
+ "print \" The mechanical efficiency at full load, eta_m = %d percent\"%(eta_m*100)\n",
+ "print \" The mechanical efficiency, \\\n",
+ "\\na)At half load, eta_m = %.1f percent \\\n",
+ "\\nb)At quarter load, eta_m = %d percent\"%(eta_m1*100,eta_m2*100)\n",
+ "\n",
+ "#Data in the book is printed wrong\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The mechanical efficiency at full load, eta_m = 80 percent\n",
+ " The mechanical efficiency, \n",
+ "a)At half load, eta_m = 66.7 percent \n",
+ "b)At quarter load, eta_m = 50 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page No : 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#Calculations on four stroke petrol engine\n",
+ "#Given:\n",
+ "bp = 35. #Brake power in kW\n",
+ "eta_m = 80. #Mechanical efficiency in percent\n",
+ "bsfc = 0.4 #Brake specific fuel consumption in kg/kWh\n",
+ "A_F = 14./1 #Air-fuel ratio\n",
+ "CV = 43000. #Calorific value in kJ/kg\n",
+ "\n",
+ "#Solution:\n",
+ "#(a)\n",
+ "ip = bp*100/eta_m #Indicated power in kW\n",
+ "#(b)\n",
+ "fp = ip-bp #Frictional power in kW\n",
+ "#(c)\n",
+ "#Since, 1 kWh = 3600 kJ\n",
+ "eta_bt = 1/(bsfc*CV/3600) #Brake thermal efficiency\n",
+ "#(d)\n",
+ "eta_it = eta_bt/eta_m*100 #Indicated thermal efficiency\n",
+ "#(e)\n",
+ "m_f = bsfc*bp #Fuel consumption in kg/hr\n",
+ "#(f)\n",
+ "m_a = A_F*m_f #Air consumption in kg/hr\n",
+ "\n",
+ "\n",
+ "#Results:\n",
+ "print \" a)The indicated power, ip = %.2f kW \\\n",
+ "\\nb)The friction power, fp = %.2f kW\"%(ip,fp)\n",
+ "print \" c)The brake thermal efficiency, eta_bt = %.1f percent \\\n",
+ "\\nd)The indicated thermal efficiency, eta_it = %.1f percent\"%(eta_bt*100,eta_it*100)\n",
+ "print \" e)The fuel consumption per hour, m_f = %.1f kg/hr \\\n",
+ "\\nf)The air consumption per hour, m_a = %d kg/hr\"%(m_f,m_a)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a)The indicated power, ip = 43.75 kW \n",
+ "b)The friction power, fp = 8.75 kW\n",
+ " c)The brake thermal efficiency, eta_bt = 20.9 percent \n",
+ "d)The indicated thermal efficiency, eta_it = 26.2 percent\n",
+ " e)The fuel consumption per hour, m_f = 14.0 kg/hr \n",
+ "f)The air consumption per hour, m_a = 196 kg/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No : 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Given:\n",
+ "F_A = 0.07/1 #Fuel-air ratio\n",
+ "bp = 75. #Brake power in kW\n",
+ "eta_bt = 20. #Brake thermal efficiency in percent\n",
+ "rho_a = 1.2 #Density of air in kg/m**3\n",
+ "rho_f = 4*rho_a #Density of fuel vapour in kg/m**3\n",
+ "CV = 43700. #Calorific value of fuel in kJ/kg\n",
+ " \n",
+ "#Solution:\n",
+ "m_f = bp*3600/(eta_bt*CV/100) #Fuel consumption in kg/hr\n",
+ "m_a = m_f/F_A #Air consumption in kg/hr\n",
+ "V_a = m_a/rho_a #Volume of air in m**3/hr\n",
+ "V_f = m_f/rho_f #Volume of fuel in m**3/hr\n",
+ "V_mixture = V_f+V_a #Mixture volume in m**3/hr\n",
+ " \n",
+ "#Results:\n",
+ "print \" The air consumption, m_a = %.1f kg/hr\"%(m_a)\n",
+ "print \" The volume of air required, V_a = %.1f m**3/hr\"%(V_a)\n",
+ "print \" The volume of mixture required = %.1f m**3/hr\"%(V_mixture) #printing error)\n",
+ " #Answer in the book is printed wrong\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The air consumption, m_a = 441.3 kg/hr\n",
+ " The volume of air required, V_a = 367.8 m**3/hr\n",
+ " The volume of mixture required = 374.2 m**3/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6 Page No : 28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given:\n",
+ "bp = 5. #Brake power in kW\n",
+ "eta_it = 30. #Indicated thermal efficiency in percent\n",
+ "eta_m = 75. #Mechanical efficiency in percent (printing error)\n",
+ "\n",
+ "#Solution:\n",
+ "ip = bp*100/eta_m #Indicated power in kW\n",
+ "CV = 42000. #Calorific value of diesel(fuel) in kJ/kg\n",
+ "m_f = ip*3600/(eta_it*CV/100) #Fuel consumption in kg/hr\n",
+ "#Density of diesel(fuel) = 0.87 kg/l\n",
+ "rho_f = 0.87 #Density of fuel in kg/l\n",
+ "V_f = m_f/rho_f #Fuel consumption in l/hr\n",
+ "isfc = m_f/ip #Indicated specific fuel consumption in kg/kWh\n",
+ "bsfc = m_f/bp #Brake specific fuel consumption in kg/kWh\n",
+ "\n",
+ "#Results:\n",
+ "print \" The fuel consumption of engine, m_f in, \\\n",
+ "\\na)kg/hr = %.3f kg/hr \\\n",
+ "\\nb)litres/hr = %.2f l/hr\"%(m_f,V_f)\n",
+ "print \" c)Indicated specific fuel consumption, isfc = %.3f kg/kWh\"%(isfc)\n",
+ "print \" d)Brake specific fuel consumption, bsfc = %.3f kg/kWh\"%(bsfc)\n",
+ "#Data in the book is printed wrong\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The fuel consumption of engine, m_f in, \n",
+ "a)kg/hr = 1.905 kg/hr \n",
+ "b)litres/hr = 2.19 l/hr\n",
+ " c)Indicated specific fuel consumption, isfc = 0.286 kg/kWh\n",
+ " d)Brake specific fuel consumption, bsfc = 0.381 kg/kWh\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7 Page No : 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Given:\n",
+ "bp = 5000. #Brake power in kW\n",
+ "fp = 1000. #Friction power in kW\n",
+ "m_f = 2300. #Fuel consumption in kg/hr\n",
+ "A_F = 20./1 #Air-fuel ratio\n",
+ "CV = 42000. #Calorific value of fuel in kJ/kg\n",
+ "\n",
+ "#Solution:\n",
+ "#(a)\n",
+ "ip = bp+fp #Indicated power in kW\n",
+ "#(b)\n",
+ "eta_m = bp/ip #Mechanical efficiency\n",
+ "#(c)\n",
+ "m_a = A_F*m_f #Air consumption in kg/hr\n",
+ "#(d)\n",
+ "eta_it = ip*3600/(m_f*CV) #Indicated thermal efficiency\n",
+ "#(e)\n",
+ "eta_bt = eta_it*eta_m #Brake thermal efficiency\n",
+ "\n",
+ "#Results:\n",
+ "print \" a)The indicated power, ip = %d kW\"%(ip)\n",
+ "print \" b)The mechanical efficiency, eta_m = %d percent\"%(eta_m*100)\n",
+ "print \" c)The air consumption, m_a = %d kg/hr\"%(m_a)\n",
+ "print \" d)The indicated thermal efficiency, eta_it = %.1f percent \\\n",
+ "\\ne)The brake thermal efficiency, eta_bt = %.1f percent\"%(eta_it*100,eta_bt*100)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " a)The indicated power, ip = 6000 kW\n",
+ " b)The mechanical efficiency, eta_m = 83 percent\n",
+ " c)The air consumption, m_a = 46000 kg/hr\n",
+ " d)The indicated thermal efficiency, eta_it = 22.4 percent \n",
+ "e)The brake thermal efficiency, eta_bt = 18.6 percent\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file