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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 5 : Equations of state"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.1 pageno : 167"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"t = 304;\t\t\t#temperature of the gas in k\n",
"p = 73;\t\t\t#pressure of the gas in atm\n",
"r = 0.00366;\t\t\t#universal gas constant in j/K/mole\n",
"\t\t\t#ct = 8a/27br;cp = a/27b**2\n",
"\n",
"# Calculations\n",
"b = (t*r/(8*p));\n",
"a = p*27*b**2;\n",
"\n",
"# Result\n",
"print 'the value of the constant b is %.5f \\\n",
"\\nthe value of the constant a is %3.5f'%(b,a)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the value of the constant b is 0.00191 \n",
"the value of the constant a is 0.00715\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.4 pageno : 169"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"tc = 132;\t\t\t#critical temperature in K\n",
"pc = 37.2;\t\t\t#critical pressure in atm\n",
"r = 82.07;\t\t\t#universal gas constant in cm**3atm/mole/K\n",
"\n",
"# Calculations\n",
"a = 27*(r**2)*(tc**2)/(64*pc);\t\t\t#value of a in atm/cm**6/mol**2\n",
"b = r*tc/(8*pc);\t\t\t#value of b in cm**3/mol\n",
"\n",
"# Result\n",
"print 'the value of is %.2e atm/cm**6/mol**2 \\\n",
"\\nthe value of b is %3.2f cm**3/mol'%(a,b)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the value of is 1.33e+06 atm/cm**6/mol**2 \n",
"the value of b is 36.40 cm**3/mol\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5 pageno : 169"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"p = 2.26*1.013*10**5;\t\t\t#critical pressure in N/m**2\n",
"v = 4./69;\t\t\t#critical volume in m**3/kmol\n",
"r = 8.31*10**3;\t\t\t#universal gas consmath.tant in J/kmol.K\n",
"\n",
"# Calculations\n",
"t = (8*p*v/(3*r));\t\t\t#critical temperature in K\n",
"\n",
"# Result\n",
"print 'critical temperature of the given problem is %3.2f K'%(t)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"critical temperature of the given problem is 4.26 K\n"
]
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}
|