diff options
Diffstat (limited to 'Test')
-rwxr-xr-x | Test/README.txt | 10 | ||||
-rwxr-xr-x | Test/chapter1.ipynb | 423 | ||||
-rwxr-xr-x | Test/chapter1_1.ipynb | 423 | ||||
-rwxr-xr-x | Test/chapter1_2.ipynb | 423 | ||||
-rwxr-xr-x | Test/chapter2.ipynb | 501 | ||||
-rwxr-xr-x | Test/chapter2_1.ipynb | 501 | ||||
-rwxr-xr-x | Test/chapter2_2.ipynb | 501 | ||||
-rwxr-xr-x | Test/screenshots/screen1.png | bin | 0 -> 64967 bytes | |||
-rwxr-xr-x | Test/screenshots/screen1_1.png | bin | 0 -> 64967 bytes | |||
-rwxr-xr-x | Test/screenshots/screen2.png | bin | 0 -> 18650 bytes | |||
-rwxr-xr-x | Test/screenshots/screen2_1.png | bin | 0 -> 18650 bytes | |||
-rwxr-xr-x | Test/screenshots/screen2_2.png | bin | 0 -> 18650 bytes | |||
-rwxr-xr-x | Test/screenshots/screen2_3.png | bin | 0 -> 18650 bytes | |||
-rwxr-xr-x | Test/screenshots/screen3.png | bin | 0 -> 95229 bytes | |||
-rwxr-xr-x | Test/screenshots/screen3_1.png | bin | 0 -> 95229 bytes | |||
-rwxr-xr-x | Test/screenshots/screen3_2.png | bin | 0 -> 95229 bytes |
16 files changed, 2782 insertions, 0 deletions
diff --git a/Test/README.txt b/Test/README.txt new file mode 100755 index 00000000..b9a36bc6 --- /dev/null +++ b/Test/README.txt @@ -0,0 +1,10 @@ +Contributed By: Hardik Ghaghada +Course: mca +College/Institute/Organization: FOSSEE - Indian Institute of Technology +Department/Designation: Aerospace +Book Title: Test +Author: Subramanium & Brij Lal +Publisher: McGraw Hill Education (India) Private Limited, New Delhi +Year of publication: 2000 +Isbn: 2548872474 +Edition: 2nd
\ No newline at end of file diff --git a/Test/chapter1.ipynb b/Test/chapter1.ipynb new file mode 100755 index 00000000..cf45a409 --- /dev/null +++ b/Test/chapter1.ipynb @@ -0,0 +1,423 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Tension Comprssion and Shear" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, page no. 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Find compressive stress and strain in the post\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "\n", + "d_1 = 4 # inner diameter (inch)\n", + "d_2 = 4.5 #outer diameter (inch)\n", + "P = 26000 # pressure in pound\n", + "L = 16 # Length of cylinder (inch)\n", + "my_del = 0.012 # shortening of post (inch)\n", + "\n", + "#calculation\n", + "A = (math.pi/4)*((d_2**2)-(d_1**2)) #Area (inch^2)\n", + "s = P/A # stress\n", + "\n", + "print \"compressive stress in the post is \", round(s), \"psi\"\n", + "\n", + "e = my_del/L # strain\n", + "\n", + "print \"compressive strain in the post is %e\" %e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "compressive stress in the post is 7789.0 psi\n", + "compressive strain in the post is 7.500000e-04\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, page no. 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "formula for maximum stress & calculating maximum stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "W = 1500 # weight (Newton)\n", + "d = 0.008 #diameter(meter) \n", + "g = 77000 # Weight density of steel\n", + "L = 40 # Length of bar (m)\n", + "\n", + "#calculation\n", + "\n", + "A = (math.pi/4)*(d**2) # Area\n", + "s_max = (1500/A) + (g*L) # maximum stress\n", + "\n", + "#result\n", + "print \"Therefore the maximum stress in the rod is \", round(s_max,1), \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore the maximum stress in the rod is 32921551.8 Pa\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3. page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating change in lenght of pipe, strain in pipe, increase in diameter & increase in wall thickness\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d1 = 4.5 # diameter in inch\n", + "d2 = 6 # diameter in inch\n", + "A = (math.pi/4)*((d2**2)-(d1**2)) # Area\n", + "P = 140 # pressure in K\n", + "s = -P/A # stress (compression)\n", + "E = 30000 # young's modulus in Ksi\n", + "e = s/E # strain\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "my_del = e*4*12 # del = e*L \n", + "print \"Change in length of the pipe is\", round(my_del,3), \"inch\"\n", + "\n", + "# Part (b)\n", + "v = 0.30 # Poissio's ratio\n", + "e_ = -(v*e)\n", + "print \"Lateral strain in the pipe is %e\" %e_\n", + "\n", + "# Part (c)\n", + "del_d2 = e_*d2 \n", + "del_d1 = e_*d1\n", + "print \"Increase in the inner diameter is \", round(del_d1,6), \"inch\"\n", + "\n", + "# Part (d)\n", + "t = 0.75\n", + "del_t = e_*t\n", + "print \"Increase in the wall thicness is %f\" %del_t, \"inch\"\n", + "del_t1 = (del_d2-del_d1)/2 \n", + "print \"del_t1 = del_t\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in length of the pipe is -0.018 inch\n", + "Lateral strain in the pipe is 1.131768e-04\n", + "Increase in the inner diameter is 0.000509 inch\n", + "Increase in the wall thicness is 0.000085 inch\n", + "del_t1 = del_t\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, page no. 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate average shear stress and compressive stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d = 0.02 # diameter in m\n", + "t = 0.008 # thickness in m\n", + "A = math.pi*d*t # shear area\n", + "P = 110000 # prassure in Newton\n", + "\n", + "#calculation\n", + "A1 = (math.pi/4)*(d**2) # Punch area\n", + "t_aver = P/A # Average shear stress \n", + "\n", + "\n", + "print \"Average shear stress in the plate is \", t_aver, \"Pa\"\n", + "s_c = P/A1 # compressive stress\n", + "print \"Average compressive stress in the plate is \", s_c, \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average shear stress in the plate is 218838046.751 Pa\n", + "Average compressive stress in the plate is 350140874.802 Pa\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Eample 1.5, page no. 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate bearing stress, shear stress in pin,\n", + "bearing stress between pin and gussets,\n", + "shear stress in anchor bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "P = 12.0 # Pressure in K\n", + "t = 0.375 # thickness of wall in inch\n", + "theta = 40.0 # angle in degree\n", + "d_pin = 0.75 # diameter of pin in inch\n", + "t_G = 0.625 # thickness of gusset in inch\n", + "t_B = 0.375 #thickness of base plate in inch\n", + "d_b = 0.50 # diameter of bolt in inch\n", + "\n", + "#calculation\n", + "\n", + "#Part (a)\n", + "s_b1 = P/(2*t*d_pin) # bearing stress\n", + "print \"Bearing stress between strut and pin\", round(s_b1,1), \"ksi\"\n", + "\n", + "#Part (b)\n", + "t_pin = (4*P)/(2*math.pi*(d_pin**2)) # average shear stress in the \n", + "print \"Shear stress in pin is \", round(t_pin,1), \"ksi\"\n", + "\n", + "# Part (c)\n", + "s_b2 = P/(2*t_G*d_pin) # bearing stress between pin and gusset\n", + "print \"Bearing stress between pin and gussets is\", s_b2, \"ksi\"\n", + "\n", + "# Part (d)\n", + "s_b3 = (P*math.cos(math.radians(40))/(4*t_B*d_b)) # bearing stress between anchor bolt and base plate\n", + "print \"Bearing stress between anchor bolts & base plate\", round(s_b3,1), \"ksi\"\n", + "\n", + "# Part (e)\n", + "t_bolt = (4*math.cos(math.radians(40))*P)/(4*math.pi*(d_b**2)) # shear stress in anchor bolt\n", + "print \"Shear stress in anchor bolts is\", round(t_bolt,1), \"ksi\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bearing stress between strut and pin 21.3 ksi\n", + "Shear stress in pin is 13.6 ksi\n", + "Bearing stress between pin and gussets is 12.8 ksi\n", + "Bearing stress between anchor bolts & base plate 12.3 ksi\n", + "Shear stress in anchor bolts is 11.7 ksi\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, page no. 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine stress at various parts\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "b1 = 1.5 # width of recmath.tangular crosssection in inch\n", + "t = 0.5 # thickness of recmath.tangular crosssection in inch\n", + "b2 = 3.0 # width of enlarged recmath.tangular crosssection in inch\n", + "d = 1.0 # diameter in inch\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "s_1 = 16000 # maximum allowable tensile stress in Psi\n", + "P_1 = s_1*t*b1 \n", + "print \"The allowable load P1 is\", P_1, \"lb\"\n", + "\n", + "# Part (b)\n", + "s_2 = 11000 # maximum allowable tensile stress in Psi\n", + "P_2 = s_2*t*(b2-d) \n", + "print \"allowable load P2 at this section is\", P_2, \"lb\"\n", + "\n", + "#Part (c)\n", + "s_3 = 26000 # maximum allowable tensile stress in Psi\n", + "P_3 = s_3*t*d \n", + "print \"The allowable load based upon bearing between the hanger and the bolt is\", P_3, \"lb\"\n", + "\n", + "# Part (d)\n", + "s_4 = 6500 # maximum allowable tensile stress in Psi\n", + "P_4 = (math.pi/4)*(d**2)*2*s_4 \n", + "print \"the allowable load P4 based upon shear in the bolt is\", round(P_4), \"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The allowable load P1 is 12000.0 lb\n", + "allowable load P2 at this section is 11000.0 lb\n", + "The allowable load based upon bearing between the hanger and the bolt is 13000.0 lb\n", + "the allowable load P4 based upon shear in the bolt is 10210.0 lb\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the cross sectional area \n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "R_ah = (2700*0.8 + 2700*2.6)/2 # Horizontal component at A in N\n", + "R_ch = R_ah # Horizontal component at C in N\n", + "R_cv = (2700*2.2 + 2700*0.4)/3 # vertical component at C in N\n", + "R_av = 2700 + 2700 - R_cv # vertical component at A in N\n", + "R_a = math.sqrt((R_ah**2)+(R_av**2))\n", + "R_c = math.sqrt((R_ch**2)+(R_cv**2))\n", + "Fab = R_a # Tensile force in bar AB\n", + "Vc = R_c # Shear force acting on the pin at C\n", + "s_allow = 125000000 # allowable stress in tension \n", + "t_allow = 45000000 # allowable stress in shear\n", + "\n", + "#calculation\n", + "Aab = Fab / s_allow # required area of bar \n", + "Apin = Vc / (2*t_allow) # required area of pin\n", + "\n", + "\n", + "print \"Required area of bar is %f\" %Apin, \"m^2\"\n", + "d = math.sqrt((4*Apin)/math.pi) # diameter in meter\n", + "print \"Required diameter of pin is %f\" %d, \"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required area of bar is 0.000057 m^2\n", + "Required diameter of pin is 0.008537 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/chapter1_1.ipynb b/Test/chapter1_1.ipynb new file mode 100755 index 00000000..cf45a409 --- /dev/null +++ b/Test/chapter1_1.ipynb @@ -0,0 +1,423 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Tension Comprssion and Shear" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, page no. 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Find compressive stress and strain in the post\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "\n", + "d_1 = 4 # inner diameter (inch)\n", + "d_2 = 4.5 #outer diameter (inch)\n", + "P = 26000 # pressure in pound\n", + "L = 16 # Length of cylinder (inch)\n", + "my_del = 0.012 # shortening of post (inch)\n", + "\n", + "#calculation\n", + "A = (math.pi/4)*((d_2**2)-(d_1**2)) #Area (inch^2)\n", + "s = P/A # stress\n", + "\n", + "print \"compressive stress in the post is \", round(s), \"psi\"\n", + "\n", + "e = my_del/L # strain\n", + "\n", + "print \"compressive strain in the post is %e\" %e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "compressive stress in the post is 7789.0 psi\n", + "compressive strain in the post is 7.500000e-04\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, page no. 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "formula for maximum stress & calculating maximum stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "W = 1500 # weight (Newton)\n", + "d = 0.008 #diameter(meter) \n", + "g = 77000 # Weight density of steel\n", + "L = 40 # Length of bar (m)\n", + "\n", + "#calculation\n", + "\n", + "A = (math.pi/4)*(d**2) # Area\n", + "s_max = (1500/A) + (g*L) # maximum stress\n", + "\n", + "#result\n", + "print \"Therefore the maximum stress in the rod is \", round(s_max,1), \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore the maximum stress in the rod is 32921551.8 Pa\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3. page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating change in lenght of pipe, strain in pipe, increase in diameter & increase in wall thickness\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d1 = 4.5 # diameter in inch\n", + "d2 = 6 # diameter in inch\n", + "A = (math.pi/4)*((d2**2)-(d1**2)) # Area\n", + "P = 140 # pressure in K\n", + "s = -P/A # stress (compression)\n", + "E = 30000 # young's modulus in Ksi\n", + "e = s/E # strain\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "my_del = e*4*12 # del = e*L \n", + "print \"Change in length of the pipe is\", round(my_del,3), \"inch\"\n", + "\n", + "# Part (b)\n", + "v = 0.30 # Poissio's ratio\n", + "e_ = -(v*e)\n", + "print \"Lateral strain in the pipe is %e\" %e_\n", + "\n", + "# Part (c)\n", + "del_d2 = e_*d2 \n", + "del_d1 = e_*d1\n", + "print \"Increase in the inner diameter is \", round(del_d1,6), \"inch\"\n", + "\n", + "# Part (d)\n", + "t = 0.75\n", + "del_t = e_*t\n", + "print \"Increase in the wall thicness is %f\" %del_t, \"inch\"\n", + "del_t1 = (del_d2-del_d1)/2 \n", + "print \"del_t1 = del_t\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in length of the pipe is -0.018 inch\n", + "Lateral strain in the pipe is 1.131768e-04\n", + "Increase in the inner diameter is 0.000509 inch\n", + "Increase in the wall thicness is 0.000085 inch\n", + "del_t1 = del_t\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, page no. 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate average shear stress and compressive stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d = 0.02 # diameter in m\n", + "t = 0.008 # thickness in m\n", + "A = math.pi*d*t # shear area\n", + "P = 110000 # prassure in Newton\n", + "\n", + "#calculation\n", + "A1 = (math.pi/4)*(d**2) # Punch area\n", + "t_aver = P/A # Average shear stress \n", + "\n", + "\n", + "print \"Average shear stress in the plate is \", t_aver, \"Pa\"\n", + "s_c = P/A1 # compressive stress\n", + "print \"Average compressive stress in the plate is \", s_c, \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average shear stress in the plate is 218838046.751 Pa\n", + "Average compressive stress in the plate is 350140874.802 Pa\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Eample 1.5, page no. 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate bearing stress, shear stress in pin,\n", + "bearing stress between pin and gussets,\n", + "shear stress in anchor bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "P = 12.0 # Pressure in K\n", + "t = 0.375 # thickness of wall in inch\n", + "theta = 40.0 # angle in degree\n", + "d_pin = 0.75 # diameter of pin in inch\n", + "t_G = 0.625 # thickness of gusset in inch\n", + "t_B = 0.375 #thickness of base plate in inch\n", + "d_b = 0.50 # diameter of bolt in inch\n", + "\n", + "#calculation\n", + "\n", + "#Part (a)\n", + "s_b1 = P/(2*t*d_pin) # bearing stress\n", + "print \"Bearing stress between strut and pin\", round(s_b1,1), \"ksi\"\n", + "\n", + "#Part (b)\n", + "t_pin = (4*P)/(2*math.pi*(d_pin**2)) # average shear stress in the \n", + "print \"Shear stress in pin is \", round(t_pin,1), \"ksi\"\n", + "\n", + "# Part (c)\n", + "s_b2 = P/(2*t_G*d_pin) # bearing stress between pin and gusset\n", + "print \"Bearing stress between pin and gussets is\", s_b2, \"ksi\"\n", + "\n", + "# Part (d)\n", + "s_b3 = (P*math.cos(math.radians(40))/(4*t_B*d_b)) # bearing stress between anchor bolt and base plate\n", + "print \"Bearing stress between anchor bolts & base plate\", round(s_b3,1), \"ksi\"\n", + "\n", + "# Part (e)\n", + "t_bolt = (4*math.cos(math.radians(40))*P)/(4*math.pi*(d_b**2)) # shear stress in anchor bolt\n", + "print \"Shear stress in anchor bolts is\", round(t_bolt,1), \"ksi\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bearing stress between strut and pin 21.3 ksi\n", + "Shear stress in pin is 13.6 ksi\n", + "Bearing stress between pin and gussets is 12.8 ksi\n", + "Bearing stress between anchor bolts & base plate 12.3 ksi\n", + "Shear stress in anchor bolts is 11.7 ksi\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, page no. 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine stress at various parts\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "b1 = 1.5 # width of recmath.tangular crosssection in inch\n", + "t = 0.5 # thickness of recmath.tangular crosssection in inch\n", + "b2 = 3.0 # width of enlarged recmath.tangular crosssection in inch\n", + "d = 1.0 # diameter in inch\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "s_1 = 16000 # maximum allowable tensile stress in Psi\n", + "P_1 = s_1*t*b1 \n", + "print \"The allowable load P1 is\", P_1, \"lb\"\n", + "\n", + "# Part (b)\n", + "s_2 = 11000 # maximum allowable tensile stress in Psi\n", + "P_2 = s_2*t*(b2-d) \n", + "print \"allowable load P2 at this section is\", P_2, \"lb\"\n", + "\n", + "#Part (c)\n", + "s_3 = 26000 # maximum allowable tensile stress in Psi\n", + "P_3 = s_3*t*d \n", + "print \"The allowable load based upon bearing between the hanger and the bolt is\", P_3, \"lb\"\n", + "\n", + "# Part (d)\n", + "s_4 = 6500 # maximum allowable tensile stress in Psi\n", + "P_4 = (math.pi/4)*(d**2)*2*s_4 \n", + "print \"the allowable load P4 based upon shear in the bolt is\", round(P_4), \"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The allowable load P1 is 12000.0 lb\n", + "allowable load P2 at this section is 11000.0 lb\n", + "The allowable load based upon bearing between the hanger and the bolt is 13000.0 lb\n", + "the allowable load P4 based upon shear in the bolt is 10210.0 lb\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the cross sectional area \n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "R_ah = (2700*0.8 + 2700*2.6)/2 # Horizontal component at A in N\n", + "R_ch = R_ah # Horizontal component at C in N\n", + "R_cv = (2700*2.2 + 2700*0.4)/3 # vertical component at C in N\n", + "R_av = 2700 + 2700 - R_cv # vertical component at A in N\n", + "R_a = math.sqrt((R_ah**2)+(R_av**2))\n", + "R_c = math.sqrt((R_ch**2)+(R_cv**2))\n", + "Fab = R_a # Tensile force in bar AB\n", + "Vc = R_c # Shear force acting on the pin at C\n", + "s_allow = 125000000 # allowable stress in tension \n", + "t_allow = 45000000 # allowable stress in shear\n", + "\n", + "#calculation\n", + "Aab = Fab / s_allow # required area of bar \n", + "Apin = Vc / (2*t_allow) # required area of pin\n", + "\n", + "\n", + "print \"Required area of bar is %f\" %Apin, \"m^2\"\n", + "d = math.sqrt((4*Apin)/math.pi) # diameter in meter\n", + "print \"Required diameter of pin is %f\" %d, \"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required area of bar is 0.000057 m^2\n", + "Required diameter of pin is 0.008537 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/chapter1_2.ipynb b/Test/chapter1_2.ipynb new file mode 100755 index 00000000..cf45a409 --- /dev/null +++ b/Test/chapter1_2.ipynb @@ -0,0 +1,423 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Tension Comprssion and Shear" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, page no. 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Find compressive stress and strain in the post\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "\n", + "d_1 = 4 # inner diameter (inch)\n", + "d_2 = 4.5 #outer diameter (inch)\n", + "P = 26000 # pressure in pound\n", + "L = 16 # Length of cylinder (inch)\n", + "my_del = 0.012 # shortening of post (inch)\n", + "\n", + "#calculation\n", + "A = (math.pi/4)*((d_2**2)-(d_1**2)) #Area (inch^2)\n", + "s = P/A # stress\n", + "\n", + "print \"compressive stress in the post is \", round(s), \"psi\"\n", + "\n", + "e = my_del/L # strain\n", + "\n", + "print \"compressive strain in the post is %e\" %e" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "compressive stress in the post is 7789.0 psi\n", + "compressive strain in the post is 7.500000e-04\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, page no. 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "formula for maximum stress & calculating maximum stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "W = 1500 # weight (Newton)\n", + "d = 0.008 #diameter(meter) \n", + "g = 77000 # Weight density of steel\n", + "L = 40 # Length of bar (m)\n", + "\n", + "#calculation\n", + "\n", + "A = (math.pi/4)*(d**2) # Area\n", + "s_max = (1500/A) + (g*L) # maximum stress\n", + "\n", + "#result\n", + "print \"Therefore the maximum stress in the rod is \", round(s_max,1), \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore the maximum stress in the rod is 32921551.8 Pa\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3. page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating change in lenght of pipe, strain in pipe, increase in diameter & increase in wall thickness\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d1 = 4.5 # diameter in inch\n", + "d2 = 6 # diameter in inch\n", + "A = (math.pi/4)*((d2**2)-(d1**2)) # Area\n", + "P = 140 # pressure in K\n", + "s = -P/A # stress (compression)\n", + "E = 30000 # young's modulus in Ksi\n", + "e = s/E # strain\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "my_del = e*4*12 # del = e*L \n", + "print \"Change in length of the pipe is\", round(my_del,3), \"inch\"\n", + "\n", + "# Part (b)\n", + "v = 0.30 # Poissio's ratio\n", + "e_ = -(v*e)\n", + "print \"Lateral strain in the pipe is %e\" %e_\n", + "\n", + "# Part (c)\n", + "del_d2 = e_*d2 \n", + "del_d1 = e_*d1\n", + "print \"Increase in the inner diameter is \", round(del_d1,6), \"inch\"\n", + "\n", + "# Part (d)\n", + "t = 0.75\n", + "del_t = e_*t\n", + "print \"Increase in the wall thicness is %f\" %del_t, \"inch\"\n", + "del_t1 = (del_d2-del_d1)/2 \n", + "print \"del_t1 = del_t\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in length of the pipe is -0.018 inch\n", + "Lateral strain in the pipe is 1.131768e-04\n", + "Increase in the inner diameter is 0.000509 inch\n", + "Increase in the wall thicness is 0.000085 inch\n", + "del_t1 = del_t\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, page no. 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate average shear stress and compressive stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "d = 0.02 # diameter in m\n", + "t = 0.008 # thickness in m\n", + "A = math.pi*d*t # shear area\n", + "P = 110000 # prassure in Newton\n", + "\n", + "#calculation\n", + "A1 = (math.pi/4)*(d**2) # Punch area\n", + "t_aver = P/A # Average shear stress \n", + "\n", + "\n", + "print \"Average shear stress in the plate is \", t_aver, \"Pa\"\n", + "s_c = P/A1 # compressive stress\n", + "print \"Average compressive stress in the plate is \", s_c, \"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Average shear stress in the plate is 218838046.751 Pa\n", + "Average compressive stress in the plate is 350140874.802 Pa\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Eample 1.5, page no. 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate bearing stress, shear stress in pin,\n", + "bearing stress between pin and gussets,\n", + "shear stress in anchor bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "P = 12.0 # Pressure in K\n", + "t = 0.375 # thickness of wall in inch\n", + "theta = 40.0 # angle in degree\n", + "d_pin = 0.75 # diameter of pin in inch\n", + "t_G = 0.625 # thickness of gusset in inch\n", + "t_B = 0.375 #thickness of base plate in inch\n", + "d_b = 0.50 # diameter of bolt in inch\n", + "\n", + "#calculation\n", + "\n", + "#Part (a)\n", + "s_b1 = P/(2*t*d_pin) # bearing stress\n", + "print \"Bearing stress between strut and pin\", round(s_b1,1), \"ksi\"\n", + "\n", + "#Part (b)\n", + "t_pin = (4*P)/(2*math.pi*(d_pin**2)) # average shear stress in the \n", + "print \"Shear stress in pin is \", round(t_pin,1), \"ksi\"\n", + "\n", + "# Part (c)\n", + "s_b2 = P/(2*t_G*d_pin) # bearing stress between pin and gusset\n", + "print \"Bearing stress between pin and gussets is\", s_b2, \"ksi\"\n", + "\n", + "# Part (d)\n", + "s_b3 = (P*math.cos(math.radians(40))/(4*t_B*d_b)) # bearing stress between anchor bolt and base plate\n", + "print \"Bearing stress between anchor bolts & base plate\", round(s_b3,1), \"ksi\"\n", + "\n", + "# Part (e)\n", + "t_bolt = (4*math.cos(math.radians(40))*P)/(4*math.pi*(d_b**2)) # shear stress in anchor bolt\n", + "print \"Shear stress in anchor bolts is\", round(t_bolt,1), \"ksi\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bearing stress between strut and pin 21.3 ksi\n", + "Shear stress in pin is 13.6 ksi\n", + "Bearing stress between pin and gussets is 12.8 ksi\n", + "Bearing stress between anchor bolts & base plate 12.3 ksi\n", + "Shear stress in anchor bolts is 11.7 ksi\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, page no. 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine stress at various parts\n", + "\"\"\"\n", + "\n", + "import math\n", + "\n", + "#initialisation\n", + "b1 = 1.5 # width of recmath.tangular crosssection in inch\n", + "t = 0.5 # thickness of recmath.tangular crosssection in inch\n", + "b2 = 3.0 # width of enlarged recmath.tangular crosssection in inch\n", + "d = 1.0 # diameter in inch\n", + "\n", + "#calculation\n", + "\n", + "# Part (a)\n", + "s_1 = 16000 # maximum allowable tensile stress in Psi\n", + "P_1 = s_1*t*b1 \n", + "print \"The allowable load P1 is\", P_1, \"lb\"\n", + "\n", + "# Part (b)\n", + "s_2 = 11000 # maximum allowable tensile stress in Psi\n", + "P_2 = s_2*t*(b2-d) \n", + "print \"allowable load P2 at this section is\", P_2, \"lb\"\n", + "\n", + "#Part (c)\n", + "s_3 = 26000 # maximum allowable tensile stress in Psi\n", + "P_3 = s_3*t*d \n", + "print \"The allowable load based upon bearing between the hanger and the bolt is\", P_3, \"lb\"\n", + "\n", + "# Part (d)\n", + "s_4 = 6500 # maximum allowable tensile stress in Psi\n", + "P_4 = (math.pi/4)*(d**2)*2*s_4 \n", + "print \"the allowable load P4 based upon shear in the bolt is\", round(P_4), \"lb\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The allowable load P1 is 12000.0 lb\n", + "allowable load P2 at this section is 11000.0 lb\n", + "The allowable load based upon bearing between the hanger and the bolt is 13000.0 lb\n", + "the allowable load P4 based upon shear in the bolt is 10210.0 lb\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the cross sectional area \n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "R_ah = (2700*0.8 + 2700*2.6)/2 # Horizontal component at A in N\n", + "R_ch = R_ah # Horizontal component at C in N\n", + "R_cv = (2700*2.2 + 2700*0.4)/3 # vertical component at C in N\n", + "R_av = 2700 + 2700 - R_cv # vertical component at A in N\n", + "R_a = math.sqrt((R_ah**2)+(R_av**2))\n", + "R_c = math.sqrt((R_ch**2)+(R_cv**2))\n", + "Fab = R_a # Tensile force in bar AB\n", + "Vc = R_c # Shear force acting on the pin at C\n", + "s_allow = 125000000 # allowable stress in tension \n", + "t_allow = 45000000 # allowable stress in shear\n", + "\n", + "#calculation\n", + "Aab = Fab / s_allow # required area of bar \n", + "Apin = Vc / (2*t_allow) # required area of pin\n", + "\n", + "\n", + "print \"Required area of bar is %f\" %Apin, \"m^2\"\n", + "d = math.sqrt((4*Apin)/math.pi) # diameter in meter\n", + "print \"Required diameter of pin is %f\" %d, \"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required area of bar is 0.000057 m^2\n", + "Required diameter of pin is 0.008537 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/chapter2.ipynb b/Test/chapter2.ipynb new file mode 100755 index 00000000..c4e1ad0f --- /dev/null +++ b/Test/chapter2.ipynb @@ -0,0 +1,501 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Axially Loaded Members" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, page no. 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the number of revolutions for the nut\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "W = 2.0 #lb\n", + "b = 10.5 #inch\n", + "c = 6.4 #inch\n", + "k = 4.2 #inch\n", + "p = 1.0/16.0 #inch\n", + "\n", + "#calculation\n", + "\n", + "n = (W*b)/(c*k*p) #inch\n", + "\n", + "#result\n", + "\n", + "print \" No. of revolution required = \", n, \"revolutions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " No. of revolution required = 12.5 revolutions\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, page no. 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "finding maximum allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "import numpy\n", + "\n", + "#initialisation\n", + "\n", + "Fce_ = 2.0 #dummy variable\n", + "Fbd_ = 3.0 #dummy variable \n", + "Lbd = 480.0 #mm\n", + "Lce = 600.0 #mm\n", + "E = 205e6 #205Gpa\n", + "Abd = 1020.0 #mm\n", + "Ace = 520.0 #mm\n", + "\n", + "#calculation\n", + "Dbd_ = (Fbd_*Lbd)/(E*Abd) #dummy variable\n", + "Dce_ = (Fce_*Lce)/(E*Ace) #dummy variable\n", + "Da = 1 #limiting value\n", + "P = ((((450+225)/225)*(Dbd_ + Dce_) - Dce_ )**(-1)) * Da \n", + "Fce = 2*P # Real value in newton\n", + "Fbd = 3*P #real value in newton\n", + "Dbd = (Fbd*Lbd)/(E*Abd) #print lacement in mm\n", + "Dce = (Fce*Lce)/(E*Ace) # print lacement in mm\n", + "a = numpy.degrees(numpy.arctan(((Da+Dce)/675))) #alpha in degree\n", + "\n", + "#result\n", + "print \"alpha = \", round(a,2), \"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha = 0.11 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculation if vertical displacement\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P1 = 2100.0 #lb\n", + "P2 = 5600.0 #lb\n", + "b = 25.0 #inch\n", + "a = 28.0 #inch\n", + "A1 = 0.25 #inch^2\n", + "A2 = 0.15 #inch^2\n", + "L1 = 20.0 #inch\n", + "L2 = 34.8 #inch\n", + "E = 29e6 #29Gpa\n", + "\n", + "#Calculations\n", + "P3 = (P2*b)/a \n", + "Ra = P3-P1\n", + "N1 = -Ra \n", + "N2 = P1 \n", + "D = ((N1*L1)/(E*A1)) + ((N2*L2)/(E*A2)) #print lacement\n", + "\n", + "#Result\n", + "print \"Downward print lacement is = \", D, \"inch\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Downward print lacement is = 0.0088 inch\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, page no. 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "obtaing formula and calculating allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#Numerical calculation of allowable load\n", + "\n", + "d1 = 4.0 #mm\n", + "d2 = 3.0 #mm\n", + "A1 = (math.pi*(d1**2))/4 #area\n", + "A2 = (math.pi*(d2**2))/4 #area\n", + "L1 = 0.4 #meter\n", + "L2 = 0.3 #meter\n", + "E1 = 72e9 #Gpa\n", + "E2 = 45e9 #Gpa\n", + "f1 = L1/(E1*A1) * 1e6 # To cpmpensate for the mm**2\n", + "f2 = L2/(E2*A2) * 1e6 \n", + "s1 = 200e6 #stress\n", + "s2 = 175e6 #stress\n", + "\n", + "#Calculations\n", + "P1 = ( (s1*A1*(4*f1 + f2))/(3*f2) ) * 1e-6 # To cpmpensate for the mm**2\n", + "P2 = ( (s2*A2*(4*f1 + f2))/(6*f1) ) * 1e-6 \n", + "\n", + "#Result\n", + "print \"Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = \", P2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = 1264.49104307\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, page no. 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate stress acting on inclined section &\n", + "the complete state of stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P = 90000.0 #newton\n", + "A = 1200e-6 # meter^2\n", + "s_x = -P/A #stress\n", + "t_1 = 25.0 #for the stresses on ab and cd plane\n", + "\n", + "#Calculations\n", + "s_1 = s_x*(math.cos(math.radians(t_1))**2)\n", + "T_1 = -s_x*math.cos(math.radians(t_1))*math.sin(math.radians(t_1))\n", + "t_2 = -65.0 #for the stresses on ad and bc plane\n", + "s_2 = s_x*(math.cos(math.radians(t_2))**2)\n", + "T_2 = -s_x*math.cos(math.radians(t_2))*math.sin(math.radians(t_2))\n", + "\n", + "#Result\n", + "print \"The normal and shear stresses on the plane ab and cd are\", round((T_1/1E+6),2), round((s_1/1E+6),2), \"MPa respecively\" \n", + "print \"respecively The normal and shear stresses on the plane ad and bc are\", round((T_2/1E+6),2), round((s_2/1E+6),2), \"MPa respecively\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal and shear stresses on the plane ab and cd are 28.73 -61.6 MPa respecively\n", + "respecively The normal and shear stresses on the plane ad and bc are -28.73 -13.4 MPa respecively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, page no. 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Calculate the vertical displacement of the joint\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "# Value of s_x based on allowable stresses on glued joint\n", + "\n", + "#initialisation\n", + "s_t = -750.0 #psi\n", + "t = -50.0 #degree\n", + "T_t = -500.0 #psi\n", + "\n", + "sg_x_1 = s_t/(math.cos(math.radians(t))**2)\n", + "sg_x_2 = -T_t/(math.cos(math.radians(t))*math.sin(math.radians(t)))\n", + "\n", + "# Value of s_x based on allowable stresses on plastic\n", + "\n", + "sp_x_1 = -1100.0 #psi\n", + "T_t_p = 600.0 #psi\n", + "t_p = 45.0 #degree\n", + "sp_x_2 = -T_t_p/(math.cos(math.radians(t_p))*math.sin(math.radians(t_p)))\n", + "\n", + "# Minimum width of bar\n", + "\n", + "P = 8000.0 #lb\n", + "A = P/sg_x_2\n", + "b_min = math.sqrt(abs(A)) #inch\n", + "print \"The minimum width of the bar is\", round(b_min,2), \"inch\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum width of the bar is 2.81 inch\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15, page no. 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Comparison of energy-absorbing capacity with different type of bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "#Bolt with reduced shank diameter\n", + "\n", + "#initialisation\n", + "g = 1.50 # inch\n", + "d = 0.5 #inch\n", + "t = 0.25 #inch\n", + "d_r = 0.406 #inch\n", + "L = 13.5 #inch\n", + "\n", + "#calculation\n", + "ratio = ((g*(d**2))/(((g-t)*(d_r**2))+(t*(d**2)))) #U2/U1\n", + "\n", + "print \"The energy absorbing capacity of the bolts with reduced shank diameter\", round(ratio,2)\n", + "ratio_1 = ( (((L-t)*(d_r**2))+(t*(d**2))) / ((2*(g-t)*(d_r**2))+2*(t*(d**2))) ) #U3/2U1\n", + "print \"The energy absorbing capacity of the long bolts\", round(ratio_1,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy absorbing capacity of the bolts with reduced shank diameter 1.4\n", + "The energy absorbing capacity of the long bolts 4.18\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.16, page no. 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Determine the maximum elongation and tensile stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "# Maximum elongation\n", + "M = 20 #kg\n", + "g = 9.81 #m/s^2\n", + "L = 2 #meter\n", + "E = 210e9 #210Gpa\n", + "h = 0.15 #meter\n", + "diameter = 0.015 #milimeter\n", + "\n", + "#Calculations & Result\n", + "A = (math.pi/4)*(diameter**2) #area\n", + "D_st = ((M*g*L)/(E*A)) \n", + "D_max = D_st*(1+(1+(2*h/D_st))**0.5) \n", + "D_max_1 = math.sqrt(2*h*D_st) # another approach to find D_max\n", + "i = D_max / D_st # Impact factor\n", + "print \"Maximum elongation is\",round((D_max/1E-3),2), \"mm\" # Maximum tensile stress\n", + "s_max = (E*D_max)/L #Maximum tensile stress\n", + "s_st = (M*g)/A #static stress\n", + "i_1 = s_max / s_st #Impact factor \n", + "print \"Maximum tensile stress is \", round((s_max/1E+6),2), \"MPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum elongation is 1.79 mm\n", + "Maximum tensile stress is 188.13 MPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18, page no. 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine displacement at the lower end of bar in various conditions\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "\n", + "#initialisation\n", + "P1 = 108000.0 #Newton\n", + "P2 = 27000.0 #Newton\n", + "L = 2.2 #meter\n", + "A = 480.0 #mm^2\n", + "\n", + "\n", + "#calculations\n", + "\n", + "# Displacement due to load P1 acting alone\n", + "s = (P1/A) #stress in MPa\n", + "e = (s/70000) + (1/628.2)*((s/260)**10) #strain\n", + "D_b = e*L*1e3 #elongation in mm\n", + "print \"elongation when only P1 load acting is = \", round(D_b,2), \" mm\"\n", + "\n", + "# Displacement due to load P2 acting alone\n", + "s_1 = (P2/A) #stress in MPa\n", + "e_1 = (s_1/70000) + (1/628.2)*((s_1/260)**10) #strain\n", + "D_b_1 = e_1*(L/2)*1e3 #elongation in mm (no elongation in lower half)\n", + "print \"elongation when only P2 load acting is = \", round(D_b_1,2), \" mm\"\n", + "\n", + "# Displacement due to both load acting simonmath.taneously\n", + "#upper half\n", + "s_2 = (P1/A) #stress in MPa\n", + "e_2 = (s_2/70000) + (1/628.2)*((s_2/260)**10) #strain\n", + "\n", + "#lower half\n", + "s_3 = (P1+P2)/A #stress in MPa\n", + "e_3 = (s_3/70000) + (1/628.2)*((s_3/260)**10) #strain\n", + "D_b_2 = ((e_2*L)/2 + (e_3*L)/2) * 1e3 # elongation in mm\n", + "print \"elongation when P1 and P2 both loads are acting is = \", round(D_b_2,2), \" mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "elongation when only P1 load acting is = 7.9 mm\n", + "elongation when only P2 load acting is = 0.88 mm\n", + "elongation when P1 and P2 both loads are acting is = 12.21 mm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/chapter2_1.ipynb b/Test/chapter2_1.ipynb new file mode 100755 index 00000000..c4e1ad0f --- /dev/null +++ b/Test/chapter2_1.ipynb @@ -0,0 +1,501 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Axially Loaded Members" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, page no. 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the number of revolutions for the nut\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "W = 2.0 #lb\n", + "b = 10.5 #inch\n", + "c = 6.4 #inch\n", + "k = 4.2 #inch\n", + "p = 1.0/16.0 #inch\n", + "\n", + "#calculation\n", + "\n", + "n = (W*b)/(c*k*p) #inch\n", + "\n", + "#result\n", + "\n", + "print \" No. of revolution required = \", n, \"revolutions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " No. of revolution required = 12.5 revolutions\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, page no. 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "finding maximum allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "import numpy\n", + "\n", + "#initialisation\n", + "\n", + "Fce_ = 2.0 #dummy variable\n", + "Fbd_ = 3.0 #dummy variable \n", + "Lbd = 480.0 #mm\n", + "Lce = 600.0 #mm\n", + "E = 205e6 #205Gpa\n", + "Abd = 1020.0 #mm\n", + "Ace = 520.0 #mm\n", + "\n", + "#calculation\n", + "Dbd_ = (Fbd_*Lbd)/(E*Abd) #dummy variable\n", + "Dce_ = (Fce_*Lce)/(E*Ace) #dummy variable\n", + "Da = 1 #limiting value\n", + "P = ((((450+225)/225)*(Dbd_ + Dce_) - Dce_ )**(-1)) * Da \n", + "Fce = 2*P # Real value in newton\n", + "Fbd = 3*P #real value in newton\n", + "Dbd = (Fbd*Lbd)/(E*Abd) #print lacement in mm\n", + "Dce = (Fce*Lce)/(E*Ace) # print lacement in mm\n", + "a = numpy.degrees(numpy.arctan(((Da+Dce)/675))) #alpha in degree\n", + "\n", + "#result\n", + "print \"alpha = \", round(a,2), \"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha = 0.11 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculation if vertical displacement\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P1 = 2100.0 #lb\n", + "P2 = 5600.0 #lb\n", + "b = 25.0 #inch\n", + "a = 28.0 #inch\n", + "A1 = 0.25 #inch^2\n", + "A2 = 0.15 #inch^2\n", + "L1 = 20.0 #inch\n", + "L2 = 34.8 #inch\n", + "E = 29e6 #29Gpa\n", + "\n", + "#Calculations\n", + "P3 = (P2*b)/a \n", + "Ra = P3-P1\n", + "N1 = -Ra \n", + "N2 = P1 \n", + "D = ((N1*L1)/(E*A1)) + ((N2*L2)/(E*A2)) #print lacement\n", + "\n", + "#Result\n", + "print \"Downward print lacement is = \", D, \"inch\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Downward print lacement is = 0.0088 inch\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, page no. 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "obtaing formula and calculating allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#Numerical calculation of allowable load\n", + "\n", + "d1 = 4.0 #mm\n", + "d2 = 3.0 #mm\n", + "A1 = (math.pi*(d1**2))/4 #area\n", + "A2 = (math.pi*(d2**2))/4 #area\n", + "L1 = 0.4 #meter\n", + "L2 = 0.3 #meter\n", + "E1 = 72e9 #Gpa\n", + "E2 = 45e9 #Gpa\n", + "f1 = L1/(E1*A1) * 1e6 # To cpmpensate for the mm**2\n", + "f2 = L2/(E2*A2) * 1e6 \n", + "s1 = 200e6 #stress\n", + "s2 = 175e6 #stress\n", + "\n", + "#Calculations\n", + "P1 = ( (s1*A1*(4*f1 + f2))/(3*f2) ) * 1e-6 # To cpmpensate for the mm**2\n", + "P2 = ( (s2*A2*(4*f1 + f2))/(6*f1) ) * 1e-6 \n", + "\n", + "#Result\n", + "print \"Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = \", P2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = 1264.49104307\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, page no. 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate stress acting on inclined section &\n", + "the complete state of stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P = 90000.0 #newton\n", + "A = 1200e-6 # meter^2\n", + "s_x = -P/A #stress\n", + "t_1 = 25.0 #for the stresses on ab and cd plane\n", + "\n", + "#Calculations\n", + "s_1 = s_x*(math.cos(math.radians(t_1))**2)\n", + "T_1 = -s_x*math.cos(math.radians(t_1))*math.sin(math.radians(t_1))\n", + "t_2 = -65.0 #for the stresses on ad and bc plane\n", + "s_2 = s_x*(math.cos(math.radians(t_2))**2)\n", + "T_2 = -s_x*math.cos(math.radians(t_2))*math.sin(math.radians(t_2))\n", + "\n", + "#Result\n", + "print \"The normal and shear stresses on the plane ab and cd are\", round((T_1/1E+6),2), round((s_1/1E+6),2), \"MPa respecively\" \n", + "print \"respecively The normal and shear stresses on the plane ad and bc are\", round((T_2/1E+6),2), round((s_2/1E+6),2), \"MPa respecively\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal and shear stresses on the plane ab and cd are 28.73 -61.6 MPa respecively\n", + "respecively The normal and shear stresses on the plane ad and bc are -28.73 -13.4 MPa respecively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, page no. 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Calculate the vertical displacement of the joint\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "# Value of s_x based on allowable stresses on glued joint\n", + "\n", + "#initialisation\n", + "s_t = -750.0 #psi\n", + "t = -50.0 #degree\n", + "T_t = -500.0 #psi\n", + "\n", + "sg_x_1 = s_t/(math.cos(math.radians(t))**2)\n", + "sg_x_2 = -T_t/(math.cos(math.radians(t))*math.sin(math.radians(t)))\n", + "\n", + "# Value of s_x based on allowable stresses on plastic\n", + "\n", + "sp_x_1 = -1100.0 #psi\n", + "T_t_p = 600.0 #psi\n", + "t_p = 45.0 #degree\n", + "sp_x_2 = -T_t_p/(math.cos(math.radians(t_p))*math.sin(math.radians(t_p)))\n", + "\n", + "# Minimum width of bar\n", + "\n", + "P = 8000.0 #lb\n", + "A = P/sg_x_2\n", + "b_min = math.sqrt(abs(A)) #inch\n", + "print \"The minimum width of the bar is\", round(b_min,2), \"inch\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum width of the bar is 2.81 inch\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15, page no. 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Comparison of energy-absorbing capacity with different type of bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "#Bolt with reduced shank diameter\n", + "\n", + "#initialisation\n", + "g = 1.50 # inch\n", + "d = 0.5 #inch\n", + "t = 0.25 #inch\n", + "d_r = 0.406 #inch\n", + "L = 13.5 #inch\n", + "\n", + "#calculation\n", + "ratio = ((g*(d**2))/(((g-t)*(d_r**2))+(t*(d**2)))) #U2/U1\n", + "\n", + "print \"The energy absorbing capacity of the bolts with reduced shank diameter\", round(ratio,2)\n", + "ratio_1 = ( (((L-t)*(d_r**2))+(t*(d**2))) / ((2*(g-t)*(d_r**2))+2*(t*(d**2))) ) #U3/2U1\n", + "print \"The energy absorbing capacity of the long bolts\", round(ratio_1,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy absorbing capacity of the bolts with reduced shank diameter 1.4\n", + "The energy absorbing capacity of the long bolts 4.18\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.16, page no. 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Determine the maximum elongation and tensile stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "# Maximum elongation\n", + "M = 20 #kg\n", + "g = 9.81 #m/s^2\n", + "L = 2 #meter\n", + "E = 210e9 #210Gpa\n", + "h = 0.15 #meter\n", + "diameter = 0.015 #milimeter\n", + "\n", + "#Calculations & Result\n", + "A = (math.pi/4)*(diameter**2) #area\n", + "D_st = ((M*g*L)/(E*A)) \n", + "D_max = D_st*(1+(1+(2*h/D_st))**0.5) \n", + "D_max_1 = math.sqrt(2*h*D_st) # another approach to find D_max\n", + "i = D_max / D_st # Impact factor\n", + "print \"Maximum elongation is\",round((D_max/1E-3),2), \"mm\" # Maximum tensile stress\n", + "s_max = (E*D_max)/L #Maximum tensile stress\n", + "s_st = (M*g)/A #static stress\n", + "i_1 = s_max / s_st #Impact factor \n", + "print \"Maximum tensile stress is \", round((s_max/1E+6),2), \"MPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum elongation is 1.79 mm\n", + "Maximum tensile stress is 188.13 MPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18, page no. 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine displacement at the lower end of bar in various conditions\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "\n", + "#initialisation\n", + "P1 = 108000.0 #Newton\n", + "P2 = 27000.0 #Newton\n", + "L = 2.2 #meter\n", + "A = 480.0 #mm^2\n", + "\n", + "\n", + "#calculations\n", + "\n", + "# Displacement due to load P1 acting alone\n", + "s = (P1/A) #stress in MPa\n", + "e = (s/70000) + (1/628.2)*((s/260)**10) #strain\n", + "D_b = e*L*1e3 #elongation in mm\n", + "print \"elongation when only P1 load acting is = \", round(D_b,2), \" mm\"\n", + "\n", + "# Displacement due to load P2 acting alone\n", + "s_1 = (P2/A) #stress in MPa\n", + "e_1 = (s_1/70000) + (1/628.2)*((s_1/260)**10) #strain\n", + "D_b_1 = e_1*(L/2)*1e3 #elongation in mm (no elongation in lower half)\n", + "print \"elongation when only P2 load acting is = \", round(D_b_1,2), \" mm\"\n", + "\n", + "# Displacement due to both load acting simonmath.taneously\n", + "#upper half\n", + "s_2 = (P1/A) #stress in MPa\n", + "e_2 = (s_2/70000) + (1/628.2)*((s_2/260)**10) #strain\n", + "\n", + "#lower half\n", + "s_3 = (P1+P2)/A #stress in MPa\n", + "e_3 = (s_3/70000) + (1/628.2)*((s_3/260)**10) #strain\n", + "D_b_2 = ((e_2*L)/2 + (e_3*L)/2) * 1e3 # elongation in mm\n", + "print \"elongation when P1 and P2 both loads are acting is = \", round(D_b_2,2), \" mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "elongation when only P1 load acting is = 7.9 mm\n", + "elongation when only P2 load acting is = 0.88 mm\n", + "elongation when P1 and P2 both loads are acting is = 12.21 mm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/chapter2_2.ipynb b/Test/chapter2_2.ipynb new file mode 100755 index 00000000..c4e1ad0f --- /dev/null +++ b/Test/chapter2_2.ipynb @@ -0,0 +1,501 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Axially Loaded Members" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, page no. 72" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculating the number of revolutions for the nut\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "\n", + "W = 2.0 #lb\n", + "b = 10.5 #inch\n", + "c = 6.4 #inch\n", + "k = 4.2 #inch\n", + "p = 1.0/16.0 #inch\n", + "\n", + "#calculation\n", + "\n", + "n = (W*b)/(c*k*p) #inch\n", + "\n", + "#result\n", + "\n", + "print \" No. of revolution required = \", n, \"revolutions\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " No. of revolution required = 12.5 revolutions\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, page no. 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "finding maximum allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "import numpy\n", + "\n", + "#initialisation\n", + "\n", + "Fce_ = 2.0 #dummy variable\n", + "Fbd_ = 3.0 #dummy variable \n", + "Lbd = 480.0 #mm\n", + "Lce = 600.0 #mm\n", + "E = 205e6 #205Gpa\n", + "Abd = 1020.0 #mm\n", + "Ace = 520.0 #mm\n", + "\n", + "#calculation\n", + "Dbd_ = (Fbd_*Lbd)/(E*Abd) #dummy variable\n", + "Dce_ = (Fce_*Lce)/(E*Ace) #dummy variable\n", + "Da = 1 #limiting value\n", + "P = ((((450+225)/225)*(Dbd_ + Dce_) - Dce_ )**(-1)) * Da \n", + "Fce = 2*P # Real value in newton\n", + "Fbd = 3*P #real value in newton\n", + "Dbd = (Fbd*Lbd)/(E*Abd) #print lacement in mm\n", + "Dce = (Fce*Lce)/(E*Ace) # print lacement in mm\n", + "a = numpy.degrees(numpy.arctan(((Da+Dce)/675))) #alpha in degree\n", + "\n", + "#result\n", + "print \"alpha = \", round(a,2), \"degree\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha = 0.11 degree\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculation if vertical displacement\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P1 = 2100.0 #lb\n", + "P2 = 5600.0 #lb\n", + "b = 25.0 #inch\n", + "a = 28.0 #inch\n", + "A1 = 0.25 #inch^2\n", + "A2 = 0.15 #inch^2\n", + "L1 = 20.0 #inch\n", + "L2 = 34.8 #inch\n", + "E = 29e6 #29Gpa\n", + "\n", + "#Calculations\n", + "P3 = (P2*b)/a \n", + "Ra = P3-P1\n", + "N1 = -Ra \n", + "N2 = P1 \n", + "D = ((N1*L1)/(E*A1)) + ((N2*L2)/(E*A2)) #print lacement\n", + "\n", + "#Result\n", + "print \"Downward print lacement is = \", D, \"inch\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Downward print lacement is = 0.0088 inch\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, page no. 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "obtaing formula and calculating allowable load\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#Numerical calculation of allowable load\n", + "\n", + "d1 = 4.0 #mm\n", + "d2 = 3.0 #mm\n", + "A1 = (math.pi*(d1**2))/4 #area\n", + "A2 = (math.pi*(d2**2))/4 #area\n", + "L1 = 0.4 #meter\n", + "L2 = 0.3 #meter\n", + "E1 = 72e9 #Gpa\n", + "E2 = 45e9 #Gpa\n", + "f1 = L1/(E1*A1) * 1e6 # To cpmpensate for the mm**2\n", + "f2 = L2/(E2*A2) * 1e6 \n", + "s1 = 200e6 #stress\n", + "s2 = 175e6 #stress\n", + "\n", + "#Calculations\n", + "P1 = ( (s1*A1*(4*f1 + f2))/(3*f2) ) * 1e-6 # To cpmpensate for the mm**2\n", + "P2 = ( (s2*A2*(4*f1 + f2))/(6*f1) ) * 1e-6 \n", + "\n", + "#Result\n", + "print \"Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = \", P2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Newton Minimum allowable stress aomong the two P1 and P2 is smaller one, therefore MAS = 1264.49104307\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, page no. 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "calculate stress acting on inclined section &\n", + "the complete state of stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "P = 90000.0 #newton\n", + "A = 1200e-6 # meter^2\n", + "s_x = -P/A #stress\n", + "t_1 = 25.0 #for the stresses on ab and cd plane\n", + "\n", + "#Calculations\n", + "s_1 = s_x*(math.cos(math.radians(t_1))**2)\n", + "T_1 = -s_x*math.cos(math.radians(t_1))*math.sin(math.radians(t_1))\n", + "t_2 = -65.0 #for the stresses on ad and bc plane\n", + "s_2 = s_x*(math.cos(math.radians(t_2))**2)\n", + "T_2 = -s_x*math.cos(math.radians(t_2))*math.sin(math.radians(t_2))\n", + "\n", + "#Result\n", + "print \"The normal and shear stresses on the plane ab and cd are\", round((T_1/1E+6),2), round((s_1/1E+6),2), \"MPa respecively\" \n", + "print \"respecively The normal and shear stresses on the plane ad and bc are\", round((T_2/1E+6),2), round((s_2/1E+6),2), \"MPa respecively\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normal and shear stresses on the plane ab and cd are 28.73 -61.6 MPa respecively\n", + "respecively The normal and shear stresses on the plane ad and bc are -28.73 -13.4 MPa respecively\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, page no. 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Calculate the vertical displacement of the joint\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "# Value of s_x based on allowable stresses on glued joint\n", + "\n", + "#initialisation\n", + "s_t = -750.0 #psi\n", + "t = -50.0 #degree\n", + "T_t = -500.0 #psi\n", + "\n", + "sg_x_1 = s_t/(math.cos(math.radians(t))**2)\n", + "sg_x_2 = -T_t/(math.cos(math.radians(t))*math.sin(math.radians(t)))\n", + "\n", + "# Value of s_x based on allowable stresses on plastic\n", + "\n", + "sp_x_1 = -1100.0 #psi\n", + "T_t_p = 600.0 #psi\n", + "t_p = 45.0 #degree\n", + "sp_x_2 = -T_t_p/(math.cos(math.radians(t_p))*math.sin(math.radians(t_p)))\n", + "\n", + "# Minimum width of bar\n", + "\n", + "P = 8000.0 #lb\n", + "A = P/sg_x_2\n", + "b_min = math.sqrt(abs(A)) #inch\n", + "print \"The minimum width of the bar is\", round(b_min,2), \"inch\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum width of the bar is 2.81 inch\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.15, page no. 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Comparison of energy-absorbing capacity with different type of bolts\n", + "\"\"\"\n", + "\n", + "import math \n", + "#Bolt with reduced shank diameter\n", + "\n", + "#initialisation\n", + "g = 1.50 # inch\n", + "d = 0.5 #inch\n", + "t = 0.25 #inch\n", + "d_r = 0.406 #inch\n", + "L = 13.5 #inch\n", + "\n", + "#calculation\n", + "ratio = ((g*(d**2))/(((g-t)*(d_r**2))+(t*(d**2)))) #U2/U1\n", + "\n", + "print \"The energy absorbing capacity of the bolts with reduced shank diameter\", round(ratio,2)\n", + "ratio_1 = ( (((L-t)*(d_r**2))+(t*(d**2))) / ((2*(g-t)*(d_r**2))+2*(t*(d**2))) ) #U3/2U1\n", + "print \"The energy absorbing capacity of the long bolts\", round(ratio_1,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy absorbing capacity of the bolts with reduced shank diameter 1.4\n", + "The energy absorbing capacity of the long bolts 4.18\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Example 2.16, page no. 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "Determine the maximum elongation and tensile stress\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "#initialisation\n", + "# Maximum elongation\n", + "M = 20 #kg\n", + "g = 9.81 #m/s^2\n", + "L = 2 #meter\n", + "E = 210e9 #210Gpa\n", + "h = 0.15 #meter\n", + "diameter = 0.015 #milimeter\n", + "\n", + "#Calculations & Result\n", + "A = (math.pi/4)*(diameter**2) #area\n", + "D_st = ((M*g*L)/(E*A)) \n", + "D_max = D_st*(1+(1+(2*h/D_st))**0.5) \n", + "D_max_1 = math.sqrt(2*h*D_st) # another approach to find D_max\n", + "i = D_max / D_st # Impact factor\n", + "print \"Maximum elongation is\",round((D_max/1E-3),2), \"mm\" # Maximum tensile stress\n", + "s_max = (E*D_max)/L #Maximum tensile stress\n", + "s_st = (M*g)/A #static stress\n", + "i_1 = s_max / s_st #Impact factor \n", + "print \"Maximum tensile stress is \", round((s_max/1E+6),2), \"MPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum elongation is 1.79 mm\n", + "Maximum tensile stress is 188.13 MPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.18, page no. 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\"\"\"\n", + "determine displacement at the lower end of bar in various conditions\n", + "\"\"\"\n", + "\n", + "import math \n", + "\n", + "\n", + "#initialisation\n", + "P1 = 108000.0 #Newton\n", + "P2 = 27000.0 #Newton\n", + "L = 2.2 #meter\n", + "A = 480.0 #mm^2\n", + "\n", + "\n", + "#calculations\n", + "\n", + "# Displacement due to load P1 acting alone\n", + "s = (P1/A) #stress in MPa\n", + "e = (s/70000) + (1/628.2)*((s/260)**10) #strain\n", + "D_b = e*L*1e3 #elongation in mm\n", + "print \"elongation when only P1 load acting is = \", round(D_b,2), \" mm\"\n", + "\n", + "# Displacement due to load P2 acting alone\n", + "s_1 = (P2/A) #stress in MPa\n", + "e_1 = (s_1/70000) + (1/628.2)*((s_1/260)**10) #strain\n", + "D_b_1 = e_1*(L/2)*1e3 #elongation in mm (no elongation in lower half)\n", + "print \"elongation when only P2 load acting is = \", round(D_b_1,2), \" mm\"\n", + "\n", + "# Displacement due to both load acting simonmath.taneously\n", + "#upper half\n", + "s_2 = (P1/A) #stress in MPa\n", + "e_2 = (s_2/70000) + (1/628.2)*((s_2/260)**10) #strain\n", + "\n", + "#lower half\n", + "s_3 = (P1+P2)/A #stress in MPa\n", + "e_3 = (s_3/70000) + (1/628.2)*((s_3/260)**10) #strain\n", + "D_b_2 = ((e_2*L)/2 + (e_3*L)/2) * 1e3 # elongation in mm\n", + "print \"elongation when P1 and P2 both loads are acting is = \", round(D_b_2,2), \" mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "elongation when only P1 load acting is = 7.9 mm\n", + "elongation when only P2 load acting is = 0.88 mm\n", + "elongation when P1 and P2 both loads are acting is = 12.21 mm\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Test/screenshots/screen1.png b/Test/screenshots/screen1.png Binary files differnew file mode 100755 index 00000000..2e923aea --- /dev/null +++ b/Test/screenshots/screen1.png diff --git a/Test/screenshots/screen1_1.png b/Test/screenshots/screen1_1.png Binary files differnew file mode 100755 index 00000000..2e923aea --- /dev/null +++ b/Test/screenshots/screen1_1.png diff --git a/Test/screenshots/screen2.png b/Test/screenshots/screen2.png Binary files differnew file mode 100755 index 00000000..eb6ad8e1 --- /dev/null +++ b/Test/screenshots/screen2.png diff --git a/Test/screenshots/screen2_1.png b/Test/screenshots/screen2_1.png Binary files differnew file mode 100755 index 00000000..eb6ad8e1 --- /dev/null +++ b/Test/screenshots/screen2_1.png diff --git a/Test/screenshots/screen2_2.png b/Test/screenshots/screen2_2.png Binary files differnew file mode 100755 index 00000000..eb6ad8e1 --- /dev/null +++ b/Test/screenshots/screen2_2.png diff --git a/Test/screenshots/screen2_3.png b/Test/screenshots/screen2_3.png Binary files differnew file mode 100755 index 00000000..eb6ad8e1 --- /dev/null +++ b/Test/screenshots/screen2_3.png diff --git a/Test/screenshots/screen3.png b/Test/screenshots/screen3.png Binary files differnew file mode 100755 index 00000000..ff023b0d --- /dev/null +++ b/Test/screenshots/screen3.png diff --git a/Test/screenshots/screen3_1.png b/Test/screenshots/screen3_1.png Binary files differnew file mode 100755 index 00000000..ff023b0d --- /dev/null +++ b/Test/screenshots/screen3_1.png diff --git a/Test/screenshots/screen3_2.png b/Test/screenshots/screen3_2.png Binary files differnew file mode 100755 index 00000000..ff023b0d --- /dev/null +++ b/Test/screenshots/screen3_2.png |