summaryrefslogtreecommitdiff
path: root/Machine_Design_by_U.C._Jindal/Ch31_2.ipynb
blob: 024ea67d33dc95648085e1b221b87c515e5c7fd7 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Ch:31 Seals packing and gaskets"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## exa 31-1 - Page 816"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "N is 4.47      \n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from math import sqrt, pi, log\n",
    "d=18#\n",
    "lg=25+25#\n",
    "Eb=210*10**3#\n",
    "Ecl=90*10**3#\n",
    "A=pi*d**2/4#\n",
    "kb=A*Eb/lg#\n",
    "x=(5*(lg+(0.5*d))/(lg+(2.5*d)))#\n",
    "km=pi*Ecl*d/(2*log(x))#\n",
    "C=kb/(kb+km)#\n",
    "sigp=600#\n",
    "At=192#\n",
    "Pi=0.75*sigp*At#\n",
    "F=200#\n",
    "C=0.322#\n",
    "Pb=F*C*10**3#\n",
    "FOS=2#\n",
    "W=At*sigp#\n",
    "N=Pb*FOS/(W-Pi)#\n",
    "print \"N is %0.2f      \"%(N)#"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## exa 31-2 - Page 816"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "p is 6.922 N/mm**2     \n"
     ]
    }
   ],
   "source": [
    "from math import sqrt, pi, log\n",
    "d=16#\n",
    "D=1.5*d#\n",
    "t=20#\n",
    "tg=4#\n",
    "#Let Gasket diameter in compression zone be d1\n",
    "d1=D+(2*t)+tg#\n",
    "lg=40#\n",
    "E=207*10**3#\n",
    "kb=pi*d**2*E/(lg*4)#\n",
    "Ecl=90*10**3#\n",
    "x=(5*(lg+(0.5*d))/(lg+(2.5*d)))#\n",
    "kp=pi*Ecl*d/(2*log(x))#\n",
    "Ag=pi*(d1**2-d**2)/4#\n",
    "Eg=480#\n",
    "kg=Ag*Eg/tg#\n",
    "km=kg*kp/(kg+kp)#\n",
    "C=kb/(kb+km)#\n",
    "At=157#\n",
    "sigp=600#\n",
    "Pi=0.75*At*sigp/2#\n",
    "FOS=2#\n",
    "Pf=At*sigp/FOS#\n",
    "W=Pf-Pi#\n",
    "P=W/C#\n",
    "N=5#\n",
    "F=P*N#\n",
    "p=F*4/(pi*120**2)#\n",
    "print \"p is %0.3f N/mm**2     \"%(p)#"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## exa 31-3 - Page 817"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "d is 20 mm     \n"
     ]
    }
   ],
   "source": [
    "from numpy import mat, pi, sqrt\n",
    "sigp=600#\n",
    "FOS=3#\n",
    "siga=sigp/FOS#\n",
    "d=16#\n",
    "D=1.5*d+60#\n",
    "#Let Gasket diameter in compression zone be d1\n",
    "d1=(300-160)/2#\n",
    "#Let compressive stress in gasket for leak proof joint be sigl\n",
    "sigl=12#\n",
    "At=mat([[1, 157],[2 ,192], [3, 245]])\n",
    "d=mat([[1 ,16],[2 ,18],[3, 20]])\n",
    "\n",
    "n=3#\n",
    "Pi = range(0,n)\n",
    "Pc = range(0,n)\n",
    "for i in range(0,n):\n",
    "    Pi[i]=At[i,1]*d[i,1]\n",
    "    Pc[i]=3*pi*(d1**2-d[i,1]**2)\n",
    "    if (Pi[i]>=Pc[i]):\n",
    "        print \"The Design is safe\"\n",
    "\n",
    "print \"d is %0.0f mm     \"%(d[i,1])#"
   ]
  }
 ],
 "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
}