diff options
Diffstat (limited to 'Testing_the_interface/chapter3_1.ipynb')
-rwxr-xr-x | Testing_the_interface/chapter3_1.ipynb | 495 |
1 files changed, 0 insertions, 495 deletions
diff --git a/Testing_the_interface/chapter3_1.ipynb b/Testing_the_interface/chapter3_1.ipynb deleted file mode 100755 index 8a396811..00000000 --- a/Testing_the_interface/chapter3_1.ipynb +++ /dev/null @@ -1,495 +0,0 @@ -{ - "metadata": { - "name": "" - }, - "nbformat": 3, - "nbformat_minor": 0, - "worksheets": [ - { - "cells": [ - { - "cell_type": "heading", - "level": 1, - "metadata": {}, - "source": [ - "Chapter 3: Torsion" - ] - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.1, page no. 196" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "calculating maximum shear stress & torque\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "d = 1.5 # diameter of bar in inch\n", - "L = 54.0 # Length of bar in inch\n", - "G = 11.5e06 # modulus of elasticity in psi \n", - "\n", - "#calculation\n", - "\n", - "# Part (a)\n", - "T = 250.0 # torque\n", - "t_max = (16*T*12)/(math.pi*(d**3)) # maximum shear stress in bar\n", - "Ip = (math.pi*(d**4))/32 # polar miment of inertia \n", - "f = (T*12*L)/(G*Ip) # twist in radian\n", - "f_ = (f*180)/math.pi # twist in degree\n", - "print \"Maximum shear stress in the bar is \", round(t_max), \" psi\"\n", - "print \"Angle of twist is\", round(f_,2), \" degree\"\n", - "\n", - "#Part (b)\n", - "t_allow = 6000 # allowable shear stress\n", - "T1 = (math.pi*(d**3)*t_allow)/16 #allowable permissible torque in lb-in\n", - "T1_ = T1*0.0831658 #allowable permissible torque in lb-ft\n", - "f_allow = (2.5*math.pi)/180 # allowable twist in radian\n", - "T2 = (G*Ip*f_allow)/L # allowable stress via a another method\n", - "T2_ = T2*0.0831658 #allowable permissible torque in lb-ft\n", - "T_max = min(T1_,T2_) # minimum of the two\n", - "print \"Maximum permissible torque in the bar is\", round(T_max), \" lb-ft\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum shear stress in the bar is 4527.0 psi\n", - "Angle of twist is 1.62 degree\n", - "Maximum permissible torque in the bar is 331.0 lb-ft\n" - ] - } - ], - "prompt_number": 2 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.2, page no. 197" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "Calculation of required diameter, outer diameter & ratio of diameteres\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "T = 1200.0 # allowable torque in N-m\n", - "t = 40e06 # allowable shear stress in Pa\n", - "f = (0.75*math.pi)/180.0 # allowable rate of twist in rad/meter\n", - "G = 78e09 # modulus of elasticity\n", - "\n", - "#calculation\n", - "\n", - "# Part (a) : Solid shaft\n", - "d0 = ((16.0*T)/(math.pi*t))**(1.0/3.0)\n", - "Ip = T/(G*f) # polar moment of inertia\n", - "d01 = ((32.0*Ip)/(math.pi))**(1.0/4.0) # from rate of twist definition\n", - "print \"The required diameter of the solid shaft is \", round(d0,5), \"m\"\n", - "\n", - "# Part (b) : hollow shaft\n", - "d2 = (T/(0.1159*t))**(1.0/3.0) # Diamater of hollow shaft in meter\n", - "d2_ = (T/(0.05796*G*f))**(1.0/4.0) # Another value of d2 by definition of theta(allow), f = T/(G*Ip)\n", - "d1 = 0.8*d2_ # because rate of twist governs the design\n", - "print \"The required diameter of the hollow shaft is \", round(d2,5), \"m\"\n", - "\n", - "# Part (c) : Ratio of diameter and weight\n", - "r1 = d2_/d01 # diameter ratio\n", - "r2 = ((d2_**2.0)-(d1**2.0))/(d01**2.0) # Weight Ratio\n", - "print \"Ratio of the diameter of the hollow and solid shaft is\", round(r1,2)\n", - "print \"Ratio of the weight of the hollow and solid shaft is\", round(r2,2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - " The required diameter of the solid shaft is 0.05346 m\n", - "The required diameter of the hollow shaft is 0.06373 m\n", - "Ratio of the diameter of the hollow and solid shaft is 1.14\n", - "Ratio of the weight of the hollow and solid shaft is 0.47\n" - ] - } - ], - "prompt_number": 5 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.4, page no. 205" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "determining maximum shear stress in various parts of the shaft\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "d = 0.03 # diameter of the shaft in meter\n", - "T2 = 450.0 # Torque in N-m\n", - "T1 = 275.0 \n", - "T3 = 175.0 \n", - "Lbc = 0.5 # Length of shaft in meter\n", - "Lcd = 0.4 # Length of shaft in meter\n", - "G = 80e09 # Modulus of elasticity\n", - "\n", - "#calculation\n", - "Tcd = T2-T1 # torque in segment CD\n", - "Tbc = -T1 # torque in segment BC\n", - "tcd = (16.0*Tcd)/(math.pi*(d**3)) # shear stress in cd segment\n", - "\n", - "print \"Shear stress in segment cd is\", round(tcd/1000000,1), \" MPa\"\n", - "tbc = (16.0*Tbc)/(math.pi*(d**3)) # shear stress in bc segment\n", - "\n", - "#answer given in the textbook for tbc is wrong\n", - "print \"Shear stress in segment bc is\", round(tbc/1000000,1), \" MPa\"\n", - "Ip = (math.pi/32)*(d**4) # Polar monent of inertia\n", - "fbc = (Tbc*Lbc)/(G*Ip) # angle of twist in radian\n", - "fcd = (Tcd*Lcd)/(G*Ip) # angle of twist in radian\n", - "fbd = fbc + fcd # angle of twist in radian\n", - "print \"Angles of twist in section BD\", round(fbd,3), \" radian\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Shear stress in segment cd is 33.0 MPa\n", - "Shear stress in segment bc is -51.9 MPa\n", - "Angles of twist in section BD -0.011 radian\n" - ] - } - ], - "prompt_number": 6 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.6, page no. 214" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "Calculate maximum shear, tensile & compressive stress in the tube.\n", - "Also, calculate coressponding strains in the tube\n", - "\"\"\"\n", - "\n", - "import math\n", - "\n", - "#initialisation \n", - "d1 = 0.06 # Inner diameter in meter\n", - "d2 = 0.08 # Outer diameter in meter\n", - "r = d2/2.0 # Outer radius\n", - "G = 27e09 # Modulus of elasticity\n", - "T = 4000.0 # Torque in N-m\n", - "\n", - "#calculation\n", - "Ip = (math.pi/32)*((d2**4)-(d1**4)) # Polar moment of inertia\n", - "t_max = (T*r)/Ip # maximum shear stress\n", - "print \"Maximum shear stress in tube is \", t_max, \" Pa\"\n", - "s_t = t_max # Maximum tensile stress\n", - "print \"Maximum tensile stress in tube is \", s_t, \" Pa\"\n", - "s_c = -(t_max) # Maximum compressive stress\n", - "print \"Maximum compressive stress in tube is \", s_c, \" Pa\"\n", - "g_max = t_max / G # Maximum shear strain in radian\n", - "print \"Maximum shear strain in tube is \", round(g_max,4), \" radian\"\n", - "e_t = g_max/2.0 # Maximum tensile strain in radian\n", - "print \"radian\",e_t,\"Maximum tensile strain in tube is \", round(e_t,4), \" radian\"\n", - "e_c = -g_max/2.0 # Maximum compressive strain in radian\n", - "print \"Maximum compressive strain in tube is \", round(e_c,4), \" radian\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Maximum shear stress in tube is 58205236.3308 Pa\n", - "Maximum tensile stress in tube is 58205236.3308 Pa\n", - "Maximum compressive stress in tube is -58205236.3308 Pa\n", - "Maximum shear strain in tube is 0.0022 radian\n", - "radian 0.00107787474687 Maximum tensile strain in tube is 0.0011 radian\n", - "Maximum compressive strain in tube is -0.0011 radian\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.7, page no. 219" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "Required diameters of the shaft at various rpm\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "H = 40.0 # Power in hp\n", - "s = 6000.0 # allowable shear stress in steel in psi\n", - "\n", - "#calculation\n", - "# Part (a)\n", - "n = 500.0 # rpm\n", - "T = ((33000.0*H)/(2*math.pi*n))*(5042.0/420.0) # Torque in lb-in\n", - "d = ((16.0*T)/(math.pi*s))**(1.0/3.0) # diameter in inch\n", - "print \"Diameter of the shaft at 500 rpm\", round(d,2), \" inch\"\n", - "\n", - "# Part (b)\n", - "n1 = 3000.0 # rpm\n", - "T1 = ((33000.0*H)/(2*math.pi*n1))*(5042.0/420.0) # Torque in lb-in\n", - "d1 = ((16*T1)/(math.pi*s))**(1.0/3.0) # diameter in inch\n", - "print \"Diameter of the shaft at 3000 rpm\", round(d1,2), \" inch\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Diameter of the shaft at 500 rpm 1.62 inch\n", - "Diameter of the shaft at 3000 rpm 0.89 inch\n" - ] - } - ], - "prompt_number": 8 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.8, page no. 221" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "Find the maximum shear stress & angle of twist in the shaft\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "\n", - "d = 0.05 # diameter of the shaft\n", - "Lab = 1.0 # Length of shaft ab in meter\n", - "Lbc = 1.2 # Length of shaft bc in meter\n", - "Pa = 50000.0 # Power in Watt at A\n", - "Pb = 35000.0 # Power in Watt at B\n", - "Ip = (math.pi/32)*(d**4) # Polar moment of inertia\n", - "Pc = 15000.0 # Power in Watt at C\n", - "G = 80e09 # Modulus of elasticity\n", - "f = 10.0 # frequency in Hz \n", - "\n", - "#Calculations\n", - "Ta = Pa/(2*math.pi*f) # Torque in N-m at A\n", - "Tb = Pb/(2*math.pi*f) # Torque in N-m at B\n", - "Tc = Pc/(2*math.pi*f) # Torque in N-m at B\n", - "Tab = Ta # Torque in N-m in shaft ab\n", - "Tbc = Tc # Torque in N-m in shaft bc\n", - "tab = (16*Tab)/(math.pi*(d**3)) # shear stress in ab segment\n", - "fab = (Tab*Lab)/(G*Ip) # angle of twist in radian\n", - "tbc = (16*Tbc)/(math.pi*(d**3)) # shear stress in ab segment\n", - "fbc = (Tbc*Lbc)/(G*Ip) # angle of twist in radian\n", - "fac = (fab+fbc)*(180.0/math.pi) # angle of twist in degree in segment ac\n", - "tmax = Tab # Maximum shear stress\n", - "\n", - "#Result\n", - "print \"The maximum shear stress tmax in the shaft\", round(tmax), \" Nm\"\n", - "print \"Angle of twist in segment AC\", round(fac,2), \" degree\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The maximum shear stress tmax in the shaft 796.0 Nm\n", - "Angle of twist in segment AC 1.26 degree\n" - ] - } - ], - "prompt_number": 9 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.10, page no. 230" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "for various loading cases, obtain formulae and calculate strain energy\n", - "\"\"\"\n", - "\n", - "import math \n", - "\n", - "#initialisation\n", - "Ta = 100.0 # Torque in N-m at A\n", - "Tb = 150.0 # Torque in N-m at B\n", - "L = 1.6 # Length of shaft in meter\n", - "G = 80e09 # Modulus of elasticity\n", - "Ip = 79.52e-09 # polar moment of inertia in m4\n", - "\n", - "#calculation\n", - "\n", - "Ua = ((Ta**2)*L)/(2*G*Ip) # Strain energy at A\n", - "print \"Torque acting at free end\", round(Ua,2), \" joule\"\n", - "Ub = ((Tb**2)*L)/(4*G*Ip) # Strain energy at B\n", - "print \"Torque acting at mid point\", round(Ub,2), \" joule\"\n", - "a = (Ta*Tb*L)/(2*G*Ip) # dummy variabble\n", - "Uc = Ua+a+Ub # Strain energy at C\n", - "print \"Total torque\", round(Uc,2), \"joule\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Torque acting at free end 1.26 joule\n", - "Torque acting at mid point 1.41 joule\n", - "Total torque 4.56 joule\n" - ] - } - ], - "prompt_number": 7 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "Example 3.11, page no. 231" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "calculate the strain energy for hollow shaft\n", - "\"\"\"\n", - "\n", - "import math \n", - "t = 480.0 # Torque of consmath.tant intensity\n", - "L = 144.0 # Length of bar\n", - "G = 11.5e06 # Modulus of elasticity in Psi\n", - "Ip = 17.18 # Polar moment of inertia\n", - "\n", - "#Calculation\n", - "U = ((t**2)*(L**3))/(G*Ip*6) # strain energy in in-lb\n", - "\n", - "#Result\n", - "print \"The strain energy for the hollow shaft is\", round(U), \"in-lb\"" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "The strain energy for the hollow shaft is 580.0 in-lb\n" - ] - } - ], - "prompt_number": 11 - }, - { - "cell_type": "heading", - "level": 2, - "metadata": {}, - "source": [ - "example 3.14, page no. 242" - ] - }, - { - "cell_type": "code", - "collapsed": false, - "input": [ - "\"\"\"\n", - "Ratio of Shear stress and angle of twist for circular & square tube\n", - "\"\"\"\n", - "import math\n", - "\n", - "r_s = (math.pi/4) #Ratio of shear stress\n", - "print \"Ratio of shear stress is \", round(r_s,2)\n", - "r_t = (math.pi**2/16) #Ratio of angle of twit\n", - "print \"Ratio of angle of twist is \", round(r_t, 2)" - ], - "language": "python", - "metadata": {}, - "outputs": [ - { - "output_type": "stream", - "stream": "stdout", - "text": [ - "Ratio of shear stress is 0.79\n", - "Ratio of angle of twist is 0.62\n" - ] - } - ], - "prompt_number": 4 - } - ], - "metadata": {} - } - ] -}
\ No newline at end of file |