diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | 47d7279a724246ef7aa0f5359cf417992ed04449 (patch) | |
tree | c613e5e4813d846d24d67f46507a6a69d1a42d87 /Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb | |
parent | 435840cef00c596d9e608f9eb2d96f522ea8505a (diff) | |
download | Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.gz Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.tar.bz2 Python-Textbook-Companions-47d7279a724246ef7aa0f5359cf417992ed04449.zip |
add books
Diffstat (limited to 'Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb')
-rwxr-xr-x | Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb | 228 |
1 files changed, 228 insertions, 0 deletions
diff --git a/Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb b/Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb new file mode 100755 index 00000000..0c66212b --- /dev/null +++ b/Advanced_Strength_and_Applied_Elasticity/Chapter5.ipynb @@ -0,0 +1,228 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4defd5409de6787753d9afa80f45fd44de9564eee21481b5ef4ed48087f19bda"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter5-Bending of Beams"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate meter and sigma \n",
+ "Mz=11000. ##Nm\n",
+ "A1=0.13*0.02 ##m\n",
+ "A2=0.15*0.02 ##m\n",
+ "z1=0.01 ##m\n",
+ "z2=0.075 ##m\n",
+ "yA=0.043 ##m\n",
+ "zA=-0.106 ##m\n",
+ "yB=-0.063 ##m\n",
+ "zB=0.\n",
+ "\n",
+ "##location of the centroid\n",
+ "z=(A1*z1+A2*z2)/(A1+A2)\n",
+ "print'%s %.2f %s'%(\"in meter is= \",z,\"\")\n",
+ "\n",
+ "Iz=(0.02*(0.13)**3)/12.+ (0.13*0.02*(0.04)**2)+(0.15*(0.02)**3.)/12.+ (0.15*0.02*(0.035)**2.)\n",
+ "print'%s %.5f %s'%(\"Iz in meter^4 is= \",Iz,\"\")\n",
+ "Iy=(0.02*(0.13)**3)/12.+ (0.13*0.02*(0.04)**2)+(0.15*(0.02)**3)/.12+ (0.15*0.02*(0.035)**2.)\n",
+ "print'%s %.5f %s'%(\"Iy in meter^4 is= \",Iy,\"\")\n",
+ "Iyz=0+A1*0.04*(-0.035)+0+A2*(-0.035)*0.03\n",
+ "print'%s %.2f %s'%(\"Iyz in meter^4 is= \",Iyz,\"\")\n",
+ "##thetap=(atand((-2*Iyz)/(Iz-Iy)))/2\n",
+ "##print'%s %.2f %s'%(thetap)\n",
+ "I1=(Iz+math.sqrt(0.+(6.79*10**-6)**2.))\n",
+ "print'%s %.5f %s'%(\"I1 in meter^4 is= \",I1,\"\")\n",
+ "I2=(Iz-math.sqrt(0+(6.79*10**-6)**2))\n",
+ "print'%s %.6f %s'%(\"I2 in meter^4 is= \",I2,\"\")\n",
+ "My1=11000.*math.sin(45/57.3)\n",
+ "print'%s %.2f %s'%(\"My1 in Nm is\",My1,\"\")\n",
+ "Mz1=11000*math.sin(45/57.3)\n",
+ "print'%s %.2f %s'%(\"Mz1 in Nm is\",Mz1,\"\")\n",
+ "\n",
+ "sigmaxA=((My1*(zA))/I1)-((Mz1*yA)/I2)\n",
+ "print'%s %.2f %s'%(\"sigmaxA in MPa is\",sigmaxA,\"\")\n",
+ "sigmaxB=0-((My1*yB)/I2)\n",
+ "print'%s %.2f %s'%(\"sigmaxB in MPa is\",sigmaxB,\"\")\n",
+ "\n",
+ "My=0.\n",
+ "y=((Mz*Iyz)*z)/(Mz*Iy) ##.......equal to z=-1.71y\n",
+ "print'%s %.3f %s'%(\"y\",y,\"\")\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "in meter is= 0.04 \n",
+ "Iz in meter^4 is= 0.00001 \n",
+ "Iy in meter^4 is= 0.00002 \n",
+ "Iyz in meter^4 is= -0.00 \n",
+ "I1 in meter^4 is= 0.00002 \n",
+ "I2 in meter^4 is= 0.000005 \n",
+ "My1 in Nm is 7777.72 \n",
+ "Mz1 in Nm is 7777.72 \n",
+ "sigmaxA in MPa is -114417761.50 \n",
+ "sigmaxB in MPa is 101941050.82 \n",
+ "y -0.014 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the distance \n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "t=1.25 ##mm\n",
+ "y=15.87 ##mm\n",
+ "z=5.28 ##mm\n",
+ "Iy=4765.62 ##mm**4\n",
+ "Iz=21054.69 ##mm**4\n",
+ "Iyz=3984.37 ##mm**4\n",
+ "thetap=13.05 ##degree\n",
+ "Iy1=3828.12 ##mm**4\n",
+ "Iz1=21953.12##mm**4\n",
+ "s=12.5\n",
+ "\n",
+ "##tau=(Vy/Iz1*t)*s*t(19.55+s*asind(13.05)/2)....equation 1\n",
+ "##F1=integrate((tau*t)ds)\n",
+ "def fun(s):\n",
+ "\ty=(0)\n",
+ "\treturn y\n",
+ "x=scipy.integrate.quad(fun,0,1)\n",
+ "x=x[0]\n",
+ "##F1=0.0912*Vy1 substituting the value of tau we get F1\n",
+ "##Vy1*ez1=37.5*F1 substituting the value of F1 we get ez1\n",
+ "ez1=37.5*0.0912\n",
+ "print'%s %.2f %s'%(\"the distance in mm is= \",ez1,\"\")\n",
+ "\n",
+ "##tau=(Vz1/Iy1*t)*s*t(12.05-s*asind(13.05)/2)....equation 2\n",
+ "##F1=integrate((tau*t)ds)\n",
+ "def fun(s):\n",
+ "\ty=(0)\n",
+ "\treturn y\n",
+ "x=scipy.integrate.quad(fun,0,1)\n",
+ "x=x[0]\n",
+ "\n",
+ "##F1=0.204*Vz1 substituting the value of tau we get F1\n",
+ "##Vz1*ey1=37.5*F1 substituting the value of F1 we get ez1\n",
+ "ey1=37.5*0.204\n",
+ "print'%s %.2f %s'%(\"the distance in mm is= \",ey1,\"\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the distance in mm is= 3.42 \n",
+ "the distance in mm is= 7.65 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate stress and meter\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "P=70. ##kN\n",
+ "c=0.05##m\n",
+ "c1=c\n",
+ "c2=c\n",
+ "R=0.1+0.05\n",
+ "A=0.005\n",
+ "\n",
+ "##m=(-1/(2*c))*integrate((y/R+y)dy)\n",
+ "def fun(c):\n",
+ "\ty=(-c)\n",
+ "\treturn y\n",
+ "\n",
+ "x=scipy.integrate.quad(fun,0,1)\n",
+ "m=-1.+(R/2.*c)*math.log((R+c)/(R-c))\n",
+ "print'%s %.2f %s'%(\"m\",m,\"\")\n",
+ "##m=(-1/(2*c))*integrate((y/R)-(y**2/R**2)+(y**3/R**3)-(y**4/R**4)+.....)dy)\n",
+ "m=-1+(3/2.)*math.log(2.)\n",
+ "print'%s %.3f %s'%(\"m\",m,\"\")\n",
+ "\n",
+ "M=P*R\n",
+ "print'%s %.2f %s'%(\"M\",M,\"\")\n",
+ "sigmatheta1=(-P*c2)/(m*A*(R-c1))\n",
+ "print'%s %.2f %s'%(\"stress in Pa is= \",sigmatheta1,\"\")\n",
+ "sigmatheta2=(P*c2)/(m*A*(R+c2))\n",
+ "print'%s %.2f %s'%(\"stress in Pa is= \",sigmatheta2,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "m -1.00 \n",
+ "m 0.040 \n",
+ "M 10.50 \n",
+ "stress in Pa is= -176230.22 \n",
+ "stress in Pa is= 88115.11 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |