summaryrefslogtreecommitdiff
path: root/sample_notebooks/SalilKapur/IntroductionConcept_of_Stress.ipynb
blob: 050d69c7a2c54929028949aaa405ddd2d862f995 (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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 1: Introduction—Concept of Stress\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example 1.1, Page number 18 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Case(a): Shearing Stress in Pin A = 6790.6 psi\n",
      "Case(b): Shearing Stress in Pin C = 7639 psi\n",
      "Case(c): Largest Normal Stress in Link ABC = 2286 psi\n",
      "Case(d): Average Shearing Stress at B = 171 psi\n",
      "Case(e): Bearing Stress in Link at C = 6000 psi\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#Variable declaration\n",
    "Fac = 750                             #Force on rod AC(lb)\n",
    "D = 0.375                             #Diameter at the upper junction of rod ABC(in)\n",
    "\n",
    "\n",
    "#Calculation         \n",
    "#Case(a)\n",
    "A=(1/4)*((math.pi)*pow(D,2))          #Area at the upper junction of rod ABC(in^2) \n",
    "tA=(Fac/A)                            #Shearing Stress in Pin A(psi)   \n",
    "#Case(b) \n",
    "Ab=(1/4)*((math.pi)*pow(0.25,2))      #Area at the lower junction of rod ABC(in^2)\n",
    "tC=(((1/2)*Fac)/Ab)                   #Shearing Stress in Pin C(psi)\n",
    "#Case(c)\n",
    "Anet=(3/8)*(1.25-0.375)               #Area of cross section at A(in^2)\n",
    "sA=(Fac/Anet)                         #Largest Normal Stress in Link ABC(psi)\n",
    "#Case(d)\n",
    "F1=750/2                              #Force on each side(lb)\n",
    "Ad=(1.25*1.75)                        #Area at junction B(in^2)\n",
    "tB=(F1/Ad)                            #Average Shearing Stress at B\n",
    "#Case(e)\n",
    "Ae=0.25*0.25                          #Area at point C(in^2)\n",
    "sB=(F1/Ae)                            #Bearing Stress in Link at C\n",
    "\n",
    "\n",
    "#Result\n",
    "print('Case(a): Shearing Stress in Pin A = %.1f psi' %tA)\n",
    "print('Case(b): Shearing Stress in Pin C = %.f psi' %tC)\n",
    "print('Case(c): Largest Normal Stress in Link ABC = %.f psi' %sA)\n",
    "print('Case(d): Average Shearing Stress at B = %.f psi' %tB)\n",
    "print('Case(e): Bearing Stress in Link at C = %.f psi' %sB)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example 1.2, Page number 19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Case(a): Diameter of the bolt = 28 mm\n",
      "Case(a): Dimension b at Each End of the Bar = 62 mm\n",
      "Case(a): Dimension h of the Bar = 34.300000 mm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#Variable declaration\n",
    "P = 120                                             #Maximum allowable tension force \n",
    "s = 175                                             #Maximum allowable stress\n",
    "t = 100                                             #Maximum allowable stress\n",
    "Sb = 350                                            #Maximum allowable stress\n",
    "\n",
    "\n",
    "#Calculation\n",
    "#Case(a)\n",
    "F1=P/2         #Current(A)\n",
    "d=math.sqrt(((P/2)*1000)/((22/(4*7))*(100000000)))  #Diameter of bolt(m)\n",
    "d=d*1000                                            #Diameter of bolt(mm)\n",
    "d=round(d,0)                                        #Rounding of the value of diameter of bolt(mm)\n",
    "Ad=(0.020*0.028)                                    #Area of cross section of plate                                    \n",
    "tb=((P*1000)/Ad)/(1000000)                          #Stress between between the 20-mm-thick plate and the 28-mm-diameter bolt\n",
    "tb=round(tb,0)                                      #Rounding of the above calculated stress to check if it is less than 350\n",
    "a=(P/2)/((0.02)*(175))                              #Dimension of cross section of ring \n",
    "a=round(a,2)                                        #Rounding dimension of cross section of ring to two decimal places\n",
    "b=28 + (2*(a))                                      #Dimension b at Each End of the Bar\n",
    "b=round(b,2)                                        #Rounding the dimension b to two decimal places \n",
    "h=(P)/((0.020)*(175))                               #Dimension h of the Bar\n",
    "h=round(h,1)                                        #Rounding dimension h of bar to 1 decimal place\n",
    "\n",
    "\n",
    "#Result\n",
    "print ('Case(a): Diameter of the bolt = %.f mm' %d)\n",
    "print ('Case(a): Dimension b at Each End of the Bar = %.f mm' %b)\n",
    "print ('Case(a): Dimension h of the Bar = %f mm' %h)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example 1.3, Page number 34"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Case(a): Diameter of the bolt =  16.730000 mm\n",
      "Case(a): Dimension b at Each End of the Bar =  22.000000 mm\n",
      "Case(a): Dimension h of the Bar =  6.000000 mm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#Variable declaration\n",
    "Su = 600    #ultimate normal stress(MPa)   \n",
    "FS = 3.3    #Factor of safety with respect to failure\n",
    "tU=350      #Ultimate shearing stress(MPa)\n",
    "Cx=40       #X Component of reaction at C(kN)\n",
    "Cy=65       #Y Component of reaction at C(kN)\n",
    "Smax=300    #Allowable bearing stress of the steel \n",
    "\n",
    "#Calculation\n",
    "C=math.sqrt((math.pow(40,2))+(math.pow(65,2)))\n",
    "\n",
    "#Case(a)\n",
    "P=(15*0.6 + 50*0.3)/(0.6)  #Allowable bearing stress of the steel(MPa)\n",
    "Sall=(Su/FS)               #Allowable Stress(MPa)\n",
    "Sall=round(Sall,1)         #Rounding Allowable stress to 1 decimal place(MPa)\n",
    "Areqa=(P/(Sall*(1000)))    #Cross Sectional area(m^2)\n",
    "Areqa=round(Areqa,5)       #Rounding cross sectional area to 5 decimal places(m^2)\n",
    "dAB=math.sqrt(((Areqa)*(4))/(22/7)) #Diameter of AB(m)\n",
    "dAB=dAB*1000                        #Diameter of AB(mm)\n",
    "dAB=round(dAB,2)                    #Rounding Diameter of AB(mm)\n",
    "\n",
    "#Case(b)\n",
    "tALL=tU/FS                          #Stress(MPa)\n",
    "tALL=round(tALL,1)                  #Rounding of Stress\n",
    "AreqC=((C/2)/tALL)                  #Cross sectional area(m^2)\n",
    "AreqC=AreqC*1000                    \n",
    "AreqC=round(AreqC,0)                #Rounding the cross sectional area\n",
    "dC=math.sqrt((4*AreqC)/(22/7))      #Diameter at point C\n",
    "dC=round((dC+1),0)                  #Rounding of the diameter at C\n",
    "\n",
    "#Case(c)\n",
    "\n",
    "Areq=((C/2)/Smax)                   \n",
    "Areq=Areq*1000                      #Cross sectional area(mm^2)\n",
    "t=(Areq/22)                         #Thickness of the bracket\n",
    "t=round(t,0)\n",
    "\n",
    "#Result\n",
    "print ('Case(a): Diameter of the bolt = % f mm' %dAB)\n",
    "print ('Case(a): Dimension b at Each End of the Bar = % f mm' %dC)\n",
    "print ('Case(a): Dimension h of the Bar = % f mm' %t)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# Example 1.4, Page number 35"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Case(a): Control Rod  =  5.263672 kips\n",
      "Case(b): Bolt at B =  5.156250 kips\n",
      "Case(c): Bolt at D =  6.865179 kips\n",
      "Case(d): Bolt at C =  5.238095 kips\n",
      "Summary. We have found separately four maximum allowable values of the force C. In order to satisfy all these criteria we must choose the smallest value, namely:=  5.156250 kips\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#Variable declaration\n",
    "tU=40                                     #ultimate tensile stress\n",
    "sU=60                                     #ultimate shearing stress\n",
    "FS=3                                      #Mimnimum factor of safety\n",
    "dA=(7/16)                                 #Diameter of bolt at A(in)\n",
    "dB=3/8                                    #Diameter of bolt at B(in) \n",
    "dD=3/8                                    #Diameter of bolt at D(in)\n",
    "dC=1/2                                    #Diameter of bolt at C(in)\n",
    "\n",
    "\n",
    "#Calculation\n",
    "Sall=(sU/FS)                              #Total tensile stress(kips)\n",
    "B=Sall*((1/4)*(22/7)*(pow((7/16),2)))     #Allowable force in the control rod(kips)\n",
    "C1=1.75*(B)                               #Control Rod(kips)\n",
    "tall=(tU/FS)                              #Total shearing stress\n",
    "B=2*(tall*(1/4)*(22/7)*(3/8)*(3/8))       #Allowable magnitude of the force B exerted on the bolt\n",
    "C2=1.75*B                                 #Bolt at B(kips)                       \n",
    "D=B                                       #Bolt at D. Since this bolt is the same as bolt B, the allowable force is same(kips) \n",
    "C3=2.33*D                                 #Bolt at D(kips)\n",
    "C4=2*(tall*(1/4)*(22/7)*(1/2)*(1/2))      #Bolt at C(kips)      \n",
    "list1=[C1,C2,C3,C4]                       #Adding all the maximum allowable forces on C(kips) \n",
    "\n",
    "\n",
    "#Result\n",
    "print ('Case(a): Control Rod  = % f kips' %C1)\n",
    "print ('Case(b): Bolt at B = % f kips' %C2)\n",
    "print ('Case(c): Bolt at D = % f kips' %C3)\n",
    "print ('Case(d): Bolt at C = % f kips' %C4)\n",
    "print ('Summary. We have found separately four maximum allowable values of the force C. In order to satisfy all these criteria we must choose the smallest value, namely:= % f kips' %min(list1));"
   ]
  }
 ],
 "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"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}