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
|
{
"metadata": {
"name": "",
"signature": "sha256:d5b975c50e55ebe3a2b199f890473e0371318b3f156613b06dbc3a02621943c9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter7-Heat engines and the second law of thermodynamics"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example1 pg- 112"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate heat and efficency\n",
"##initialisation of variables\n",
"m= 0.35 ##kg\n",
"u2= 211.785 ##kJ/kg\n",
"u1= 182.267 ##kJ/kg\n",
"p2= 300. ##kPa\n",
"v3= 0.085566 ##kJ/kg\n",
"v2= 0.076218 ##kJ/kg\n",
"h3= 260.391 ##kJ/kg\n",
"h2= 234.650 ##kJ/kg\n",
"u4= 199.460 ##kJ/kg\n",
"u3= 234.721 ##kJ/kg\n",
"p4= 250.##kPa\n",
"v1= 0.076218 ##kJ/kg\n",
"v4= 0.085566 ##kJ/kg\n",
"h1= 201.322 ##kJ/kg\n",
"h4= 220.851 ##kJ/kg\n",
"##CALCULATIONS\n",
"Q12= m*(u2-u1)\n",
"W23= m*p2*(v3-v2)\n",
"Q23= m*(h3-h2)\n",
"W34= 0\n",
"Q34= m*(u4-u3)\n",
"W41= m*p4*(v1-v4)\n",
"Q41= m*(h1-h4)\n",
"dW= W23+W41\n",
"dQ= Q12+Q23+Q34+Q41\n",
"Qh= Q12+Q23\n",
"n= dW*100/Qh\n",
"##RESULTS\n",
"print'%s %.2f %s'%('heat = ',Qh,'kj')\n",
"print'%s %.2f %s'%('efficiency =',n, 'percent')\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"heat = 19.34 kj\n",
"efficiency = 0.85 percent\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example4 pg-123"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate effiecncy of heat engine and efficency\n",
"##initialisation of variables\n",
"Qc= 9 ##kW\n",
"W= 7.5 ##kW\n",
"Qh= Qc+W\n",
"Tc= 50 ##C\n",
"Th= 400 ##C\n",
"##CALCULATIONS\n",
"n= W/Qh\n",
"nrev= 1-((273.15+Tc)/(273.15+Th))\n",
"##RESULTS\n",
"print'%s %.3f %s'% ('efficiency of heat engine = ',n,'')\n",
"print'%s %.3f %s'%('efficiency =',nrev,'')\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"efficiency of heat engine = 0.455 \n",
"efficiency = 0.520 \n"
]
}
],
"prompt_number": 2
}
],
"metadata": {}
}
]
}
|