summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb
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/6-Bending.ipynb
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/6-Bending.ipynb')
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/6-Bending.ipynb1099
1 files changed, 1099 insertions, 0 deletions
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
+}