diff options
Diffstat (limited to 'Mechanics_of_Structures/Chapter10.ipynb')
-rwxr-xr-x | Mechanics_of_Structures/Chapter10.ipynb | 661 |
1 files changed, 661 insertions, 0 deletions
diff --git a/Mechanics_of_Structures/Chapter10.ipynb b/Mechanics_of_Structures/Chapter10.ipynb new file mode 100755 index 00000000..5ba91400 --- /dev/null +++ b/Mechanics_of_Structures/Chapter10.ipynb @@ -0,0 +1,661 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:65543f2d4bb6fb1415ff8fc05c077edf5e538efef4c593534466949561fc7f05"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter10-Radial pressure-cylindrical and spherical shells"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The necessary thickness of metal for seamless pipe \n",
+ "d = 2.;## feet\n",
+ "p = 250.;## lb/in^2\n",
+ "f = 12000.;## lb/in^2\n",
+ "t_limit = p*d*12/(2*f) ;## inches\n",
+ "print'%s %.2f %s'%('The necessary thickness of metal for seamless pipe is',t_limit,'inches');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The necessary thickness of metal for seamless pipe is 0.25 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Maximum intensity of shear stress induced \n",
+ "l = 8.;##feet\n",
+ "d = 3.;## feet\n",
+ "t = 1/2.;## inches\n",
+ "p = 200.;## lb/in**2\n",
+ "E = 30.*10**6.;## lb/in**2\n",
+ "PR = 0.3;## poisson's ratio\n",
+ "f1 = p*d*12./(2.*t);## lb/in**2\n",
+ "f2 = p*d*12./(4.*t);## lb/in**2\n",
+ "f_s = 0.5*(f1-f2);## lb/in**2\n",
+ "e1 = (f1/E)-(PR*f2/E);## lb/in**2\n",
+ "e2 = (f2/E)-(PR*f1/E);## lb/in**2\n",
+ "del_d = e1*d*12.;## inches\n",
+ "del_l = e2*l*12.;## inches\n",
+ "del_V = (e2+2.*e1)*0.25*math.pi*(12*d)**2. * l*12.;## cub. inches\n",
+ "print'%s %.d %s'%('Maximum intensity of shear stress induced =',f_s,'lb/in**2')\n",
+ "\n",
+ "print'%s %.6f %s'%('del_d =',del_d,'inches')\n",
+ "print'%s %.6f %s'%('del_l = ',del_l,'inches')\n",
+ "print'%s %.1f %s'%('del_V =',del_V,'cub. inches')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum intensity of shear stress induced = 1800 lb/in**2\n",
+ "del_d = 0.007344 inches\n",
+ "del_l = 0.004608 inches\n",
+ "del_V = 44.6 cub. inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Thickness of metal required\n",
+ "d = 30.;## inches\n",
+ "H = 300.;## feet\n",
+ "w = 62.5;\n",
+ "f = 2800.;\n",
+ "##intensity of water pressur\n",
+ "p = w*H/144.;## lb/in**2\n",
+ "t_limit = p*d/(2*f);## inches\n",
+ "print'%s %.4f %s'%('Thickness of metal required is',t_limit, 'inches')\n",
+ "\n",
+ "\n",
+ "##the answer is correct only, but it is approximated in the text book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thickness of metal required is 0.6975 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calcualte The permissible steam pressure and circumferential stress and longitudinal sretss \n",
+ "d = 78.;## inches\n",
+ "t = 3/4.;## inches\n",
+ "n1 = 70/100.;## efficiency of the longitudinal riveted joint\n",
+ "f = 6.;## tons/in^2\n",
+ "n2 = 60/100.;## efficiency of the circumferential riveted joint\n",
+ "p = f*2240./(d/(2.*t*n1));##lb/in^2\n",
+ "p = round(p-1);\n",
+ "f1 = p*d/(2.*t);## lb/in^2\n",
+ "f2 = p*d/(4.*t*n2);## lb/in^2\n",
+ "print'%s %.d %s'%('The permissible steam pressure, p = ',p,'lb/in^2');\n",
+ "print'%s %.d %s'%('The circumferential stress, f1 =',f1,'lb/in^2')\n",
+ "print'%s %.2f %s'%('The circumferential stress, f1= ',f1/2240,'tons/in^2');\n",
+ "print'%s %.d %s'%('The longitudinal stress, f2 =',f2,'lb/in^2') \n",
+ "print'%s %.2f %s'%('The longitudinal sretss, f2 =',f2/2240,'lb/in^2')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The permissible steam pressure, p = 180 lb/in^2\n",
+ "The circumferential stress, f1 = 9360 lb/in^2\n",
+ "The circumferential stress, f1= 4.18 tons/in^2\n",
+ "The longitudinal stress, f2 = 7800 lb/in^2\n",
+ "The longitudinal stress, f2 = 3.48 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The thickness of the plate required\n",
+ "d = 4.;## feet\n",
+ "p = 200.;## lb/in^2\n",
+ "f = 15000.;## lb/in^2\n",
+ "n = 0.7;## efficiency\n",
+ "t_limit = p*d*12/(4*f*n);## inches\n",
+ "print'%s %.2f %s'%('The thickness of the plate required =',t_limit,'inches');\n",
+ "\n",
+ "##the answer is correct only, but it is approximated in the text book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thickness of the plate required = 0.23 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The pressure exerted by fluid on the shell\n",
+ "d = 3.;## feet\n",
+ "t = 1/4.;## inches\n",
+ "del_V = 9.;## cub. inches\n",
+ "E = 30*10**6;## lb/in^2\n",
+ "PR = 0.3;## poisson's ratio\n",
+ "V = (math.pi/6.)*(12.*d)**3;## in^3\n",
+ "k = del_V/V;\n",
+ "f = k*E/(3.*(1.-PR));## lb/in^2\n",
+ "p = 4.*f*t/(12.*d);## lb/in^2\n",
+ "print'%s %.d %s'%('The pressure exerted by fluid on the shell, p =',p,'lb/in^2');\n",
+ "\n",
+ "##there is a minute calculation error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The pressure exerted by fluid on the shell, p = 146 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calcualte the Pipe and Steel-wire of intiually due to p and finally due to p\n",
+ "d = 12.;## feet\n",
+ "t = 1/2.;## inches\n",
+ "d1 = 1/4.;## inches\n",
+ "p = 500.;## lb/in^2\n",
+ "E_c = 6000.;## tons/in^2\n",
+ "PR = 0.3;## Poisson's ratio\n",
+ "E_s = 13000.;## tons/in^2\n",
+ "f_t = 8000.;## lb/in^2\n",
+ "l = 8.;\n",
+ "P_c = l*(math.pi/64.)*f_t;## lb-wt\n",
+ "f_c = P_c/(2.*t);## lb/in^2\n",
+ "##bursting force per inch unit length\n",
+ "f_b = p*d;## lb-wt\n",
+ "f_p = (f_b + (l*0.049*PR*p*d/(4.*t))*(E_s/E_c))/(1 + (l*0.049)*E_s/E_c);## lb/in^2 \n",
+ "f_w = (f_p - PR*p*d/(4.*t))*E_s/E_c;## lb/in^2\n",
+ "\n",
+ "print(' Pipe Steel-wire');\n",
+ "print'%s %.d %s'%(' Initually,',f_c,'lb/in^2.,compr.')\n",
+ "print'%s %.d %s'%('Intiually',f_t,'lb/in^2., tensile')\n",
+ "print'%s %.d %s'%( 'Due to p, ',f_p,'lb/in^2.,tensile.')\n",
+ "print'%s %.d %s'%('Due to p',f_t,'lb/in^2., tensile')\n",
+ "print'%s %.d %s'%(' Finally, ',f_p-f_c,'lb/in^2.,tensile.')\n",
+ "print'%s %.d %s'%('Finally',f_w+f_t,'lb/in^2., tensile')\n",
+ "\n",
+ "##there is a calculation error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Pipe Steel-wire\n",
+ " Initually, 3141 lb/in^2.,compr.\n",
+ "Intiually 8000 lb/in^2., tensile\n",
+ "Due to p, 3657 lb/in^2.,tensile.\n",
+ "Due to p 8000 lb/in^2., tensile\n",
+ " Finally, 516 lb/in^2.,tensile.\n",
+ "Finally 13975 lb/in^2., tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg395"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate 'The maximum intensities of circumferential stresses are\n",
+ "d = 12.;## inches\n",
+ "t = 3.;## inches\n",
+ "p_x1 = 900.;## lb/in^2\n",
+ "x1 = 0.5*d;## inches\n",
+ "p_x2 = 0.;\n",
+ "x2 = 0.5*d+t;## inches\n",
+ "##from Lame's formulae\n",
+ "b = (p_x1-p_x2)/((1/x1**2)-(1/x2**2));\n",
+ "a = (b/x1**2)- p_x1;\n",
+ "f_x1 = (b/x1**2)+a;## lb/in^2\n",
+ "f_x2 = (b/x2**2)+a;## lb/in^2\n",
+ "print'%s %.d %s'%('The maximum intensities of circumferential stresses are: f_6 =',f_x1,'lb/in^2.,tensile') \n",
+ "print'%s %.d %s'%('The minimum intensities of circumferential stresses are: f_6f_9 =',f_x2,'lb/in^2., tensile')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum intensities of circumferential stresses are: f_6 = 2340 lb/in^2.,tensile\n",
+ "The minimum intensities of circumferential stresses are: f_6f_9 = 1440 lb/in^2., tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# calculate 'The maximum intensities of circumferential stresses are and the outer diameter\n",
+ "d = 5.;## inches \n",
+ "p = 3.;## tons/in^2\n",
+ "f = 8.;## tons/in^2\n",
+ "x = 0.5*d;## inches\n",
+ "b = (p+f)/(2/x**2);\n",
+ "a = f-(b/x**2); \n",
+ "r = math.sqrt(b/a);##outer radius\n",
+ "t = r-0.5*d;##thickness\n",
+ "D = 2.*t+d;##outer diameter\n",
+ "print'%s %.3f %s'%('The thickness of metal necessary, t =',t,'inches');\n",
+ "print'%s %.1f %s'%('the outer diameter will be, D =',D,'inches');\n",
+ "\n",
+ "##the answer is correct, but it is approximated in the text book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thickness of metal necessary, t = 1.208 inches\n",
+ "the outer diameter will be, D = 7.4 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# calculate The outer radius in all four cases\n",
+ "d = 9.;## inches\n",
+ "p = 5000/2240.;## lb/in**2\n",
+ "f = 8.;## tons/in**2\n",
+ "PR = 0.3;## Poisson's ratio\n",
+ "##(i) Maximum principal stress hypothesis:\n",
+ "k_limit1 = math.sqrt((f + p)/(f - p));##k_limit = r1/r2\n",
+ "r_limit1 = k_limit1*0.5*d;##inches\n",
+ "print'%s %.3f %s'%('The outer radius in case(i), r2 =',r_limit1,'inches');\n",
+ "##(ii) Maximum principal strain:\n",
+ "k_limit2 = math.sqrt(((f/p - PR)+1)/(f/p - PR -1));\n",
+ "r_limit2 = k_limit2*0.5*d;## inches\n",
+ "print'%s %.3f %s'%(' The outer radius in case(ii), r2 =',r_limit2,'inches');\n",
+ "##(iii) Maximum shear stress:\n",
+ "k_limit3 = math.sqrt(f/(2*p) /((f/(2*p)) - 1));\n",
+ "r_limit3 = k_limit3*0.5*d;## inches\n",
+ "print'%s %.3f %s'%('The outer radius in case(iii), r2 =',r_limit3,' inches');\n",
+ "##(iv) Maximum strain energy\n",
+ "K1 = (f**2 /p**2)/(2*((f**2 /(2*p**2)) - (1+PR)));\n",
+ "K2 = K1**2;\n",
+ "K3 = ((f**2 /(2*p**2)) - (1-PR))/((f**2 /(2*p**2)) - (1+PR));\n",
+ "k_limit4 =math. sqrt(K1+math.sqrt(K2-K3));\n",
+ "r_limit4 = k_limit4*0.5*d;## inches\n",
+ "print'%s %.3f %s'%(' The outer radius in case(iv), r2 =',r_limit4,' inches');\n",
+ "\n",
+ "##there are calculation errors in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The outer radius in case(i), r2 = 5.994 inches\n",
+ " The outer radius in case(ii), r2 = 6.163 inches\n",
+ "The outer radius in case(iii), r2 = 6.769 inches\n",
+ " The outer radius in case(iv), r2 = 6.249 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex11-pg404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "# calculate hoop stress at x = 3,6 inches,x = 5 inches initially on inner tube and outer tube\n",
+ "r1 = 0.5*6.;## inches\n",
+ "r2 = 0.5*12.;## inches\n",
+ "r3 = 0.5*10.;## inches\n",
+ "p = 1500.;## lb/in**2\n",
+ "p_f = 12000.;## lb/in**2\n",
+ "##Initially, for the inner tube\n",
+ "b = -p/((1./r1**2.) - (1./r3**2.));\n",
+ "a = b/r1**2.;\n",
+ "f_3 = (b/r1**2.) +a;## lb/in**2\n",
+ "f_5 = (b/r3**2.) +a;## lb/in**2\n",
+ "##for the outer tube\n",
+ "b1 = p/((1/r3**2.)-(1/r2**2.));\n",
+ "a1 = b1/r2**2.;\n",
+ "f1_5 = (b1/r3**2.)+a1;## lb/in**2\n",
+ "f1_6 = (b1/r2**2.)+a1;## lb/in**2\n",
+ "##When the fluid pressure of 12000 lb/in**2, is admitted into the compound tube\n",
+ "B = p_f/((1./r1**2.)-(1/r2**2.));\n",
+ "A = B/(r2**2.);\n",
+ "f_3_ = (B/r1**2.)+A;## lb/in**2\n",
+ "f_5_ = (B/r3**2.)+A;## lb/in**2\n",
+ "f_6_ = (B/r2**2.)+A;## lb/in**2\n",
+ "\n",
+ "print('The hoop stresse are');\n",
+ "print'%s %.1f %s %.1f %s '%(' at x = 3 inches,x = 5 inches initially on inner tube are ',-f_3,' lb/in^2.., compressive, ',-f_5,' lb/in^2..,compressive respectively');\n",
+ "print'%s %.1f %s %.1f %s'%(' at x = 5 inches,x = 6 inches initially on outer tube are ',f1_5,' lb/in^2.., tensile, ',f1_6,' lb/in^2..,tensile respectively');\n",
+ "print'%s %.d %s %.d %s %.d %s'%(' at x = 3 inches,x = 5 inches and x = 6 inches due to fluid pressure are ',f_3_,' lb/in^2.., tensile, ',f_5_,' lb/in^2..,tensile, and',f_6_,' lb/in^2..,tensile respectively')\n",
+ "print'%s %.1f %s %.1f %s'%(' at x = 3 inches,x = 5 inches finally on inner tube are ',f_3_+f_3,' lb/in^2.., tensile, ',f_5_+f_5,' lb/in^2..,tensile respectively');\n",
+ "print'%s %.d %s %.d %s'%(' at x = 5 inches,x = 6 inches finally on outer tube are',f1_5+f_5_,' lb/in^2.., tensile, ',f1_6+f_6_,' lb/in^2.., tensile respectively');"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The hoop stresse are\n",
+ " at x = 3 inches,x = 5 inches initially on inner tube are 4687.5 lb/in^2.., compressive, 3187.5 lb/in^2..,compressive respectively \n",
+ " at x = 5 inches,x = 6 inches initially on outer tube are 8318.2 lb/in^2.., tensile, 6818.2 lb/in^2..,tensile respectively\n",
+ " at x = 3 inches,x = 5 inches and x = 6 inches due to fluid pressure are 20000 lb/in^2.., tensile, 9760 lb/in^2..,tensile, and 8000 lb/in^2..,tensile respectively\n",
+ " at x = 3 inches,x = 5 inches finally on inner tube are 15312.5 lb/in^2.., tensile, 6572.5 lb/in^2..,tensile respectively\n",
+ " at x = 5 inches,x = 6 inches finally on outer tube are 18078 lb/in^2.., tensile, 14818 lb/in^2.., tensile respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex12-pg407"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The minimum temperature to which outer tube should be heated before it can be slipped\n",
+ "p = 1500.;## lb/in^2\n",
+ "E = 30*10**6;## lb/in^2\n",
+ "f1_5 = 8318.;## lb/in^2\n",
+ "f2_5 = 3187.5;## lb/in^2\n",
+ "alpha = 0.0000062;## per F\n",
+ "r3 = 6;## inches\n",
+ "del_r3 = r3*(f1_5+f2_5)/E;## inches\n",
+ "t = ((f1_5+f2_5)/E)/(alpha);## inches\n",
+ "print'%s %.2f %s'%('The minimum temperature to which outer tube should be heated before it can be slipped on, t =',t,'F');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The minimum temperature to which outer tube should be heated before it can be slipped on, t = 61.86 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex13-pg408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The hoop stresses are as under for inner tube at x=1/5 and 3 and 4.5 inches \n",
+ "r1 = 0.5*9.;## inches\n",
+ "r2 = 0.5*3.;## inches\n",
+ "r3 = 0.5*6.;## inches\n",
+ "del_r3 = 0.5*0.003;## inches\n",
+ "E = 13000.;## tons/in^2\n",
+ "k1 = r1/r3;\n",
+ "k2 = r2/r3;\n",
+ "a1 = (del_r3/r3)*E/((k1**2 +1)- (k2**2 +1)*(k1**2 -1)/(k2**2 -1));\n",
+ "a = a1*(k1**2 -1)/(k2**2 -1);\n",
+ "b1 = a1*r1**2;\n",
+ "b = a*r2**2;\n",
+ "p_ = (b/r3**2) -a;## tons/in^2\n",
+ "## for the inner tube\n",
+ "f_x1 = (b/r2**2) +a;## tons/in^2\n",
+ "f_x2 = (b/r3**2) +a;## tons/in^2\n",
+ "## for the outer tube\n",
+ "f_x3 = (b1/r3**2) +a1;## tons/in^2\n",
+ "f_x4 = (b1/r1**2) +a1;## tons/in^2\n",
+ "print ('The hoop stresses are as under:');\n",
+ "print'%s %.2f %s'%('For the inner tube, at x = 1/5 inches, f =',-f_x1,'tons/in^2., compressive')\n",
+ "print'%s %.2f %s'%('at x = 3 inches, f =',-f_x2,'tons/in^2.,compressive')\n",
+ "print'%s %.2f %s'%(' For the outer tube, at x = 3 inches, f =',f_x3,'tons/in^2., tensile')\n",
+ "\n",
+ "print'%s %.2f %s'%('at x = 4.5 inches, f =',f_x4,' tons/in^2.,tensile');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The hoop stresses are as under:\n",
+ "For the inner tube, at x = 1/5 inches, f = 4.06 tons/in^2., compressive\n",
+ "at x = 3 inches, f = 2.54 tons/in^2.,compressive\n",
+ " For the outer tube, at x = 3 inches, f = 3.96 tons/in^2., tensile\n",
+ "at x = 4.5 inches, f = 2.44 tons/in^2.,tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg414"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the thickness of the shell required\n",
+ "r1 = 0.5*5.;## inches\n",
+ "p = 5000.;## lb/in^2\n",
+ "f = 5.;## tons/in^2\n",
+ "b = (f + p/2240.)/((1/r1**3) + (2/r1**3));\n",
+ "a = f - (b/r1**3);\n",
+ "##external diameter\n",
+ "r = (2*b/a)**(1/3);## inches\n",
+ "t = r - r1;## inches\n",
+ "print'%s %.3f %s'%('The thickness of the shell required, t =',t,'inches');\n",
+ "\n",
+ "##the answer is approximated in the text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thickness of the shell required, t = -1.500 inches\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |