summaryrefslogtreecommitdiff
path: root/Mechanical_Metallurgy/Chapter_11_1.ipynb
blob: c0c024ddf7884992313d59190deef6340de89bc6 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 11: Fracture Mechanics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 11.1, Fracture Toughness, Page No. 354"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Since Fracture Toughness of the material is = 172.852 MPa\n",
      " and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture\n"
     ]
    }
   ],
   "source": [
    "\n",
    "from math import sqrt\n",
    "from math import pi\n",
    "from math import cos\n",
    "\n",
    "#variable declaration\n",
    "a=5;\n",
    "a=a*10**-3;             #conversion to m\n",
    "t=1.27;          #in cm\n",
    "t=t*10**-2;        #conversion to m\n",
    "def sec(x):\n",
    "    return 1/cos(x);\n",
    "\n",
    "#calculation\n",
    "K_Ic=24;\n",
    "sigma=K_Ic/(sqrt(pi*a)*sqrt(sec(pi*a/(2*t))));\n",
    "\n",
    "#result\n",
    "print('Since Fracture Toughness of the material is = %g MPa\\n and the applied stress is 172 MPa thus the flaw will propagate as a brittle fracture')%(sigma);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 11.2, Fracture Toughness, Page No. 354"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Critical Crack depth = 15.4981 mm\n",
      "which is greater than the thickness of the vessel wall, 12mm\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "\n",
    "#variable declaration\n",
    "K_Ic=57;\n",
    "sigma0=900;\n",
    "sigma=360;\n",
    "Q=2.35;\n",
    "\n",
    "#calculation\n",
    "a_c=K_Ic**2*Q/(1.21*pi*sigma**2);\n",
    "a_c=a_c*1000;                         #conversion to mm\n",
    "\n",
    "#result\n",
    "print('\\nCritical Crack depth = %g mm\\nwhich is greater than the thickness of the vessel wall, 12mm')%(a_c);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Example 11.3, Plasticity, Page No. 361"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Plastic zone size = 0.113177 mm\n",
      "Stress Intensity Factor = 42.8659 MPa m^(1/2)\n",
      "\n",
      "\n",
      "Note: Calculation Errors in book\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt\n",
    "from math import pi\n",
    "\n",
    "#variable declaration\n",
    "a=10;\n",
    "a=a*10**-3;                 #conversion to m\n",
    "sigma=400;\n",
    "sigma0=1500;\n",
    "\n",
    "#calculation\n",
    "rp=sigma**2*a/(2*pi*sigma0**2);\n",
    "rp=rp*1000;                      #conversion to mm\n",
    "K=sigma*sqrt(pi*a);\n",
    "K_eff=sigma*sqrt(pi*a)*sqrt(a+pi*rp);\n",
    "\n",
    "#result\n",
    "print('\\nPlastic zone size = %g mm\\nStress Intensity Factor = %g MPa m^(1/2)\\n\\n\\nNote: Calculation Errors in book')%(rp,K_eff);"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}