summaryrefslogtreecommitdiff
path: root/Thermodynamics_for_Engineers/Chapter_17_3.ipynb
blob: 98fc5f1077b61e507518a07a80fc1883e5ce74d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
 "metadata": {
  "name": "",
  "signature": "sha256:b620865a516deeb75cd703005b53698c7a7013658cab02400acc0bf08c43a5d1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 17 - Internal-combustion engines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - Pg 358"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the indicated efficiency, brake thermal efficiency in both cases\n",
      "#Initalization of variables\n",
      "hp1=2000. #bhp\n",
      "m=792. #lb/hr\n",
      "ex=0.5\n",
      "hp2=210.\n",
      "hv=18900. #Btu/lb\n",
      "etth=51.3\n",
      "#calculations\n",
      "ihp=hp1+hp2\n",
      "ietat= ihp*2544/(m*hv) *100\n",
      "betat=ietat*hp1/ihp\n",
      "betat2=hp1*2544/(m*hv) *100\n",
      "ietae=ietat/etth *100\n",
      "betae=betat/etth *100\n",
      "brake= ietae*hp1/ihp\n",
      "#results\n",
      "print '%s %.1f %s' %(\"Indicated efficiency =\",ietat,\"percent\")\n",
      "print '%s %.1f %s' %(\"\\n Brake thermal efficiency =\",betat,\" percent\")\n",
      "print '%s %.1f %s' %(\"\\n In case 2, Brake thermal efficiency =\",betat2,\"percent\")\n",
      "print '%s %.1f %s' %(\"\\n Indicated thermal efficiency =\",ietae,\" percent\")\n",
      "print '%s %.1f %s' %(\"\\n Brake engine efficiency =\",betae,\" percent\")\n",
      "print '%s %.1f %s' %(\"\\n In case 2, Brake engine efficiency =\",brake,\"percent\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Indicated efficiency = 37.6 percent\n",
        "\n",
        " Brake thermal efficiency = 34.0  percent\n",
        "\n",
        " In case 2, Brake thermal efficiency = 34.0 percent\n",
        "\n",
        " Indicated thermal efficiency = 73.2  percent\n",
        "\n",
        " Brake engine efficiency = 66.3  percent\n",
        "\n",
        " In case 2, Brake engine efficiency = 66.3 percent\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - Pg 361"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the indicated mep\n",
      "#Initalization of variables\n",
      "J=778.\n",
      "o2=12.5\n",
      "theo=0.95\n",
      "N=56.5\n",
      "R0=1545.\n",
      "T=540. #R\n",
      "p=14. #psia\n",
      "LHV=2368089. #Btu/lb\n",
      "ther=39.4\n",
      "iep=0.78\n",
      "ve=0.8\n",
      "#calculations\n",
      "Ar=o2/0.21 *theo\n",
      "vol=N*R0*T/(144*p)\n",
      "hv=(LHV -17730)/LHV\n",
      "ithep=iep*ther\n",
      "pd=ithep/100 *ve *100.5\n",
      "mep=J*pd\n",
      "#results\n",
      "print '%s %d %s' %(\"Indicated mep =\",mep,\"lb/sq ft\")\n",
      "print '%s' %(\"The answer might differ from textbook due to rounding off error\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Indicated mep = 19223 lb/sq ft\n",
        "The answer might differ from textbook due to rounding off error\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}