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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 5: Surface Tension"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 5.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Work (dyn cm or erg) = 5.03e+04\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#If the surface tension of a soap bubble is 0.4 N/m, what work is required to\n",
"#increase the diameter from 5 to 15 cm?\n",
"import math\n",
"#initialisation of variables\n",
"St= 0.04 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#N/m\n",
"d1= 5. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#cm\n",
"d2= 15. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#cm\n",
"#CALCULATIONS\n",
"W= St*1000.*2*4*math.pi*(math.pow((d2/2),2)-math.pow((d1/2),2))\t\t#Work\n",
"#RESULTS\n",
"print '%s %.2e' % ('Work (dyn cm or erg) = ',W)\n",
"raw_input('press enter key to exit')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 5.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Presuure difference (lbf/ft^2) = 14.12\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#By much does the pressure inside a 0.017 in droplet of water at 20C\n",
"#exceed the outside pressure.\n",
"import math\n",
"#initialisation of variables\n",
"R= 0.017 \t\t\t\t\t\t\t\t\t\t\t\t#in\n",
"sigma= 72.8 \t\t\t\t\t\t\t\t\t\t\t#m N/m\n",
"#CALCULATIONS\n",
"P= (2*sigma*0.005*0.017)/(72.8*R*7.08*math.pow(10,-4))\t#Presuure difference\n",
"#RESULTS\n",
"print '%s %.2f' % ('Presuure difference (lbf/ft^2) = ',P)\n",
"raw_input('press enter key to exit')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exa 5.3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Difference in mercury level (cm (depression)) = -2.48\n",
"press enter key to exit\n"
]
},
{
"data": {
"text/plain": [
"''"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#A 0.4 mm diameter glass tube stands vertically in a dish of mercury at 20C.\n",
"#Determine the difference between the level of mercury in the dish and in\n",
"#the tube. The specific gravity for mercury is 13.6 and the contact angle \n",
"#with glass is 130C\n",
"import math\n",
"#initialisation of variables\n",
"d= 13.6 \t\t\t\t\t\t\t#gm/cm^3\n",
"g= 980 \t\t\t\t\t\t\t\t#cm/s^2\n",
"D= 0.4 \t\t\t\t\t\t\t\t#mm\n",
"angle= 130*math.pi/180. \t\t\t#radians\n",
"s= 514. \t\t\t\t\t\t\t#dyn/cm\n",
"#CALCULATIONS\n",
"h= (4*s*10*math.cos(angle))/(d*g*D)\t#Depression in mercury level\n",
"#RESULTS\n",
"print '%s %.2f' % (' Difference in mercury level (cm (depression)) = ',h)\n",
"raw_input('press enter key to exit')"
]
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|