diff options
Diffstat (limited to 'Solid_Mechanics_by_S_M_A_Kazimi/3-ANALYSIS_OF_STRAINS.ipynb')
-rw-r--r-- | Solid_Mechanics_by_S_M_A_Kazimi/3-ANALYSIS_OF_STRAINS.ipynb | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/Solid_Mechanics_by_S_M_A_Kazimi/3-ANALYSIS_OF_STRAINS.ipynb b/Solid_Mechanics_by_S_M_A_Kazimi/3-ANALYSIS_OF_STRAINS.ipynb new file mode 100644 index 0000000..0aaefd2 --- /dev/null +++ b/Solid_Mechanics_by_S_M_A_Kazimi/3-ANALYSIS_OF_STRAINS.ipynb @@ -0,0 +1,217 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: ANALYSIS OF STRAINS" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Chapter3_Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// initialization of variables\n", +"clear\n", +"epsillon=[0.01 0 0\n", +" 0 0.02 0.02\n", +" 0 0.02 0.01] // dimensionless\n", +"theta=30 // degrees\n", +"//calculations\n", +"theta=theta*%pi/180\n", +"a=[cos(theta) sin(theta) 0\n", +" -sin(theta) cos(theta) 0\n", +" 0 0 1]\n", +"b=a.'\n", +"epsillon_new=a*epsillon*b\n", +"// calculation of strain invariants\n", +"// for epsillon\n", +"J1=epsillon(1,1)+epsillon(2,2)+epsillon(3,3)\n", +"J2=epsillon(1,1)*epsillon(2,2)+epsillon(2,2)*epsillon(3,3)+epsillon(3,3)*epsillon(1,1)-2*(epsillon(1,2)^2+epsillon(2,3)^2+epsillon(3,1)^2)\n", +"J3=epsillon(1,1)*epsillon(2,2)*epsillon(3,3)+2*epsillon(1,2)*epsillon(2,3)*epsillon(3,1)-(epsillon(1,1)*epsillon(2,3)^2+epsillon(2,2)*epsillon(3,1)^2+epsillon(3,3)*epsillon(1,2)^2)\n", +"\n", +"// for epsillon_new\n", +"J11=epsillon_new(1,1)+epsillon_new(2,2)+epsillon_new(3,3)\n", +"J22=epsillon_new(1,1)*epsillon_new(2,2)+epsillon_new(2,2)*epsillon_new(3,3)+epsillon_new(3,3)*epsillon_new(1,1)-2*(epsillon_new(1,2)^2+epsillon_new(2,3)^2+epsillon_new(3,1)^2)\n", +"J33=epsillon_new(1,1)*epsillon_new(2,2)*epsillon_new(3,3)+2*epsillon_new(1,2)*epsillon_new(2,3)*epsillon_new(3,1)-(epsillon_new(1,1)*epsillon_new(2,3)^2+epsillon_new(2,2)*epsillon_new(3,1)^2+epsillon_new(3,3)*epsillon_new(1,2)^2)\n", +"\n", +"// results\n", +"printf('The new strain tensor is');\n", +"disp(epsillon_new);\n", +"printf('The strain invariants of old strain tensor are J1=%0.2f J2=%.e J3=%.e \n and that of the new strain tensor are J1=%0.2f J2=%.e J3=%.e',J1,J2,J3,J11,J22,J33)\n", +"printf('\n Hence the same strain invariants')\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Chapter3_Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// initialization of variables\n", +"clear\n", +"epsillon=[0.01 -0.02 0\n", +" -0.02 0.03 -0.01\n", +" 0 -0.01 0] // dimensionless\n", +"a_xx=0.6 \n", +"theta=acos(a_xx) // radians\n", +"//calculations\n", +"// theta=theta*%pi/180\n", +"a=[cos(theta) 0 -sin(theta)\n", +" 0 1 0\n", +" sin(theta) 0 cos(theta)]\n", +"b=a.'\n", +"epsillon_new=a*epsillon*b\n", +"\n", +"// calculation of strain invariants\n", +"// for epsillon\n", +"J1=epsillon(1,1)+epsillon(2,2)+epsillon(3,3)\n", +"\n", +"J2=epsillon(1,1)*epsillon(2,2)+epsillon(2,2)*epsillon(3,3)+epsillon(3,3)*epsillon(1,1)-2*(epsillon(1,2)^2+epsillon(2,3)^2+epsillon(3,1)^2)\n", +"\n", +"J3=epsillon(1,1)*epsillon(2,2)*epsillon(3,3)+2*epsillon(1,2)*epsillon(2,3)*epsillon(3,1)-(epsillon(1,1)*epsillon(2,3)^2+epsillon(2,2)*epsillon(3,1)^2+epsillon(3,3)*epsillon(1,2)^2)\n", +"\n", +"// for epsillon_new\n", +"J11=epsillon_new(1,1)+epsillon_new(2,2)+epsillon_new(3,3)\n", +"\n", +"J22=epsillon_new(1,1)*epsillon_new(2,2)+epsillon_new(2,2)*epsillon_new(3,3)+epsillon_new(3,3)*epsillon_new(1,1)-2*(epsillon_new(1,2)^2+epsillon_new(2,3)^2+epsillon_new(3,1)^2)\n", +"\n", +"J33=epsillon_new(1,1)*epsillon_new(2,2)*epsillon_new(3,3)+2*epsillon_new(1,2)*epsillon_new(2,3)*epsillon_new(3,1)-(epsillon_new(1,1)*epsillon_new(2,3)^2+epsillon_new(2,2)*epsillon_new(3,1)^2+epsillon_new(3,3)*epsillon_new(1,2)^2)\n", +"\n", +"// Results\n", +"printf('The new strain tensor is')\n", +"disp(epsillon_new)\n", +"printf('The strain invariants of old stress tensor are J1=%0.2f J2=%.e J3=%.e \n and that of the new stress tensor are J1=%0.2f J2=%.e J3=%.e',J1,J2,J3,J11,J22,J33)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Chapter3_Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// initialization of variables\n", +"clear\n", +"epsillon_A= 700*10^-6 \n", +"epsillon_B= 300*10^-6 \n", +"epsillon_C= 300*10^-6 \n", +"theta=45 // degrees\n", +"theta=theta*%pi/180 // radians\n", +"// calculations\n", +"epsillon_x=epsillon_A\n", +"epsillon_y=epsillon_C\n", +"gamma_xy=(epsillon_B-(epsillon_x*cos(theta)^2+epsillon_y*sin(theta)^2))/(sin(theta)*cos(theta))\n", +"epsillon_1=1/2*(epsillon_x+epsillon_y)+(1/2)*sqrt((epsillon_x-epsillon_y)^2+gamma_xy^2)\n", +"epsillon_2=1/2*(epsillon_x+epsillon_y)-(1/2)*sqrt((epsillon_x-epsillon_y)^2+gamma_xy^2)\n", +"phi=0.5*atan(gamma_xy/(epsillon_x-epsillon_y))\n", +"phi=phi*180/%pi\n", +"//results\n", +"printf('The principal strains are %.3e, %.3e',epsillon_1,epsillon_2)\n", +"printf('\n phi = %.2f degrees',phi)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Chapter3_Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"// initialization of variables\n", +"clear\n", +"epsillon_A= 1000*10^-6 \n", +"epsillon_B= 720*10^-6 \n", +"epsillon_C= 600*10^-6 \n", +"th_B=120 // degrees\n", +"th_C=240 // degrees\n", +"//calculations\n", +"th_B=th_B*%pi/180\n", +"th_C=th_C*%pi/180\n", +"// we need to solve for epsillon_y and gamma_xy\n", +"// Ax=B\n", +"ep_x=epsillon_A\n", +"A=[sin(th_B)^2 sin(th_B)*cos(th_B)\n", +" sin(th_C)^2 sin(th_C)*cos(th_C)]\n", +"C=[epsillon_B-ep_x*cos(th_B)^2; epsillon_C-ep_x*cos(th_C)^2] \n", +"x=inv(A)*C\n", +"ep_y=x(1,1)\n", +"gam_xy=x(2,1)\n", +"epsillon_x=ep_x\n", +"epsillon_y=ep_y\n", +"gamma_xy=gam_xy\n", +"epsillon_1=1/2*(epsillon_x+epsillon_y)+(1/2)*sqrt((epsillon_x-epsillon_y)^2+gamma_xy^2)\n", +"epsillon_2=1/2*(epsillon_x+epsillon_y)-(1/2)*sqrt((epsillon_x-epsillon_y)^2+gamma_xy^2)\n", +"// Results\n", +"printf('The principal strains are %.3e, %.3e',epsillon_1,epsillon_2)" + ] + } +], +"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 +} |