From 476705d693c7122d34f9b049fa79b935405c9b49 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 14 Apr 2020 10:19:27 +0530 Subject: Initial commit --- .../1-Stress.ipynb | 1022 ++++++++++++++++++++ 1 file changed, 1022 insertions(+) create mode 100644 Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb (limited to 'Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb') diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb new file mode 100644 index 0000000..0da90e7 --- /dev/null +++ b/Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb @@ -0,0 +1,1022 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Stress" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: S10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 1.10 : ')\n", +"\n", +"//Given:\n", +" af = 800; //N Axial force along centroidal axis\n", +"t = 0.040; //m thickness of square cross section\n", +"ang_b = 30 *(%pi/180) ;\n", +"ang_b_comp = 60 *(%pi/180);\n", +"a = t^2; //m^2 Area of cross section\n", +"a_new = ((t*1000)^2)/(sin(ang_b_comp)); // mm^2 Area of section at b-b\n", +"\n", +"//Part(a)\n", +"\n", +"//Internal Loading: The bar is sectioned, Fig 1-24b, and the internal resultant loading consists of only axial force.\n", +"\n", +"// Average Stress: \n", +"avg_stress = af/(a* 1000);\n", +"\n", +"//Shear Force at the section is zero.\n", +"//The average normal stress distribution over the cross section is shown in Fig 1-24c.\n", +"\n", +"\n", +"//Part(b)\n", +"\n", +"\n", +"//solve the two equations for two unknowns:\n", +"\n", +"N = af * cos(ang_b); \n", +"V = af * sin(ang_b);\n", +"avg_normal_stress = (N*1000)/ a_new; // kPa\n", +"avg_shear_stress = (V*1000)/a_new; //kPa\n", +"\n", +"//Display\n", +"\n", +"printf('\n\nThe average stress for section a-a = %.2f kPa',avg_stress);\n", +"printf('\nThe Normal Force for section b-b = %.2f N',N);\n", +"printf('\nThe Shear Force for section b-b = %.2f N',V);\n", +"printf('\nThe Average Normal Stress for section b-b = %.2f kPa',avg_normal_stress);\n", +"printf('\nThe Average Shear Stress for section b-b = %.2f kPa',ceil(avg_shear_stress));\n", +"\n", +"//--------------------------------------------------------------------------END--------------------------------------------------------------------------\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: S11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 1.11 : ')\n", +"\n", +"//Given :\n", +"f = 5000; //N\n", +"d_rod = 10;//Diameter of steel rod in mm.\n", +"l_bc = 20; //Length of side bc in mm.\n", +"l_bd = 40; //Length of side bd in mm.\n", +"a_rod = (%pi/4)* (d_rod^2); //Area of cross section of the rod in mm^2.\n", +"a_strut = l_bc*l_bd ; //Area of strut in mm^2.\n", +"\n", +"\n", +"//Average shear stress\n", +"\n", +"avg_shear_rod = f/a_rod; //for rod in Mpa\n", +"avg_shear_strut = (f/2)/a_strut; //for strut\n", +"\n", +"//Display:\n", +"\n", +"printf('\n\nThe average shear stress for the rod = %.2f MPa',avg_shear_rod);\n", +"printf('\nThe average shear stress for the strut = %.2f MPa',avg_shear_strut);\n", +"\n", +"\n", +"\n", +"//--------------------------------------------------------------END----------------------------------------------------------------------------" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: S12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"\n", +"disp('Scilab Code Ex 1.12 : ')\n", +"\n", +"//Given:\n", +"l_bc = 50; //Length of BC in mm.\n", +"l_db = 75; // mm.\n", +"l_ed = 40; // mm.\n", +"l_ab = 25; // mm.\n", +"f_diagonal = 3000; //N\n", +"a1 = l_ab*l_ed; //Area of face AB in mm^2.\n", +"a2 = l_bc*l_ed ; //mm^2.\n", +"a3 = l_db*l_ed ; // mm^2.\n", +"\n", +"//Internal loadings - The free body diagram of the inclined member is shown in 1-26b. \n", +"\n", +"//Equilibrium Equations\n", +"\n", +"//Balancing forces along the x- direction.\n", +"f_ab = f_diagonal*(3/5); //Force on segment AB in N\n", +"V = f_ab; //Shear force acting on the sectioned horizontal plane EDB in N\n", +"\n", +"//Balancing forces along the Y direction.\n", +"f_bc = f_diagonal*(4/5); //Force on segment BC in N.\n", +"\n", +"//Average compressive stresses along the horizontal and vertical planes:\n", +"\n", +"avg_comp_ab = f_ab/a1; // N/mm^2\n", +"avg_comp_bc = f_bc/a2; // N/mm^2\n", +"\n", +"//Average shear stress acting on the horizontal plane defined by EDB :\n", +"\n", +"avg_shear = f_ab/a3; // N/mm^2\n", +"\n", +"//Display:\n", +"\n", +"\n", +"printf('\n\nThe Force on segment AB = %.2f N',f_ab);\n", +"printf('\nThe Shear Force on sectioned plane EDB = %.2f N',V);\n", +"printf('\nThe Force on segment BC = %.2f N',f_bc);\n", +"printf('\nThe average compressive stress along AB = %.2f N/mm^2',avg_comp_ab);\n", +"printf('\nThe average compressive stress along BC = %.2f N/mm^2',avg_comp_bc);\n", +"printf('\nThe average shear stress along EDB = %.2f N/mm^2',avg_shear);\n", +"\n", +"//-------------------------------------------------------------------------------END---------------------------------------------------------------------------\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: S13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"clear all; clc;\n", +"\n", +"\n", +"disp('Scilab Code Ex 1.13 : ')\n", +"\n", +"//Given:\n", +"shear_allow = 90; //MPa\n", +"tensile_allow = 115; //MPa\n", +"\n", +"l_AP = 2; //m\n", +"l_PB = 1; //m\n", +"resultant_A = 5.68; //kN\n", +"resultant_B = 6.67; //kN\n", +"v_a = 2.84; //kN\n", +"v_b = 6.67; //kN\n", +"\n", +"\n", +"//Diameter of the Pins:\n", +"A_A = (v_a*10^3)/(shear_allow*10^6); //Area of pin A\n", +"da = (sqrt((4*A_A)/%pi))*10^3 // d = (square root of(area*4/pi)) in mm\n", +"A_B = (v_b*10^3)/(shear_allow*10^6) ; //Area of pin B\n", +"db = (sqrt((4*A_B)/%pi))*10^3 // Area = (%pi\4)d^2 in mm^2\n", +"\n", +"chosen_da = ceil(da);\n", +"chosen_db = ceil(db);\n", +"\n", +"//Diameter of Rod:\n", +"A_bc = (resultant_B*10^3)/(tensile_allow*10^6); //Area of BC\n", +"dbc = (sqrt((4*A_bc)/%pi)*10^3); // Area = %pi\4)d^2\n", +"chosen_dbc = ceil(dbc);\n", +"\n", +"//Displaying Results:\n", +"\n", +"printf ('\n\n The diameter of pin A = %.3f mm',da);\n", +"printf ('\n The diameter of pin B = %.3f mm',db);\n", +"printf ('\n The diameter of rod BC = %.2f mm',dbc);\n", +"printf ('\n\n\nThe chosen diameters are: ');\n", +"printf ('\n The diameter of pin A = %.3f mm',chosen_da);\n", +"printf ('\n The diameter of pin B = %.3f mm',chosen_db);\n", +"printf ('\n The diameter of rod BC = %.2f mm',chosen_dbc);\n", +"\n", +"//-----------------------------------------------------------------------END--------------------------------------------------------------------\n", +"\n", +"\n", +"\n", +"\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: S14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"\n", +"disp('Scilab Code Ex 1.14 : ')\n", +"\n", +"//Given:\n", +"shear_allow = 55; //MPa\n", +"l_ac = 200; //mm\n", +"l_cd= 75; //mm\n", +"l_de = 50; //mm\n", +"l_ce = l_cd + l_de;\n", +"load_d =15; //kN\n", +"load_e = 25; //kN\n", +"\n", +"//Internal Shear Force:\n", +"//summation Mc = 0\n", +"\n", +"f_ab = ((load_d*l_cd +load_e*(3/5)*l_ce)/l_ac);\n", +"c_x =-load_d + (load_e*(4/5)); //resolving C in x dir\n", +"c_y = load_d + (load_e*(3/5)); //resolving C in y dir\n", +"\n", +"f_c = sqrt(c_x^2 + c_y^2); //kN\n", +"V = f_c/2;\n", +"\n", +"//Required Area\n", +"A = ((V*10^3)/(shear_allow)); //A = V/Allowable shear in mm^2\n", +"d = ((sqrt((4*A)/%pi))) // Area = (%pi\4)d^2 in mm^2\n", +"\n", +"chosen_d = ceil(ceil(d))+1;\n", +"\n", +"//Displaying Results:\n", +"\n", +"\n", +"printf('\n\nThe force at AB = %.2f kN',f_ab);\n", +"printf('\nThe resultant force at C = %.2f kN',f_c);\n", +"printf('\nThe area of pin = %.2f mm^2',A);\n", +"printf('\nThe diameter of pin = %.2f mm',chosen_d);\n", +"\n", +"//---------------------------------------------------------------END--------------------------------------------------------------------------------------\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: S15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 1.15 : ')\n", +"\n", +"//Given:\n", +"P= 20; //kN\n", +"d_hole = 40; //mm\n", +"normal_allow = 60; //MPa\n", +"shear_allow = 35; //MPa\n", +"\n", +"\n", +"//Diameter of Rod:\n", +"area1 = (P*10^3)/(normal_allow*10^6); //Area in m^2\n", +"d = ((sqrt((4*area1)/%pi))*1000); // Area = (%pi\4)d^2\n", +"\n", +"\n", +"//Thickness of disc:\n", +"V = P;\n", +"area2 = (V*10^3)/(shear_allow*10^6); //Area in m^2\n", +"thickness = (area2*10^6)/(d_hole*%pi);// A = pi*d*t\n", +" \n", +"\n", +"printf('\n\nThe cross sectional area of disc = %.8f m^2',area1);\n", +"printf('\nThe diameter of rode = %.2f mm',d);\n", +"printf('\nThe thickness of disc = %.2f mm',thickness);\n", +"\n", +"//------------------------------------------------------------------------END------------------------------------------------------------------------------------\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: S16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear all; clc;\n", +"\n", +"disp('Scilab Code Ex 1.16 : ')\n", +"\n", +"//Given:\n", +"bearing_allow = 75; //MPa\n", +"tensile_allow = 55; //MPa\n", +"d_shaft = 60; //mm\n", +"r_shaft = d_shaft/2; //mm\n", +"area_shaft = %pi*(r_shaft^2); //Area = pi*r^2\n", +"d_collar = 80; //mm\n", +"r_collar = d_collar/2; //mm\n", +"area_collar = %pi*(r_collar^2); //Area = pi*r^2\n", +"thick_collar = 20; //mm\n", +"\n", +"//Normal Stress:\n", +"P1 = (tensile_allow* area_shaft)/3; //Tensile stress = 3P/A.\n", +"P1_kN = P1/1000;\n", +"\n", +"\n", +"//Bearing Stress:\n", +"bearing_area = area_collar-area_shaft; //mm^2\n", +"P2 = (bearing_allow*bearing_area)/3; //Bearing stress = 3P/A.\n", +"P2_kN= P2/1000;\n", +"\n", +"if(P2_kN