summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Thermodynamics/Chapter7_6.ipynb
blob: 02425deac1d3237718cc1123e77b68b768ea32c8 (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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
{

 "metadata": {

  "name": "",

  "signature": "sha256:a60a19bd48510a099eb4483e5176d858019753b734df1f9001e5af0e3bc7fc2e"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter7:THE SECOND LAW OF THERMODYNAMICS"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.1:pg-241"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#example 1\n",

      "#rate of fuel consumption\n",

      "\n",

      "W=136*0.7355 #output of automobile engine in kW\n",

      "neng=0.3 #thermal efficiency of automobile engine\n",

      "Qh=W/neng #energy output of fuel in kW\n",

      "Q1=Qh-W #total rate of energy rejected to the ambient\n",

      "qh=35000.0 #energy output of fuel in kJ/kg\n",

      "m=Qh/qh #rate of fuel consumption in kg/s\n",

      "print\"\\n hence,total rate of energy rejected is\",round(Q1),\"kW\" \n",

      "print\"\\n and rate of fuel consumption is\",round(m,4),\"kg/s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " hence,total rate of energy rejected is 233.0 kW\n",

        "\n",

        " and rate of fuel consumption is 0.0095 kg/s\n"

       ]

      }

     ],

     "prompt_number": 12

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.2:pg-243"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#example 2\n",

      "#coefficient of performance of refrigerator\n",

      "\n",

      "Qh=400 #heat rejected to kitchen air in W\n",

      "W=150.0 #electrical input power in W\n",

      "Q1=Qh-W #rate of energy taken out to cold space in W\n",

      "B=Ql/W #coefficicent of performnace of refrigerator\n",

      "print\"\\n hence,rate of energy taken out of the cold space is\",round(Q1),\"W\"\n",

      "print\"\\n and coefficient of performance of the refrigerator is\",round(B,2),"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " hence,rate of energy taken out of the cold space is 250.0 W\n",

        "\n",

        " and coefficient of performance of the refrigerator is 1.67\n"

       ]

      }

     ],

     "prompt_number": 22

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.3:pg-256"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#example 3\n",

      "# temperature at which the pressure go to zero\n",

      "\n",

      "P1=110.9#pressur at the ice point in kPa\n",

      "P2=151.5#pressure at the steam point in kPa\n",

      "T1=0#in C\n",

      "T2=100#in C\n",

      "S=(P2-P1)/(T2-T1)#slope in kPa/C\n",

      "T=T1-(P1/S)# absolute ideal gas temperature in C\n",

      "print\"\\n hence,the absolute ideal gas temperature is\",round(T,2),\"C\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " hence,the absolute ideal gas temperature is -273.15 C\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.4:pg-260"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#example 4\n",

      "#comparison of ideal carnot heat engine with actual heat engine\n",

      "\n",

      "Qh=1000.0 #rate of heat transfer to heat engine in kW\n",

      "W=450.0 #rate of production of work in kW\n",

      "Ql=Qh-W #rate of heat rejected by heat engine in kW\n",

      "nthermal=W/Qh #efficiency from the definition of efficiency\n",

      "Tl=300 #temperature of surroundings in K\n",

      "Th=550.0 #temperature of heat source in Celsius\n",

      "ncarnot=1-Tl/(Th+273.15) #efficiency if heat engine is considered to be ideal carnot heat engine\n",

      "W2=ncarnot*Qh #rate of work production if heat engine is assumed to be ideal carnot heat engine in kW\n",

      "Q12=Qh-W2 #rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine\n",

      "print\"\\n hence,energy discarded to the ambient surroundings iS\",round(Q12,4),\"kw\"\n",

      "print\"\\n and the engine efficiency is\",round(ncarnot,4),"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " hence,energy discarded to the ambient surroundings iS 364.4536 kw\n",

        "\n",

        " and the engine efficiency is 0.6355\n"

       ]

      }

     ],

     "prompt_number": 53

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex7.5:pg-261"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#example 5\n",

      "#calculating required work\n",

      "\n",

      "Tl=24+273.15 #room temperature in Kelvins\n",

      "Th=35+273.15 #atmospheric temperature in Kelvins\n",

      "Ql=4 #rate of heat rejection from room\n",

      "B=Tl/(Th-Tl) #coefficient of performance of air conditioner\n",

      "W=Ql/B #required work in kW\n",

      "print\"\\n hence,the magnitude of reqiured work is\",round(W,2),\"kw\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " hence,the magnitude of reqiured work is 0.15 kw\n"

       ]

      }

     ],

     "prompt_number": 40

    }

   ],

   "metadata": {}

  }

 ]

}