summaryrefslogtreecommitdiff
path: root/Engineering_Mechanics_by_Tayal_A.K./chapter04_15.ipynb
blob: e5d35c61bcbc491f3ae647a334bf76f5d1d0bd30 (plain)
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
{
 "metadata": {
  "name": "chapter4.ipynb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4 : Centroid , Centre Of Mass And Centre Of Gravity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4-8,Page No:100"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Initilization of variables\n",
      "\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",
      "\n",
      "# Calculations\n",
      "\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*0.5) #cm # y co-ordinate of the centroid of top flange\n",
      "y2=t3+(t2*0.5) #cm #  y co-ordinate of the centroid of the web\n",
      "y3=t3*0.5 #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-symmetrycal I-section\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The centroid of the un equal I-section is \",round(y_c,2),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The centroid of the un equal I-section is  10.96 cm\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4-9,Page No:101"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Initilization of variables\n",
      "\n",
      "# The given section is Z-section which is un-symmetrycal about both the axis\n",
      "\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",
      "\n",
      "# Calculations\n",
      "\n",
      "# Respective areas\n",
      "\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",
      "\n",
      "# first we calculate the x co-ordinate of the centroid\n",
      "\n",
      "x1=b3-b2+(b1*0.5) #cm # for the bottom flange\n",
      "x2=b3-(b2*0.5) #cm # for the web\n",
      "x3=b3*0.5 #cm # for the top flange\n",
      "x_c=((A1*x1)+(A2*x2)+(A3*x3))/(A1+A2+A3) #cm\n",
      "\n",
      "# secondly we calculate the y co-ordinate of the centroid\n",
      "\n",
      "y1=t1*0.5 #cm # for the bottom flange\n",
      "y2=t1+(t2*0.5) #cm # for the web\n",
      "y3=t1+t2+(t3*0.5) #cm # for the top flange\n",
      "y_c=((A1*y1)+(A2*y2)+(A3*y3))/(A1+A2+A3) # cm\n",
      "\n",
      "# Results\n",
      "\n",
      "print\"The centroid of the cross-sectional area of a Z-section about x-axis is \",round(x_c,2),\"cm\"\n",
      "print\"The centroid of the cross-sectional area of a Z-section about y-axis is \",round(y_c,2),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The centroid of the cross-sectional area of a Z-section about x-axis is  13.56 cm\n",
        "The centroid of the cross-sectional area of a Z-section about y-axis is  7.69 cm\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}