summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_Pytel_and_Kiusalaas/Chapter13.ipynb
blob: 60e5f3b63182dedbe2e42ec1bc0edc18a4e8a750 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:09673653cb16b83119bc0c347f996805dac297e3d0e1db4167910bd881eb2ed7"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13: Inelastic Action"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13.1, Page No:461"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "d=150 #Depth of the web in mm\n",
      "wf=100 #Width of the flange in mm\n",
      "df=20 #Depth of the flange in mm\n",
      "t=20 #Thickness of the web in mm\n",
      "\n",
      "#Calculations\n",
      "y_bar=10**-3*(((wf*df*(d+df*0.5))+(d*t*d*0.5))/(wf*df+d*t)) #Distance of Neutral Axis in m\n",
      "#Simplfying the computation\n",
      "a=wf*df**3*12**-1\n",
      "b=wf*df*((d+df*0.5)-y_bar*10**3)**2\n",
      "c=t*d**3*12**-1\n",
      "f=t*d*((d*0.5)-y_bar*10**3)**2\n",
      "I=(a+b+c+f)*10**-12 #Moment of inertia in mm^3\n",
      "\n",
      "#Limit Moment\n",
      "yp=(wf*df+d*t)/(2*t) #Plastic Neutral Axis in mm\n",
      "Myp=I/y_bar #Yielding will start at moment without the stress term to ease computation\n",
      "mom=10**-9*((t*yp**2*0.5)+(wf*df*(d-yp+10))+(t*25**2*0.5)) #Sum of 1st moments\n",
      "Ml_Myp=mom*Myp**-1 #Ratio\n",
      "\n",
      "#Result\n",
      "print \"The ratio ML/Myp=\",round(Ml_Myp,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio ML/Myp= 1.765\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13.2, Page No:467"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#Variable Decleration\n",
      "E_st=200 #Youngs Modulus of Steel in GPa\n",
      "sigma_st_yp=290 #Yielding Stress in MPa\n",
      "E_al=70 #Youngs Modulus of Aluminium in GPa\n",
      "sigma_al_yp=330 #Yielding Stresss of Aluminium in MPa\n",
      "A_st=900 #Area of steel rod in mm^2\n",
      "A_al=600 #Area of Aluminium rod in mm^2\n",
      "L_st=350 #Length of the steel rod in mm\n",
      "L_al=250 #Length of the aluminium rod in mm\n",
      "\n",
      "#Calculations\n",
      "#Limit Load\n",
      "P_st=sigma_st_yp*A_st*10**-3 #Load in limiting condition in kN\n",
      "P_al=sigma_al_yp*A_al*10**-3 #Load in limiting condition in kN\n",
      "P_L=P_st+2*P_al #Total Loading in kN\n",
      "\n",
      "#Elastic Unloading\n",
      "#Solving for Pst and Pal using matri approach\n",
      "A=np.array([[1,2],[L_st*(E_st*A_st)**-1,-L_al*(E_al*A_al)**-1]])\n",
      "B=np.array([P_L,0])\n",
      "C=np.linalg.solve(A,B) #Loading in kN\n",
      "\n",
      "#Residual Stresses\n",
      "P_res_st=C[0]-P_st #Residual Load in kN\n",
      "P_res_al=C[1]-P_al #Residual Load in kN\n",
      "sigma_st=P_res_st/A_st #residual Stress in Steel in MPa\n",
      "sigma_al=P_res_al/A_al #residual Stress in Aluminium in MPa\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"The Residual stresses are as follows\"\n",
      "print \"Sigma_st=\",round(sigma_st*10**3,1),\"MPa and sigma_al=\",round(sigma_al*10**3,1),\"MPa\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Residual stresses are as follows\n",
        "Sigma_st= 151.5 MPa and sigma_al= -113.6 MPa\n"
       ]
      }
     ],
     "prompt_number": 22
    }
   ],
   "metadata": {}
  }
 ]
}