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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1:Materials Properties and Requirements "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.1, page no-8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Resistance of the wire\n",
"\n",
"import math\n",
"#variable declaration\n",
"r=0.45*10**-3 # radius of the wire\n",
"L=0.3 # length of the wire\n",
"rho=17.0*10**-9 # resistivity of wire in ohm-m \n",
"\n",
"#Calculations\n",
"R=rho*(L/(math.pi*r**2))\n",
"\n",
"#Result\n",
"print('The resistance of the wire is %.3f ohm'%R)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resistance of the wire is 0.008 ohm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.2, page no-8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Extension of a wire\n",
"\n",
"import math\n",
"#variable declaration\n",
"r=1.25*10**-3 # radius of the wire in m\n",
"L=3.0 # length of wire in m\n",
"F=4900.0 # applied force in Newton\n",
"e=2.05*10**11 # modulus of elasticity\n",
"\n",
"#calculation\n",
"s=F/(math.pi*r**2*e)\n",
"\n",
"#result\n",
"print('strain = %.3f\\nTherefore, extension = %.3f m'%(s,s*3))"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"strain = 0.005\n",
"Therefore, extension = 0.015 m\n"
]
}
],
"prompt_number": 4
}
],
"metadata": {}
}
]
}
|