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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 4 Centroid Centre of mass and Centre of Gravity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 4.8 Centroid of a composite plane figure"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The centroid of the un equal I-section is 10.961538 cm \n",
"\n"
]
}
],
"source": [
"# Initilization of variables\n",
"b1=20 #cm # width of top flange\n",
"t1=5 #cm # thickness of top flange\n",
"b2=5 #cm # width of web\n",
"t2=15 #cm # thickness or height of the web\n",
"b3=30 #cm # width of bottom flange\n",
"t3=5 #cm # thickness of bottom flange\n",
"# Calculations\n",
"A1=b1*t1 #cm**2 # area of bottom flange\n",
"A2=b2*t2 #cm**2 # area of the web\n",
"A3=b3*t3 #cm**2 # area of top flange\n",
"y1=t3+t2+(t1/2) #cm # y co-ordinate of the centroid of top flange\n",
"y2=t3+(t2/2) #cm # y co-ordinate of the centroid of the web\n",
"y3=t3/2 #cm # y co-ordinate of the centroid of the bottom flange\n",
"y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) #cm # where y_c is the centroid of the un-symmetrical I-section\n",
"# Results\n",
"print('The centroid of the un equal I-section is %f cm \\n'%y_c)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example 4.9 Centroid of a composite plane figure"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The centroid of the cross-sectional area of a Z-section about x-axis is 13.557692 cm \n",
"\n",
"The centroid of the cross-sectional area of a Z-section about y-axis is 7.692308 cm \n",
"\n"
]
}
],
"source": [
"# Initilization of variables\n",
"# The given section is Z-section which is un-symmetrycal about both the axis\n",
"b1=20 #cm # width of bottom flange \n",
"t1=5 #cm # thickness of the bottom flange\n",
"b2=2.5 #cm # thickness of the web of the flange\n",
"t2=15 #cm # depth of the web\n",
"b3=10 #cm # width of the top flange\n",
"t3=2.5 #cm # thickness of the top flange\n",
"# Calculations\n",
"# Respective areas\n",
"A1=b1*t1 # cm**2 # area of the bottom flange\n",
"A2=b2*t2 # cm**2 # area of the web\n",
"A3=b3*t3 # cm**2 # area of the top-flange\n",
"# first we calculate the x co-ordinate of the centroid\n",
"x1=b3-b2+(b1/2) #cm # for the bottom flange\n",
"x2=b3-(b2/2) #cm # for the web\n",
"x3=b3/2 #cm # for the top flange\n",
"x_c=((A1*x1)+(A2*x2)+(A3*x3))/(A1+A2+A3) #cm\n",
"# secondly we calculate the y co-ordinate of the centroid\n",
"y1=t1/2 #cm # for the bottom flange\n",
"y2=t1+(t2/2) #cm # for the web\n",
"y3=t1+t2+(t3/2) #cm # for the top flange\n",
"y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) # cm\n",
"# Results\n",
"print('The centroid of the cross-sectional area of a Z-section about x-axis is %f cm \\n'%x_c)\n",
"print('The centroid of the cross-sectional area of a Z-section about y-axis is %f cm \\n'%y_c)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
},
"widgets": {
"state": {},
"version": "1.1.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|