summaryrefslogtreecommitdiff
path: root/Elements_of_Thermodynamics_and_heat_transfer/Chapter_19_1.ipynb
blob: e14fdd84df0d4a1b43cc1e2153725a5b29c3e4ca (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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
{
 "metadata": {
  "name": "",
  "signature": "sha256:6dda6a8235cbc517967b1f5033dd3771eb08f1241054f5c218f55be7d9c59b8c"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 19 - Fundamentals of heat transfer"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - Pg 381"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the experimental value of thermal conductivity and Required temperature\n",
      "#Initialization of variables\n",
      "import math\n",
      "r1=1.12 #in\n",
      "r2=3.06 #in\n",
      "t1=203 #F\n",
      "t2=184 #F\n",
      "r3=2.09 #in\n",
      "po=11.1 #watts\n",
      "#calculations\n",
      "km=po*3.413*(12/r1-12/r2)/(4*math.pi*(t1-t2))\n",
      "dt=po*3.413*(12/r1-12/r3)/(4*math.pi*km)\n",
      "t3d=t1-dt\n",
      "#results\n",
      "print '%s %.2f %s' %(\"The experimental value of thermal conductivity =\",km,\"Btu/hr ft F\")\n",
      "print '%s %.1f %s' %(\"\\n Required temperature =\",t3d,\" F\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The experimental value of thermal conductivity = 1.08 Btu/hr ft F\n",
        "\n",
        " Required temperature = 189.1  F\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - Pg 383"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the heat loss and Temperature required\n",
      "#Initialization of variables\n",
      "import math\n",
      "r1=4.035 #in\n",
      "r2=4.312 #in\n",
      "r3=5.312 #in\n",
      "r4=6.812 #in\n",
      "k12=25 #Btu/hr ft F\n",
      "k23=0.05 #Btu/hr ft F\n",
      "k34=0.04 #Btu/hr ft F\n",
      "t1=625. #F\n",
      "t4=125. #F\n",
      "l=100. #ft\n",
      "hr=1.7 #Btu/hr ft^2 F\n",
      "#calculations\n",
      "Rs=1/(2.*math.pi*l) *(math.log(r2/r1) /k12+math.log(r3/r2) /k23 +math.log(r4/r3) /k34)\n",
      "Qd=(t1-t4)/Rs\n",
      "dt=Qd*12/(hr*math.pi*2*l*6.812)\n",
      "t0=t4-dt\n",
      "#results\n",
      "print '%s %d %s' %(\"Heat loss =\",Qd,\"Btu/hr\")\n",
      "print '%s %d %s' %(\"\\n Temperature required =\",t0,\"F\")\n",
      "print '%s' %(\"The answers given in the textbook are a bit different due to rounding off error\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss = 30231 Btu/hr\n",
        "\n",
        " Temperature required = 75 F\n",
        "The answers given in the textbook are a bit different due to rounding off error\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3 - Pg 396"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Coefficient of heat transfer\n",
      "#Initialization of variables\n",
      "import math\n",
      "dout=1 #in\n",
      "d1=0.049 #in\n",
      "t1=70. #F\n",
      "t2=80. #F\n",
      "rho=62.2 #lbm/ft^3\n",
      "mum=2.22 #lbm/ft hr\n",
      "k=0.352 #Btu/hr ft F\n",
      "cp=1 #Btu/lbm F\n",
      "vel=500000. #lbm/hr\n",
      "n=100. #tubes\n",
      "#calculations\n",
      "D=dout-2*d1\n",
      "t=(t1+t2)/2.\n",
      "V=vel/n *4*144/(math.pi*D**2 *rho)\n",
      "Re=rho*V*D/(mum*12)\n",
      "Pr=cp*mum/k\n",
      "Nu=0.023*Re**0.8 *Pr**0.4\n",
      "hc=Nu*k*12/D\n",
      "#results\n",
      "print '%s %d %s' %(\"Coefficient of heat transfer =\",hc,\"Btu/hr ft^2 F\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of heat transfer = 1040 Btu/hr ft^2 F\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4 - Pg 397"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Coefficient of heat transfer and Percentage change\n",
      "#Initialization of variables\n",
      "import math\n",
      "d1=0.5 #ft\n",
      "t1=200. #F\n",
      "t2=80. #F\n",
      "ta=400. #F\n",
      "rho=0.0662 #lbm/ft**3\n",
      "mum=0.0483 #lbm/ft hr\n",
      "k=0.0167 #Btu/hr ft F\n",
      "cp=0.2408 #Btu/lbm F\n",
      "rho2=0.0567 #lbm/ft**3\n",
      "mum2=0.0542 #lbm/ft hr\n",
      "k2=0.0190 #Btu/hr ft F\n",
      "cp2=0.2419 #Btu/lbm F\n",
      "g=32.17\n",
      "#calculations\n",
      "ti=(t1+t2)/2.\n",
      "bet=1/(460.+ti)\n",
      "Pr1=cp*mum/k\n",
      "Gr1=d1**3 *rho**2 *3600**2 *g*bet*(t1-t2)/mum**2\n",
      "Gr1pr1=Gr1*Pr1\n",
      "hc1=k/d1 *0.53*(Gr1pr1)**0.25\n",
      "Q1=hc1*(t1-t2)\n",
      "tf=(ta+t2)/2.\n",
      "bet2=1/(460.+tf)\n",
      "Pr2=cp2*mum2/k2\n",
      "Gr2=d1**3 *rho2**2 *3600**2 *g*bet2*(ta-t2)/mum2**2\n",
      "Gr2pr2=Gr2*Pr2\n",
      "hc2=k2/d1 *0.53*(Gr2pr2)**0.25\n",
      "Q2=hc2*(ta-t2)\n",
      "per=100*(Q2-Q1)/Q1\n",
      "#results\n",
      "print '%s %.3f %s' %(\"Coefficient of heat transfer in case 1=\",hc1,\" Btu/hr ft^2 F\")\n",
      "print '%s %.3f %s' %(\"\\n Coefficient of heat transfer in case 2 =\",hc2,\"Btu/hr ft^2 F\")\n",
      "print '%s %d %s' %(\"\\n Percentage change =\",per,\"percent\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of heat transfer in case 1= 1.076  Btu/hr ft^2 F\n",
        "\n",
        " Coefficient of heat transfer in case 2 = 1.312 Btu/hr ft^2 F\n",
        "\n",
        " Percentage change = 225 percent\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5 - Pg 398"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Temperature o wing surface and Heat transfer convective\n",
      "#Initialization of variables\n",
      "chord=40. #ft\n",
      "v=1200. #mph\n",
      "t1=80. #F\n",
      "t2=200. #F\n",
      "mu=0.0447 #lbm/ft hr\n",
      "rho=5280. #lbm/ft**3\n",
      "cp=0.2404 #Btu/lbm F\n",
      "k=0.0152 #Btu/hr ft F\n",
      "J=778.\n",
      "gc=32.17 #ft/s**2\n",
      "mu2=0.0514 #lbm/ft hr\n",
      "k2=0.0179 #Btu/hr ft F\n",
      "cp2=0.2414 #Btu/lbm F\n",
      "#calculations\n",
      "Re=rho*v*chord*0.0735/mu\n",
      "r=(mu*cp/k)**(1./3.)\n",
      "tav=t1+ r*v**2 *rho**2 /(2*gc*J*cp*3600**2)\n",
      "ts=t1+ 0.5*(t2-t1)+ 0.22*(tav-t1)\n",
      "Re2=v*rho*chord*0.0610/mu2\n",
      "Pr2=cp2*mu2/k2\n",
      "hc=cp2*v*rho*0.0610 *0.037*Re2**(-0.2) *Pr2**(-0.667)\n",
      "Q2=hc*(t2-tav)\n",
      "#results\n",
      "print '%s %.1f %s' %(\"Temperature of wing surface =\",tav,\" F\")\n",
      "print '%s %d %s' %(\"\\n Heat transfer convective =\",Q2,\"Btu/hr ft^2\")\n",
      "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature of wing surface = 309.3  F\n",
        "\n",
        " Heat transfer convective = -9711 Btu/hr ft^2\n",
        "The answers are a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6 - Pg 413"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the percent of radiation emitted by surface and percent absorbed\n",
      "#Initialization of variables\n",
      "import math\n",
      "r1=1. #in\n",
      "r2=5. #in\n",
      "F12=1.\n",
      "#calculations\n",
      "F21=4*math.pi*r1**2 *F12/(4*math.pi*r2**2)*100\n",
      "F22=(1-F21/100.)*100.\n",
      "#results\n",
      "print '%s %d %s' %(\"Percent of radiation emitted by surface 2 on small sphere =\",F21,\" percent\")\n",
      "print '%s %d %s' %(\"\\n Remaining\",F22, \"percent is absorbed by inner surface of larger sphere\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Percent of radiation emitted by surface 2 on small sphere = 4  percent\n",
        "\n",
        " Remaining 96 percent is absorbed by inner surface of larger sphere\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7 - Pg 413"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Net exchange of radiation\n",
      "#Initialization of variables\n",
      "short=2. #ft\n",
      "apart=3. #ft\n",
      "lon=4. #ft\n",
      "T1=2260. #R\n",
      "T2=530. #R\n",
      "sigma=0.1714\n",
      "#calculations\n",
      "A1=short*lon\n",
      "ratio=short/apart\n",
      "print '%s' %(\"from curve 3\")\n",
      "F=0.165\n",
      "Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)\n",
      "#results\n",
      "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "from curve 3\n",
        "Net exchange of radiation = 58844 Btu/hr\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8 - Pg 416"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Net exchange of radiation\n",
      "#Initialization of variables\n",
      "F=0.51\n",
      "A1=8 #ft^2\n",
      "sigma=0.1714\n",
      "T1=2260. #R\n",
      "T2=530. #R\n",
      "#calculations\n",
      "Q12=A1*F*sigma*((T1/100)**4 -(T2/100)**4)\n",
      "#results\n",
      "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Net exchange of radiation = 181881 Btu/hr\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9 - Pg 417"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Net exchange of radiation\n",
      "#Initialization of variables\n",
      "F=0.51\n",
      "A1=8. #f^2\n",
      "sigma=0.1714\n",
      "T1=2260. #R\n",
      "T2=530. #R\n",
      "#calculations\n",
      "F12=1/(1/0.51 +(1/0.9 -1) +(1/0.6 -1))\n",
      "Q12=A1*F12*sigma*((T1/100)**4 -(T2/100)**4)\n",
      "#results\n",
      "print '%s %d %s' %(\"Net exchange of radiation =\",Q12,\"Btu/hr\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Net exchange of radiation = 130225 Btu/hr\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10 - Pg 418"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Percentage change in total heat transfer\n",
      "#Initialization of variables\n",
      "em=0.79\n",
      "sigma=0.1714\n",
      "T1=660. #R\n",
      "T2=540. #R\n",
      "T3=860. #R\n",
      "#calculations\n",
      "Q1=em*sigma*((T1/100)**4 -(T2/100)**4)\n",
      "Q2=em*sigma*((T3/100)**4 -(T2/100)**4)\n",
      "Qh1=129+Q1\n",
      "Qh2=419+Q2\n",
      "per=100*(Qh2-Qh1)/Qh1\n",
      "#results\n",
      "print '%s %.1f %s' %(\"Percentage change in total heat transfer =\",per,\"percent\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Percentage change in total heat transfer = 285.7 percent\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11 - Pg 419"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Error in probe reading\n",
      "#Initialization of variables\n",
      "Tp=12.57\n",
      "Tw=10.73\n",
      "ep=0.8\n",
      "sig=0.1714\n",
      "hc=7\n",
      "#calculations\n",
      "dt=ep*sig*(Tp**4-Tw**4)/hc\n",
      "#results\n",
      "print '%s %d %s' %(\"Error in probe reading =\",dt,\"F\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Error in probe reading = 229 F\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12 - Pg 420"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Heat transfer in both cases\n",
      "#Initialization of variables\n",
      "import math\n",
      "l=6 #ft\n",
      "d1=0.55 #in\n",
      "d2=0.75 #in\n",
      "h1=280. #Btu/hr ft^2 F\n",
      "h2=2000. #Btu/fr ft^2 F\n",
      "k=220. #Btu/hr ft F\n",
      "t2=212. #F\n",
      "t1=60. #F\n",
      "f=500. #Btu/hr ft^2 F\n",
      "#calculations\n",
      "A2=math.pi*d1*l/12\n",
      "A3=math.pi*d2*l/12\n",
      "Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)\n",
      "Q=(t2-t1)/Rt\n",
      "Rt2=Rt+ 1/(f*A2)\n",
      "Q2=(t2-t1)/Rt2\n",
      "#results\n",
      "print '%s %d %s' %(\"Heat transfer =\",Q,\"Btu/hr\")\n",
      "print '%s %d %s' %(\"\\n Heat transfer in case 2=\",Q2,\" Btu/hr\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer = 33074 Btu/hr\n",
        "\n",
        " Heat transfer in case 2= 21994  Btu/hr\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13 - Pg 422"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Overall Heat transfer coefficient\n",
      "#Initialization of variables\n",
      "import math\n",
      "l=6 #ft\n",
      "d1=0.55 #in\n",
      "d2=0.75 #in\n",
      "h1=280. #Btu/hr ft^2 F\n",
      "h2=2000. #Btu/fr ft^2 F\n",
      "k=220. #Btu/hr ft F\n",
      "t2=212. #F\n",
      "t1=60. #F\n",
      "#calculations\n",
      "A2=math.pi*d1*l/12\n",
      "A3=math.pi*d2*l/12\n",
      "Rt=1/(h1*A2) + 1/(h2*A3) +math.log(d2/d1) /(2*math.pi*k*l)\n",
      "U3=1/(A3*Rt)\n",
      "#results\n",
      "print '%s %.1f %s' %(\"Overall Heat transfer coefficient =\",U3,\"Btu/hr ft^2 F\")\n",
      "print '%s' %(\"The answer in the textbook is a bit different due to rounding off error in textbook.\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall Heat transfer coefficient = 184.7 Btu/hr ft^2 F\n",
        "The answer in the textbook is a bit different due to rounding off error in textbook.\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 14 - Pg 427"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Parameters X and Z\n",
      "#Initialization of variables\n",
      "t1=300. #F\n",
      "t2=260. #F\n",
      "t3=200. #F\n",
      "t4=160. #F\n",
      "#calculations\n",
      "X=(t2-t4)/(t1-t4)\n",
      "Z=(t1-t3)/(t2-t4)\n",
      "#results\n",
      "print '%s %.3f %s %.1f %s' %(\"Parameters X and Z are\",X, \"and\",Z,\"respectively\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Parameters X and Z are 0.714 and 1.0 respectively\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}