summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb')
-rw-r--r--Mechanics_of_Materials_by_R_C_Hibbeler/2-Strain.ipynb222
1 files changed, 222 insertions, 0 deletions
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
+}