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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4 : Temperature"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"\n",
"Example 4.1 Page no. 92\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Temperature Conversion\n",
"# Solution\n",
"\n",
"# Variable\n",
"#(a)\n",
"Temp_c=100. ; #[degree Celsius]\n",
"\n",
"# Calculation and Result\n",
"Temp_k=Temp_c+273 ; #[K]\n",
"print '(a) Temperature in kelvin is %.2f K'%Temp_k\n",
"\n",
"#(b)\n",
"Temp_f=(100*(1.8/1)) +32 ; #[degree Fahrenheit]\n",
"print ' (b) Temperature in degree Fahrenheit is %.2f '%Temp_f\n",
"\n",
"#(c)\n",
"Temp_r= Temp_f + 460 ; #[degree Rankine ]\n",
"print ' (c) Temperature in degree Rankine is %.2f '%Temp_r"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) Temperature in kelvin is 373.00 K\n",
" (b) Temperature in degree Fahrenheit is 212.00 \n",
" (c) Temperature in degree Rankine is 672.00 \n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 4.2 Page no. 93\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Temperature Conversion\n",
"# Solution\n",
"\n",
"# Variables\n",
"c = 139.1 + (1.56*10**-1)*(-460-32)/1.8 ;\n",
"d = (1.56*10**-1)/1.8;\n",
"\n",
"# Calculation\n",
"#Now convert c +dTR to (Btu/lb mol*degree R) to get answer of form a + bTR,where\n",
"a = c*(454/(1055*1.8)) ;\n",
"b = d*(454/(1055*1.8)) ;\n",
"\n",
"# Result\n",
"print 'The required answer is %.2f + (%.2e)T Btu/(lb mol*degree R) , where T is in degree R . '%(a,b)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The required answer is 23.06 + (2.07e-02)T Btu/(lb mol*degree R) , where T is in degree R . "
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": true,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|