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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 3 Temperature and the ideal gas"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:3.2 Pg:59 "
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Volume = 379.5 ft**3/mol\n"
]
}
],
"source": [
"#Initialization of variables\n",
"p=14.7 #psia\n",
"R0=1545 \n",
"t=460 +60 #R\n",
"#calculations\n",
"v=R0*t/(p*144)\n",
"#results\n",
"print \"Volume = %.1f ft**3/mol\"%(v)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex:3.3 Pg:59"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"density of nitrogen = 0.0932 lbm/ft**3\n"
]
}
],
"source": [
"#Initialization of variables\n",
"p=20.0 #psia\n",
"R0=1545.0 \n",
"t=460 +100 #R\n",
"M=28\n",
"#calculations\n",
"v=R0*t/(p*144*M)\n",
"rho=1/v\n",
"#results\n",
"print \"density of nitrogen = %.4f lbm/ft**3\"%(rho)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|