diff options
Diffstat (limited to 'Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb')
-rw-r--r-- | Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb | 378 |
1 files changed, 378 insertions, 0 deletions
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb new file mode 100644 index 0000000..4585328 --- /dev/null +++ b/Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb @@ -0,0 +1,378 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Combined Loadings" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: CL1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.1 : ')\n", +"\n", +"//Given:\n", +"di = 1.2*1000; //m\n", +"ri = di/2;\n", +"t = 12; //mm\n", +"sigma = 140; //MPa\n", +"\n", +"//Cylindrical Pressure Vessel:\n", +"\n", +"p1 = (t*sigma)/ri; //sigma = pr/t\n", +"\n", +"//Spherical Vessel:\n", +"\n", +"p2 = (2*t*sigma)/(ri); //sigma = pr/2t\n", +"\n", +"//Display:\n", +"\n", +"printf('\n\nThe maximum internal pressure the cylindrical pressure vessel can sustain = %1.1f N/mm^2',p1);\n", +"printf('\nThe maximum internal pressure a spherical pressure vessel can sustain = %1.1f N/mm^2',p2);\n", +"\n", +"//----------------------------------------------------------------------END--------------------------------------------------------------------------------" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: CL2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.2 : ')\n", +"\n", +"//Given:\n", +"P = 15000; //N\n", +"a = 40; //mm\n", +"b = 100; //mm\n", +"\n", +"//Stress Components:\n", +"\n", +"//Normal Force:\n", +"A = a*b;\n", +"sigma = P/A;\n", +"\n", +"//Bending Moment:\n", +"I = (a*b^3)/12; //I = (1/12)*bh^3\n", +"M = P*(b/2);(b/2);\n", +"c = b/2;\n", +"sigma_max =(M*c)/I;\n", +"\n", +"//Superposition:\n", +"x = ((sigma_max-sigma)*b)/((sigma_max+sigma)+(sigma_max-sigma));\n", +"sigma_b = (sigma_max-sigma);\n", +"sigma_c = (sigma_max + sigma);\n", +"\n", +"//Display:\n", +"\n", +"printf('\n\nThe state of stress at B = %1.1f MPa (tensile)',sigma_b);\n", +"printf('\nThe state of stress at C = %1.1f MPa (compressive)',sigma_c);\n", +"\n", +"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n", +"\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: CL3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.3 : ')\n", +"\n", +"//Given:\n", +"ri = 600/1000; //m\n", +"t = 12/1000; //m\n", +"ro = ri+t;\n", +"sp_wt_water = 10; //kN/m^3\n", +"sp_wt_steel = 78; //kN/m^3\n", +"l_a = 1; //m depth of point A from the top\n", +"\n", +"//Internal Loadings:\n", +"v = (%pi*l_a)*(ro^2 - ri^2);\n", +"W_st = sp_wt_steel*v;\n", +"\n", +"p = sp_wt_water*l_a; //Pascal's Law\n", +"\n", +"//Stress Components:\n", +"\n", +"//Circumferential Stress:\n", +"sigma1 = (p*ri)/t;\n", +"\n", +"//Longitudinal Stress:\n", +"A_st = (%pi)*(ro^2 - ri^2);\n", +"sigma2 = W_st/A_st;\n", +"\n", +"//Display:\n", +"\n", +"\n", +"printf('\n\nThe state of stress at A (Circumferential) = %1.1f kPa',sigma1);\n", +"printf('\nThe state of stress at A (Longitudinal) = %1.1f kPa',sigma2);\n", +"\n", +"//----------------------------------------------------------------------END--------------------------------------------------------------------------------" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: CL4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.4 : ')\n", +"\n", +"//Given:\n", +"y_c = 125/1000; //m\n", +"x_c = 1.5; //m\n", +"y_b = 1.5; //m\n", +"x_b = 6; //m\n", +"udl = 50; //kN/m\n", +"l_udl = 2.5; //m\n", +"l = 250/1000; //m\n", +"width = 50/1000; //m \n", +"\n", +"\n", +"//Internal Loadings:\n", +"N = 16.45; //kN\n", +"V = 21.93; //kN\n", +"M = 32.89; //kNm\n", +"\n", +"//Stress Components:\n", +"\n", +"//Normal Force:\n", +"A = l*width;\n", +"sigma1 = N/(A*1000);\n", +"\n", +"//Shear Force:\n", +"tou_c = 0;\n", +"\n", +"//Bending Moment:\n", +"c = y_c;\n", +"I = (1/12)*(width*l^3);\n", +"sigma2 = (M*c)/(I*1000);\n", +"\n", +"//Superposition:\n", +"sigmaC = sigma1+sigma2;\n", +"\n", +"//Display:\n", +"\n", +"\n", +"printf('\n\nThe stress due to normal force at C = %1.2f MPa',sigma1);\n", +"printf('\nThe stress due to shear force at C = %1.2f MPa',tou_c);\n", +"printf('\nThe stress due to bending moment at C = %1.2f MPa',sigma2);\n", +"printf('\nThe resultant stress at C = %1.1f MPa',sigmaC);\n", +"\n", +"//----------------------------------------------------------------------END--------------------------------------------------------------------------------" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: CL5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.5 : ')\n", +"\n", +"//Given:\n", +"r = 0.75*10; //mm\n", +"f_x =500;//N\n", +"f_y =800;//N\n", +"l1 = 8*10; //mm\n", +"l2 = 10*10; //mm\n", +"l3 = 14*10; //mm\n", +"\n", +"//Stress Components:\n", +"\n", +"//Normal Force:\n", +"A1 = (%pi*r^2);\n", +"sigma1 = f_x/A1; //stress = P/A\n", +"\n", +"//Shear Force:\n", +"y_bar = (4*r)/(3*%pi);\n", +"A2 = A1/2;\n", +"Q = y_bar*A2; //Q = yA\n", +"V = f_y;\n", +"I = (1/4)*(%pi*r^4);\n", +"t = 2*r;\n", +"tou_a = (V*Q)/(I*t); //Shear = VQ/It\n", +"\n", +"//Bending Moment:\n", +"M_y = f_x*l3;\n", +"c = r;\n", +"sigma_A = (M_y*c)/I; \n", +"\n", +"//Torsional Moment:\n", +"T = f_y*l3;\n", +"J = (0.5*%pi*r^4); \n", +"tou_A = (T*c)/J;\n", +"\n", +"//Resultant:\n", +"res_normal= sigma1+sigma_A;\n", +"res_shear = tou_a+tou_A;\n", +"\n", +"//Display:\n", +"\n", +"printf('\n\nThe stress due to normal force at A = %1.2f MPa',sigma1);\n", +"printf('\nThe stress due to shear force at A = %1.2f MPa',tou_a);\n", +"printf('\nThe stress due to bending moment at A = %1.2f MPa',sigma_A);\n", +"printf('\nThe stress due to torsional moment at A = %1.2f MPa',tou_A);\n", +"printf('\nThe resultant normal stress component at A = %1.2f MPa',res_normal);\n", +"printf('\nThe resultant shear stress component at A = %1.2f MPa',res_shear);\n", +"\n", +"//------------------------------------------------------------------------END------------------------------------------------------------------------------" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: CL6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 8.6 : ')\n", +"\n", +"//Given:\n", +"P = 40; //kN\n", +"l_ab = 0.4; //m\n", +"l_bc = 0.8; //m\n", +"\n", +"//Stress Components:\n", +"\n", +"//Normal Force:\n", +"A = l_ab*l_bc;\n", +"sigma = P/A;\n", +"\n", +"//Bendng Moments:\n", +"M_x = P*l_ab/2;\n", +"cy = l_ab/2;\n", +"Ix = (1/12)*(l_bc*l_ab^3); //I = (1/12)*(bh^3)\n", +"sigma_max_1 = (M_x*cy)/Ix; //sigma = My/I\n", +"\n", +"M_y = P*l_bc/2;\n", +"cx = l_bc/2;\n", +"Iy = (1/12)*(l_ab*l_bc^3); //I = (1/12)*(bh^3)\n", +"sigma_max_2 = (M_y*cx)/Iy; //sigma = My/I\n", +"\n", +"//Superposition:\n", +"stress_A = -sigma + sigma_max_1 + sigma_max_2;\n", +"stress_B = -sigma - sigma_max_1 + sigma_max_2;\n", +"stress_C = -sigma - sigma_max_1 - sigma_max_2;\n", +"stress_D = -sigma + sigma_max_1 - sigma_max_2;\n", +"\n", +"e = abs((stress_B*l_ab)/(stress_A-stress_B));\n", +"h = abs((stress_B*l_bc)/(stress_A-stress_B));\n", +"\n", +"//Display:\n", +"\n", +"\n", +"printf('\n\nThe normal stress at corner A = %1.0f kPa',stress_A);\n", +"printf('\nThe normal stress at corner B = %1.0f kPa',stress_B);\n", +"printf('\nThe normal stress at corner C = %1.0f kPa',stress_C);\n", +"printf('\nThe normal stress at corner D = %1.0f kPa',stress_D);\n", +"printf('\nThe line of zero stress along AB = %1.4f m',e);\n", +"printf('\nThe line of zero stress along AD = %1.3f m',h);\n", +"\n", +"//------------------------------------------------------------------------END------------------------------------------------------------------------------\n", +"\n", +"\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |