summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_R_C_Hibbeler
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Mechanics_of_Materials_by_R_C_Hibbeler
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Mechanics_of_Materials_by_R_C_Hibbeler')
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/1-Stress.ipynb1022
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/10-Strain_Transformation.ipynb777
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/11-Design_of_Beams_and_Shafts.ipynb301
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/12-Deflection_of_Beams_and_Shafts.ipynb547
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/13-Buckling_of_Columns.ipynb740
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/14-Energy_Methods.ipynb692
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb222
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/3-Mechanical_Properties_of_Materials.ipynb357
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/4-Axial_Load_.ipynb981
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/5-Torsion.ipynb958
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb1099
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/7-Transverse_Shear.ipynb432
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/8-Combined_Loadings.ipynb378
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/9-Stress_Transformation.ipynb566
14 files changed, 9072 insertions, 0 deletions
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<P1_kN)\n",
+" big = P2_kN;\n",
+"else big = P1_kN;\n",
+" end\n",
+" \n",
+"//Displaying Results:\n",
+"\n",
+"printf('\n\nThe load calculated by Normal Stress = %.1f kN',P1_kN);\n",
+"printf('\nThe load calculated by Bearing Stress = %.1f kN',P2_kN);\n",
+"printf('\nThe largest load that can be applied to the shaft = %.1f kN',big);\n",
+"\n",
+"//----------------------------------------------------------------------------END----------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.17: S17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.17 : ')\n",
+"\n",
+"//Given:\n",
+"d_ac= 20; //mm\n",
+"area_ac = %pi*(d_ac/2)^2; //Area = (%pi\4)d^2\n",
+"area_al = 1800; //mm^2\n",
+"d_pins = 18; //mm\n",
+"area_pins = %pi*(d_pins/2)^2;\n",
+"st_fail_stress = 680; //MPa\n",
+"al_fail_stress = 70; //MPa\n",
+"shear_fail_pin = 900; //MPa\n",
+"fos = 2; //Factor of safety\n",
+"l_ab = 2; //m\n",
+"l_ap = 0.75; //m\n",
+"\n",
+"\n",
+"st_allow= st_fail_stress /fos; //MPa\n",
+"al_allow = al_fail_stress/fos; //MPa\n",
+"pin_allow_shear = shear_fail_pin/fos; //MPa\n",
+"\n",
+"//Rod AC\n",
+"f_ac = (st_allow*area_ac)/1000;\n",
+"P1 = ((f_ac*l_ab)/(l_ab-l_ap));\n",
+"\n",
+"//Block B\n",
+"f_b =(al_allow*area_al)/1000;\n",
+"P2 = ((f_b*l_ab)/l_ap);\n",
+"\n",
+"//Pin A or C:\n",
+"V = (pin_allow_shear*area_pins)/1000;\n",
+"P3 = (V*l_ab)/(l_ab-l_ap);\n",
+"\n",
+"if(P1<P2 & P1<P3)\n",
+" big = P1;\n",
+"else if(P2<P1 & P2<P3)\n",
+" big = P2;\n",
+"else big = P3;\n",
+"end\n",
+"\n",
+"//Displaying Results:\n",
+"\n",
+"printf('\n\nThe load allowed on rod AC = %.1f kN',round(P1));\n",
+"printf('\nThe load allowed on block B = %.1f kN',P2);\n",
+"printf('\nThe load allowed on pins A or C = %.1f kN',P3);\n",
+"printf('\nThe largest load that can be applied to the bar = %.1f kN ',big);\n",
+"\n",
+"//----------------------------------------------------------------------------------END----------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: S1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.1 :')\n",
+"\n",
+"w_varying = 270;\n",
+"l_crossection = 9;\n",
+"l_cb = 6;\n",
+"l_ac = 2;\n",
+"w_c = (w_varying/l_crossection) * l_cb //By proportion, load at C is found.\n",
+"f_resultant_c = 0.5* w_c *l_cb \n",
+"// Equations of Equilibrium\n",
+"\n",
+"//Balancing forces in the x direction:\n",
+"n_c = 0\n",
+"\n",
+"//Balncing forces in the y direction:\n",
+"v_c = f_resultant_c\n",
+"\n",
+"// Balncing the moments about C:\n",
+"m_c = - (f_resultant_c*l_ac)\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"printf('\n\nThe resultant force at C = %.2f N',f_resultant_c);\n",
+"printf('\nThe horizontal force at C = %.2f N',n_c);\n",
+"printf('\nThe vertical force at C = %.2f N',v_c);\n",
+"printf('\nThe moment about C = %.2f Nm',m_c);\n",
+"\n",
+"\n",
+"// ---------------------------------------------------------END-------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: S2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.2 : ')\n",
+"\n",
+"f_d = 225; //N\n",
+"w_uniform = 800; // N/m\n",
+"l_ac = 0.200; //m\n",
+"l_cb = 0.05+0.1; //m\n",
+"l_bd = 0.100; //m\n",
+"l_bearing = 0.05; //m\n",
+"f_resultant = w_uniform*l_cb //120N\n",
+"l_f_resultant_b = (l_cb/2)+ l_bearing; //0.125m\n",
+"l = l_ac + l_cb + l_bearing + l_bd \n",
+"\n",
+"\n",
+"// This problem is solved by considering segment AC of the shaft.\n",
+"\n",
+"//Support Reactions:\n",
+"\n",
+"m_b = 0; // Net moment about B is zero for equilibrium . Sum Mb = 0.\n",
+"a_y = -((f_d*l_bd) - (f_resultant*l_f_resultant_b))/ (l - l_bd) // finding the reaction force at A\n",
+"\n",
+"// Refer to the free body diagram in Fig.1-5c.\n",
+"f_c = 40 //N\n",
+"//Balancing forces in the x direction:\n",
+"n_c = 0\n",
+"\n",
+"//Balncing forces in the y direction:\n",
+"v_c = a_y - f_c //-18.75N - 40N-Vc = 0\n",
+"\n",
+"// Balncing the moments about C:\n",
+"m_c = ((a_y * (l_ac + 0.05)) - f_c*(0.025) ) // Mc+40N(0.025m)+ 18.75N(0.250m) = 0\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"printf('\n\nThe resultant force = %.2f N',f_resultant);\n",
+"printf('\nThe reaction force at A = %.2f N',a_y);\n",
+"printf('\nThe horizontal force at C = %.2f N',n_c);\n",
+"printf('\nThe vertical force at C = %.2f N',v_c);\n",
+"printf('\nThe moment about C = %.2f Nm',m_c);\n",
+"\n",
+"//-------------------------------------------------------------------END-----------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: S3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.3 :')\n",
+"\n",
+"// Given:\n",
+"l_ac = 1; //m.\n",
+"l_cd = 1.5 ; //m.\n",
+"l_bd = 0.5; //m.\n",
+"r_a = 0.125; //m.\n",
+"r_d = 0.125; //m.\n",
+"W = 2000; // N\n",
+"\n",
+"\n",
+"// Equations of equilibrium:\n",
+"\n",
+"//Balancing forces in the x direction:\n",
+"n_c = -W; // N\n",
+"\n",
+"//Balncing forces in the y direction:\n",
+"v_c = -W; //N\n",
+"\n",
+"// Balncing the moments about C:\n",
+"m_c = - (W*(r_a +l_ac)- W*r_a)\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"printf('\n\nThe horizontal force at C = %.2f N',n_c);\n",
+"printf('\nThe vertical force at C = %.2f N',v_c);\n",
+"printf('\nThe moment about C = %.2f Nm',m_c);\n",
+"\n",
+"//----------------------------------------------------------------------------END--------------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: S4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.4 :')\n",
+"\n",
+"// Given:\n",
+"l_ag = 1; //Length of AG is 1m.\n",
+"l_gd = 1; //Length of GD is 1m.\n",
+"l_de = 3; //Length of DE is 1m.\n",
+"f_a = 1500; //Force at A is 1500N.\n",
+"l_ec = 1.5; //Length of EC is 1m.\n",
+"l = l_ag +l_gd +l_de;\n",
+"w_uniform_varying = 600; //Nm.\n",
+"\n",
+"w_resultant = 0.5*l_de*w_uniform_varying;\n",
+"// calling point of action of resultant as P\n",
+"l_ep = (2/3)*l_de; //Distance between points P and E.\n",
+"l_ap = l - l_ep; // Distance between points A and P.\n",
+"\n",
+"\n",
+"f_ba = 7750; //N\n",
+"f_bc = 6200; //N\n",
+"f_bd = 4650; //N\n",
+"\n",
+"//Free Body Diagram: Using the result for Fba, the left section AG of the beam is shown in Fig 1-7d.\n",
+"\n",
+"// Equations of equilibrium:\n",
+"\n",
+"//Balancing forces in the x direction:\n",
+"n_g = -f_ba * (4/5); // N\n",
+"\n",
+"//Balncing forces in the y direction:\n",
+"v_g = -f_a + f_ba*(3/5); //N\n",
+"\n",
+"// Balncing the moments about C:\n",
+"m_g = (f_ba * (3/5)*l_ag) - (f_a * l_ag); //Nm\n",
+"\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"\n",
+"printf('\n\nThe horizontal force at G = %.2f N',n_g);\n",
+"printf('\nThe vertical force at G = %.2f N',v_g);\n",
+"printf('\nThe moment about G = %.2f Nm',m_g);\n",
+"\n",
+"\n",
+"//-------------------------------------------------------------------END----------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: S5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"\n",
+"disp('Scilab Code Ex 1.5 :')\n",
+"\n",
+"// Given:\n",
+"f_a = 50; //N\n",
+"m_a = 70; // Moment at A in Nm\n",
+"l_ad = 1.25; //Length of AD in m.\n",
+"l_bd = 0.5; //Length of BD in m.\n",
+"l_cb = 0.75; //Length of BC in m.\n",
+"w_l = 2; //Kg/m\n",
+"g = 9.81; //N/kg- acceleration due to gravity\n",
+"\n",
+"\n",
+"\n",
+"//Free Body Diagram :\n",
+"\n",
+"w_bd = w_l*l_bd*g; //in N. Weight of each segment of pipe that acts through the centre of gravity of each segment.\n",
+"w_ad = w_l*l_ad*g;\n",
+"\n",
+"// Equations of Equilibrium\n",
+"\n",
+"//Balancing forces in the x direction:\n",
+"f_b_x = 0; // N\n",
+"\n",
+"//Balncing forces in the y direction:\n",
+"f_b_y = 0; //N\n",
+"\n",
+"//Balncing forces in the z direction:\n",
+"f_b_z = g + w_ad + f_a; //N\n",
+"\n",
+"// Balancing Moments in the x direction:\n",
+"m_b_x = - m_a + (f_a*l_bd) + (w_ad*l_bd) + (l_bd/2)*g; //Nm\n",
+"\n",
+"// Balancing Moments in the y direction:\n",
+"m_b_y = - (w_ad*(l_ad/2)) - (f_a*l_ad); //Nm\n",
+"\n",
+"// Balancing Moments in the z direction:\n",
+"m_b_z = 0; //Nm\n",
+"\n",
+"v_b_shear = sqrt(f_b_z ^2 + 0); //Shear Force in N\n",
+"t_b = - m_b_y; //Torsional Moment in Nm\n",
+"m_b = sqrt(m_b_x ^2+ 0); // Bending moment in Nm\n",
+"\n",
+"\n",
+"//Display\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"\n",
+"printf('\n\n The weight of segment BD = %.1f N',w_bd);\n",
+"printf('\n The weight of segment AD = %.1f N',w_ad);\n",
+"printf('\n The force at B in the Z direction = %.1f N',f_b_z);\n",
+"printf('\n The moment about B in the X direction = %.1f Nm',m_b_x);\n",
+"printf('\n The moment about G in the Y direction = %.1f Nm',m_b_y);\n",
+"printf('\n The Shear Force at B = %.1f N',v_b_shear);\n",
+"printf('\n The Torsional Moment at B = %.1f Nm',t_b);\n",
+"printf('\n The Bending Moment at B = %.1f Nm',m_b);\n",
+"\n",
+"\n",
+"\n",
+"//-----------------------------------------------------END-----------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6: S6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"\n",
+"disp('Scilab Code Ex 1.6 :')\n",
+"\n",
+"//Given:\n",
+"netf_b = 18*(10 ^3); //N Net force at B.\n",
+"netf_c = 8*(10^3); //N Net force at C.\n",
+"f_a = 12 *(10^3); //N Force at A.\n",
+"f_d = 22* (10^3); //N Force at D.\n",
+"w = 35; //mm Width.\n",
+"t = 10; //mm Thickness.\n",
+"\n",
+"//calculations:\n",
+"p_bc = netf_b + f_a; //N Net force in region BC.\n",
+"a = w*t; //m^2 The area of the cross section.\n",
+"avg_normal_stress = p_bc/a; //Average Normal Stress.\n",
+"\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"printf('\n\n Net force in the region BC = %.2f N',p_bc);\n",
+"printf('\nThe Area of cross section = %.2f m^2',a);\n",
+"printf('\nThe Average Normal Stress in the bar when subjected to load = %.2f MPa',avg_normal_stress);\n",
+"\n",
+"//---------------------------------------------------------END----------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7: S7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"\n",
+"disp('Scilab Code Ex 1.7 :')\n",
+"\n",
+"//Given :\n",
+"m_lamp = 80; //Mass of lamp in Kg.\n",
+"d_ab = 10; // Diameter of AB in mm.\n",
+"d_bc = 8; // Diameter of BC in mm.\n",
+"ab_h = 60 *(%pi/180); // In degrees - Angle made by AB with the horizontal.\n",
+"w = m_lamp*9.81; //N\n",
+"a_bc = (%pi/4)*(d_bc^2); //m^2 Area of cross section of rod BC\n",
+"a_ab = (%pi/4)*(d_ab^2); //m^2 Area of cross section of rod AB\n",
+"\n",
+"\n",
+"\n",
+"// Equations of equilibrium: Solving equilibrium equations simultaneously ,using matrices ,in the x and y directions to obtain force in BC and force in BA.\n",
+"\n",
+"\n",
+"a = [(4/5) -(cos(ab_h)) ; (3/5) (sin(ab_h))];\n",
+"b = [0 ; w];\n",
+"f = zeros(1)\n",
+"\n",
+"f = a\b;\n",
+"f_bc = f(1); // Force in BC in N.\n",
+"f_ba = f(2); //Force in BA in N.\n",
+"avg_normal_stress_a = f_ba / a_ab; //Mpa Average Normal Stress in AB\n",
+"avg_normal_stress_c = f_bc/ a_bc;// Mpa Average Normal Stress in BC\n",
+"\n",
+"\n",
+"// Displaying results:\n",
+"\n",
+"\n",
+"printf('\n\nThe Weight of lamp = %.2f N',w);\n",
+"printf('\nThe Net force in BC = %.2f N',f_bc);\n",
+"printf('\nTheNet force in BA = %.2f N',f_ba);\n",
+"printf('\nThe Average Normal Stress in AB when subjected to load = %.2f MPa',avg_normal_stress_a);\n",
+"printf('\nThe Average Normal Stress in BC when subjected to load = %.2f MPa',avg_normal_stress_c);\n",
+"\n",
+"//------------------------------------------------------------------END----------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8: S8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"\n",
+"disp('Scilab Code Ex 1.8 :')\n",
+"\n",
+"//Given:\n",
+"h_above_ab = 0.8; \n",
+"h_below_ab = 0.2; \n",
+"d_a = 0.2; \n",
+"d_b = 0.1; \n",
+"sp_w = 80; \n",
+"\n",
+"// Equation of Equilibrium:\n",
+"\n",
+"\n",
+"a = %pi* (d_a^2); // Area of cross section in m^2\n",
+"p = sp_w * h_above_ab * a;\n",
+"avg_comp_stress = p/a; // The average compressive stress in kN/m^2\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\nThe internal Axial force P = %.2f kN',p);\n",
+"printf('\nThe average compressive stress = %.2f kN/m^2',avg_comp_stress);\n",
+"\n",
+"\n",
+"//--------------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9: S9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 1.9 : ')\n",
+"\n",
+"//Given :\n",
+"f = 3000; //N Force acting at distance x from AB.\n",
+"l_ac = 200; //Length of AC in mm.\n",
+"a_ab = 400; //Cross sectional area of AB in mm^2.\n",
+"a_c = 650; // area of C in mm^2.\n",
+"\n",
+"\n",
+"f_ans = zeros(3)\n",
+"\n",
+"k = [1 1 0;0 l_ac -f; 1.625 -1 0]\n",
+"l = [f ; 0 ; 0 ]\n",
+"f_ans = k\l;\n",
+"\n",
+"f_ab = f_ans(1)\n",
+"f_c = f_ans(2)\n",
+"x = f_ans(3)\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe Net force on AB = %.2f N',ceil(f_ab));\n",
+"printf('\nNet force on C = %.2f N',f_c);\n",
+"printf('\nDistance of force from AB = %.2f mm',ceil(x));\n",
+"\n",
+"\n",
+"//------------------------------------------------------------------------------END------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/10-Strain_Transformation.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/10-Strain_Transformation.ipynb
new file mode 100644
index 0000000..254bce5
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/10-Strain_Transformation.ipynb
@@ -0,0 +1,777 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Strain Transformation"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10: StnT10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.10 : ')\n",
+"\n",
+"//Given:\n",
+"a = 300; //mm\n",
+"b = 50; //mm\n",
+"t = 20; //mm\n",
+"E_cu = 120*10^3; //MPa\n",
+"nu_cu = 0.34;// Poisson's ratio\n",
+"\n",
+"//By inspection:\n",
+"sigma_x = 800; //MPa\n",
+"sigma_y = -500; //MPa\n",
+"tou_xy = 0;\n",
+"sigma_z = 0;\n",
+"\n",
+"//By Hooke's Law:\n",
+"ep_x = (sigma_x/E_cu) - (nu_cu/E_cu)*(sigma_y + sigma_z);\n",
+"ep_y = (sigma_y/E_cu) - (nu_cu/E_cu)*(sigma_x + sigma_z);\n",
+"ep_z = (sigma_z/E_cu) - (nu_cu/E_cu)*(sigma_y + sigma_x);\n",
+"\n",
+"//New lengths:\n",
+"\n",
+"a_dash = a + ep_x*a;\n",
+"b_dash = b + ep_y*b;\n",
+"t_dash = t + ep_z*t;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe new length = %1.2fmm ',a_dash);\n",
+"printf('\nThe new width = %1.2f mm ',b_dash);\n",
+"printf('\nThe new thickness = %1.2f mm ',t_dash);\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11: StnT11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.11 : ')\n",
+"\n",
+"//Given:\n",
+"p = 20; //kPa\n",
+"E = 600; //kPa\n",
+"nu = 0.45\n",
+"a = 4; //cm\n",
+"b = 2; //cm\n",
+"c = 3; //cm\n",
+"\n",
+"//Dilatation:\n",
+"sigma_x = -p;\n",
+"sigma_y = -p;\n",
+"sigma_z = -p;\n",
+"\n",
+"e = ((1-2*nu)/E)*(sigma_x + sigma_y + sigma_z);\n",
+"\n",
+"//Change in Length:\n",
+"ep = (sigma_x - nu*(sigma_y + sigma_z))/E;\n",
+"\n",
+"del_a = ep*a;\n",
+"del_b = ep*b;\n",
+"del_c = ep*c;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe change in length a = %1.4fcm ',del_a);\n",
+"printf('\nThe change in length b = %1.5fcm ',del_b);\n",
+"printf('\nThe change in length c = %1.4fcm ',del_c);\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12: StnT12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.12 : ')\n",
+"\n",
+"//Given:\n",
+"di = 60/1000; //m\n",
+"ri = di/2;\n",
+"d0 = 80/1000;//m\n",
+"ro = d0/2;\n",
+"T = 8000;//Nm\n",
+"M = 3500; //Nm\n",
+"sigma_y_sqr = 250^2; //MPa\n",
+"\n",
+"//Calculations:\n",
+"c = ro;\n",
+"J = (%pi/2)*(ro^4 - ri^4)*(10^6);\n",
+"I = (%pi/4)*(ro^4 - ri^4)*(10^6);\n",
+"tou_a = (T*c)/J;\n",
+"sigma_a = (M*c)/I;\n",
+"\n",
+"sigma_avg = (0-sigma_a)/2;\n",
+"\n",
+"R = sqrt(116.4^2 + sigma_avg^2);\n",
+"sigma1 = sigma_avg + R;\n",
+"sigma2 = sigma_avg - R;\n",
+"\n",
+"test = (sigma1^2 - (sigma1*sigma2) + sigma2^2);\n",
+"\n",
+"\n",
+"if(test<sigma_y_sqr)\n",
+" printf('\n\nThe material within the pipe will not yield.');\n",
+"end\n",
+"\n",
+"//-----------------------------------------------------------------------END---------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13: StnT13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.13 : ')\n",
+"\n",
+"//Given:\n",
+"T = 400; //Nm\n",
+"sigma_ult = 150*10^6; //N/m^2\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"x = T/(%pi/2);\n",
+"r_3 = [x/sigma_ult];\n",
+"r = nthroot(r_3, 3);\n",
+"r= r*1000; //in mm\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe smallest radius of the solid cast iron shaft = %1.2fmm ',r);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.14: StnT14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.14 : ')\n",
+"\n",
+"//Given:\n",
+"r = 0.5; //cm\n",
+"sigma_yield = 360; //MPa\n",
+"T = 3.25; //kN/cm\n",
+"A= (%pi*r^2);\n",
+"P = 15; //kN\n",
+"J = (%pi/2)*(r^4);\n",
+"sigma_y_sqr = sigma_yield^2;\n",
+"\n",
+"//Calculations:\n",
+"sigma_x = -(P/A)*10;\n",
+"sigma_y = 0;\n",
+"tou_xy = (T*r*10)/J;\n",
+"\n",
+"k = (sigma_x + sigma_y)/2;\n",
+"R = sqrt(k^2 + (tou_xy^2));\n",
+"\n",
+"sigma1 = k+R;\n",
+"sigma2 = k-R;\n",
+"l = sigma1 - sigma2;\n",
+"\n",
+"//Maximum Shear Stress Theory:\n",
+"test1 = abs(l);\n",
+"\n",
+"if(test1 >= sigma_yield)\n",
+" \n",
+" printf('\n\nFailure occurs by Maximum Shear Stress Theory.');\n",
+"end\n",
+"\n",
+"\n",
+"//Maximum Distortion-Energy Theory:\n",
+"test2 = (sigma1^2 - (sigma1*sigma2) + sigma2^2);\n",
+"\n",
+"\n",
+"if(test2<sigma_y_sqr)\n",
+" \n",
+" printf('\n\nFailure will not occur by Maximum Distortion-Energy Theory.');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: StnT1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.1 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = 500; //Normal Strain\n",
+"ep_y = -300; //Normal Strain\n",
+"gamma_xy = 200; //Shear Strain\n",
+"theta = 30*(%pi/180);\n",
+"theta = theta*-1;\n",
+"\n",
+"ep_x_new = ((ep_x+ep_y)/2) + ((ep_x - ep_y)/2)*cos(2*theta) + (gamma_xy/2)*sin(2*theta);\n",
+"\n",
+"gamma_xy_new = -((ep_x - ep_y)/2)*sin(2*theta) + (gamma_xy/2)*cos(2*theta);\n",
+"gamma_xy_new = 2*gamma_xy_new;\n",
+"\n",
+"phi = 60*(%pi/180);\n",
+"ep_y_new = (ep_x+ep_y)/2 + ((ep_x - ep_y)/2)*cos(2*phi) + (gamma_xy/2)*sin(2*phi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe equivalent strain acting on the element in the x plain oriented at 30 degrees clockwise = %1.1f *10^-6',ep_x_new);\n",
+"printf('\nThe equivalent strain acting on the element in the y plain oriented at 30 degrees clockwise = %1.1f *10^-6',ep_y_new);\n",
+"printf('\nThe equivalent shear strain acting on the element = %1.0f *10^-6',gamma_xy_new);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: StnT2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.2 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = -350;//(*10^-6) Normal Strain\n",
+"ep_y = 200; //*(10^-6) Normal Strain\n",
+"gamma_xy = 80; //*(10^-6) Shear Strain\n",
+"\n",
+"//Orientation of the element:\n",
+"tan_thetap = (gamma_xy)/(ep_x - ep_y);\n",
+"thetap1 = (0.5)*(atan(tan_thetap));\n",
+"\n",
+"//Principal Strains:\n",
+"\n",
+"k = (ep_x + ep_y)/2;\n",
+"l = (ep_x - ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"R = sqrt( (l)^2 + tou^2);\n",
+"ep1 = R + k;\n",
+"ep2 = k -R ;\n",
+"ep = [ep1 ep2];\n",
+"\n",
+"ep_x1 = k + l*cos(2*thetap1)+ tou*sin(2*thetap1);\n",
+"thetap1 = thetap1*(180/%pi);\n",
+"thetap2 = (90 + thetap1);\n",
+"thetap =[thetap1 thetap2];\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe orientation of the element in the positive counterclockwise direction = %1.2f degrees, %1.2f degrees ',thetap);\n",
+"printf('\nThe principal strains are = %1.0f *10^-6 , %1.0f *10^-6 ',ep);\n",
+"printf('\nThe principal strain in the new x direction is = %1.0f *10^-6 ',ep_x1);\n",
+"\n",
+"//----------------------------------------------------------------------END---------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: StnT3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.3 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = -350;//(*10^-6) Normal Strain\n",
+"ep_y = 200; //*(10^-6) Normal Strain\n",
+"gamma_xy = 80; //*(10^-6) Shear Strain\n",
+"\n",
+"//Orientation of the element:\n",
+"tan_thetap = -(ep_x - ep_y)/(gamma_xy);\n",
+"thetap1 = (0.5)*(atan(tan_thetap));\n",
+"\n",
+"//Maximum in-plane shear strain:\n",
+"\n",
+"l = (ep_x - ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"R = sqrt( l^2 + tou^2);\n",
+"max_inplane_strain = 2*R;\n",
+"\n",
+"gamma_xy_1 = (-l*sin(2*thetap1)+ tou*cos(2*thetap1))*2;\n",
+"strain_avg = (ep_x + ep_y)/2;\n",
+"\n",
+"thetap1 = thetap1*(180/%pi);\n",
+"thetap2 = (90 + thetap1);\n",
+"thetap =[thetap1 thetap2];\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe orientation of the element = %1.1f degrees, %1.1f degrees ',thetap);\n",
+"printf('\nThe maximum in-plane shear strain = %1.0f *10^-6 ',max_inplane_strain);\n",
+"printf('\nThe average strain = %1.0f *10^-6 ',strain_avg);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: StnT4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.4 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = 250;//(*10^-6) Normal Strain\n",
+"ep_y = -150; //*(10^-6) Normal Strain\n",
+"gamma_xy = 120; //*(10^-6) Shear Strain\n",
+"\n",
+"//Construction of the circle:\n",
+"strain_avg = (ep_x + ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"R = sqrt((ep_x - strain_avg)^2 + (tou^2));\n",
+"\n",
+"//Principal Strains:\n",
+"ep1 = (strain_avg + R);\n",
+"ep2 = (strain_avg - R);\n",
+"strain = [ep1 ep2];\n",
+"\n",
+"tan_thetap = (tou)/(ep_x - strain_avg);\n",
+"thetap1 = (atan(tan_thetap))/2;\n",
+"thetap1 = thetap1*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe principal strains are = %1.0f *10^-6, %1.0f*10^-6 ',strain);\n",
+"printf('\nThe orientation of the element = %1.2f degrees',thetap1);\n",
+"printf('\nThe average strain = %1.0f *10^-6 ',strain_avg);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: StnT5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.5 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = 250;//(*10^-6) Normal Strain\n",
+"ep_y = -150; //*(10^-6) Normal Strain\n",
+"gamma_xy = 120; //*(10^-6) Shear Strain\n",
+"\n",
+"//Orientation of the element:\n",
+"thetas = 90 - 2*8.35;\n",
+"thetas1 = thetas/2;\n",
+"\n",
+"//Maximum in-plane shear strain:\n",
+"\n",
+"l = (ep_x - ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"R = sqrt( l^2 + tou^2);\n",
+"max_inplane_strain = 2*R;\n",
+"\n",
+"\n",
+"strain_avg = (ep_x + ep_y)/2;\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe orientation of the element = %1.1f degrees ',thetas1);\n",
+"printf('\nThe maximum in-plane shear strain = %1.0f *10^-6 ',max_inplane_strain);\n",
+"printf('\nThe average strain = %1.0f *10^-6 ',strain_avg);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: StnT6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.6 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = -300;//(*10^-6) Normal Strain\n",
+"ep_y = -100; //*(10^-6) Normal Strain\n",
+"gamma_xy = 100; //*(10^-6) Shear Strain\n",
+"theta = 20; //degrees\n",
+"\n",
+"\n",
+"//Construction of the circle:\n",
+"strain_avg = (ep_x+ ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"R = sqrt((-ep_x + strain_avg)^2 + tou^2);\n",
+"\n",
+"//Strains on Inclined Element:\n",
+"theta1 = 2*theta;\n",
+"\n",
+"phi = atan((tou)/(-ep_x +strain_avg));\n",
+"phi = phi*(180/%pi);\n",
+"psi = theta1 - phi;\n",
+"psi = psi*(%pi/180);\n",
+"\n",
+"ep_x1 = -(-strain_avg+ R*cos(psi));\n",
+"gamma_xy1 = -(R*sin(psi))*2;\n",
+"\n",
+"ep_y1 = -(-strain_avg - R*cos(psi));\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe normal strain in the new x direction = %1.0f *10^-6 ',ep_x1);\n",
+"printf('\nThe normal strain in the new y direction = %1.1f *10^-6 ',ep_y1);\n",
+"printf('\nThe shear strain in the new xy direction = %1.0f *10^-6 ',gamma_xy1);\n",
+"printf('\nThe average strain = %1.0f *10^-6 ',strain_avg);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7: StnT7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.7 : ')\n",
+"\n",
+"//Given:\n",
+"ep_x = -400;//(*10^-6) Normal Strain\n",
+"ep_y = 200; //*(10^-6) Normal Strain\n",
+"gamma_xy = 150; //*(10^-6) Shear Strain\n",
+"\n",
+"//Maximum in-plane Shear Strain:\n",
+"strain_avg = (ep_x+ ep_y)/2;\n",
+"tou = gamma_xy/2;\n",
+"\n",
+"R = sqrt((-ep_x + strain_avg)^2 + tou^2); \n",
+"strain_max = strain_avg + R;\n",
+"strain_min = strain_avg - R;\n",
+"\n",
+"max_shear_strain = strain_max - strain_min;\n",
+"\n",
+"//Absolute Maximum Shear Strain:\n",
+"abs_max_shear = max_shear_strain;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum in-plane principal strain = %1.0f *10^-6 ',strain_max);\n",
+"printf('\nThe minimum in-plane principal strain = %1.0f *10^-6 ',strain_min);\n",
+"printf('\nThe maximum in-plane shear strain = %1.0f *10^-6 ',max_shear_strain);\n",
+"printf('\nThe absolute maximum shear strain = %1.0f *10^-6 ',abs_max_shear);\n",
+"printf('\nThe average strain = %1.0f *10^-6 ',strain_avg);\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8: StnT8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.8 : ')\n",
+"\n",
+"//Given:\n",
+"ep_a = 60;//(*10^-6) Normal Strain\n",
+"ep_b = 135; //*(10^-6) Normal Strain\n",
+"ep_c = 264; //*(10^-6) Normal Strain\n",
+"\n",
+"theta_a = 0;\n",
+"theta_b = 60*(%pi/180);\n",
+"theta_c = 120*(%pi/180);\n",
+"\n",
+"//Using matrices to solve the equations: \n",
+"a1 = (cos(theta_a))^2;\n",
+"b1 = (sin(theta_a))^2;\n",
+"c1 = cos(theta_a)*sin(theta_a);\n",
+"\n",
+"a2 = (cos(theta_b))^2;\n",
+"b2 = (sin(theta_b))^2;\n",
+"c2 = cos(theta_b)*sin(theta_b);\n",
+"\n",
+"a3 = (cos(theta_c))^2;\n",
+"b3 = (sin(theta_c))^2;\n",
+"c3 = cos(theta_c)*sin(theta_c);\n",
+"\n",
+"A = [a1 b1 c1 ; a2 b2 c2; a3 b3 c3 ]\n",
+"b = [ep_a ; ep_b ; ep_c];\n",
+"strain = A\b;\n",
+"\n",
+"ep_x = strain(1);\n",
+"ep_y = strain(2);\n",
+"gamma_xy = strain(3);\n",
+"\n",
+"strain_avg = (ep_x + ep_y )/2;\n",
+"tou = gamma_xy/2;\n",
+"\n",
+"R = sqrt((-ep_x + strain_avg)^2 + tou^2); \n",
+"\n",
+"ep1 = strain_avg + R;\n",
+"ep2 = strain_avg - R;\n",
+"ep = [ep1 ep2];\n",
+"\n",
+"tan_thetap =atan(-tou/(-ep_x + strain_avg));\n",
+"thetap = tan_thetap/2;\n",
+"thetap2 = thetap*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum in-plane principal strains are = %1.0f *10^-6 , %1.1f *10^-6',ep);\n",
+"printf('\nThe angle of orientation = %1.1f degrees',thetap2);\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+" \n",
+" \n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9: StnT9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 10.9 : ')\n",
+"\n",
+"//Given:\n",
+"E_st = 200*10^9; //GPa\n",
+"nu_st = 0.3; //Poisson's ratio\n",
+"ep1 = 272 *10^-6;\n",
+"ep2 = 33.8 *10^-6;\n",
+"\n",
+"//Solving for sigma using matrices:\n",
+"A = [1 -nu_st; -nu_st 1];\n",
+"b = [(ep1*E_st) ; (ep2*E_st)];\n",
+"sigma = A\b;\n",
+"\n",
+"sigma1= sigma(1)/(10^6);\n",
+"sigma2= sigma(2)/(10^6);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe principal stresses at point A are = %1.0f MPa , %1.1f MPa',sigma1, sigma2);\n",
+"\n",
+"\n",
+"//--------------------------------------------------------------------------END--------------------------------------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/11-Design_of_Beams_and_Shafts.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/11-Design_of_Beams_and_Shafts.ipynb
new file mode 100644
index 0000000..944e9b8
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/11-Design_of_Beams_and_Shafts.ipynb
@@ -0,0 +1,301 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Design of Beams and Shafts"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: DBS1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 11.1 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_allow = 170; //MPa\n",
+"tou_allow = 100; //MPa\n",
+"\n",
+"//Shear and Moment Diagrams:\n",
+"V_max = 90; //kN\n",
+"M_max = 120; //kNm\n",
+"\n",
+"//Bending Stress:\n",
+"S_reqd = (M_max*(10^3))/sigma_allow;\n",
+"\n",
+"W = [60 67 64 74 80 100];\n",
+"S = [1120 1200 1030 1060 984 987];\n",
+"\n",
+"i = find(min(W));\n",
+"S_chosen = S(i);\n",
+"flag1 = 0;\n",
+"flag2 = 0;\n",
+"\n",
+"if (S_reqd<S_chosen) \n",
+" flag1 =1; \n",
+"end\n",
+"\n",
+"//Shear Stress:\n",
+"d = 455; //mm\n",
+"tw = 8; //mm\n",
+"tou_avg = (V_max*10^3)/(d*tw);\n",
+"\n",
+"if(tou_avg<tou_allow)\n",
+" flag2 =1;\n",
+"end\n",
+"\n",
+"if(flag1==1 & flag2==1)\n",
+" \n",
+" \n",
+" printf('\n\nUse a W460X60 standard shape.');\n",
+"end\n",
+"\n",
+"//--------------------------------------------------------------------------END-------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: DBS2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 11.2 : ')\n",
+"\n",
+"//Given:\n",
+"l = 200/1000;//m\n",
+"t = 30/1000;//m\n",
+"sigma_allow = 12; //MPa\n",
+"tou_allow = 0.8; //MPa\n",
+"V_nail = 1.50; //kN\n",
+"l_bc = 2; //m\n",
+"l_cd = 2; //m\n",
+"\n",
+"//Shear and Moment Diagrams:\n",
+"V_max = 1.5; //kN\n",
+"M_max = 2; //kNm\n",
+"\n",
+"//Bending Stress:\n",
+"y1 = l/2;\n",
+"A1 = l*t;\n",
+"y2 = l+(t/2);\n",
+"A2 = t*l;\n",
+"y_dash = (y1*A1 + y2*A2)/(A1 + A2);\n",
+"\n",
+"I1 = (t*l^3)/12 + (t*l*(y_dash - y1)^2);\n",
+"I2 = (l*t^3)/12 + (t*l*(y2 - y_dash)^2);\n",
+"I =I1 + I2;\n",
+"\n",
+"c = y_dash;\n",
+"sigma = (M_max*c)/(I);\n",
+"flag1 = 0;\n",
+"sigma_allow = sigma_allow*1000; //kPa\n",
+"\n",
+"if(sigma<sigma_allow)\n",
+" flag1 = 1;\n",
+"end\n",
+"\n",
+"//Shear Stress:\n",
+"y3 = y_dash/2;\n",
+"A3 = y_dash*t;\n",
+"Q = y3*A3;\n",
+"\n",
+"tou = (V_max*Q)/(I*t);\n",
+"tou_allow = tou_allow*1000; //kPa\n",
+"flag2 =0;\n",
+"\n",
+"if(tou<tou_allow)\n",
+" flag2 = 1;\n",
+"end\n",
+"\n",
+"//Nail Spacing:\n",
+"y4a = (l+t-y_dash);\n",
+"y4 = y4a - (t/2);\n",
+"A4 = l*t;\n",
+"Q4 = y4*A4;\n",
+"V_bc = 1.5; //kN\n",
+"V_cd = 1; //kN\n",
+"\n",
+"q_bc = (V_bc*Q4)/I;\n",
+"q_cd = (V_cd*Q4)/I;\n",
+"\n",
+"s_bc = (V_nail)/(q_bc);\n",
+"s_cd = (V_nail)/(q_cd);\n",
+"\n",
+"chosen_bc = 150; //mm\n",
+"chosen_cd = 250; //mm\n",
+"\n",
+"if(flag1==1 & flag2==1)\n",
+" \n",
+" printf('\n\nThe design is safe in bending and shear.');\n",
+" printf('\nThe calculated nail spacing BC = %1.3f m',s_bc);\n",
+" printf('\nThe calculated nail spacing CD = %1.3f m',s_cd);\n",
+" printf('\nThe chosen nail spacing BC = %1.0f mm',chosen_bc);\n",
+" printf('\nThe chosen nail spacing CD = %1.0f mm',chosen_cd);\n",
+"end\n",
+"\n",
+"//--------------------------------------------------------------------------END-------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: DBS3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 11.3 : ')\n",
+"\n",
+"//Given:\n",
+"udl = 12; //kN/m\n",
+"h_by_a = 1.5;\n",
+"sigma_allow = 9; //MPa\n",
+"tou_allow = 0.6; //MPa\n",
+"\n",
+"//Shear and Moment Diagrams:\n",
+"V_max = 20; //kN\n",
+"M_max =10.67; //kNm\n",
+"\n",
+"//Bending Stress:\n",
+"S_reqd = (M_max)/(sigma_allow*1000);\n",
+"c = h_by_a/2;\n",
+"a_cube = (S_reqd*c*12)/(1.5^3); //S_reqd = I/c\n",
+"a = a_cube^(1/3);\n",
+"\n",
+" \n",
+"A = a*h_by_a*a;\n",
+"tou_max = (1.5*V_max)/(A*1000);\n",
+"\n",
+"\n",
+"if(tou_max>tou_allow)\n",
+" a_sqr = (3/2)*(V_max)/(h_by_a*tou_allow*1000);\n",
+" a =sqrt(a_sqr);\n",
+"end\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe smallest width for the laminated wooden beam = %1.3f m', a);\n",
+"\n",
+"//----------------------------------------------------------------------END-----------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6: DBS6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 11.6 : ')\n",
+"\n",
+"//Given:\n",
+"tou_allow = 50*10^6; //MPa\n",
+"T = 7.5; //Nm\n",
+"R_ah = 150; //N\n",
+"R_av = 475; //N\n",
+"l_ac = 0.25; //m\n",
+"\n",
+"mc = R_ah*l_ac;\n",
+"m = R_av*l_ac;\n",
+"\n",
+"M_c = sqrt(m^2 + mc^2);\n",
+"\n",
+"k = sqrt(M_c^2 + T^2);\n",
+"c1 = (2*k)/(%pi*tou_allow);\n",
+"c = c1^(1/3);\n",
+"\n",
+"d = 2*c*1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe smallest allowable diameter of the shaft = %1.1f mm', d);\n",
+"\n",
+"//----------------------------------------------------------------------END------------------------------------------------------------------------------"
+ ]
+ }
+],
+"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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/12-Deflection_of_Beams_and_Shafts.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/12-Deflection_of_Beams_and_Shafts.ipynb
new file mode 100644
index 0000000..92c4fa8
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/12-Deflection_of_Beams_and_Shafts.ipynb
@@ -0,0 +1,547 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Deflection of Beams and Shafts"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: DefBS10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.10 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200*10^6; //kN/m^2\n",
+"I = 17*10^-6;//mm^4\n",
+"l_ac = 2; //m\n",
+"l_cF = 4; //m\n",
+"l_Fb = 2; //m\n",
+"l_cb = 6; //m\n",
+"l_aF = 6; //m\n",
+"l_ab = 8; //m\n",
+"F = 16; //kN\n",
+"R_b = (F*l_cb)/l_ab;\n",
+"R_a = F - R_b;\n",
+"\n",
+"mc = R_a*l_ac;\n",
+"mf = R_b*l_Fb;\n",
+"theta_ca = (0.5*l_ac*mc)/(E*I);\n",
+"\n",
+"A1 = 0.5*l_aF*mf;\n",
+"t1_ba = (l_Fb + l_aF/3)*(A1);\n",
+"\n",
+"A2 = 0.5*l_Fb*mf;\n",
+"t2_ba = (l_Fb*2*A2)/3;\n",
+"\n",
+"t_ba = (t1_ba+t2_ba)/(E*I);\n",
+"\n",
+"theta_c = (t_ba/l_ab)-(theta_ca);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe slope at point C of the steel beam = %1.5f rad',theta_c);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.12: DefBS12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.12 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200; //kN/m^2\n",
+"I = 50*10^6;//mm^4\n",
+"l_ab = 4; //m\n",
+"l_bc = 4; //m\n",
+"l_ac = l_ab+l_bc;\n",
+"R_a = -25; //kN\n",
+"R_b = 50; //kN\n",
+"R_c = 25; //kN\n",
+"\n",
+"mb = R_a*l_ab;\n",
+"\n",
+"//Moment-Area Theorem:\n",
+"\n",
+"t_ca = (l_ab*0.5*l_ac*mb*(10^3)^3)/(E*I);\n",
+"t_ba = (l_ab*0.5*l_ab*mb*(10^3)^3)/(E*I*3);\n",
+"\n",
+"del_c = -t_ca + 2*t_ba;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe displacement at point C for the steel overhanging beam = %1.1f mm',del_c);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.13: DefBS13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.13 : ')\n",
+"\n",
+"//Given:\n",
+"w = 2; //kN/m\n",
+"L = 8; //m\n",
+"P = 8; //kN\n",
+"\n",
+"//Calculations:\n",
+"EI_theta_A1 = (3*w*L^3)/(128); //ThetaA1 = (3wL^3)/(128EI)\n",
+"EI_nu_C1 = (5*w*L^4)/(768); //NuC1 = (5wL^4)/(768EI)\n",
+"\n",
+"EI_theta_A2 = (P*L^2)/(16); //theta_A2 = (PL^2)/(16EI)\n",
+"EI_nu_C2 = (P*L^3)/(48); //nu_C2 = (PL^3)/(48EI)\n",
+"\n",
+"theta_A = EI_theta_A1 + EI_theta_A2;\n",
+"nu_C = EI_nu_C1 + EI_nu_C2;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe slope at A in terms of EI = %1.0f/EI kNm^2',theta_A);\n",
+"printf('\nThe displacement at point C in terms of EI = %1.0f/EI kNm^3',nu_C);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.14: DefBS14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.14 : ')\n",
+"\n",
+"//Given:\n",
+"w = 5; //kN/m\n",
+"l_ab = 4; //m\n",
+"l_bc = 2; //m\n",
+"P = 10; //kN\n",
+"M = w*l_ab; //kNm\n",
+"\n",
+"//Calculations:\n",
+"EI_theta_B1 = (w*l_ab^3)/(24); //ThetaB1 = (wL^3)/(24EI)\n",
+"EI_nu_C1 = l_bc*EI_theta_B1;\n",
+"\n",
+"EI_theta_B2 = (M*l_ab)/(3); //\n",
+"EI_nu_C2 = l_bc*EI_theta_B2;\n",
+"\n",
+"EI_nu_C3 = (P*l_bc^3)/(3); //nuC3 = (PL^3)/(24EI)\n",
+"\n",
+"nu_C = -EI_nu_C1 + EI_nu_C2 + EI_nu_C3;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe displacement at end C of the overhanging beam, in terms of EI = %1.1f/EI kNm^3',nu_C);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.15: DefBS15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.15 : ')\n",
+"\n",
+"//Given:\n",
+"w = 4; //kN/m\n",
+"l = 10; //m\n",
+"l_bc =3; //m\n",
+"\n",
+"//Calculations:\n",
+"EI_theta_B = (w*l^3)/(24); //ThetaB1 = (wL^3)/(24EI)\n",
+"EI_nu_B = (w*l^4)/(30); //nuB = (wL^4)/(30EI)\n",
+"\n",
+"nu_C = EI_nu_B + (EI_theta_B*l_bc);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe displacement at end C of the cantilever beam, in terms of EI = %1.0f/EI kNm^3',nu_C);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.16: DefBS16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.16 : ')\n",
+"\n",
+"//Given:\n",
+"k = 45; //kN/m\n",
+"F = 3; //kN\n",
+"E = 200*10^6; //kPa\n",
+"l_ab = 3; //m\n",
+"l_ac = 1; //m\n",
+"l_cb = 2; //m\n",
+"I = 4.687*10^-6; //m^4\n",
+"R_a = (F*l_cb)/(l_ab);\n",
+"R_b = F-R_a;\n",
+"\n",
+"//Calculations:\n",
+"nu_a = (R_a)/k;\n",
+"nu_b = (R_b)/k;\n",
+"\n",
+"nu_c1 = nu_b + (l_cb/l_ab)*(nu_a - nu_b);\n",
+"nu_c2 = ((F*l_ac*l_cb)*(l_ab^2 - l_ac^2 - l_cb^2))/(6*E*I*l_ab);\n",
+"\n",
+"nu_c = nu_c1 + nu_c2;\n",
+"nu_C = nu_c*1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe vertical displacement of the force at C = %1.3f mm',nu_C);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.21: DefBS21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.21 : ')\n",
+"\n",
+"//Given:\n",
+"l = 3; //m\n",
+"l_af = l/2; //m\n",
+"P = 8; //kN\n",
+"w = 6; //kN/m\n",
+"\n",
+"//Compatibility Equation:\n",
+"EI_nu_b1 = (w*l^4)/8 + (5*P*l^3)/48; //nu_b = (wl^4)/8EI + (5Pl^3)/48EI\n",
+"EI_nu_b2 = (l^3)/3;\n",
+"\n",
+"B_y = EI_nu_b1 / EI_nu_b2;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe reactions at roller support B = %1.2f kN',B_y);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.22: DefBS22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.22 : ')\n",
+"\n",
+"//Given:\n",
+"l = 8; //m\n",
+"l_ab = l/2; //m\n",
+"l_bc = l/2; //m\n",
+"l_af = l_ab/2; //m\n",
+"b = 12/1000; //m\n",
+"w = 24; //kN/m\n",
+"E = 200*10^6; //Kn/m^2\n",
+"I = 80*10^-6;// m^4\n",
+"\n",
+"//Compatibility Equation:\n",
+"nu_b = (5*w*l^4)/(768*E*I); //nu_b = (5wl^4)/768EI\n",
+"nu_b_byBy = (l^3)/(48*E*I); //nu_b' = (Pl^3)/48EI\n",
+"\n",
+"B_y = (nu_b-b)/nu_b_byBy;\n",
+"\n",
+"C_y = ((w*l_ab*l_af) - (B_y*l_ab))/l;\n",
+"\n",
+"A_y = (w*l_ab - B_y - C_y);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe reaction at A = %1.0f kN',A_y);\n",
+"printf('\nThe reaction at B = %1.0f kN',B_y);\n",
+"printf('\nThe reaction at C = %1.0f kN',C_y);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.23: DefBS23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.23 : ')\n",
+"\n",
+"//Given:\n",
+"d = 12; //mm\n",
+"E = 210; //GPa\n",
+"I = 186*10^6; //mm^4\n",
+"P = 40; //kN\n",
+"l_bc = 3; //m\n",
+"l_ab = 4;//m\n",
+"l = 5; //m\n",
+"\n",
+"//Compatibility Equation: nuB'' = nuB - nuB'\n",
+"A = (%pi/4)*(d^2);\n",
+"\n",
+"nuB1_by_Fbc = (l_bc*1000)/(A*E*1000); //nuB'' = PL/AE\n",
+"nuB2 = (5*P*1000*(l_ab*1000)^3)/(48*E*1000*I); //nuB = (5PL^3)/(48EI)\n",
+"nuB2_by_Fbc = ((l*1000)^3)/(3*E*1000*I); //nuB' = (PL^3)/(3EI)\n",
+"\n",
+"F_bc = (nuB2)/(nuB1_by_Fbc + nuB2_by_Fbc );\n",
+"F_bc = F_bc/1000; //in kN\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe force in the rod due to loading = %1.3f kN',F_bc);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.24: DefBS24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.24 : ')\n",
+"\n",
+"//Given:\n",
+"l_ab = 4; //m\n",
+"l = l_ab/2;\n",
+"w = 9; //kN/m\n",
+"\n",
+"//Compatibility Equations:\n",
+"\n",
+"EI_thetaB = (w*l_ab^3)/(48); //thetaB = (wL^3)/(48EI)\n",
+"EI_nuB = (7*w*l_ab^4)/(384); //nuB = (7wl^4)/(384EI)\n",
+"\n",
+"//Only redundant By applied:\n",
+"EI_thetaB_by_By = (l_ab^2)/(2); //thetaB' = (PL^2)/(2EI)\n",
+"EI_nuB_by_By = (l_ab^3)/(3); //nuB' = (PL^3)/(3EI)\n",
+"\n",
+"//Only redundant Mb is applied:\n",
+"EI_thetaB_by_Mb = l_ab; //thetaB'' = (ML)/(EI)\n",
+"EI_nuB_by_Mb = (l_ab^2)/(2); //nuB'' = (ML^2)/(2EI)\n",
+"\n",
+"//Solving for By and Mb using matrices:\n",
+"\n",
+"A = [EI_thetaB_by_By EI_thetaB_by_Mb; EI_nuB_by_By EI_nuB_by_Mb ];\n",
+"b = [-EI_thetaB; -EI_nuB ] ;\n",
+"moments = A\b;\n",
+"\n",
+"By = moments(1);\n",
+"Mb = moments(2);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe vertical force at B for the beam = %1.3f kN',By);\n",
+"printf('\nThe moment at B for the beam = %1.2f kNm',Mb);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: DefBS6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 12.6 : ')\n",
+"\n",
+"//Display:\n",
+" printf('\n\nRefer to the relation derived in the book.');\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/13-Buckling_of_Columns.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/13-Buckling_of_Columns.ipynb
new file mode 100644
index 0000000..38eebef
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/13-Buckling_of_Columns.ipynb
@@ -0,0 +1,740 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Buckling of Columns"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.10: BoC10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.10 : ')\n",
+"\n",
+"//Given:\n",
+"L = 750; //mm\n",
+"P = 60; //kN\n",
+"sigma = 195; //N/mm^2\n",
+"K = 1;\n",
+"\n",
+"//Calculations:\n",
+"b2 = (P*1000)/(2*sigma);\n",
+"b = sqrt(b2);\n",
+"\n",
+"A = 2*b*b;\n",
+"Iy = (1/12)*(2*b*b^3);\n",
+"ry = sqrt(Iy/A);\n",
+"\n",
+"sl_ratio = (K*L)/(ry);\n",
+"\n",
+"\n",
+"\n",
+"if(sl_ratio>12)\n",
+" b4 = (P*1000*2598.1^2)/(2*378125); //Eqn 13.26\n",
+" b = b4^(1/4);\n",
+" \n",
+" sl_ratio = (2598.1)/(b);\n",
+" w = 2*b;\n",
+" \n",
+" if(sl_ratio>55)\n",
+" printf('\n\nThe thickness of the bar = %1.0fmm',b);\n",
+" printf('\nThe width of the bar = %1.0fmm',w);\n",
+" end\n",
+"end\n",
+"\n",
+"//-------------------------------------------------------------------------END----------------------------------------------------------------------------\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.11: BoC11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.11 : ')\n",
+"\n",
+"//Given:\n",
+"P = 20*10^3; //N\n",
+"y1 = 150; //mm\n",
+"x1 = 40; //mm\n",
+"A = (x1*y1);\n",
+"d = 40;\n",
+"K = 1;\n",
+"\n",
+"//Eqn 13.29\n",
+"\n",
+"L2 = (3718*A*d^2)/(P);\n",
+"L = sqrt(L2);\n",
+"KL_d = (K*L)/(d);\n",
+"\n",
+"if(KL_d>26 & KL_d<=50)\n",
+" printf('\n\nThe greatest allowable length L as specified by the NFPA = %1.0f mm',L);\n",
+" \n",
+"end \n",
+"\n",
+"//------------------------------------------------------------------------END----------------------------------------------------------------------------- \n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.12: BoC12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.12 : ')\n",
+"\n",
+"//Given:\n",
+"L = 1600; //mm\n",
+"K = 2;\n",
+"l = 80; //mm\n",
+"b = 40; //mm\n",
+"e = 20; //mm\n",
+"c = 40; //mm\n",
+"\n",
+"//Calculations:\n",
+"I1 = (1/12)*(l*b^3);\n",
+"A = l*b;\n",
+"r = sqrt(I1/A);\n",
+"sl_ratio = (K*L)/(r);\n",
+"\n",
+"//Eqn 13.26:\n",
+"sigma_allow = (378125)/(sl_ratio^2);\n",
+"\n",
+"I2 = (1/12)*(b*l^3);\n",
+"coefficient = (1/A) + (e*c)/I2;\n",
+"sigma_max = sigma_allow;\n",
+"P = sigma_max/coefficient;\n",
+"P = P/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe load that can be supported if the column is fixed at its base = %1.2f kN',P);\n",
+"\n",
+"//------------------------------------------------------------------------END-----------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.13: BoC13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.13 : ')\n",
+"\n",
+"//Given:\n",
+"sigmaB_allow = 160; //MPa\n",
+"E = 200; //GPa\n",
+"sigma_y = 250; //MPa\n",
+"K= 1;\n",
+"A = 3790; //mm^2\n",
+"Ix = 17.1*10^6; //mm^4\n",
+"ry = 38.2; //mm\n",
+"d = 157; //mm\n",
+"c= d/2; \n",
+"e = 750; //mm\n",
+"L = 4000; //mm\n",
+"\n",
+"sl_ratio = (K*L)/(ry);\n",
+"sl_ratio_c = sqrt((2*%pi^2*E*1000)/(sigma_y));\n",
+"\n",
+"\n",
+"\n",
+"if(sl_ratio<sl_ratio_c)\n",
+" num = (1 - (sl_ratio^2/(2*sl_ratio_c^2)))*sigma_y;\n",
+" denom1 = (5/3) + ((3/8)*sl_ratio/sl_ratio_c);\n",
+" denom2 = (sl_ratio^3)/(8*sl_ratio_c^3);\n",
+" sigmaA_allow = num/(denom1 - denom2);\n",
+" \n",
+" coeffP = 1/(sigmaA_allow*A) + (e*c)/(Ix*sigmaB_allow);\n",
+" P = 1/coeffP;\n",
+" \n",
+" sigA = (P/A)/(sigmaA_allow);\n",
+" P = P/1000; //in kN\n",
+" \n",
+" \n",
+" if(sigA < 0.15)\n",
+" printf('\n\nThe maximum allowable value of eccentric load = %1.2f kN',P);\n",
+" end\n",
+"end\n",
+"\n",
+"//---------------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.14: BoC14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.14 : ')\n",
+"\n",
+"//Given:\n",
+"K = 2;\n",
+"d= 60; //mm\n",
+"L = 1200; //mm\n",
+"e = 80; //mm\n",
+"c = d;\n",
+"A = 60*120; //mm^2\n",
+"l = 60; //mm\n",
+"b = 120;//mm\n",
+"\n",
+"\n",
+"//Calculations:\n",
+"sl_ratio = (K*L)/(d);\n",
+"\n",
+"if(sl_ratio>26 & sl_ratio<50)\n",
+" sigma_allow = (3718)/(sl_ratio^2);\n",
+" sigma_max = sigma_allow;\n",
+" \n",
+" I = (1/12)*(l*b^3);\n",
+" coeffP = (1/A) + (e*c)/(I);\n",
+" P = sigma_max/coeffP;\n",
+" P = P/1000; //kN\n",
+" \n",
+" printf('\n\nThe eccentric load that can be supported = %1.2f kN',P);\n",
+"end\n",
+"\n",
+"//Answer given in the textbook varies.\n",
+"\n",
+"//-------------------------------------------------------------------------END-------------------------------------------------------------------------------------\n",
+" \n",
+" \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1: BoC1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.1 : ')\n",
+"\n",
+"//Given:\n",
+"l = 7.2*1000; //mm\n",
+"E = 200; //GPa\n",
+"ro = 75; //mm\n",
+"ri = 70; //mm\n",
+"sigma_y = 250; //MPa\n",
+"\n",
+"//Calculations:\n",
+"I = (%pi/4)*(ro^4 - ri^4)\n",
+"A = (%pi)*(ro^2 -ri^2);\n",
+"\n",
+"Pcr = (%pi^2*(E*10^6)*I*(1000)^-2)/(l^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"\n",
+"sigma_cr = (Pcr*1000)/A;\n",
+"\n",
+"if(sigma_cr<sigma_y)\n",
+" \n",
+" printf('\n\nThe maximum allowable axial load that the column can support = %1.1f kN',Pcr);\n",
+"end\n",
+"\n",
+"//-------------------------------------------------------------------------END--------------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2: BoC2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.2 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200; //GPa\n",
+"I = 15.3*10^6; //mm^4\n",
+"l= 4*1000; //mm\n",
+"A = 5890; //mm^2\n",
+"sigma_y = 250; //MPa\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"Pcr = ((%pi^2)*E*10^6*I*1000^-2)/(l^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"\n",
+"sigma_cr = (Pcr*1000)/A;\n",
+"\n",
+"if(sigma_cr>sigma_y)\n",
+" Pcr = (sigma_y*A);\n",
+" Pcr = Pcr/1000; //in kN\n",
+"end\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum allowable axial load that the column can support = %1.1f kN',Pcr);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3: BoC3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.3 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200;//GPa\n",
+"Ix = 13.4*10^-6;\n",
+"Iy = 1.83*10^-6;\n",
+"l = 8;\n",
+"KLx = 0.5*l; //m\n",
+"KLy = 0.7*(l/2); //m\n",
+"rx = 66.2; //mm\n",
+"ry = 24.5; //mm\n",
+"\n",
+"Pcrx = (%pi^2*E*10^6*Ix)/(KLx^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"Pcry = (%pi^2*E*10^6*Iy)/(KLy^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"\n",
+"Pcr = min(Pcrx,Pcry);\n",
+"A = 3060; //mm^2\n",
+"sigma_cr = Pcr/A;\n",
+"\n",
+"sl_ratio_x = (KLx*1000)/(rx);\n",
+"sl_ratio_y = (KLy*1000)/(ry);\n",
+"s_ratio = max(sl_ratio_x, sl_ratio_y);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum load that the column can support without buckling = %1.0f kN',Pcr);\n",
+"printf('\nThe largest slenderness ratio = %1.1f N/mm^2',s_ratio);\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4: BoC4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.4 : ')\n",
+"\n",
+"//Given:\n",
+"E = 70;//GPa\n",
+"Ix = 61.3*10^-6;\n",
+"Iy = 23.2*10^-6;\n",
+"l = 5;\n",
+"KLx = 2*l; //m\n",
+"KLy = 0.7*(l); //m\n",
+"FS = 3; //Factor of safety\n",
+"sigma_y = 215; //MPa\n",
+"\n",
+"\n",
+"Pcrx = (%pi^2*E*10^6*Ix)/(KLx^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"Pcry = (%pi^2*E*10^6*Iy)/(KLy^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"\n",
+"Pcr = min(Pcrx,Pcry);\n",
+"A = 7.5*10^-3; //mm^2\n",
+"P_allow = Pcr/FS;\n",
+"sigma_cr = (Pcr*10^-3)/A;\n",
+"\n",
+"\n",
+"if(sigma_cr<sigma_y)\n",
+"\n",
+" printf('\n\nThe largest allowable load that the column can support = %1.0f kN',P_allow);\n",
+"end\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5: BoC5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"disp('Scilab Code Ex 13.5 : ')\n",
+"//Given:\n",
+"E = 200*10^3; //MPa\n",
+"sigma_y = 250; //MPa\n",
+"x1 = 50; //mm\n",
+"y1 = 75; //mm\n",
+"z1 = 4.5; //m\n",
+"e = 25; //mm\n",
+"Ix = (1/12)*x1*(y1*2)^3;\n",
+"A = x1*2*y1;\n",
+"rx = sqrt(Ix/A);\n",
+"L = z1*1000;\n",
+"KL = 1*L;\n",
+"sl_ratio = KL/rx;\n",
+"c = y1;\n",
+"ec_r = e*c/(rx^2);\n",
+"P_a = 83; //MPa\n",
+"A = 7500; //mm^2\n",
+"P = P_a*A;\n",
+"P = P/1000; //in kN\n",
+"k = (L/(2*rx))*(sqrt(P/(E*A)));\n",
+"sigma_max = (P*1000/A)*(1+ec_r*sec(k)); //Secant Formula\n",
+"l = sqrt((P*1000)/(E*Ix));\n",
+"nu_max = e*(sec(l*L/2)-1);\n",
+"//Display:\n",
+"printf('\n\nThe allowable eccentric load that can be applied on the column = %1.1fkN',P);\n",
+"printf('\nThe maximum deflection of the column due to the loading = %1.0f mm',nu_max);\n",
+"//--------------------------------------------------------------------------END------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6: BoC6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.6 : ')\n",
+"\n",
+"//Given:\n",
+"z1 = 4*1000; //mm\n",
+"e = 200; //mm\n",
+"KLy = 0.7*z1;\n",
+"Iy = 20.4*10^6;\n",
+"E = 200*10^3; //N/mm^2\n",
+"sigma_y =250; //MPa\n",
+"\n",
+"//y-y Axis Buckling:\n",
+"Pcry = (%pi^2*E*10^6*Iy)/(KLy^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"Pcry = Pcry/1000;\n",
+"\n",
+"//x-x Axis Yielding:\n",
+"Kx= 2;\n",
+"KLx = Kx*z1;\n",
+"c = (z1-KLy)/2;\n",
+"rx = 89.9;\n",
+"\n",
+"//Solved by applying the Secant Formula and then finding Px by trial and error:\n",
+"\n",
+"trial_Px = 419.4; //kN\n",
+"\n",
+"A = 7850;//mm^2\n",
+"sigma = (trial_Px*1000)/(A);\n",
+"\n",
+"if(Pcry>trial_Px & sigma<sigma_y)\n",
+"printf('\n\nThe maximum eccentric load that the column can support = %1.1fkN',trial_Px);\n",
+"printf('\nFailure will occur about the x-x axis.');\n",
+"\n",
+"end\n",
+"\n",
+"//--------------------------------------------------------------------------END------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7: BoC7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.7 : ')\n",
+"\n",
+"//Given:\n",
+"d = 30; //mm\n",
+"r = d/2;\n",
+"L = 600; //mm\n",
+"sigma_pl = 150;//MPa\n",
+"\n",
+"//Calculations:\n",
+"I = (%pi/4)*(r^4);\n",
+"A = %pi*r^2;\n",
+"r_gyr = sqrt(I/A);\n",
+"K = 1;\n",
+"sl_ratio = (K*L)/(r_gyr);\n",
+"flag1 = 0;\n",
+"\n",
+"//Assuming the critical stress is elastic:\n",
+"E = 150/0.001;\n",
+"sigma_cr1 = (%pi^2*E)/(sl_ratio^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+"\n",
+"\n",
+"if(sigma_cr1 > sigma_pl)\n",
+" Et = (270 - 150)/(0.002 - 0.001);\n",
+" sigma_cr2 = (%pi^2*Et)/(sl_ratio^2); //Pcr = (%pi^2*EI)/(l^2)\n",
+" \n",
+" if(sigma_cr2>150 & sigma_cr2<270) \n",
+" Pcr = sigma_cr2*A;\n",
+" Pcr = Pcr/1000; //in kN\n",
+" printf('\n\nThe critical load when used as a pin supported column = %1.0fkN',Pcr);\n",
+" \n",
+" end\n",
+" \n",
+" \n",
+"end\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8: BoC8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.8 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200*10^3; //MPa\n",
+"sigma_y = 250; //MPa\n",
+"L = 5*1000; //mm\n",
+"K = 1;\n",
+"A = 19000; //mm^2\n",
+"rx = 117; //mm\n",
+"ry = 67.4; //mm\n",
+"\n",
+"//Calculations:\n",
+"sl_ratio = (K*L)/(ry);\n",
+"sl_ratio_c = sqrt((2*%pi^2*E)/(sigma_y));\n",
+"\n",
+"if(sl_ratio>0 & sl_ratio<sl_ratio_c)\n",
+" num = (1 - (sl_ratio^2/(2*sl_ratio_c^2)))*sigma_y;\n",
+" denom1 = (5/3) + ((3/8)*sl_ratio/sl_ratio_c);\n",
+" denom2 = (sl_ratio^3)/(8*sl_ratio_c^3);\n",
+" sigma_allow = num/(denom1 - denom2);\n",
+" \n",
+" P = sigma_allow*A;\n",
+" P = P/1000;\n",
+" printf('\n\nThe largest load the pin supported column can safely bear = %1.0f kN',P);\n",
+" \n",
+" end\n",
+" \n",
+"//---------------------------------------------------------------------END----------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.9: BoC9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 13.9 : ')\n",
+"\n",
+"//Given:\n",
+"P = 80; //kN\n",
+"E = 210*10^3; //MPa\n",
+"sigma_y = 360; //MPa\n",
+"L = 5000; //mm\n",
+"K = 0.5;\n",
+"\n",
+"//Calculations:\n",
+"I_by_d = (1/4)*(%pi)*(0.5^4);\n",
+"A_by_d = (1/4)*(%pi);\n",
+"r_by_d = sqrt(I_by_d/A_by_d);\n",
+"\n",
+"sl_ratio_c = sqrt((2*%pi^2*E)/(sigma_y));\n",
+"sigma_allow = (P*1000)/A_by_d;\n",
+"\n",
+"d4 = (sigma_allow*23*(K*L)^2*16)/(12*%pi^2*E);\n",
+"d = d4^(1/4);\n",
+"\n",
+"//Check:\n",
+"d = ceil(d);\n",
+"r = d/4;\n",
+"KL_r = (K*L)/r;\n",
+"\n",
+"\n",
+"if(KL_r>sl_ratio_c & KL_r<200)\n",
+" printf('\n\nThe smallest diameter of the rod as allowed by AISC specification = %1.0fmm',d);\n",
+" \n",
+"end \n",
+"\n",
+"//------------------------------------------------------------------------END----------------------------------------------------------------------------- "
+ ]
+ }
+],
+"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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/14-Energy_Methods.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/14-Energy_Methods.ipynb
new file mode 100644
index 0000000..79c1a07
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/14-Energy_Methods.ipynb
@@ -0,0 +1,692 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Energy Methods"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.10: EM10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.10 : ')\n",
+"\n",
+"//Given:\n",
+"m = 80*1000; //kg\n",
+"v = 0.2; //m/s\n",
+"l_ac = 1.5; //m\n",
+"E = 200*10^9; //N/m^2\n",
+"w = 0.2; //m\n",
+"I = (1/12)*(w^4);\n",
+"l_ab = 1000; //mm\n",
+"\n",
+"//Calculations:\n",
+"del_Amax = sqrt((m*v^2*l_ac^3)/(3*E*I));\n",
+"\n",
+"P_max = (3*E*I*del_Amax)/(l_ac^3);\n",
+"theta_A = (P_max*l_ac^2)/(2*E*I);\n",
+"del_Amax = del_Amax*1000;\n",
+"del_Bmax = del_Amax + (theta_A*l_ab);\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe maximum horizontal displacement of the post at B due to impact = %1.1f mm',del_Bmax);\n",
+" \n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.11: EM11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.11 : ')\n",
+"\n",
+"//Given:\n",
+"A = 400*10^-6; //m^2\n",
+"E = 200*10^6; //kN/m^2\n",
+"P = 100; //kN\n",
+"\n",
+"//Virtual Work Equation:\n",
+"\n",
+"n = [0 0 -1.414 1];\n",
+"N = [-100 141.4 -141.4 200];\n",
+"L = [4 2.828 2.828 2];\n",
+"del_cv = 0;\n",
+"\n",
+"for i=1:4\n",
+" del_cv = del_cv + (n(i)*N(i)*L(i))/(A*E);\n",
+"end\n",
+"\n",
+"del_cv = del_cv*1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe vertical displacement of joint C of the steel truss = %1.1f mm',del_cv);\n",
+" \n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.12: EM12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.12 : ')\n",
+"\n",
+"//Given:\n",
+"A = 300*10^-6; //m^2\n",
+"E = 210*10^6; //kN/m^2\n",
+"P = 60; //kN\n",
+"F_ac = 1.25; //kN\n",
+"\n",
+"//Part a:\n",
+"\n",
+"//Virtual Work Equation:\n",
+"\n",
+"n = [0 1.25 0 -0.75];\n",
+"N = [0 75 -60 -45];\n",
+"L = [1.5 2.5 2 1.5];\n",
+"del_ch = 0;\n",
+"\n",
+"for i=1:4\n",
+" del_ch = del_ch + (n(i)*N(i)*L(i))/(A*E);\n",
+"end\n",
+"\n",
+"del_chA = del_ch*1000;\n",
+"\n",
+"//Part b:\n",
+"\n",
+"del_L = -6; //mm\n",
+"del_chB = F_ac*del_L;\n",
+"\n",
+"if(del_chB<0)\n",
+" \n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe horizontal displacement of joint C if a force is applied to B = %1.3f mm',del_chA);\n",
+" printf('\nThe horizontal displacement of joint C if AC is fabricated short = %1.1f mm',del_chB);\n",
+"end\n",
+"\n",
+" \n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.13: EM13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.13 : ')\n",
+"\n",
+"//Given:\n",
+"del_T = 60; //degree celcius\n",
+"alpha = 12*10^-6; //per degree celcius\n",
+"E = 200*10^6; //kN/m^2\n",
+"A = 250*10^-6; //m^2\n",
+"L = 4; //m\n",
+"\n",
+"//Virtual Work Equation:\n",
+"n = 1.155; //kN\n",
+"N = -12; //kN\n",
+"\n",
+"del_bh = (n*N*L)/(A*E) + (n*alpha*del_T*L);\n",
+"del_bh = del_bh*1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe horizontal displacement of joint B of the truss = %1.2f mm',del_bh);\n",
+"\n",
+"//---------------------------------------------------------------------END--------------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.16: EM16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.16 : ')\n",
+"\n",
+"//Given:\n",
+"I = 175.8*10^-6; //m^4\n",
+"E = 200*10^6; //kN/m^2\n",
+"Ra = 1;//kN\n",
+"l_ab = 3; //m\n",
+"l_bc = 6; //m\n",
+"\n",
+"\n",
+"//Virtual Work Equation:\n",
+"m1 = -1; //*x1\n",
+"M1 = -2.5; //*x1^3\n",
+"m2 = -0.5; //*x2\n",
+"\n",
+"x10 = 0;\n",
+"x11 = l_ab;\n",
+"I1 = integrate('m1*M1*(x1^4)','x1',x10,x11);\n",
+"\n",
+"x20 = 0;\n",
+"x21 = l_bc;\n",
+"I2 = integrate('m2*123.75*(x2^2)','x2',x20,x21);\n",
+"\n",
+"x20 = 0;\n",
+"x21 = l_bc;\n",
+"I3 = integrate(' -m2*22.5*(x2^3)','x2',x20,x21);\n",
+"\n",
+"In = I1 + I2 + I3;\n",
+"del_A = (In)/(E*I);\n",
+"del_A = del_A*1000;\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe displacement of point A of the steel beam = %1.1f mm',del_A);\n",
+" \n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.17: EM17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.17 : ')\n",
+"\n",
+"//Given:\n",
+"E = 210*10^3; //N/mm^2\n",
+"P = 40*10^3;//N\n",
+"A_ab = 1250; //mm^2\n",
+"A_ac = 625; //mm^2\n",
+"A_cd = 1250; //mm^2\n",
+"A_bc = 625; //mm^2\n",
+"\n",
+"N_by_P = [0 0 1.67 -1.33];\n",
+"L = [4000 3000 5000 4000];\n",
+"A = [A_ab A_bc A_ac A_cd];\n",
+"N = zeros(4);\n",
+"sum = 0;\n",
+"\n",
+"\n",
+"for i =1:4\n",
+" N(i) = N_by_P(i)*P;\n",
+" num(i) = N(i)*N_by_P(i)*L(i);\n",
+" \n",
+"end\n",
+"\n",
+"for i = 1:4\n",
+" sum = sum + (num(i)/(A(i)*E)); //By Castigliano's Second theorem.\n",
+"end\n",
+"\n",
+"del_ch = sum;\n",
+"\n",
+"//Display:\n",
+" printf('\n\nThe horizontal displacement of joint C of the steel truss = %1.2f mm',sum);\n",
+" \n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.18: EM18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.18 : ')\n",
+"\n",
+"//Given:\n",
+"E = 200*10^6; //kN/m^2\n",
+"P = 0;//N\n",
+"A = 400*10^-6; //m^2\n",
+"\n",
+"N_by_P = [0 0 -1.414 1];\n",
+"L = [4 2.828 2.828 2];\n",
+"N = [-100 141.4 -141.4 200];\n",
+"sum = 0;\n",
+"\n",
+"\n",
+"for i =1:4\n",
+" num(i) = N(i)*N_by_P(i)*L(i); \n",
+"end\n",
+"\n",
+"for i = 1:4\n",
+" sum = sum + (num(i)/(A*E)); //By Castigliano's Second theorem.\n",
+"end\n",
+"\n",
+"del_ch = sum*1000;\n",
+"\n",
+"//Display:\n",
+" printf('\n\nThe vertical displacement of joint C of the steel truss = %1.1f mm',del_ch);\n",
+" \n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: EM1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.1 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_y = 310; //N/mm^2\n",
+"db =18; //mm\n",
+"rb = db/2;\n",
+"Ab = %pi*(rb^2);\n",
+"E = 210*10^3; //N/mm^2\n",
+"da1 = 20; //mm\n",
+"ra1 = da1/2;\n",
+"Aa1 = %pi*(ra1^2);\n",
+"La1 = 50;//mm\n",
+"La2= 6; //mm\n",
+"da2 =18; //mm\n",
+"ra2 = da2/2;\n",
+"Aa2 = %pi*(ra2^2);\n",
+"Lb = 56; //mm\n",
+"\n",
+"\n",
+"//Bolt A:\n",
+"P_max = sigma_y*Ab;\n",
+"Uia = (P_max^2/(2*E))*(La1/Aa1 + La2/Aa2); //Ui = (N^2L)/(2AE)\n",
+"Uia = Uia/1000;\n",
+"\n",
+"//Bolt B:\n",
+"Uib = (P_max^2/(2*E))*(Lb/Ab);\n",
+"Uib = Uib/1000;\n",
+"\n",
+"//Display:\n",
+" printf('\n\nThe greatest amount of strain energy absorbed by bolt A = %1.3f J',Uia);\n",
+" printf('\nThe greatest amount of strain energy absorbed by bolt B = %1.3f J',Uib);\n",
+" \n",
+" //-------------------------------------------------------------------------END---------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.21: EM21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.21 : ')\n",
+"\n",
+"//Given:\n",
+"I = 125*10^-6; //m^4\n",
+"E = 200*10^6; //kN/m^2\n",
+"Rc = 5;//kN\n",
+"l_ac = 6; //m\n",
+"l_cb = 4; //m\n",
+"\n",
+"\n",
+"//Castigliano's Second Theorem:\n",
+"m = 0.4/9;\n",
+"\n",
+"x10 = 0;\n",
+"x11 = l_ac;\n",
+"I11 = integrate('4.4*(x1^2)','x1',x10,x11);\n",
+"I12 = integrate('-m*(x1^4)','x1',x10,x11);\n",
+"I1 = I11 + I12;\n",
+"\n",
+"x20 = 0;\n",
+"x21 = l_cb;\n",
+"I21 = integrate('6*0.6*(x2^2)','x2',x20,x21);\n",
+"I22 = integrate('18*0.6*(x2)','x2',x20,x21);\n",
+"I2 = I21+I22;\n",
+"\n",
+"In = I1 + I2 ;\n",
+"del_cv = (In)/(E*I);\n",
+"del_cv = del_cv*1000;\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe vertical displacement of point C of the steel beam = %1.1f mm',del_cv);\n",
+" \n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: EM5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.5 : ')\n",
+"\n",
+"//Given:\n",
+"G = 75*10^9; //N/m^2\n",
+"ro = 80/1000; //m\n",
+"t = 15/1000; //m\n",
+"ri = ro - t;\n",
+"l1 = 750/1000; //m\n",
+"l2 = 300/1000; //m\n",
+"T1 = 40; //Nm\n",
+"T2 =15; //Nm\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"J = (%pi/2)*(ro^4 - ri^4);\n",
+"\n",
+"//Eqn 14-22\n",
+"U1 = (T1^2*l1)/(2*G*J); \n",
+"U2 = (T2^2*l2)/(2*G*J);\n",
+"Ui = U1 + U2;\n",
+"Ui = Ui*10^6; //in micro Joule\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe strain energy stored in the shaft = %1.0fX10^-6 J',Ui);\n",
+" \n",
+"//-------------------------------------------------------------------------END-------------------------------------------------------------------------------------------\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6: EM6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.6 : ')\n",
+"\n",
+"//Given:\n",
+"l_ab = 1; //m\n",
+"l_bc = 2; //m\n",
+"N_ab = 11.547*1000; //N\n",
+"Nb = 20*1000; //N\n",
+"Nc = -23.094*1000; //N\n",
+"N_ac = -20*1000; //N\n",
+"A = 100/(1000^2); //mm^2\n",
+"E = 200*10^9; //N/m^2\n",
+"P = 20*10^3;//N\n",
+"\n",
+"//Eqn 14-26\n",
+"P_by_2 = P/2;\n",
+"l_ac = sqrt(l_bc^2 - l_ab^2);\n",
+"del = 0;\n",
+"\n",
+"N2= [N_ab^2 Nc^2 N_ac^2];\n",
+"L = [l_ab l_bc l_ac];\n",
+"\n",
+"for i = 1:3\n",
+" del = del + (N2(i)*L(i))/(2*A*E);\n",
+"end\n",
+"\n",
+"del_bh = del/P_by_2;\n",
+"del_bh = del_bh*1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe horizontal displacement at point B = %1.2fmm',del_bh);\n",
+" \n",
+"//-------------------------------------------------------------------------END-------------------------------------------------------------------------------------------\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.8: EM8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.8 : ')\n",
+"\n",
+"//Given:\n",
+"ro = 60; //mm\n",
+"ri = 50; //mm\n",
+"E = 70; //kN/mm^2\n",
+"W = 600; //kN\n",
+"L = 240; //mm\n",
+"h = 0;\n",
+"\n",
+"//Part a:\n",
+"\n",
+"A = (%pi)*(ro^2 - ri^2);\n",
+"del_st= (W*L)/(A*E);\n",
+"\n",
+"//Part b:\n",
+"\n",
+"del_max = del_st*(1 + sqrt(1 + 2*(h/del_st)));\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe maximum displacement at the top of the pipe for gradually applied load = %1.4f mm',del_st);\n",
+" printf('\nThe maximum displacement at the top of the pipe for suddenly applied load = %1.4f mm',del_max);\n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.9: EM9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 14.9 : ')\n",
+"\n",
+"//Given:\n",
+"W = 6000; //N\n",
+"h = 50; //mm\n",
+"E = 210*1000; //N/mm^2\n",
+"L = 5000; //mm\n",
+"I = 87.3*10^6; //mm^2\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"del_st = (W*L^3)/(48*E*I);\n",
+"del_max = del_st*(1 + sqrt(1 + 2*(h/del_st)));\n",
+"\n",
+"c = 252/2;\n",
+"sigma_max = (12*E*del_max*c)/(L^2);\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe maximum bending stress in the steel beam = %1.2f N/mm^2',sigma_max);\n",
+" printf('\nThe maximum deflection in the beam = %1.3f mm',del_max);\n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------------"
+ ]
+ }
+],
+"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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb
new file mode 100644
index 0000000..595dbf4
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb
@@ -0,0 +1,222 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Strain"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Strain1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 2.1 : ')\n",
+"\n",
+"//Given:\n",
+"e_z= 4;\n",
+"ab = 0.200; //m\n",
+"\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Part a)\n",
+"\n",
+"z=integrate('1+(40*10^-3)*(sqrt(z))','z',0,ab); //Strain formula for short line segment = delta(sdash) =(1+e_z)delta(s) \n",
+"deltaB= z-ab;\n",
+"deltaB_mm= deltaB*1000;\n",
+"\n",
+"//Part b)\n",
+"\n",
+"e_avg = deltaB/ab;// Normal strain formula : e = (delta(sdash) -delta(s))/delta(s)\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe value of integration is =%10.5f m',z);\n",
+"printf('\nThe displacement at the end of the rod is = %0.2f mm',deltaB_mm);\n",
+"printf('\nThe average normal strain in the rod is =%10.4f mm/mm',e_avg);\n",
+"\n",
+"//-------------------------------------------------------------------------END----------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: Strain2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 2.2 : ')\n",
+"\n",
+"//Given:\n",
+"theta = 0.002; //radians\n",
+"bc=1; //m\n",
+"ba = 0.5;//m\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"bb_dash = theta*ba;\n",
+"avg_normal_strain = bb_dash/bc;//m/m\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe average normal strain =%10.3f m/m',avg_normal_strain);\n",
+"\n",
+"//---------------------------------------END---------------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Strain3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 2.3 : ')\n",
+"\n",
+"//Given:\n",
+"\n",
+"ab= 250; //mm\n",
+"bbdash_x = 3; //mm\n",
+"bbdash_y = 2; //mm\n",
+"ac = 300; //mm\n",
+"\n",
+"//calculations:\n",
+"\n",
+"//Part(a)\n",
+"abdash = sqrt((ab - bbdash_y)^2 + (bbdash_x)^2); //Pythagoras theorem\n",
+"avg_normal_strain = (abdash-ab)/ab;\n",
+"\n",
+"//Part(b)\n",
+"gamma_xy = atan(bbdash_x/(ab - bbdash_y)); //shear strain formula\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe average normal strain along AB is =%10.5f mm/mm',avg_normal_strain);\n",
+"printf('\nThe average shear strain = %10.5f rad',gamma_xy);\n",
+"\n",
+"//--------------------------------------------------------------------END-----------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Strain4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 2.4 : ')\n",
+"\n",
+"//Given:\n",
+"ab = 150; //mm\n",
+"bc = 150; //mm\n",
+"disp_cd= 2; //mm\n",
+"ab_half = ab/2;\n",
+"addash_half = (bc+disp_cd)/2 ;\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Part(a)\n",
+"\n",
+"ac = sqrt((ab)^2 + (bc)^2); //Pythagoras theorem in mm\n",
+"ac_m = ac/1000; //in m\n",
+"acdash = sqrt((ab)^2 + (bc+disp_cd)^2); //Pythagoras theorem in mm\n",
+"acdash_m = acdash/1000; //in m\n",
+"\n",
+"avg_strain_ac = (acdash_m - ac_m)/ac_m; //Normal strain formula\n",
+"\n",
+"//Part(b)\n",
+"\n",
+"theta_dash = 2* atan((addash_half)/(bc/2)); //theta found in radians\n",
+"gamma_xy = (%pi / 2)- theta_dash; //shear strain formula\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe average normal strain along the diagonal AC is =%10.5f mm/mm',avg_strain_ac);\n",
+"printf('\nThe shear strain at E relative to the x,y axes = %10.5f rad',gamma_xy);\n",
+"\n",
+"//----------------------------------------------------------------END---------------------------------------------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/3-Mechanical_Properties_of_Materials.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/3-Mechanical_Properties_of_Materials.ipynb
new file mode 100644
index 0000000..1408511
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/3-Mechanical_Properties_of_Materials.ipynb
@@ -0,0 +1,357 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Mechanical Properties of Materials"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: MPM1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.1 : ')\n",
+"\n",
+"//Given:\n",
+"offset = 0.2; //%\n",
+"a_x = 0.0016; //mm/mm\n",
+"a_y = 345; //Mpa\n",
+"\n",
+"//Refer to the given graph.\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Modulus of Elasticity\n",
+"E = a_y/(a_x*10^3); //E is the slope in GPa.\n",
+"\n",
+"//Yield Strength:\n",
+"sigma_ys = 469; //Graphically, for a strain of 0.002mm/mm\n",
+"\n",
+"//Ultimate Stress:\n",
+"sigma_u = 745.2; //Mpa B is the peak of stress strain graph.\n",
+"\n",
+"//Fracture Stress:\n",
+"ep_f = 0.23; //mm/mm\n",
+"sigma_f = 621; //Mpa from the graph.\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe Modulus of Elasticity is = %10.1f GPa',E);\n",
+"printf('\nThe Yield Strength from the graph = %0.2f MPa',sigma_ys);\n",
+"printf('\nThe Ultimate Stress from the graph is =%10.1f MPa',sigma_u);\n",
+"printf('\nThe Fracture Stress from the graph is =%10.1f MPa',sigma_f);\n",
+"\n",
+"//-------------------------------------------------------------------------END----------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: MPM2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.2 : ')\n",
+"\n",
+"//Given:\n",
+"stress_b = 600; //MPa\n",
+"strain_b = 0.023; //mm/mm\n",
+"stress_a = 450; //Mpa\n",
+"strain_a = 0.006; //mm/mm\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Permanent Strain:\n",
+"E = stress_a/strain_a;\n",
+"strain_cd = stress_b/E; //The recovered elastic strain\n",
+"perm_strain = strain_b - strain_cd; //mm/mm\n",
+"\n",
+"//Modulus of Resilience:\n",
+"ur_initial = (0.5*stress_a*strain_a);//MJ/m^3\n",
+"ur_final = (0.5*stress_b*strain_cd); //MJ/m^3\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe Permanent Strain is =%10.5f mm/mm',perm_strain);\n",
+"printf('\nThe Initial Modulus of Resilience is = %0.2f MJ/mm^3',ur_initial);\n",
+"printf('\nThe Final Modulus of Resilience is = %0.2f MJ/mm^3',ur_final);\n",
+"\n",
+"\n",
+"//------------------------------------------------------------------------------END-------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: MPM3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.3 : ')\n",
+"\n",
+"//Given:\n",
+"p = 10000; //N\n",
+"E_al = 70*(10^3); //MPa\n",
+"l_ab = 600; //mm\n",
+"d_ab = 20; //mm\n",
+"l_bc = 400; //mm\n",
+"d_bc = 15; //mm\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"a_ab = (%pi/4)*(d_ab^2);// Area of AB\n",
+"a_bc = (%pi/4)*(d_bc^2);\n",
+"stress_ab = p/a_ab;// Stress = load/area\n",
+"stress_bc = p/a_bc;\n",
+"\n",
+"e_ab = stress_ab/E_al; //Hookes's Law. Elastic strain.\n",
+"e_bc = 0.045; //mm/mm . From the graph for stress_bc\n",
+"\n",
+"elongation = (l_ab*e_ab)+ (l_bc*e_bc);\n",
+"strain_rec = stress_bc/E_al; //Strain Recovery\n",
+"\n",
+"e_og = e_bc-strain_rec;// mm/mm\n",
+"rod_elong = e_og*l_bc;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe elongation of the rod when load is applied =%10.1f mm',elongation);\n",
+"printf('\nThe permanent elongation of the rod when load is removed = %0.1f mm',rod_elong);\n",
+"\n",
+"//-------------------------------------------------------------------------END----------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: MPM4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.4 : ')\n",
+"\n",
+"//Given:\n",
+"P = 80; //kN\n",
+"l_z = 1.5; //m\n",
+"l_y = 0.05;//m\n",
+"l_x = 0.1; //m\n",
+"\n",
+"//Calculations:\n",
+"A= l_x*l_y;\n",
+"normal_stress_z = (P*(10^3))/A; //Pa\n",
+"\n",
+"Est = 200; //GPa - from the tables.\n",
+"strain_z = (normal_stress_z)/(Est*(10^9)); // Strain = stress/modulus of elasticity\n",
+"\n",
+"axial_elong = strain_z*l_z; //elongation in the y direction\n",
+"\n",
+"nu_st = 0.32; //Poisson's Ratio - from the tables.\n",
+"strain_x = -(nu_st)*(strain_z); //strain in the x direction.\n",
+"strain_y = strain_x;\n",
+"\n",
+"//Elongations:\n",
+"delta_x = strain_x*l_x;\n",
+"delta_y = strain_y*l_y;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe change in the length (z direction) = %10.8f m',axial_elong);\n",
+"printf('\nThe change in the cross section (x direction)= %10.8f m',delta_x);\n",
+"printf('\nThe change in the cross section (y direction)= %10.8f m',delta_y);\n",
+"\n",
+"printf('\n\nIn the standard form:')\n",
+"printf('\nThe change in the length (z direction) = %10.2f x10^6m',(axial_elong*10^6));\n",
+"printf('\nThe change in the cross section (x direction)= %10.2f x10^6m',(delta_x*10^6));\n",
+"printf('\nThe change in the cross section (y direction)= %10.2f x10^6m',(delta_y*10^6));\n",
+"\n",
+"//----------------------------------------------------------------------------END------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: MPM5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.5 : ')\n",
+"\n",
+"//Given:\n",
+"//Refer to the graph of shear stress-strain of titanium alloy.\n",
+"x_A = 0.008; //rad - x co-ordinate of A\n",
+"y_A = 360; //MPa - y co-ordinate of A\n",
+"height = 50;//mm\n",
+"l = 75; //mm\n",
+"b = 100; //mm\n",
+"\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Shear Modulus:\n",
+"G = y_A/x_A;\n",
+"\n",
+"//Proportional Limit:\n",
+"tou_pl = 360; //Mpa Point A\n",
+"\n",
+"//Ultimate Stresss:\n",
+"tou_u = 504; //MPa - Max shear stress at B\n",
+"\n",
+"//Maximum Elastic Displacement:\n",
+"tanA= x_A;// tan theta is approximated as theta.\n",
+"d = tanA*height;\n",
+"\n",
+"//Shear Force:\n",
+"A = l*b;\n",
+"V = tou_pl*A;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe Shear Modulus = %10.2f MPa',G);\n",
+"printf('\nThe Proportional Limit = %10.2f Mpa',tou_pl);\n",
+"printf('\nThe Ultimate Shear Stress = %10.2f MPa ',tou_u);\n",
+"printf('\nThe Maximum Elastic Displacement = %10.2f mm',d);\n",
+"printf('\nThe Shear Force = %10.2f kN ',(V/1000));\n",
+"\n",
+"//------------------------------------------------------------------END---------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: MPM6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 3.6 : ')\n",
+"\n",
+"//Given:\n",
+"d_o = 0.025; //m\n",
+"l_o =0.25; //m\n",
+"F =165; //kN\n",
+"delta = 1.2; //mm\n",
+"G_al = 26; //GPa\n",
+"sigma_y = 440; //MPa\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Modulus of Elasticity:\n",
+"A = (%pi/4)*(d_o^2);\n",
+"avg_normal_stress = (F*10^3)/A;\n",
+"avg_normal_strain = delta/l_o;\n",
+"E_al = avg_normal_stress/ avg_normal_strain;\n",
+"\n",
+"E_al = E_al/10^6;\n",
+"\n",
+"//Contraction of Diameter:\n",
+"nu = (E_al/(2*G_al))-1;\n",
+"strain_lat = nu*(avg_normal_strain) ;\n",
+"d_contraction = strain_lat* d_o ;\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe Modulus of Elasticity = %10.1f GPa',E_al);\n",
+"printf('\nThe contraction in diameter due to the force = %10.4f mm',d_contraction);\n",
+"\n",
+"//------------------------------------------------------------------------------END----------------------------------------------------------------------------------------"
+ ]
+ }
+],
+"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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/4-Axial_Load_.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/4-Axial_Load_.ipynb
new file mode 100644
index 0000000..0c429e7
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/4-Axial_Load_.ipynb
@@ -0,0 +1,981 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Axial Load "
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: AL10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.10 : ')\n",
+"\n",
+"//Given:\n",
+"T1 = 30; //degree celcius\n",
+"T2 = 60;//degress celcius\n",
+"l_ab = 1;//m\n",
+"area = 10*10*10^-6; //m^2\n",
+"alpha = 12*10^-6;// per degree celcius\n",
+"E = 200*10^6; //kPa\n",
+"\n",
+"//Equilibrium:\n",
+"//F_a = F_b = F\n",
+"\n",
+"del_T = T2-T1;\n",
+"F = alpha*del_T*area*E; //Thermal Stress Formula\n",
+"\n",
+"avg_normal_comp_stress = (F*10^-3)/area; // sigma = F/A\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe force at A and B = %1.1f kN',F);\n",
+"printf('\nThe average normal compressive stress = %1.1f MPa',avg_normal_comp_stress);\n",
+"\n",
+"\n",
+"//-------------------------------------------------------------------END--------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: AL11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.11 : ')\n",
+"\n",
+"//Given:\n",
+"area_sleeve = 600*10^-6; //m^2\n",
+"area_bolt = 400*10^-6; //m^2\n",
+"T1 = 15; //degree celcius\n",
+"T2 = 80; //degree celcius\n",
+"alpha_bolt = 12*10^-6; //per degree celcius\n",
+"alpha_sleeve = 23*10^-6; //per degree celcius\n",
+"l = 0.15; //m\n",
+"E_bolt = 200*10^9; //N/m^2 \n",
+"E_sleeve = 73.1*10^9; //N/m^2 \n",
+"\n",
+"//Equilibrium:\n",
+"//F_s = F_b\n",
+"\n",
+"//Compatibility:\n",
+"del_T = T2 - T1; // temperature difference\n",
+"delb_T = alpha_bolt*del_T*l; \n",
+"delb_F = l/(area_bolt*E_bolt);\n",
+"dels_T = alpha_sleeve*del_T*l; \n",
+"dels_F = l/(area_sleeve*E_sleeve);\n",
+"\n",
+"//delb_T + F_b*delb_F = dels_T + F_s*dels_F\n",
+"\n",
+"F_b = (dels_T-delb_T)/(delb_F+dels_F);\n",
+"F_b = F_b/1000; //in kN\n",
+"F_s= F_b;\n",
+"\n",
+"sigma_b = F_b/(area_bolt*10^3); //Average Normal Stress\n",
+"sigma_s = F_s/(area_sleeve*10^3); //Average Normal Stress\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe force experienced by sleeve and bolt = %1.2f kN',F_s);\n",
+"printf('\nThe average normal stress on bolt = %1.1f MPa',sigma_b);\n",
+"printf('\nThe average normal stress on sleeve = %1.1f MPa',sigma_s);\n",
+"\n",
+"\n",
+"//-----------------------------------------------------------END-----------------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: AL12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.12 : ')\n",
+"\n",
+"//Given:\n",
+"h = 0.250; //m\n",
+"T1 = 20; //degree celcius\n",
+"udl = 150; //kN/m\n",
+"T2 = 80; //degree celcius\n",
+"len = 0.3; //m\n",
+"dia_steel = 0.04;//m\n",
+"r_steel = 0.02;\n",
+"dia_aluminium = 0.06; //m\n",
+"r_al = dia_aluminium/2;\n",
+"area_st = %pi*(r_steel^2);\n",
+"area_al = %pi*(r_al^2);\n",
+"F = 90*10^3;//N\n",
+"alpha_st = 12*10^-6; //per degree celcius\n",
+"alpha_al = 23*10^-6; //per degree celcius\n",
+"E_st = 200*10^9; // N/m^2\n",
+"E_al = 73.1*10^9; // N/m^2\n",
+"\n",
+"//Equilibrium:\n",
+"//From the free body diagram: Eqn1 : 2F_st + F_al-\n",
+"\n",
+"\n",
+"// -delst_T + F_st*delst_F = -delal_T + F_al*delal_F\n",
+"\n",
+"//Eqn2 : 165.9*10^3 =1.216F_al - F_st F = 0\n",
+"\n",
+"//Compatibility:\n",
+"delst_T = alpha_st*(T1+T2)*h;\n",
+"delst_F = h/(area_st*E_st);\n",
+"delal_T = alpha_al*(T1+T2)*h;\n",
+"delst_F = h/(area_al*E_al);\n",
+"\n",
+"coeffMat = [2 1; -1 1.216]\n",
+"b= [90*10^3 ; 165.9*10^3]\n",
+"F = coeffMat\b;\n",
+"F_st = F(1)/1000;\n",
+"F_al =F(2)/1000;\n",
+"F_al =ceil(F_al);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe force on the steel post = %1.1f kN',F_st);\n",
+"printf('\nThe force on the aluminium post = %1.1f kN',F_al);\n",
+"\n",
+"//-----------------------------------------------------------------------------END----------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: AL13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.13 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_allow = 115; //MPa\n",
+"\n",
+"//Determinng the stress concentration factor:\n",
+"\n",
+"r_n =10/20;\n",
+"w_h = 40/20;\n",
+"k = 1.4; //from graph\n",
+"sigma_avg = sigma_allow/k;\n",
+"P =sigma_avg*20*10;\n",
+"P = P/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe largest axial force that the bar can carry = %1.2f kN',P);\n",
+"\n",
+"//------------------------------------------------------------------------------END---------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: AL14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.14 : ')\n",
+"\n",
+"//Given:\n",
+"P = 80*10^3; //N\n",
+"yield_stress = 700; //MPa;\n",
+"E = 200*10^9; //N/mm^2\n",
+"l1 = 0.3; //m\n",
+"l2 = 0.8; //m\n",
+"\n",
+"//Maximum Normal Stress:\n",
+"r_h = 6/20;\n",
+"w_h = 40/20;\n",
+"K = 1.6;\n",
+"\n",
+"area2 = 0.02*0.01; //m^2 note its not 0.001.\n",
+"max_stress = (K*P)/area2;\n",
+"max_stress = (max_stress/10^6); // converting to MPa\n",
+"\n",
+"//Displacement:\n",
+"area1 = 0.04*0.01;\n",
+"del_ad_1 = (P*l1)/(area1*E);\n",
+"del_ad_2 = (P*l2)/(area2*E);\n",
+"del_ad = (2*del_ad_1)+ del_ad_2;\n",
+"del_ad = del_ad*1000; //converting m to mm\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum normal stress = %1.1f MPa',max_stress);\n",
+"printf('\nThe displacement of one end with respect to the other = %1.2f mm',del_ad);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: AL15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.15 : ')\n",
+"\n",
+"//Given\n",
+"weight = 15; //kN\n",
+"l_ab = 5; //m\n",
+"l_ac= 5.0075; //m\n",
+"area = 30; //mm^2\n",
+"\n",
+"//calculations:\n",
+"strain_ab = (l_ac-l_ab)/l_ab; \n",
+"max_strain = 0.0017; \n",
+"\n",
+"stress_ab = (350*strain_ab)/max_strain;\n",
+"F_ab = stress_ab*area; // F= stress*area\n",
+"E_st = 350/max_strain; //Modulus ofelasticity\n",
+"\n",
+"del1 = l_ab/(area*10^-6*E_st*10^3); //del = PL/AE\n",
+"del2 = l_ac/(area*10^-6*E_st*10^3); //del = PL/AE\n",
+"\n",
+"//Eqn1 = T_ab + T_ac = weight\n",
+"//Eqn2 = del1*T_ab - del2*T_ac = (l_ac-l_ab)\n",
+"\n",
+"//Solving using matrices:\n",
+"A = [1 1;del1 -del2];\n",
+"b = [weight; (l_ac-l_ab)];\n",
+"T = A\b;\n",
+"\n",
+"T_ab = T(1);\n",
+"T_ac = T(2);\n",
+"\n",
+"stress_in_ab = (T_ab*10^3)/area;\n",
+"\n",
+"if(stress_in_ab>350)\n",
+" T_ab = (350*area)/1000;\n",
+"end\n",
+"\n",
+"T_ac = 15-T_ab;\n",
+"stress = (T_ac*10^3)/area;\n",
+"strain_ac = (stress*max_strain)/350;\n",
+"\n",
+"elong_ac = strain_ac*l_ac; //m\n",
+"elong_ab = (l_ac-l_ab)+elong_ac; //m\n",
+"\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe force experienced by wire AB = %1.1f kN',T_ab);\n",
+"printf('\nThe force experienced by wire AC = %1.1f kN',T_ac);\n",
+"printf('\nThe elongation in wire AB = %1.5f m',elong_ab);\n",
+"printf('\nThe elongation in wire AC = %1.5f m',elong_ac);\n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: AL16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.16 : ')\n",
+"\n",
+"//Given:\n",
+"yield = 250; //MPa\n",
+"r = 4; //mm\n",
+"width = 40; //mm\n",
+"thick = 2; //mm\n",
+"\n",
+"//a)\n",
+"r_h = r/(width - (2*r));\n",
+"w_h = width/(width - (2*r));\n",
+"K = 1.75;\n",
+"area = (thick*(width - (2*r))*10^-6);\n",
+"P_y = (yield*10^6*area)/K;\n",
+"P_y = P_y/1000;\n",
+"\n",
+"//b)\n",
+"P_p = (yield*10^6*area);\n",
+"P_p = P_p/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum load P that does not cause the steel to yield = %1.2f kN',P_y);\n",
+"printf('\nThe maximum load that the bar can support = %1.2f kN',P_p);\n",
+"\n",
+"//-------------------------------------------------------------------------END----------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: AL17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.17 : ')\n",
+"\n",
+"//Given:\n",
+"r = 5/1000; //m\n",
+"yield = 420; //MPa\n",
+"E = 70; //GPa\n",
+"P = 60; //kN\n",
+"l_ac = 100/1000; //m\n",
+"l_cb = 300/1000; //m\n",
+"F_a = 45; //kN by elastic analysis\n",
+"F_b = 15; //kN by elastic analysis\n",
+"\n",
+"//Calculations:\n",
+"area = %pi*(r^2)\n",
+"sigma_ac = F_a/(area*1000);\n",
+"sigma_ac1 = sigma_ac;\n",
+"sigma_cb = F_b/(area*1000);\n",
+"sigma_cb1 = sigma_cb;\n",
+"\n",
+"if(sigma_ac>yield)\n",
+" F_a_y = yield*10^3*area;\n",
+" F_b = P - F_a_y;\n",
+" \n",
+" sigma_ac = yield;\n",
+" sigma_cb = F_b/(area*1000);\n",
+"end\n",
+"\n",
+"//Residual Stress:\n",
+"defl_c = (F_b*l_cb)/(area*E*10^6);\n",
+"strain_cb = defl_c/l_cb;\n",
+"strain_ac = -defl_c/l_ac;\n",
+"\n",
+"sigma_ac_r = -sigma_ac+ sigma_ac1;\n",
+"sigma_cb_r = sigma_cb - sigma_cb1;\n",
+"\n",
+" sigma = sigma_cb_r;\n",
+" \n",
+"//Permanent Displacement:\n",
+"res_strain_cb = (sigma*10^6)/(E*10^9);\n",
+"perm_defl_c = res_strain_cb*l_cb*1000;\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe residual stress in AC = %1.1f MPa',sigma_ac_r);\n",
+"printf('\nThe residual stress in CB = %1.1f MPa',sigma_cb_r);\n",
+"printf('\nThe permanent displacement of the collar at C = %1.3f mm',perm_defl_c);\n",
+"\n",
+"//----------------------------------------------------------------------END-----------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: AL1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.1 : ')\n",
+"\n",
+"//Given:\n",
+"a_ab = 600; //mm^2\n",
+"a_bd = 1200; //mm^2\n",
+"a_bc = a_bd;\n",
+"p = 75; //kN\n",
+"l_ab = 1; //m\n",
+"l_bc = 0.75; //m\n",
+"l_cd = 0.5; //m\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Internal Forces: By method of Sections\n",
+"P_bc = 35; //kN\n",
+"P_cd = 45;//kN\n",
+"\n",
+"//Displacement:\n",
+"E_st = 210*(10^3); //From the tables\n",
+"\n",
+"P = [p P_bc -P_cd];\n",
+"A =[a_ab a_bc a_bd];\n",
+"L= [l_ab l_bc l_cd];\n",
+"E = []\n",
+"n = length(P)\n",
+"\n",
+"delta_sum =0;\n",
+"\n",
+"for i = 1:n;\n",
+" delta_sum = delta_sum + (P(i)*L(i)*(10^6))/(A(i)*E_st);\n",
+"end\n",
+"\n",
+"delta_bc = (P_bc*l_bc*10^6)/(a_bc*E_st);\n",
+"\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe vertical displacement of end A = +%1.2f mm',delta_sum);\n",
+"printf('\nThe displacement of B relative to C is = +%1.3f mm',delta_bc);\n",
+"\n",
+"//------------------------------------------------------------------------END----------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: AL2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.2 : ')\n",
+"\n",
+"//Given:\n",
+"a_ab = 400; //mm^2\n",
+"d_rod = 10; //mm\n",
+"r_rod = d_rod/(2*1000); //radius in m\n",
+"P = 80; //kN\n",
+"E_st = 200*(10^9); //Pa\n",
+"E_al = 70*(10^9); //Pa\n",
+"l_ab = 400; //mm\n",
+"l_bc = 600; //mm\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Internal forces: tension = compression = 80kN.\n",
+"\n",
+"//Displacement:\n",
+"\n",
+"//delta =PL/AE\n",
+"numerator1 = P*(10^3)*(l_bc/1000); \n",
+"denominator1 = (%pi*r_rod^2*E_st);\n",
+"delta_cb = numerator1/denominator1; //to the right\n",
+"\n",
+"numerator2 = -P*(10^3)*(l_ab/1000); \n",
+"denominator2 = (a_ab* 10^-6 *E_al);\n",
+"delta_a = -numerator2/denominator2; //to the right\n",
+"\n",
+"delta_c = delta_a+delta_cb;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"\n",
+"printf('\n\nThe displacement of C with respect to B = +%1.6f m',delta_cb);\n",
+"printf('\nThe displacement of B with respect to A = +%1.6f m',delta_a);\n",
+"printf('\nThe displacement of C relative to A = +%1.5f m',delta_c);\n",
+"\n",
+"//------------------------------------------------------------------END---------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: AL3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.3 : ')\n",
+"\n",
+"//Given:\n",
+"d_ac = 20; //mm\n",
+"r_ac = d_ac/(2*1000); //radius in m\n",
+"d_bd =40; //mm\n",
+"r_bd = d_bd/(2*1000); //radius in m\n",
+"P = 90; //kN\n",
+"E_st = 200*(10^9); //Pa\n",
+"E_al = 70*(10^9); //Pa\n",
+"l_af = 200; //mm\n",
+"l_fb = 400; //mm\n",
+"l_bd = 300; //mm\n",
+"l_ac = l_bd;\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Internal Force:\n",
+"P_ac = 60; //kN\n",
+"P_bd = 30; //kN\n",
+"\n",
+"//Displacement:\n",
+"\n",
+"//Post AC: delta = PL/AE\n",
+"num1 = -(P_ac*10^3*(l_ac/1000));\n",
+"denom1 = %pi* r_ac^2*E_st;\n",
+"delta_a = -num1/denom1; //downwards\n",
+"delta_a = delta_a*1000; //in m\n",
+"\n",
+"//Post BD: delta = PL/AE\n",
+"num2 = -(P_bd*10^3*(l_bd/1000));\n",
+"denom2 = %pi* r_bd^2*E_al;\n",
+"delta_b = -num2/denom2; //downwards\n",
+"delta_b = delta_b*1000; //in m\n",
+"\n",
+"\n",
+"delta_f = delta_b + (0.184)*(l_fb/(l_af+l_fb)); //By similar triangles from the figure.\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe displacement of Post AC = +%1.3f mm downwards',delta_a);\n",
+"printf('\nThe displacement of Post BD = +%1.3f mm downwards',delta_b);\n",
+"printf('\nnThe displacement of point F = +%1.3f mm downwards',delta_f);\n",
+"\n",
+"//------------------------------------------------------------------------------END-----------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: AL5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.5 : ')\n",
+"\n",
+"//Given:\n",
+"d_ab = 5; //mm\n",
+"A = (%pi/4)*(d_ab/1000)^2;\n",
+"gap = 1; //mm\n",
+"P = 20; //kN\n",
+"E_st = 200; //GPa\n",
+"l_ac = 0.4; //m\n",
+"l_cb = 0.8; //m\n",
+"l_ab = l_ac+l_cb;\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Equilibrium:\n",
+"// Eqn1: -Fa - Fb +P*10^3 = 0; \n",
+"\n",
+"//Compatibility:\n",
+"delta_ba = gap/1000; //in m\n",
+"\n",
+"delta = delta_ba*(A*E_st*10^9); //delta_ba* Lac/AE \n",
+"\n",
+"\n",
+"//Eqn2: (L/AE)*Fa -(Lb/AE)*Fb = delta_ba\n",
+"\n",
+"//Solving Equations 1 and 2 by matrices:\n",
+"coeff_F = [1 1; l_ac -l_cb];\n",
+"b =[P*10^3 ; delta];\n",
+"F = coeff_F\b;\n",
+"\n",
+"F_a = F(1)/1000;\n",
+"F_b = F(2)/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe reaction force at A = %1.1f kN',F_a);\n",
+"printf('\nThe reaction force at B = %1.2f kN',F_b);\n",
+"\n",
+"//--------------------------------------------------------------------------------END----------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: AL6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.6 : ')\n",
+"\n",
+"//Given:\n",
+"P = 45; //kN\n",
+"E_al = 70*10^3;\n",
+"E_br = 105*10^3;\n",
+"h = 0.5; //m\n",
+"ri = 25/1000; //m\n",
+"ro = 50/1000; //m\n",
+"A = (%pi*(ro^2 -ri^2));\n",
+"Ai = %pi*ri^2;\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Equilibrium: Eqn1:F_al +F_br = P\n",
+"\n",
+"//Compatibility:\n",
+"coeff_F_br = (A*E_al)/(Ai*E_br); // delta_al = delta_brass\n",
+"\n",
+"//Eqn2 : F_al- (coeff_F_br*F_br) = 0\n",
+"\n",
+"//Solving equations 1 and 2 using matrices:\n",
+"\n",
+"coeff_F = [1 1; 1 -coeff_F_br];\n",
+"b = [P; 0];\n",
+"F = coeff_F\b;\n",
+"\n",
+"F_al =F(1);\n",
+"F_br =F(2);\n",
+"\n",
+"avg_stress_al = F_al/A; \n",
+"avg_stress_br = F_br/Ai; \n",
+"\n",
+"avg_stress_al = avg_stress_al/1000;\n",
+"avg_stress_br = avg_stress_br/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe axial force experienced by Al = %1.1f kN',F_al);\n",
+"printf('\nThe axial force experienced by Brass = %1.2f kN',F_br);\n",
+"printf('\nThe average normal stress in Al = %1.2f MPa',avg_stress_al);\n",
+"printf('\nThe average normal stress in Al Brass = %1.2f MPa',avg_stress_br);\n",
+"\n",
+"//---------------------------------------------------------------------END-------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: AL7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.7 : ')\n",
+"\n",
+"//Given:\n",
+"P = 15; //kN\n",
+"a_ab = 25; //mm^2\n",
+"a_ef =a_ab;\n",
+"a_cd = 15; //mm^2\n",
+"l_ef = 0.5; //m\n",
+"l_ce = 0.4; //m\n",
+"l_ac = 0.4; //m\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Equilibrium:\n",
+"//In the y direction ; F_a +F_c +F_e = P\n",
+"//of moments: -F_a(l_ac)+ P(l_ac/2) +F_e(l_ce) = 0\n",
+"\n",
+"//Compatibility equation for displacemnts:\n",
+"coeff_Fc = (1/a_cd); //coefficient of Fc\n",
+"coeff_Fa = (0.5/a_ab); //coefficient of Fc\n",
+"coeff_Fe = (0.5/a_ef); //coefficient of Fc\n",
+"\n",
+"//Using matrices to solve the 3 Equations:\n",
+"A = [1 1 1; -l_ac 0 l_ce; coeff_Fa -coeff_Fc coeff_Fe];\n",
+"b = [P ; -P*(l_ac/2); 0];\n",
+"F = A\b;\n",
+"\n",
+"\n",
+"F_a = F(1);\n",
+"F_b = F(2);\n",
+"F_c = F(3);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe force in rod AB = %1.2f kN',F_a);\n",
+"printf('\nThe force in rod CD = %1.2f kN',F_b);\n",
+"printf('\nThe force in rod EF = %1.2f kN',F_c);\n",
+"\n",
+"//--------------------------------------------------------------------END--------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: AL8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.8 : ')\n",
+"\n",
+"//Given:\n",
+"r_o = 10; //mm\n",
+"r_i = 5; //mm\n",
+"l = 60; //mm\n",
+"a_t = (%pi)*(r_o^2 - r_i^2); //Area of thread\n",
+"a_b = (%pi*(r_i^2));// Area of bolt\n",
+"one_turn =20/20;\n",
+"E_am = 45; //GPa\n",
+"E_al = 75; //GPa\n",
+"\n",
+"//calculations:\n",
+"\n",
+"//Equilibrium:\n",
+"// In Y direction: F_b - F_t = 0\n",
+"\n",
+"//Compatibility:\n",
+"half_turn = one_turn/2;\n",
+"coeff_Ft = l/(a_t*E_am*10^3); // delta = PL/AE\n",
+"coeff_Fb = l/(a_b*E_al*10^3);\n",
+"\n",
+"//Solving the two simultaneous equations for F_b and F_t:\n",
+"A = [1 -1; coeff_Fb coeff_Ft];\n",
+"b = [0 ; half_turn];\n",
+"F = A\b;\n",
+"\n",
+"F_b =F(1);\n",
+"F_t = F(2);\n",
+"\n",
+"stress_b = F_b/a_b;\n",
+"stress_t = F_t/a_t;\n",
+"\n",
+"F_b = F_b/1000; //in kN\n",
+"F_t = F_t/1000; //in kN\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe force experienced by threads = %1.2f kN',F_t);\n",
+"printf('\nThe force experienced by the bolt = %1.2f kN',F_b);\n",
+"printf('\nThe stress in the screw = %1.1f MPa',stress_t);\n",
+"printf('\nThe stress in the bolt = %1.1f MPa',stress_b);\n",
+"\n",
+"//------------------------------------------------------------------------END-----------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: AL9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 4.9 : ')\n",
+"\n",
+"//Given:\n",
+"l_ab = 800 + 400;//mm\n",
+"P = 20; //kN\n",
+"d = 5/1000; //m\n",
+"area = (%pi/4)*d^2; //Cross sectional area\n",
+"l_bbdash = 1/1000;//m\n",
+"E = 200; //GPa\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"//Compatibility\n",
+"delta_p = (P*10^3*0.4)/(area*E*10^9); //delta = PL/AE\n",
+"delta_b = delta_p-l_bbdash;\n",
+"F_b = (delta_b*area*E*10^9)/(l_ab/1000);\n",
+"F_b = F_b/1000;\n",
+"\n",
+"//Equilibrium:\n",
+"F_a = P - F_b;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe reaction at A = %1.1f kN',F_a);\n",
+"printf('\nThe reaction at B = %1.1f kN',F_b);\n",
+"\n",
+"//------------------------------------------------------------END--------------------------------------------------------------------"
+ ]
+ }
+],
+"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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/5-Torsion.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/5-Torsion.ipynb
new file mode 100644
index 0000000..8ddf9e8
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/5-Torsion.ipynb
@@ -0,0 +1,958 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Torsion"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: T11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.11 : ')\n",
+"\n",
+"//Given:\n",
+"d = 20/1000; //m\n",
+"r = d/2;\n",
+"l_bc = 0.2;\n",
+"l_cd = 1.5;\n",
+"l_da = 0.3;\n",
+"T_c = 800; //Nm\n",
+"T_d = -500; //Nm\n",
+"\n",
+"//Equilibrium:\n",
+"//Eqn 1 : 300 = T_a + T_b\n",
+"\n",
+"//Compatibility:\n",
+"//Eqn 2:\n",
+"coeff_Tb = -l_bc;\n",
+"coeff_Ta = l_cd + l_da;\n",
+"\n",
+"//Solving Equations simultaneously using matrices:\n",
+"C = [1 1; coeff_Tb coeff_Ta];\n",
+"b = [300 ; -750];\n",
+"T = C\b;\n",
+"\n",
+"T_b = T(1);\n",
+"T_a = T(2);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe reaction at A = %1.0f Nm',T_a);\n",
+"printf('\nThe reaction at B = %1.0f Nm',T_b);\n",
+"\n",
+"//---------------------------------------------------------------------------------END--------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: T12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.12 : ')\n",
+"\n",
+"//Given:\n",
+" T = 250; //Nm\n",
+" G_st = 80; //GPa\n",
+" G_br = 36; //GPa\n",
+" ri = 10; //mm\n",
+" ro = 20; //mm\n",
+" l_ab = 1.2; //m\n",
+" \n",
+" //Equilibrium:\n",
+" // -Tst-Tbr+250Nm = 0\n",
+" coeff1_st = -1;\n",
+" coeff1_br = -1;\n",
+" b1 = -250;\n",
+" \n",
+" //Compatibility:\n",
+" //phi = TL/JG\n",
+" \n",
+" J1 = (%pi/2)*(ro^4 - ri^4);\n",
+" J2 = (%pi/2)*(ri^4);\n",
+" coeff2_st = 1/(J1*G_st*10^3);\n",
+" coeff2_br = -1/(J2*G_br*10^3);\n",
+"b2 = 0;\n",
+"\n",
+"//Solving the above two equations simultaneously using matrices:\n",
+"A = [coeff1_st coeff1_br;coeff2_st coeff2_br ];\n",
+"b = [b1 ; b2];\n",
+"T = A\b;\n",
+"\n",
+"T_st = T(1);\n",
+"T_br = T(2);\n",
+"\n",
+"shear_br_max = (T_br*10^3*ri)/(J2); //tou = (Tr)/J\n",
+"shear_st_min = (T_st*10^3*ri)/(J1); //tou = (Tr)/J\n",
+"shear_st_max = (T_st*10^3*ro)/(J1); //tou = (Tr)/J\n",
+"\n",
+"shear_strain = shear_br_max / G_br;\n",
+"shear_strain = shear_strain;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe Torque acting on Steel = %1.2f Nm',T_st);\n",
+"printf('\nThe Torque acting on Brass = %1.2f Nm',T_br);\n",
+"printf('\nThe maximum shear stress experienced by Steel = %1.2f MPa',shear_st_max);\n",
+"printf('\nThe minimum shear stress experienced by Steel = %1.2f MPa',shear_st_min);\n",
+"printf('\nThe maximum shear stress experienced by Brass = %1.2f MPa',shear_br_max);\n",
+"printf('\nThe shear strain at the interface = %1.5f *10^-3 rad',shear_strain);\n",
+"\n",
+"\n",
+"//--------------------------------------------------------END-------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: T13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.13 : ')\n",
+"\n",
+"//Given:\n",
+" l = 1.2; //m\n",
+" a = 40; //mm\n",
+" tou_allow = 56; //MPa\n",
+" phi_allow = 0.02; //rad\n",
+" G = 26; //GPa\n",
+" alpha = (60*%pi)/180; //degrees\n",
+" \n",
+" //Calculations:\n",
+" T_shear1 = (tou_allow*a^3)/(20*1000); // allowable shear stress = (20T)/(a^3)\n",
+" T_twist1 = (phi_allow*a^4*G*10^3)/(46*l*10^6); //angle of twist =(46TL)/(a^4*G)\n",
+" \n",
+" T1 = min(T_shear1, T_twist1);\n",
+" \n",
+"//Circular Cross Section:\n",
+"c_ = (a*a*sin(alpha))/(%pi*2);\n",
+"c = sqrt(c_);\n",
+"\n",
+"J = (%pi/2)*(c^4);\n",
+"T_shear2 = (tou_allow*J)/(c*1000);\n",
+"T_twist2 = (phi_allow*J*G*10^3)/(l*10^6);\n",
+"\n",
+" T2 = min(T_shear2, T_twist2);\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe largest torque that can be applied at the end of the triangular shaft = %1.2f Nm',T1);\n",
+"printf('\nThe largest torque that can be applied at the end of the circular shaft = %1.2f Nm',T2);\n",
+"\n",
+"\n",
+"//------------------------------------------------------------------------------END------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: T15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.15 : ')\n",
+"\n",
+"//Given:\n",
+"l_cd = 0.5; //m\n",
+"l_de = 1.5; //m\n",
+"h =60/1000; //m\n",
+"w = 40/1000; //m\n",
+"t_h = 3/1000; //m\n",
+"t_w = 5/1000; //m\n",
+"T_c = 60; //Nm\n",
+"T_d = 25; //Nm\n",
+"G = 38*10^9; //N/m^2\n",
+"T1 = T_c - T_d;\n",
+"\n",
+"//Average Shear Stress:\n",
+"area = (w-t_w)*(h-t_h);\n",
+"\n",
+"shear_a = T1/(2*t_w*area*10^6);\n",
+"shear_b = T1/(2*t_h*area*10^6);\n",
+"\n",
+"//Angle of Twist:\n",
+"\n",
+"ds_t = 2*(((w-t_w)/t_h)+((h-t_h)/t_w));\n",
+"T = [T_c T1];\n",
+"l = [l_cd l_de];\n",
+"phi = 0;\n",
+"\n",
+"for i = 1:2\n",
+" phi = phi+ (T(i)*l(i)*ds_t)/(4*area^2*G);\n",
+" \n",
+"end\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe average shear stress of the tube at A = %1.2f MPa',shear_a);\n",
+"printf('\nThe average shear stress of the tube at B = %1.2f MPa',shear_b);\n",
+"printf('\nThe angle of twist of end C = %1.6f rad',phi);\n",
+"\n",
+"//----------------------------------------------------------------------------END-------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: T16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.16 : ')\n",
+"\n",
+"//Given:\n",
+"T = 85; //Nm\n",
+"G = 26; //GPa\n",
+"t = 10; //mm thickness\n",
+"a = 60; //mm side\n",
+"l = 1.5; //m\n",
+"\n",
+"//Average Shear Stress:\n",
+"area_m = (a-t)*(a-t);\n",
+"avg_shear = (T*10^3)/(2*t*area_m); //tou_avg = T/(2tarea_m);\n",
+"\n",
+"\n",
+"//Angle of Twist:\n",
+"ds_t = (4*(a-t))/t;\n",
+"phi = (T*10^3*l*10^3*ds_t)/(4*(area_m^2)*G*10^3);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe average shear stress in the tube at A = %1.1f N/mm^2',avg_shear);\n",
+"printf('\nThe angle of twist due to loading = %1.5f rad',phi);\n",
+"\n",
+"//------------------------------------------------------------------END------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: T17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.17 : ')\n",
+"\n",
+"//Given:\n",
+"tou_allow = 90; //MPa\n",
+"phi_allow = 2*10^-3; //rad\n",
+"a = 200; //mm side\n",
+"angle = (60*%pi)/180;\n",
+"h = a*sin(angle);\n",
+"l = 3; //m\n",
+"t = 5/1000; //m\n",
+"G = 75*10^9; //N/mm^2\n",
+"\n",
+"//Calculations:\n",
+"area_m = 0.5*a*h*10^-6;//m^2 a = (1/2)bh\n",
+"ds_t = (3*a)/(t*1000);\n",
+"\n",
+"T_shear = (tou_allow*10^6*2*t*area_m); //tou_avg = T/(2tarea_m);\n",
+"\n",
+"T_twist = (phi_allow*4*area_m^2*G)/(l*ds_t);\n",
+"\n",
+" T = min(T_shear, T_twist);\n",
+" \n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum torque that the thin tube can be subjected to = %1.1f Nm',T);\n",
+"\n",
+"//----------------------------------------------------------------END------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: T18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.18 : ')\n",
+"\n",
+"//Given:\n",
+"fillet_r = 6; //mm\n",
+"D = 40/1000; //m\n",
+"d = 20/1000; //m\n",
+"T = 30; //Nm\n",
+"D_d = D/d; \n",
+"r_d = fillet_r/d; \n",
+"k = 1.3;\n",
+"\n",
+"//Maximum Shear Stress:\n",
+"c = D/2;\n",
+"J = (%pi/2)*(c^4)\n",
+"max_shear = (k*T*c)/(J*10^6); // tou = K(Tc/J)\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum shear stress in the shaft due to the applied torques = %1.2f MPa',max_shear);\n",
+"\n",
+"//----------------------------------------------------------------END------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: T19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.19 : ')\n",
+"\n",
+"//Given:\n",
+"ro = 50/1000; //m\n",
+"ri = 30/1000; //m\n",
+"c = ro;\n",
+"shear = 20*10^6; //N/m^2\n",
+"\n",
+"//Maximum Elastic Torque:\n",
+"J = (%pi/2)*((ro^4)-(ri^4));\n",
+"T_y = (shear*J)/c; // tou = Tc/J\n",
+"T_y = T_y/1000; //in kN\n",
+"\n",
+"//Plastic Torque:\n",
+"x0 = 0.03;\n",
+"x1 = 0.05;\n",
+"I = integrate('rho^2','rho',x0,x1)\n",
+"Tp = (2*%pi*I*shear);\n",
+"Tp= Tp/1000;\n",
+"\n",
+"//Outer Shear Strain:\n",
+"strain = (0.286*10^-3*ro)/(ri);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum torque that can be applied to the shaft without causing the material to yield = %1.2f kNm',T_y);\n",
+"printf('\nThe plastic torque that can be applied to the shaft = %1.2f kNm',Tp);\n",
+"printf('\nThe minimum shear strain at the outer radius of the shaft = %1.7f rad',strain);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------END------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: T1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.1 : ')\n",
+"\n",
+"//Given:\n",
+"r = 50; //mm\n",
+"J = (%pi/2)*(r^4); //polar moment of inertia\n",
+"tou_max = 56; //MPa\n",
+"T = (tou_max*J)/(r*10^6); //toumax = Tc/J\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe resultant internal torque = %1.0f kNm',T);\n",
+"\n",
+"//-----------------------------------------------------------------END-------------------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: T20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.19 : ')\n",
+"\n",
+"//Given:\n",
+"r = 20/1000; //m\n",
+"l = 1.5; //m\n",
+"phi = 0.6; //rad\n",
+"shear_y = 75*10^6; //N/m^2\n",
+"\n",
+"//Calculations:\n",
+"max_shear_strain = (phi*r)/(l); //phi = (strain*L)/r\n",
+"strain_y = 0.0016;\n",
+"\n",
+"r_y = (r*strain_y)/(max_shear_strain); //by ratios\n",
+"\n",
+"//T= (%pi*shear_y)*(4c^3 - r_y^3)/6;\n",
+"c = r;\n",
+"\n",
+"T = (%pi*shear_y)*(4*c^3 - r_y^3)/6;\n",
+"T = T/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe torque needed to twist the shaft by 0.6 rad = %1.2f kNm',T);\n",
+"\n",
+"//----------------------------------------------------------------END------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: T21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.21 : ')\n",
+"\n",
+"//Given:\n",
+"l = 1.5; //m\n",
+"G = 42*10^3; //GPa\n",
+"co = 50; //mm\n",
+"ci = 25;//mm\n",
+"shear_y = 84; //N/mm^2\n",
+"strain_y = 0.002; //rad\n",
+"\n",
+"//Plastic Torque:\n",
+"T_p = ((2*%pi)*(co^3 - ci^3)*shear_y)/3;\n",
+"phi_p = (strain_y*l*10^3)/ci;\n",
+"\n",
+"J = (%pi/2)*(co^4 - ci^4);\n",
+"shear_r = (T_p*co)/J;\n",
+"shear_i = (shear_r*ci)/(co);// shear = Tc/J\n",
+"\n",
+"G = shear_y/strain_y; \n",
+"\n",
+"phi_dash = (T_p*l*10^3)/(J*G); //phi = TpL/JG;\n",
+"\n",
+"phi = phi_p - phi_dash;\n",
+"T_p = T_p/10^6;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe plastic torque Tp = %1.2f x 10^6 Nmm',T_p);\n",
+"printf('\nThe permanent twist of the tube if Tp is removed = %1.5f rad',phi);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------END------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: T3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.3 : ')\n",
+"\n",
+"//Given:\n",
+"T1 = 4250; //kNmm\n",
+"T2 = -3000; //kNm\n",
+"T3 = T1+T2; //kNm\n",
+"r = 75; //mm\n",
+"\n",
+"//Section Property:\n",
+"J = (%pi/2)*(r^4); //polar moment of inertia\n",
+"\n",
+"//Shear Stress:\n",
+"c_a = 75; //mm\n",
+"tou_a = (T3*c_a*1000)/J; //tou = Tc/J\n",
+"\n",
+"c_b = 15; //mm\n",
+"tou_b = (T3*c_b*1000)/J; //tou = Tc/J\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe shear stress developed at A = %1.2f MPa',tou_a);\n",
+"printf('\nThe shear stress developed at B = %1.3f MPa',tou_b);\n",
+"\n",
+"//--------------------------------------------------------------------------------------END-------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: T4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.4 : ')\n",
+"\n",
+"//Given:\n",
+"di = 80; //mm\n",
+"ri = 40/1000; //m\n",
+"d0 = 100; //mm\n",
+"ro = d0/2000; //m\n",
+"F = 80; //N\n",
+"l1 = 0.2; //m\n",
+"l2 = 0.3; //m\n",
+"\n",
+"//Internal Torque:\n",
+"T = F*(l1+l2);\n",
+"\n",
+"//Section Property:\n",
+"J = (%pi/2)*((ro^4)-(ri^4));\n",
+"\n",
+"//Shear Stress:\n",
+"c_o = 0.05;//m\n",
+"tou_o = (T*c_o)/(J*10^6);\n",
+"\n",
+"c_i = 0.04; //m\n",
+"tou_i = (T*c_i)/(J*10^6);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe shear stress in the inner wall = %1.3f MPa',tou_i);\n",
+"printf('\nThe shear stress in the outer wall = %1.3f MPa',tou_o);\n",
+"\n",
+"\n",
+"//---------------------------------------------------------------------END-------------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: T5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.5 : ')\n",
+"\n",
+"//Given:\n",
+"P = 3750; //W\n",
+"N = 175; //rpm\n",
+"allow_shear = 100; //MPa\n",
+"\n",
+"//Calculations:\n",
+"ang_vel = (2*%pi*N)/60; // rad/s\n",
+"T = P/ang_vel; //P = T*angular velocity\n",
+"\n",
+"c = ((2*T*1000)/(%pi*allow_shear))^(1/3);\n",
+"d = round(2*c);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe required diameter of the shaft = %1.0f mm',d);\n",
+"\n",
+"//------------------------------------------------------------------END------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: T6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.6 : ')\n",
+"\n",
+"//Given:\n",
+"di = 30; //mm\n",
+"ri= (di/2000); //m\n",
+"d0 = 42; //mm\n",
+"ro = (d0/2000); //m\n",
+"P = 90; //kW\n",
+"max_shear = 50; //MPa\n",
+"\n",
+"//Calculations:\n",
+"c = ro; //m\n",
+"J = (%pi/2)*((ro^4)-(ri^4)); //Polar moment of inertia of hollow shaft\n",
+"T = (max_shear*J)/c; //tou max = Tc/J\n",
+"\n",
+"//P = 2(%pi)fT\n",
+"f = (P)/(2*%pi*T*10^3);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe required frequency of rotation of the shaft = %1.1f Hz',f);\n",
+"\n",
+"//---------------------------------------------------------------------------END------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: T7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.7 : ')\n",
+"\n",
+"//Given:\n",
+"E = 80*10^3; //MPa\n",
+"d = 14/1000; //m\n",
+"r = d/2; //m\n",
+"R = 100; //mm\n",
+"l_ac = 0.4; //m\n",
+"l_cd = 0.3; //m\n",
+"l_de = 0.5; //m\n",
+"T_c = 280;//Nm\n",
+"T_a = 150; //Nm\n",
+"T_d = 40; //Nm\n",
+"T_ac = T_a; //Nm\n",
+"T_cd = T_ac - T_c; \n",
+"T_de = T_cd - T_d;\n",
+"\n",
+"//Angle of Twist:\n",
+"J = (%pi/2)*(r^4);\n",
+"\n",
+"T = [T_ac T_cd T_de];\n",
+"l = [l_ac l_cd l_de];\n",
+"\n",
+"sumTwist = 0;\n",
+"\n",
+"for i= 1:3\n",
+" sumTwist = sumTwist+ ((T(i)*l(i))/(J*E*10^6));\n",
+"end\n",
+"\n",
+"displacement = - sumTwist*R;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe angle of twist of the shaft = %1.3f rad',sumTwist);\n",
+"printf('\nThe displacement of tooth P on gear A = %1.1f mm',displacement);\n",
+"\n",
+"//---------------------------------------------------------------------END------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: T8.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.8 : ')\n",
+"\n",
+"//Given:\n",
+"T = 45; //N\n",
+"G = 80; //GPa\n",
+"d = 20/1000; //m\n",
+"r = d/2; //m\n",
+"l_dc = 1.5; //m\n",
+"l_ab = 2; //m\n",
+"r1 = 75/1000; //m\n",
+"r2 = 150/1000; //m\n",
+"\n",
+"//Internal Torque:\n",
+"F = T/r2;\n",
+"T_d_x = F*r1;\n",
+"\n",
+"//Angle of twist:\n",
+"J = (%pi/2)*(r^4);\n",
+"phi_c = (T*l_dc)/(2*J*G*10^9);\n",
+"phi_b = (phi_c*r1)/r2;\n",
+"\n",
+"phi_ab = (T*l_ab)/(J*G*10^9);\n",
+"\n",
+"phi_a = phi_b + phi_ab;\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe angle of twist of end A of shaft AB = + %1.4f rad',phi_a);\n",
+"\n",
+"//----------------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: T9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 5.9 : ')\n",
+"\n",
+"//Given:\n",
+"d = 50; //mm\n",
+"r = d/2;\n",
+"c = d/2;\n",
+"l_buried = 600; //mm\n",
+"G = 40*10^3; //MPa\n",
+"F = 100; //N\n",
+"l_handle= 150; //mm\n",
+"l_ab = 900; //mm\n",
+"\n",
+"//Internal Torque:\n",
+"T_ab = F*2*l_handle;\n",
+"t = T_ab/l_buried;\n",
+"\n",
+"//Maximum Shear Stress:\n",
+"J = (%pi/2)*(r^4);\n",
+"tou_max = (T_ab*c)/(J);\n",
+"\n",
+"//Angle of Twist:\n",
+"\n",
+"x0=0;\n",
+"x1=l_buried;\n",
+"X=integrate('x','x',x0,x1);\n",
+"\n",
+"phi_a = ((T_ab*l_ab)+(50*X))/(J*G); \n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum shear stress in the post = %1.2f N/mm^2',tou_max);\n",
+"printf('\nThe angle of twist at the top of the post = %1.5f rad',phi_a);\n",
+"\n",
+"//---------------------------------------------------------------------------END----------------------------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb
new file mode 100644
index 0000000..78011e0
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb
@@ -0,0 +1,1099 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Bending"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: B11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.11 : ')\n",
+"\n",
+"//Given:\n",
+"l = 4.5; //m\n",
+"R1 = 1.5; //kN\n",
+"R2 = 3; //kN\n",
+"uvl = 2; //kN/m\n",
+"\n",
+"//Shear diagram:\n",
+"x = sqrt((2*R1*l)/(uvl));\n",
+"M = (R1*x) - (0.5*uvl*x^3)/(3*l);\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nV becomes zero at x = %1.1fm',x);\n",
+" printf('\nThe magnitude of the maximum moment = %1.1f kNm',M);\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: B13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.13 : ')\n",
+"\n",
+"//Given:\n",
+"l_ab = 4; //m\n",
+"l_cd = 4; //m\n",
+"l_bc = 6; //m\n",
+"Rb = 8; //kN\n",
+"uvl = 2; //kN/m\n",
+"\n",
+"//Moment diagram:\n",
+"p = [-1/18 0 -3.6 17.6]\n",
+"x = roots(p)\n",
+"y = x(3);\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nV becomes zero at x = %1.2f m',y);\n",
+"\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: B14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.14 : ')\n",
+"\n",
+"//Given:\n",
+"b = 60; //mm\n",
+"h = 120; //mm\n",
+"sigma_max = 20; //N/mm^2\n",
+"c = b;\n",
+"\n",
+"//Part (a):\n",
+"I = (1/12)*b*h^3;\n",
+"M1 = (sigma_max*I)/(c); //sigma_max = Mc/I Flexure Formula\n",
+"M1 = M1*10^-6; //in kN/m\n",
+"\n",
+"//Part (b):\n",
+"y0=60;\n",
+"y1=-60\n",
+"\n",
+"M2 = integrate('-(20*y^2)','y',y0,y1);\n",
+"M2 = M2*10^-6;\n",
+"\n",
+"F = (0.5*sigma_max*b*b);\n",
+"c = 2*(60 -(0.5*b)); //distance between centroids of both the volumes.\n",
+"M = F*c/1000;\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe internal moment M calculated using : ');\n",
+" printf('\na)The flexure formula = %1.2f kNm',M1);\n",
+" printf('\nb)The resultant of the stress distribution using the basic principles = %1.2f kNm',M2);\n",
+"\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: B15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.15 : ')\n",
+"\n",
+"//Given:\n",
+"udl = 5; //kN/m\n",
+"l1 = 3;//m\n",
+"l2 = 6; //m\n",
+"t = 20/1000; //mm\n",
+"yb = 0.15;//m\n",
+"\n",
+"//Section Property:\n",
+"I_bar1 = (1/12)*(0.25)*(0.02^3);\n",
+"Ad2 = (0.25)*(0.02)*(yb+(t/2))^2;\n",
+"I_bar2 = (1/12)*(0.02)*(0.3^3);\n",
+"I = 2*(I_bar1 + Ad2) + I_bar2;\n",
+"\n",
+"//Bending stress:\n",
+"c = 0.15 + t;\n",
+"M= 22.5; //kNm\n",
+"\n",
+"sigma_max = (M*c)/(I*1000);\n",
+"\n",
+"sigma_B = (M*yb)/(I*1000);\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe absolute maximum bending stress is = %1.1f MPa',sigma_max);\n",
+"\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: B16.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.16 : ')\n",
+"\n",
+"//Given:\n",
+"t1 = 15/1000; //m\n",
+"t2 = 20/1000; //m\n",
+"l = 250/1000; //m\n",
+"b = 200/1000; //m\n",
+"P = 2.4; //kN\n",
+"l_a = 2; //m\n",
+"l_b = 1; //m\n",
+"\n",
+"//Internal Moment:\n",
+"y1 = b/2;\n",
+"y2 = t2/2;\n",
+"A = (2*t1*b)+(t2*l);\n",
+"y_bar = ((2*y1*t1*b)+(y2*t2*l))/A;\n",
+"\n",
+"M = (P*l_a)+(1*y_bar);\n",
+"\n",
+"//Section Property:\n",
+"I1 = (1/12)*(l*t2^3) + (l*t2*(y_bar - y2)^2);\n",
+"I2 = (1/12)*(t1*b^3) + (t1*b*(y1 - y_bar)^2);\n",
+"I =I1+ 2*I2;\n",
+"\n",
+"//Maximum Bending Stress:\n",
+"c = b - y_bar;\n",
+"sigma_max = (M*c)/(I*1000);\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe maximum bending stress at section a-a = %1.1f MPa',sigma_max);\n",
+"\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.17: B17.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.17 : ')\n",
+"\n",
+"//Given:\n",
+"b = 60/1000; //m\n",
+"h = 30/1000; //m\n",
+"M = 40; //Nm\n",
+"c1= h/2;\n",
+"rib_t = 5/1000; //m\n",
+"rib_w = 10/1000;//m\n",
+"\n",
+"//Without Ribs:\n",
+"I1 = (1/12)*(b*h^3);\n",
+"sigma_max1 = (M*c1)/(I1*10^6);\n",
+"\n",
+"//With Ribs:\n",
+"y1 = c1;\n",
+"y2 = h+(rib_t/2);\n",
+"A1 = h*b;\n",
+"A2 = rib_t*rib_w;\n",
+"y_bar = ((y1*A1)+2*(y2*A2))/(A1 + 2*A2);\n",
+"\n",
+"c2 = h+rib_t - y_bar;\n",
+"I2 = I1 + (b*h*(y_bar - y1)^2);\n",
+"I3 = (1/12)*rib_w*rib_t^3 + (rib_w*rib_t*(y2 - y_bar)^2);\n",
+"I = I2 + 2*I3;\n",
+"\n",
+"sigma_max2 = (M*c2)/(I*10^6);\n",
+"\n",
+"if(sigma_max2>sigma_max1)\n",
+" \n",
+" printf('\n\nThe maximum normal stress in the member without ribs = %1.2f MPa',sigma_max1);\n",
+" printf('\nThe maximum normal stress in the member with ribs = %1.2f MPa',sigma_max2);\n",
+" printf('\nThe ribs should be omitted.');\n",
+" \n",
+" end\n",
+"\n",
+" \n",
+"//-----------------------------------------------------------------END--------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: B18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.18 : ')\n",
+"\n",
+"//Given:\n",
+"M = 12; //kNm\n",
+"l_bc = 0.2; //m\n",
+"l_be = 0.4; //m\n",
+"\n",
+"//Internal Moment Components:\n",
+"My = (-4/5)*M;\n",
+"Mz = (3/5)*M;\n",
+"\n",
+"Iy = (1/12)*(l_be*l_bc^3);\n",
+"Iz = (1/12)*(l_bc*l_be^3); \n",
+"\n",
+"//Bending Stress:\n",
+"sigma_B = (-Mz*1000*(l_be/2))/Iz + (My*1000*(-l_bc/2))/Iy;\n",
+"sigma_B = sigma_B/10^6;\n",
+"sigma_C = (-Mz*1000*(l_be/2))/Iz + (My*1000*(l_bc/2))/Iy;\n",
+"sigma_C = sigma_C/10^6;\n",
+"sigma_D = (-Mz*1000*(-l_be/2))/Iz + (My*1000*(l_bc/2))/Iy;\n",
+"sigma_D = sigma_D/10^6;\n",
+"sigma_E = (-Mz*1000*(-l_be/2))/Iz + (My*1000*(-l_bc/2))/Iy;\n",
+"sigma_E = sigma_E/10^6;\n",
+"\n",
+"//Orientation of Nuetral Axis:\n",
+"z = (0.45)/(sigma_E + sigma_B);\n",
+"\n",
+"//theta = -atan(4/3);\n",
+"tanA = (Iz/Iy)*(-4/3);\n",
+"alpha = atan(tanA);\n",
+"alpha = alpha*(180/%pi);\n",
+"\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe normal stress at B = %1.2f MPa',sigma_B);\n",
+" printf('\nThe normal stress at C = %1.2f MPa',sigma_C);\n",
+" printf('\nThe normal stress at D = %1.2f MPa',sigma_D);\n",
+" printf('\nThe normal stress at E = %1.2f MPa',sigma_E);\n",
+" printf('\nThe orientation of the nuetral axis = %1.1f degrees',alpha);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: B19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.19 : ')\n",
+"\n",
+"//Given:\n",
+"theta = 30*(%pi/180);\n",
+"M = 15; //kNm\n",
+"My = M*cos(theta); \n",
+"Mz = M*sin(theta); \n",
+"b = 0.1; //m\n",
+"t1 = 0.04;//m\n",
+"t2 = 0.03;//m\n",
+"\n",
+"\n",
+"//Section Properties:\n",
+"y1 = b/2;\n",
+"y2 = b + t2/2;\n",
+"A1 = (b*t1);\n",
+"A2 = (b*2*t2);\n",
+"z_bar = (y1*A1 + y2*A2)/(A1+A2);\n",
+"\n",
+"Iz = (1/12)*(b*t1^3) + (1/12)*(t2*(2*b)^3);\n",
+"Iy = (1/12)*(t1*b^3) + b*t1*(z_bar - y1)^2 + (1/12)*(2*b*t2^3) + 2*b*t2*(y2 - z_bar)^2;\n",
+"\n",
+"//Maximum Bending Stress:\n",
+"l_b = b+t2 - z_bar;\n",
+"sigma_B = (-Mz*1000*(-b))/Iz + (My*1000*(l_b))/Iy;\n",
+"sigma_B = sigma_B/10^6;\n",
+"sigma_C = (-Mz*1000*(t1/2))/Iz + (My*1000*(-z_bar))/Iy;\n",
+"sigma_C = sigma_C/10^6;\n",
+"\n",
+"sigma = max(abs(sigma_B),abs(sigma_C));\n",
+"\n",
+"//Orientation of the nuetral axis:\n",
+"theta1 = 60*(%pi/180);\n",
+"alpha = atan((Iz/Iy)*tan(theta1));\n",
+"alpha = alpha*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe maximum normal stress in the beam = %1.2f MPa',sigma);\n",
+" printf('\n The orientation of the nuetral axis = %1.1f degrees',alpha);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.20: B20.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.20 : ')\n",
+"\n",
+"//Given:\n",
+"M =20; //kN\n",
+"Iy = 0.96*10^-3; //m^4\n",
+"Iz = 7.54*10^-3; //m^4\n",
+"theta = 57.1*(%pi/180);\n",
+"\n",
+"\n",
+"//Internal moment Components:\n",
+"My = M*sin(theta); \n",
+"Mz = M*cos(theta); \n",
+"\n",
+"//Bending Stress:\n",
+"y_p = -0.2; //y Coordinate of P\n",
+"z_p = 0.35; //z Coordinate of P\n",
+"\n",
+"theta1 = (%pi/2)-(theta);\n",
+"yp = -z_p*sin(theta1)+ y_p*cos(theta1);\n",
+"zp = z_p*cos(theta1) + y_p*sin(theta1);\n",
+"\n",
+"//Eq 6-17\n",
+"\n",
+"sigma_p = ((Mz*-yp)/Iz) + ((My*zp)/Iy) ;\n",
+"sigma_p = sigma_p/10^3;\n",
+"\n",
+"//Orientation of the Nuetral Axis:\n",
+"alpha = atan((Iz/Iy)*tan(theta));\n",
+"alpha = alpha*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe maximum normal stress at point P = %1.2f MPa',sigma_p);\n",
+" printf('\nThe orientation of the nuetral axis = %1.1f degrees',alpha);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21: B21.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.21 : ')\n",
+"\n",
+"//Given:\n",
+"M = 2; //kNm\n",
+"Ew = 12; //GPa\n",
+"Est = 200; //GPa\n",
+"bw = 150/1000; //m\n",
+"t = 20/1000; //m\n",
+"rib = 9/1000;//m\n",
+"\n",
+"//Section Properties:\n",
+"n = (Ew/Est);\n",
+"bst = n*bw;\n",
+"\n",
+"y1 = t/2;\n",
+"A1 = t*bw;\n",
+"y2 = bw/2 + t;\n",
+"A2 = rib*bw;\n",
+"\n",
+"y_bar = (y1*A1 +y2*A2)/(A1+A2);\n",
+"\n",
+"I1 = (1/12)*(bw)*(t^3) + A1*(y_bar - y1)^2;\n",
+"I2 = (1/12)*(rib)*(bw^3) + A2*(y2-y_bar)^2;\n",
+"Ina = I1+I2;\n",
+"\n",
+"//Normal Stress:\n",
+"sigma_B = (M*(bw+t-y_bar))/(Ina*1000);\n",
+"sigma_C = (M*(y_bar))/(Ina*1000);\n",
+"\n",
+"//Normal Stress in the wood:\n",
+"sigmaB = n*sigma_B;\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe normal stress at point B = %1.1f MPa',sigma_B);\n",
+" printf('\nThe normal stress at point C = %1.2f MPa',sigma_C);\n",
+" printf('\nThe normal stress at point B in the wood = %1.2f MPa',sigmaB);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22: B22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.22 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_allow_st = 168; //MPa\n",
+"sigma_allow_w = 21; //MPa\n",
+"Est = 200; //GPa\n",
+"Ew = 12; //GPa\n",
+"Iz = 7.93*10^6; //mm^4\n",
+"A1 = 5493.75; //mm^2\n",
+"t = 5; //mm\n",
+"h = 100; //mm\n",
+"\n",
+"//Without Board:\n",
+"c = h+t;\n",
+"M1 = (sigma_allow_st*Iz)/(c*10^6);\n",
+"\n",
+"//With Board:\n",
+"bw = 300;//mm\n",
+"n = (Ew/Est); \n",
+"bst = n*bw;\n",
+"\n",
+"//For the transformed section:\n",
+"y1 = 0;\n",
+"y2 = 55;\n",
+"A2 = bst*h;\n",
+"\n",
+"y_bar = (y1*A1 + y2*A2)/(A1+A2);\n",
+"\n",
+"I1 = Iz + A1*y_bar^2;\n",
+"I2 = (1/12)*(bst*h^3) + (A2*(y2-y_bar)^2);\n",
+"I = I1+I2;\n",
+"\n",
+"c = c+y_bar;\n",
+"M2 = (sigma_allow_st*I)/(c*10^6);\n",
+"\n",
+"cw = c - y_bar;\n",
+"Mw = (sigma_allow_w*I)/(n*cw*10^6);\n",
+"\n",
+"M = min(Mw,M2);\n",
+"\n",
+"//Display:\n",
+"\n",
+" printf('\n\nThe maximum bending moment without re-inforcement = %1.3f kNm',M1);\n",
+" printf('\nThe maximum bending moment with re-inforcement = %1.2f kNm',M);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.23: B23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.23 : ')\n",
+"\n",
+"//Given:\n",
+"M = 60; //kNm\n",
+"Est = 200; //GPa\n",
+"Econc = 25; //GPa\n",
+"d = 25;//mm\n",
+"r = d/2;\n",
+"w = 300;//mm\n",
+"ht =400; //mm\n",
+"\n",
+"//Section Properties:\n",
+"n = Est/Econc;\n",
+"Ast = 2*%pi*r^2;\n",
+"A = n*Ast;\n",
+"\n",
+"p = [1 52.37 -20949.33]\n",
+"h = roots(p)\n",
+"h = h(2);\n",
+"\n",
+"I = (1/12)*(w*h^3) +w*h*(h/2)^2 + A*(ht - h)^2;\n",
+"\n",
+"//Normal Stress:\n",
+"sigma_conc_max = (M*1000*h*1000)/(I);\n",
+"sigma_conc = (M*1000*(ht-h)*1000)/(I);\n",
+"sigma_st = n*sigma_conc;\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe normal stress in each steel reinforcing rod = %1.2f MPa',sigma_st);\n",
+" printf('\nThe maximum normal stress in the concrete = %1.2f MPa',sigma_conc_max);\n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24: B24.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.24 : ')\n",
+"\n",
+"//Given:\n",
+"sigma = 140; //Mpa\n",
+"ri = 90; //mm\n",
+"ro = 110; //mm\n",
+"a = 20; //mm\n",
+"\n",
+"//Section Properties:\n",
+" \n",
+"y = integrate('a*(1/r)','r',ri,ro)\n",
+"R = (a*a)/y;\n",
+"\n",
+"r_avg = (ri+ro)/2;\n",
+"M1 = (-sigma*a*a*ro*(r_avg - R))/(R-ro);\n",
+"M1 = M1*10^-6;\n",
+"\n",
+"M2 = (sigma*a*a*ri*(r_avg - R))/(R-ri);\n",
+"M2 = M2*10^-6;\n",
+"\n",
+"M = min(M1,M2);\n",
+"\n",
+"sigma1 = (M*(R - ro))/(a*a*ro*(r_avg - R));\n",
+"\n",
+"//For a straight Bar:\n",
+"I = (1/12)*(a*a^3);\n",
+"c = 10; //mm\n",
+"M_strt= (sigma*I)/c;\n",
+"M_strt = M_strt*10^-6;\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe maximum bending moment that can be applied to the bar = %1.3f kNm',M);\n",
+" printf('\nThe maximum bending moment that can be applied to a straight bar = %1.3f kNm',M_strt);\n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.25: B25.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.25 : ')\n",
+"\n",
+"//Given:\n",
+"ri = 200/1000; //m\n",
+"r1 = 250/1000; //m\n",
+"ro = 280/1000; //m\n",
+"M = 4; //kNm\n",
+"a = 0.05; //m\n",
+"h = 0.03; //m\n",
+"\n",
+"//Section Properties:\n",
+"A1 = a^2 ;\n",
+"A2 = (0.5*a*h);\n",
+"A = A1+A2;\n",
+"r_avg1 = (r1+ri)/2;\n",
+"r_avg2 = r1+(h/3);\n",
+"r_bar =((r_avg1*A1)+(r_avg2*A2))/A;\n",
+"\n",
+"int_dA_r1 = a*log(r1/ri);\n",
+"int_dA_r2 = (a*ro*log(ro/r1))/(ro-r1) - a;\n",
+"R = (A)/(int_dA_r1+ int_dA_r2);\n",
+"k= r_bar - R;\n",
+"\n",
+"//Normal Stress:\n",
+"sigma_B = (-M*(R-ri))/(A*ri*k*1000);\n",
+"sigma_A = (-M*(R-ro))/(A*ro*k*1000);\n",
+"\n",
+"sigma = max(abs(sigma_B),abs(sigma_A))\n",
+"\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe maximum normal stress in the bar = %1.0f MPa',sigma);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.26: B26.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.26 : ')\n",
+"\n",
+"//Given:\n",
+"M = 5; //kNm\n",
+"sigma_y = 500; //MPa\n",
+"r = 16; //mm\n",
+"h = 80; //mm\n",
+"w = 120; //mm\n",
+"r_h = r/h;\n",
+"w_h = w/h;\n",
+"k = 1.45; \n",
+"c = h/(2000);\n",
+"t = 20/1000; //m\n",
+"\n",
+"//Calculations:\n",
+"I = (1/12)*(t)*(h/1000)^3\n",
+"sigma_max = (k*M*c)/(I*1000);\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe maximum normal stress in the steel = %1.0f MPa',sigma_max);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.27: B27.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.27 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_y = 250; //MPa\n",
+"t = 12.5; //mm\n",
+"w = 200; //mm\n",
+"h = 225; //mm\n",
+"\n",
+"//Maximum Elastic Moment:\n",
+"yy = (h+t)/2;\n",
+"I1 = (1/12)*(w*t^3) + (w*t*yy^2);\n",
+"I = (1/12)*(t*h^3) + 2*(I1);\n",
+"c = 125; //mm\n",
+"\n",
+"My = (sigma_y*I)/(c); //Flexure Formula\n",
+"\n",
+"//Plastic Moment:\n",
+"C1= sigma_y*t*(h/2);\n",
+"C2= sigma_y*t*(w);\n",
+"Mp = (2*56.25*C1) + (2*yy*C2);\n",
+"\n",
+"//Shape Factor:\n",
+"k = Mp/My;\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe shape factor for the beam = %1.2f ',k);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.28: B28.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.28 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_y = 250; //MPa\n",
+"t = 15/1000; //m\n",
+"w = 100/1000; //m\n",
+"h = 120/1000; //m\n",
+"c = 10/1000; //m\n",
+"\n",
+"//Calculations:\n",
+"d = ((sigma_y*t*w)+(sigma_y*t*h))/(sigma_y*t*2);\n",
+"\n",
+"T = sigma_y*t*d*10^3;\n",
+"C1 = sigma_y*t*c*10^3;\n",
+"C2 = sigma_y*t*w*10^3;\n",
+"\n",
+"Mp = (T*d/2)+(C1*c/2)+(C2*(c+t/2));\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe plastic moment that can be resisted by the beam = %1.1f kNm',Mp);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.29: B29.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.29 : ')\n",
+"\n",
+"//Given:\n",
+"ep1 = 0.01;\n",
+"ep2 = 0.05;\n",
+"sig1 = 1050;//N/mm^2\n",
+"sig2 = 1330;//N/mm^2\n",
+"sig3 = 280; //N/mm^2\n",
+"y = 0.3; //cm\n",
+"h = 3; //cm\n",
+"w = 2; //cm\n",
+"\n",
+"//Calculations:\n",
+"yy = (h/2)-y\n",
+"T1 = (1/2)*(sig3*yy*w);\n",
+"y1 = y +(2/3)*(yy);\n",
+"T2 = yy*sig1*w;\n",
+"y2 = y+(0.5*yy);\n",
+"T3 = (0.5*y*sig1*w);\n",
+"y3 = (2/3)*(y);\n",
+"\n",
+"M = 2*(T1*y1 + T2*y2 + T3*y3);\n",
+"M = M/1000;\n",
+"\n",
+"//Display:\n",
+"\n",
+" \n",
+" printf('\n\nThe bending moment applied that will cause a strain of 0.05mm/mm = %1.2f kNm',M);\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.30: B30.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.30 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_y = 250; //MPa\n",
+"t = 12.5; //mm\n",
+"w = 200; //mm\n",
+"h = 225; //mm\n",
+"c = (h/2)+t;\n",
+"I = 82.44*10^6;//mm^4\n",
+"Mp = 188; //kN\n",
+"\n",
+"//Calculations:\n",
+"sigma_allow = (Mp*10^6*c)/(I);\n",
+"y = (sigma_y*c)/(sigma_allow);\n",
+"\n",
+"//Display:\n",
+" \n",
+" printf('\n\nThe point of zero normal stress = %1.2f mm',y);\n",
+" printf('\nThe Residual Stress distribution is shown in the text book.');\n",
+" \n",
+" //------------------------------------------------------------------------END---------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: B5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 6.5 : ')\n",
+"\n",
+"//Shear and Moment Diagrams:\n",
+"p = [-1/9 -2 30]\n",
+"x = roots(p)\n",
+"y = (x(2));\n",
+"\n",
+" \n",
+" M = (30*y) - (y^2) - (y^3)/27;\n",
+"\n",
+"\n",
+"\n",
+"//Display:\n",
+" \n",
+"printf('\n\nThe magnitude of the maximum moment is = %1.0f kNm', M);\n",
+"printf('\nRefer to the shear and moment diagrams in the book.');\n",
+"\n",
+"\n",
+"//---------------------------------------------------------------------------END-----------------------------------------------------------------------------\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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/7-Transverse_Shear.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/7-Transverse_Shear.ipynb
new file mode 100644
index 0000000..15fabe9
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/7-Transverse_Shear.ipynb
@@ -0,0 +1,432 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Transverse Shear"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: TS1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.1 : ')\n",
+"\n",
+"//Given:\n",
+"V = 3; //kN\n",
+"h = 125; //mm\n",
+"b = 100; //mm\n",
+"y_top = 50; //mm\n",
+"x_right = 37.5; //mm\n",
+"\n",
+"//Part (a):\n",
+"\n",
+"//Section Properties:\n",
+"I = (b*h^3)/12;\n",
+"y_dash_1 = ((h-y_top)-(h/2));\n",
+"A = y_top*b;\n",
+"Q = (y_dash_1+(y_top/2))*A;\n",
+"\n",
+"//Shear Stress:\n",
+"tou_p = (V*Q)/(I*b); //tou = VQ/It\n",
+"tou_p = tou_p*10^3;\n",
+"\n",
+"//Part (b):\n",
+"\n",
+"//Section Properties:\n",
+"y_dash_2 = (y_dash_1+(y_top));\n",
+"a_dash= b*y_dash_2;\n",
+"Q_dash =(y_dash_2*a_dash)/2;\n",
+"\n",
+"//Shear Stress:\n",
+"tou_max = (V*Q_dash)/(I*b);\n",
+"tou_max = tou_max*10^3;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe shear stress in the beam at point P = %1.3f MPa',tou_p);\n",
+"printf('\nThe maximum shear stress in the beam = %1.3f MPa',tou_max);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: TS2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.2 : ')\n",
+"\n",
+"//Given:\n",
+"V = 80; //kN\n",
+"thick_1 = 20/1000; //m\n",
+"thick_2 = 15/1000; //m\n",
+"l = 300/1000; //m\n",
+"y = 100/1000; //m\n",
+"h = 2*y;\n",
+"y_dash = y +thick_1/2;\n",
+"\n",
+"//Part(a):\n",
+"\n",
+"I1 = (thick_2*(h^3))/12;\n",
+"I2 = (l*(thick_1^3))/12;\n",
+"I3 = (l*thick_1*(y_dash)^2);\n",
+"I = I1+2*(I2+I3); //Moment of inertia\n",
+"\n",
+"Q_b = y_dash*l*thick_1;\n",
+"//At B'\n",
+"tou_b_dash = (V*Q_b)/(I*l*1000);\n",
+"//At B\n",
+"tou_b = (V*Q_b)/(I*thick_2*1000);\n",
+"\n",
+"//At C:\n",
+"Q_c = (y_dash*l*thick_1)+(y*thick_2*y/2);\n",
+"tou_c = (V*Q_c)/(I*thick_2*1000);\n",
+"\n",
+"//Part(b)\n",
+"\n",
+"\n",
+"y0 = -0.1;\n",
+"y1 = 0.1;\n",
+"\n",
+"function Q =f(y),Q = ((0.735 - (7.5*y*y))*10^-3),\n",
+"endfunction\n",
+"Int =intg(y0,y1,f)\n",
+"\n",
+"V_w = (V*Int*thick_2)/(I*thick_2);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe shear stress at B dash = %1.2f MPa',tou_b_dash);\n",
+"printf('\nThe shear stress at B = %1.1f MPa',tou_b);\n",
+"printf('\nThe shear stress at C = %1.1f MPa',tou_c);\n",
+"printf('\nThe shear force resisted by the web = %1.1f kN',V_w);\n",
+"\n",
+"//------------------------------------------------------------------------END----------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: TS3.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.3 : ')\n",
+"\n",
+"//Given:\n",
+"udl = 6.5; //kN\n",
+"l_bc = 8; //m\n",
+"l = 150/1000;//m\n",
+"t = 30/1000;//m\n",
+"\n",
+"//Internal Shear:\n",
+"w = udl*l_bc/2;\n",
+"l_wc = l_bc/4;\n",
+"l_bw = l_bc - l_wc;\n",
+"V = (w*l_bw)/l_bc;\n",
+"R_b = w - V;\n",
+"\n",
+"//Section Properties:\n",
+"y1= l/2;\n",
+"A = (l*t);\n",
+"y2= l+(t/2);\n",
+"y_dash = (y1*A + y2*A)/(2*A);\n",
+"I1 = (t*l^3)/12;\n",
+"I2 = (A*(y_dash-y1)^2);\n",
+"I3 = (l*t^3)/12;\n",
+"I4 = (A*(y2 - y_dash)^2);\n",
+"I = I1+I2+I3+I4;\n",
+"\n",
+"Q = ((l+t)-(t/2)-y_dash)*A;\n",
+"\n",
+"//Shear Stress:\n",
+"tou_max = (V*Q)/(I*t*1000);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum shear stress in the glue necessary to hold the boards together = %1.2f MPa',tou_max);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: TS4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.4 : ')\n",
+"\n",
+"//Given:\n",
+"\n",
+"V = 850; //kN\n",
+"l1 =250/1000; //m\n",
+"l2 = 300/1000; //m\n",
+"l3 = 125/1000;//m\n",
+"t = 10/1000; //m\n",
+"h = 200/1000; //m\n",
+"\n",
+"A1 = l1*t;\n",
+"A2 = l2*t;\n",
+"A3 = l3*t;\n",
+"\n",
+"y1 = l2+(t/2);\n",
+"y2 = l2/2;\n",
+"y3 = h+(t/2);\n",
+"\n",
+"y_dash = (2*y2*A2 + A1*y1 + A3*y3)/(2*A2 + A1 + A3);\n",
+"\n",
+"I1 = ((l1*t^3)/12) +(A1 * (l2+(t/2)-y_dash)^2);\n",
+"I2 = ((t*l2^3)/12) +(A2 * (y_dash - (l2/2))^2);\n",
+"I3 = ((l3*t^3)/12) +(A1 * (h+(t/2)-y_dash)^2);\n",
+"I = 2*I2 + I1 + I3;\n",
+"\n",
+"Q_b = (l2+(t/2) - y_dash)*A1; //Q = y'A'\n",
+"Q_c = (h+(t/2) - y_dash)*A3; //Q = y'A'\n",
+"\n",
+"//Shear Flow:\n",
+"\n",
+"q_b = (V*Q_b)/I;\n",
+"q_c = (V*Q_c)/I;\n",
+"\n",
+"q_b = q_b/(2*1000);\n",
+"q_c = q_c/(2*1000);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe shear flow at B, resisted by the glue is = %1.2f MN/m',q_b);\n",
+"printf('\nThe shear flow at C, resisted by the glue is = %1.4f MN/m',q_c);\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: TS5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.5 : ')\n",
+"\n",
+"//Given:\n",
+"V = 80; //N\n",
+"t = 1.5; //cm\n",
+"a = 7.5; //cm\n",
+"b = a-2*t; //cm\n",
+"F_nail= 30; //N\n",
+"\n",
+"//Section Properties:\n",
+"I = (a*a^3 - b*b^3 )/12;\n",
+"Q_b = (((a-2*t)/2)+(t/2))*a*t; //Q = y'A'\n",
+"Q_c = (((a-2*t)/2)+(t/2))*(a-2*t)*t; //Q = y'A'\n",
+"\n",
+"//Shear Flow:\n",
+"q_b = (V*Q_b)/I;\n",
+"q_c = (V*Q_c)/I;\n",
+"\n",
+"s_b = F_nail/(q_b/2);\n",
+"s_c = F_nail/(q_c/2);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe maximum spacing of nails required at B is = %1.0f cm',s_b);\n",
+"printf('\nThe maximum spacing of nails required at C is = %1.1f cm',s_c);\n",
+"\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: TS6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.6 : ')\n",
+"\n",
+"//Given:\n",
+"F = 40; //N\n",
+"s = 9; //cm\n",
+"h = 5; //cm\n",
+"t = 0.5; //cm\n",
+"w = 3; //cm\n",
+"w_3 = w/3; //cm\n",
+"\n",
+"//Calculations:\n",
+"\n",
+"I = (w*h^3)/12 - (2*w_3*(h - 2*t)^3)/12;\n",
+"\n",
+"//Case 1:\n",
+"\n",
+"Q1 = ((h-t)/2)*(w*t);\n",
+"V1 =((F/s)*I)/Q1 ; //q = VQ/I\n",
+"\n",
+"//Case2:\n",
+"\n",
+"Q2 = ((h-t)/2)*(w_3*t);\n",
+"V2 =((F/s)*I)/Q2 ; //q = VQ/I\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe largest vertical shear that can be supported in Case 1 = %1.1f N',V1);\n",
+"printf('\nThe largest vertical shear that can be supported in Case 2 = %1.1f N',V2);\n",
+"\n",
+"//-------------------------------------------------------------------------END---------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: TS7.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 7.7 : ')\n",
+"\n",
+"//Given:\n",
+"V = 10; //kN\n",
+"b1 = 6; //cm\n",
+"h1 = 8; //cm\n",
+"t = 1; //cm\n",
+"b2 = b1-2*t;\n",
+"h2 = h1-2*t; //cm\n",
+"b3 = 4; //cm\n",
+"\n",
+"//Calculations:\n",
+"I = ((b1*h1^3)/12) - ((b2*h2^3)/12);\n",
+"\n",
+"q_b = 0;\n",
+"\n",
+"Q_c = ((b1/2)+(t/2))*(b3+(t))*t; \n",
+"q_c = (V*Q_c*100)/(I); //Q = VQ/I\n",
+"\n",
+"Q_d = (2*h1/4*t*b3) + ((b1/2)+(t/2))*b3*t;\n",
+"q_d = (V*Q_d*100)/(I); //Q = VQ/I\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nVariation of shear flow at B = %1.1f N/mm',q_b);\n",
+"printf('\nVariation of shear flow at C = %1.1f N/mm',q_c);\n",
+"printf('\nVariation of shear flow at D = %1.1f N/mm',q_d);\n",
+"\n",
+"//-------------------------------------------------------------------------END---------------------------------------------------------------------------------------\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
+}
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
+}
diff --git a/Mechanics_of_Materials_by_R_C_Hibbeler/9-Stress_Transformation.ipynb b/Mechanics_of_Materials_by_R_C_Hibbeler/9-Stress_Transformation.ipynb
new file mode 100644
index 0000000..397a60d
--- /dev/null
+++ b/Mechanics_of_Materials_by_R_C_Hibbeler/9-Stress_Transformation.ipynb
@@ -0,0 +1,566 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Stress Transformation"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10: ST10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.10 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_x = -20; //MPa\n",
+"sigma_y = 90; //MPa\n",
+"tou_xy = 60; //MPa\n",
+"\n",
+"//Construction of the circle:\n",
+"sigma_avg = (sigma_x+sigma_y)/2;\n",
+"R = sqrt(((sigma_x-sigma_avg))^2 + (tou_xy)^2);\n",
+"\n",
+"//Maximum In plane Shear Stress:\n",
+"tou_max = R;\n",
+"\n",
+"theta_s1 = atan(-(sigma_x - sigma_avg)/(tou_xy));\n",
+"theta_s1 = theta_s1/2*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum in-plane shear stresses are = %1.1f MPa',tou_max);\n",
+"printf('\n = %1.1f MPa',sigma_avg);\n",
+"printf('\nThe orientation of the element is = %1.1f degrees',theta_s1);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11: ST11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.11 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_x = -8; //MPa\n",
+"sigma_y = 12; //MPa\n",
+"tou_xy = -6; //Mpa\n",
+"\n",
+"//Construction of the circle:\n",
+"sigma_avg = (sigma_x+sigma_y)/2;\n",
+"\n",
+"R = sqrt( 10^2 + tou_xy^2);\n",
+"\n",
+"//Stresses on 30 degree element:\n",
+"phi = atan(6/10);\n",
+"psi = (%pi/3) - phi;\n",
+"\n",
+"//On face BD:\n",
+"sigma_x1 = 2 - (R*cos(psi));\n",
+"tou_xy1 = (R*sin(psi));\n",
+"\n",
+"//On face DE:\n",
+"sigma_x2 = 2 + (R*cos(psi));\n",
+"tou_xy2 = -(R*sin(psi));\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe normal stress on plane BD inclined at 30 degrees is = %1.2f MPa',sigma_x1);\n",
+"printf('\nThe normal stress on plane DE inclined at 60 degrees is = %1.1f MPa',sigma_x2);\n",
+"printf('\nThe shear stress is = %1.2f MPa',tou_xy1);\n",
+"\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12: ST12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.12 : ')\n",
+"\n",
+"//Given:\n",
+"P = 900; //N\n",
+"T = 2.5; //Nm\n",
+"d = 40/1000; //m\n",
+"r = d/2;\n",
+"c = r;\n",
+"\n",
+"//Stress Components:\n",
+"J = (%pi/2)*(r^4);\n",
+"tou = (T*c)/(J*1000);\n",
+"\n",
+"A = (%pi*r^2);\n",
+"sigma = P/(A*1000);\n",
+"\n",
+"//Principal Stresses:\n",
+"sigma_avg = (0 + sigma)/2;\n",
+"\n",
+"R = sqrt( sigma_avg^2 + tou^2);\n",
+"sigma1 = sigma_avg + R;\n",
+"sigma2 = sigma_avg - R;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe prinicpal stresses at point P are:');\n",
+"printf('\n %1.1f kPa',sigma1);\n",
+"printf('\n %1.1f kPa',sigma2);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: ST13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.13 : ')\n",
+"\n",
+"//Given:\n",
+"w = 120; //kN/m\n",
+"I = 67.4*(10^-6);\n",
+"V= 84; //kN\n",
+"M = 30.6; //kNm\n",
+"t = 10/1000; //m\n",
+"\n",
+"//Stress Components:\n",
+"y = 0.200/2;\n",
+"sigma = -(M*10^3*y)/(I*10^6);\n",
+"\n",
+"Q = (0.100 + 0.015/2)*(0.175)*(0.015);\n",
+"tou = (V*Q*10^3)/(I*t*10^6);\n",
+"\n",
+"//Principal Stresses:\n",
+"\n",
+"k = sigma/2;\n",
+"R = sqrt( (-sigma+k)^2 + tou^2);\n",
+"sigma1 = R + k;\n",
+"sigma2 = k -R ;\n",
+"\n",
+"theta_p2 = atan(-tou/(sigma-k));\n",
+"theta_p2 =theta_p2/2*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"\n",
+"printf('\n\nThe prinicpal stresses at point P are:');\n",
+"printf('\n %1.1f MPa',sigma1);\n",
+"printf('\n %1.1f MPa',sigma2);\n",
+"printf('\nThe angle of rotation of the plane %1.1f degrees',theta_p2);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: ST14.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.14 : ')\n",
+"\n",
+"//Given:\n",
+"tou = 40; //kPa\n",
+"sigma = -20; //kPa\n",
+"\n",
+"//Principal Stresses:\n",
+"sigma_avg = sigma/2;\n",
+"R = sqrt( (-sigma + sigma_avg)^2 + tou^2);\n",
+"sigma_max = sigma_avg + R ;\n",
+"sigma_min = sigma_avg - R ;\n",
+"\n",
+"theta = atan(tou/(-sigma+sigma_avg));\n",
+"theta = theta/2;\n",
+"\n",
+"//Absolute Maximum Shear Stress:\n",
+"tou_max = (sigma_max - sigma_min)/2;\n",
+"sigma_avg = (sigma_max + sigma_min)/2;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe prinicpal stresses at the point are:');\n",
+"printf('\n %1.1f kPa',sigma_max);\n",
+"printf('\n %1.1f kPa',sigma_min);\n",
+"printf('\nThe absolute maximum shear stress at the point %1.1f kPa',tou_max);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: ST15.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.15 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_max = 32; //MPa\n",
+"sigma_min = 0; //MPa\n",
+"sigma_int = 16; //MPa\n",
+"\n",
+"tou_max = (sigma_max - sigma_min)/2 ; //MPa\n",
+"sigma_avg = (sigma_max + sigma_min)/2 ; //MPa\n",
+"\n",
+"tou_in_plane = (sigma_max - sigma_int)/2;\n",
+"sigma_avg2 = sigma_avg + (tou_in_plane);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum absolute shear stress = %1.2f MPa',tou_max);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: ST1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.1 : ')\n",
+"\n",
+"//Given:\n",
+"tou = 25; //MPa\n",
+"sigma1 = 50; //MPa\n",
+"sigma2 = 80; //MPa\n",
+"phi = 30*(%pi/180);\n",
+"\n",
+"// Calculations:\n",
+"sigma_x1 = (sigma1*cos(phi)*cos(phi))- (tou*cos(phi)*sin(phi)) - (sigma2*sin(phi)*sin(phi))- (tou*sin(phi)*cos(phi));\n",
+"tou1 = (sigma1*cos(phi)*sin(phi))+ (tou*cos(phi)*cos(phi)) + (sigma2*sin(phi)*cos(phi))- (tou*sin(phi)*sin(phi));\n",
+"sigma_x2 = (tou*cos(phi)*sin(phi))- (sigma2*cos(phi)*cos(phi)) + (tou*sin(phi)*cos(phi))+ (sigma1*sin(phi)*sin(phi));\n",
+"tou2 = (tou*cos(phi)*cos(phi))+ (sigma2*cos(phi)*sin(phi)) - (tou*sin(phi)*sin(phi))+ (sigma1*sin(phi)*cos(phi));\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe normal stress component in the x diection is = %1.2f MPa',sigma_x1);\n",
+"printf('\n The shear stress component in the x diection is = %1.1f MPa',tou1);\n",
+"printf('\n The normal stress component in the y diection is = %1.1f MPa',sigma_x2);\n",
+"printf('\n The shear stress component in the y diection is = %1.1f MPa',tou2);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: ST2.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"\n",
+"disp('Scilab Code Ex 9.2 : ')\n",
+"\n",
+"//Given:\n",
+"phi = -30*(%pi/180);\n",
+"theta = 60*(%pi/180);\n",
+"sigma_x = -80; //MPa\n",
+"sigma_y = 50; //MPa\n",
+"tou_xy = -25; //MPa\n",
+"\n",
+"//Plane CD:\n",
+"sigma_x1 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*cos(2*phi))/2 + (tou_xy*sin(2*phi)); //Eqn 9.1\n",
+"tou_xy1 = ((-(sigma_x - sigma_y)*sin(2*phi))/2) + (tou_xy*cos(2*phi)); //Eqn 9.2\n",
+"\n",
+"//Plane BC:\n",
+"sigma_x2 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*cos(2*theta))/2 + (tou_xy*sin(2*theta)); //Eqn 9.1\n",
+"tou_xy2 = (-(sigma_x - sigma_y)*sin(2*theta))/2 + tou_xy*cos(2*theta); //Eqn 9.2\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe normal stress of plane CD inclined at 30 degrees = %1.1f MPa',sigma_x1);\n",
+"printf('\nThe shear stress of plane CD inclined at 30 degrees = %1.1f MPa',tou_xy1);\n",
+"printf('\nThe normal stress of plane BC inclined at 60 degrees = %1.2f MPa',sigma_x2);\n",
+"printf('\nThe shear stress of plane BC inclined at 60 degrees = %1.1f MPa',tou_xy2);\n",
+"\n",
+"//-------------------------------------------------------------------------END---------------------------------------------------------------------------------------"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5: ST5.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.5 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_x = -20; //MPa\n",
+"sigma_y = 90; //MPa\n",
+"tou_xy = 60; //MPa\n",
+"\n",
+"//Orientation of Element:\n",
+"theta_p2 = atan((2*tou_xy)/(sigma_x - sigma_y));\n",
+"theta_p2 = theta_p2/2;\n",
+"theta_p1 = (180+2*theta_p2)/2;\n",
+"\n",
+"//Principal Stresses:\n",
+"\n",
+"sigma1 = ((sigma_x+sigma_y)/2)+(sqrt(((sigma_x - sigma_y)/2)^2 + tou_xy^2));\n",
+"sigma2 = ((sigma_x+sigma_y)/2)- sqrt(((sigma_x-sigma_y)/2)^2 + tou_xy^2);\n",
+"sigma_x2 = ((sigma_x+sigma_y)/2)+ (((sigma_x-sigma_y)/2)*cos(2*theta_p2)) + (tou_xy*sin(2*theta_p2));\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe first principal stress is = %1.0f MPa',sigma1);\n",
+"printf('\nThe second principal stress is = %1.1f MPa',sigma2);\n",
+"printf('\nThe normal stress acting on the 23.7 degrees plane = %1.1f MPa',sigma_x2);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: ST6.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.6 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_x = -20; //MPa\n",
+"sigma_y = 90; //MPa\n",
+"tou_xy =60; //Mpa\n",
+"\n",
+"//Orientation of Element:\n",
+"theta_s2 = atan(-(sigma_x - sigma_y)/(2*tou_xy));\n",
+"theta_s2 = theta_s2/2;\n",
+"theta_s1 = %pi + 2*theta_s2;\n",
+"theta_s1 = theta_s1/2;\n",
+"\n",
+"//Maximum in plane Shear Stress:\n",
+"tou_max = (sqrt(((sigma_x - sigma_y)/2)^2 + tou_xy^2));\n",
+"tou_xy1 = -(sigma_x - sigma_y)*(sin(2*theta_s2))/2 + (tou_xy*cos(2*theta_s2));\n",
+"\n",
+"//Average Normal Stress:\n",
+"sigma_avg = (sigma_x+sigma_y)/2;\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe maximum in-plane shear stress is = %1.1f MPa',tou_xy1);\n",
+"printf('\nThe average normal stress is = %1.0f MPa',sigma_avg);\n",
+"\n",
+"//----------------------------------------------------------------------END--------------------------------------------------------------------------------\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9: ST9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear all; clc;\n",
+"\n",
+"disp('Scilab Code Ex 9.9 : ')\n",
+"\n",
+"//Given:\n",
+"sigma_x = -12; //MPa\n",
+"sigma_y = 0;\n",
+"tou_xy = -6; //MPa\n",
+"\n",
+"//Construction of the circle:\n",
+"sigma_avg = (sigma_x+sigma_y)/2;\n",
+"R = sqrt((-sigma_x+sigma_avg)^2 + (tou_xy)^2);\n",
+"\n",
+"//Principal Stresses:\n",
+"sigma2 = -R+sigma_avg;//From the Mohr's circle\n",
+"sigma1 = R+sigma_avg;\n",
+"\n",
+"theta_p2 = atan((-tou_xy)/(-sigma_x+sigma_avg));\n",
+"theta_p2 = theta_p2/2*(180/%pi);\n",
+"\n",
+"//Display:\n",
+"\n",
+"printf('\n\nThe first principal stress is = %1.2f MPa',sigma1);\n",
+"printf('\nThe second principal stress is = %1.1f MPa',sigma2);\n",
+"printf('\nThe direction of the principal plane is = %1.1f degrees',theta_p2);\n",
+"\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
+}