summaryrefslogtreecommitdiff
path: root/Strength_of__Materials_by_Dr.R.K.Bansal/chapter3.ipynb
blob: 43fe6e1134a3a5f04ad609fa3f68aea0d69260ec (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:1d0b1f24c9d10ade871ede95388991dbd93c7a64d0a0c3e5beb35a6a045b6a61"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3:Principal Stresses and Strains"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 3.8,page no.98"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given\n",
      "#Variable declaration\n",
      "sigma1=100           #Major principal stress in N/sq.mm\n",
      "sigma2=-60           #Minor principal stress in N/sq.mm\n",
      "theta=90-50          #Angle of inclination in degrees\n",
      "\n",
      "#Calculation\n",
      "sigman=round(((sigma1+sigma2)/2)+(((sigma1-sigma2)/2)*math.cos(math.radians(2*theta))),2)\n",
      "sigmat=round((sigma1-sigma2)/2*(math.sin(math.radians(2*theta))),3)\n",
      "sigmaR=round(math.sqrt(sigman**2+sigmat**2),3)\n",
      "sigmat_max=int((sigma1-sigma2)/2)\n",
      "\n",
      "#Result\n",
      "print \"Normal stress =\",sigman,\"N/mm^2\"\n",
      "print \"Shear stress =\",sigmat,\"N/mm^2\"\n",
      "print \"Resultant stress =\",sigmaR,\"N/mm^2\"\n",
      "print \"Maximum shear stress =\",sigmat_max,\"N/mm^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Normal stress = 33.89 N/mm^2\n",
        "Shear stress = 78.785 N/mm^2\n",
        "Resultant stress = 85.765 N/mm^2\n",
        "Maximum shear stress = 80 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 3.9,page no.99"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given\n",
      "#Variable declaration\n",
      "sigma1=100        #Major principal stress in N/sq.mm\n",
      "sigma2=-40        #Minor principal stress in N/sq.mm\n",
      "theta=90-60       #Angle of inclination in degrees\n",
      "\n",
      "#Calculation\n",
      "sigman=((sigma1+sigma2)/2)+(((sigma1-sigma2)/2)*math.cos(math.radians(2*theta)))\n",
      "sigmat=round((sigma1-sigma2)/2*(math.sin(math.radians(2*theta))),2)\n",
      "sigmaR=round(math.sqrt(sigman**2+sigmat**2),1)\n",
      "sigmat_max=int((sigma1-sigma2)/2)\n",
      "phi=int(math.degrees(math.atan(sigmat/sigman)))\n",
      "\n",
      "#Result\n",
      "print \"Resultant stress in magnitude =\",sigmaR,\"N/mm^2\"\n",
      "print \"Direction of resultant stress =\",phi,\"degrees\"\n",
      "print \"Maximum shear stress =\",sigmat_max,\"N/mm^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resultant stress in magnitude = 88.9 N/mm^2\n",
        "Direction of resultant stress = 43 degrees\n",
        "Maximum shear stress = 70 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 3.13,page no.111"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given\n",
      "#Variable declaration\n",
      "sigma1=120       #Major tensile stress in N/sq.mm\n",
      "sigma2=-90       #Minor compressive stress in N/sq.mm\n",
      "sigma_gp=150     #Greatest principal stress in N/sq.mm\n",
      "\n",
      "#Calculation\n",
      " #case(a):Magnitude of the shearing stresses on the two planes\n",
      "tau=round(math.sqrt(((sigma_gp-((sigma1+sigma2)/2))**2)-(((sigma1-sigma2)/2)**2)),3)\n",
      " #case(b):Maximum shear stress at the point\n",
      "sigmat_max=int((math.sqrt((sigma1-sigma2)**2+(4*tau**2)))/2)\n",
      "\n",
      "#Result\n",
      "print \"Shear stress on the two planes =\",tau,\"N/mm^2\"\n",
      "print \"Maximum shear stress at the point =\",sigmat_max,\"N/mm^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Shear stress on the two planes = 84.853 N/mm^2\n",
        "Maximum shear stress at the point = 135 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Problem 3.16,page no.115"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given\n",
      "#Variable declaration\n",
      "sigma1=600        #Major tensile stress in N/sq.mm\n",
      "sigma2=300        #Minor tensile stress in N/sq.mm\n",
      "tau=450           #Shear stress in N/sq.mm\n",
      "theta1=45         #Angle of inclination in degrees\n",
      "theta2=135        #Angle of inclination in degrees\n",
      "\n",
      "#Calculation\n",
      "sigman1=int(((sigma1+sigma2)/2)+(((sigma1-sigma2)/2)*math.cos(math.radians(2*theta1)))+(tau*math.sin(math.radians(2*theta1))))                                                    \n",
      "sigman2=int(((sigma1+sigma2)/2)+(((sigma1-sigma2)/2)*math.cos(math.radians(2*theta2)))+(tau*math.sin(math.radians(2*theta2))))                                                         \n",
      "sigmat1=int(round((sigma1-sigma2)/2*(math.sin(math.radians(2*theta1)))-(tau*math.cos(math.radians(2*theta1))),0))\n",
      "sigmat2=int(round((sigma1-sigma2)/2*(math.sin(math.radians(2*theta2)))-(tau*math.cos(math.radians(2*theta2))),0))                                                         \n",
      "\n",
      "#Result\n",
      "print \"Normal stress(when theta is 45 degrees)=\",sigman1,\"N/mm^2\"\n",
      "print \"Normal stress(when theta is 135 degrees)=\",sigman2,\"N/mm^2\"                                                         \n",
      "print \"Tangential stress(when theta is 45 degrees)=\",sigmat1,\"N/mm^2\"\n",
      "print \"Tangential stress(when theta is 135 degrees)=\",sigmat2,\"N/mm^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Normal stress(when theta is 45 degrees)= 900 N/mm^2\n",
        "Normal stress(when theta is 135 degrees)= 0 N/mm^2\n",
        "Tangential stress(when theta is 45 degrees)= 150 N/mm^2\n",
        "Tangential stress(when theta is 135 degrees)= -150 N/mm^2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}