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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 01:Introduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex1.1:pg-20"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 1.1\n",
"\n",
"\n",
" Gas Pressure is 1.74 atm\n"
]
}
],
"source": [
"import math\n",
"# Given Data\n",
"d_r = 13640 # Density of mercury in kg/m^3\n",
"g = 9.79 # Acceleration due to gravity in m/s^2\n",
"z = 562e-03 # Difference in height in m\n",
"z0 = 761e-03 # Reading of barometer in m\n",
"P = (d_r*g*(z+z0))*(0.987/1e05) # Gas Pressure in atm\n",
"\n",
"print \"\\n Example 1.1\\n\"\n",
"print \"\\n Gas Pressure is \",round(P,2),\" atm\"\n",
"#The answers vary due to round off error\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex1.2:pg-21"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 1.2\n",
"\n",
"\n",
" Inlet steam pressure is 1.5 MPa\n",
"\n",
" Condenser pressure is 8.27 kPa\n"
]
}
],
"source": [
"import math\n",
"#Given Data\n",
"d_r = 13.6e03 # Density of mercury in kg/m^3\n",
"g = 9.81 # Acceleration due to gravity in m/s^2\n",
"z = 710e-03 # Steam flow pressure in m\n",
"z0 = 772e-03 # Reading of barometer in m\n",
"P = 1.4e06 # Gauge pressure of applied steam in Pa\n",
"P0 = d_r*g*z0 # Atmospheric pressure in Pa\n",
"Pi = P+P0 # Inlet steam pressure in Pa\n",
"Pc = d_r*g*(z0-z) # Condenser pressure in Pa\n",
"\n",
"print \"\\n Example 1.2\\n\"\n",
"print \"\\n Inlet steam pressure is\",round(Pi/1e6,2),\" MPa\"\n",
"print \"\\n Condenser pressure is\",round(Pc/1e3,2),\" kPa\"\n",
"#The answers vary due to round off error\n",
"\n",
"\n",
"\n"
]
}
],
"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.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|