diff options
Diffstat (limited to 'Advanced_Strength_and_Applied_Elasticity/Chapter7.ipynb')
-rwxr-xr-x | Advanced_Strength_and_Applied_Elasticity/Chapter7.ipynb | 669 |
1 files changed, 669 insertions, 0 deletions
diff --git a/Advanced_Strength_and_Applied_Elasticity/Chapter7.ipynb b/Advanced_Strength_and_Applied_Elasticity/Chapter7.ipynb new file mode 100755 index 00000000..ad86d09a --- /dev/null +++ b/Advanced_Strength_and_Applied_Elasticity/Chapter7.ipynb @@ -0,0 +1,669 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cb28374726804cd374e61b1808cab7ccc40447e8df5be7bbb88241dd0bce4859"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7-Numerical Methods"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate tauA and tauB\n",
+ "import numpy\n",
+ "from numpy.linalg import inv\n",
+ "a=15. ##mm\n",
+ "b=10. ##mm\n",
+ "h=5. ##mm\n",
+ "h1=4.4 ##mm\n",
+ "h2=2.45 ##mm\n",
+ "h3=3. ##mm\n",
+ "\n",
+ "x=([[2, 0, 0, 0, 2, -4],[0, 2, 0, 1 ,-4 ,1],[0, 0, 2, -4, 1, 0],[-4, 2 ,0 ,0 ,0 ,1],[1, -4.27, 1, 0, 1.06, 0],[0, 1.25, -7.41, 1.34, 0, 0]])\n",
+ "print(x)\n",
+ "y=([[-2], [-2], [-2], [-2], [-2], [-2]])\n",
+ "print(y)\n",
+ "z=numpy.dot(inv(x),y)\n",
+ "X1=z[1]\n",
+ "X2=z[2]\n",
+ "X3=z[3]\n",
+ "X4=z[0]\n",
+ "X5=z[4]\n",
+ "X6=z[5]\n",
+ "print(X4)\n",
+ "\n",
+ "print(X1)\n",
+ "print(X2)\n",
+ "print(X3)\n",
+ "print(X5)\n",
+ "print(X6)\n",
+ " \n",
+ "dfi=2.075 \n",
+ "d3fi=-0.001\n",
+ "d2fi=-1.383\n",
+ "d4fi=0.002\n",
+ "\n",
+ "##tauB=derivative(fi,y)B\n",
+ "tauB=(dfi+(d2fi/2.)-(d3fi/3.)+(d4fi/4.))\n",
+ "print'%s %.2f %s'%('tauB=',tauB,' G*thetab')\n",
+ "\n",
+ "dfi=1.536\n",
+ "d2fi=-0.613\n",
+ "d3fi=-0.002\n",
+ "d4fi=0.001\n",
+ "d5fi=0.001\n",
+ "d6fi=-0.002\n",
+ "\n",
+ "##tauA=derivative(fi,x)A\n",
+ "tauA=(dfi+(-d2fi/2.)-(d3fi/3.)-(d4fi/4.)+(d5fi/5.)+(d6fi/6.))\n",
+ "print'%s %.2f %s'%('tauA=',tauA,' G*thetaa')\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[[2, 0, 0, 0, 2, -4], [0, 2, 0, 1, -4, 1], [0, 0, 2, -4, 1, 0], [-4, 2, 0, 0, 0, 1], [1, -4.27, 1, 0, 1.06, 0], [0, 1.25, -7.41, 1.34, 0, 0]]\n",
+ "[[-2], [-2], [-2], [-2], [-2], [-2]]\n",
+ "[ 2.07117939]\n",
+ "[ 1.76075859]\n",
+ "[ 0.84472513]\n",
+ "[ 1.53616791]\n",
+ "[ 2.45522136]\n",
+ "[ 2.76320038]\n",
+ "tauB= 1.38 G*thetab\n",
+ "tauA= 1.84 G*thetaa\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate effective fem at joint B and the change of moment in beam segment AB and BC\n",
+ "p=15.\n",
+ "P=45.\n",
+ "a=3.\n",
+ "b=1.5\n",
+ "L1=3.\n",
+ "L2=4.5\n",
+ "MfAB=-(p*L1**2)/12.\n",
+ "print'%s %.2f %s'%(\"in kNm is= \",MfAB,\"\")\n",
+ "MfBA=(11.25)\n",
+ "print'%s %.2f %s'%(\"in kNm is= \",MfBA,\"\")\n",
+ "MfBC=-(P*a*b**2)/L2**2\n",
+ "print'%s %.2f %s'%(\"in kNm is= \",MfBC,\"\")\n",
+ "MfCB=(P*b*a**2)/L2**2\n",
+ "print'%s %.2f %s'%(\"in kNm is= \",MfCB,\"\")\n",
+ "B=MfBA+MfBC\n",
+ "print'%s %.2f %s'%(\"effective fem at joint B in kNm is= \",B,\"\")\n",
+ "AB=0.429*-B ## joint rotates until a change in moment is +3.75\n",
+ "print'%s %.2f %s'%(\"the change of moment in beam segment AB in kN is=\",AB,\"\")\n",
+ "BC=0.571*-B\n",
+ "print'%s %.2f %s'%(\"the change of moment in beam segment AB in kN is=\",BC,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "in kNm is= -11.25 \n",
+ "in kNm is= 11.25 \n",
+ "in kNm is= -15.00 \n",
+ "in kNm is= 30.00 \n",
+ "effective fem at joint B in kNm is= -3.75 \n",
+ "the change of moment in beam segment AB in kN is= 1.61 \n",
+ "the change of moment in beam segment AB in kN is= 2.14 \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg221"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#find epsilon\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy.linalg import inv\n",
+ "p=14. ##MPa\n",
+ "t=0.3 ##cm\n",
+ "E=200. ##GPa\n",
+ "v=0.3\n",
+ "gamma1=77. ##kN/m**3\n",
+ "alpha=12.*10**-6 ## per degree celcius\n",
+ "A=2\n",
+ "T=50. ##degree celcius\n",
+ "\n",
+ "D=numpy.matrix([[3.33, 0.99, 0],[0.99 ,3.3, 0],[0, 0, 1.16]])\n",
+ "print(D)\n",
+ "##[D*]=(t*[D])/4*A\n",
+ "Dj=(10**6)*D\n",
+ "\n",
+ "D1=Dj/8. \n",
+ "\n",
+ "print(D1)\n",
+ "\n",
+ "##solution a: stiffness matrix\n",
+ "xi=0.\n",
+ "x1=0.\n",
+ "xj=4.\n",
+ "x2=4.\n",
+ "xm=0.\n",
+ "x3=0.\n",
+ "yi=-1.\n",
+ "y1=-1.\n",
+ "yj=-1.\n",
+ "y2=-1.\n",
+ "ym=1.\n",
+ "y3=1.\n",
+ "\n",
+ "ai=0.-4.\n",
+ "a1=0.-4.\n",
+ "print(ai,a1)\n",
+ "aj=0-0.\n",
+ "a2=0-0.\n",
+ "print(aj,a2)\n",
+ "am=4.-0.\n",
+ "a3=4.-0.\n",
+ "print(am,a3)\n",
+ "\n",
+ "bi=-1-1\n",
+ "b1=-1-1\n",
+ "print(bi,b1)\n",
+ "bj=1.+1.\n",
+ "b2=1.+1.\n",
+ "print(bj,b2)\n",
+ "bm=-1.+1.\n",
+ "b3=-1+1.\n",
+ "print(bm,b3)\n",
+ "\n",
+ "k11=(10**6/8.)*(3.3*4+1.16*16)\n",
+ "print'%s %.2f %s'%('k11=',k11,'')\n",
+ "k12=(10**6/8)*(3.3*2*-2+0)\n",
+ "print'%s %.2f %s'%('k12=',k12,'')\n",
+ "k13=(10**6/8)*(0+1.16*4*-4)\n",
+ "print'%s %.2f %s'%('k13=',k13,'')\n",
+ "k22=(10**6/8.)*(3.3*4+0)\n",
+ "print'%s %.2f %s'%('k22=',k22,'')\n",
+ "k23=0.\n",
+ "print'%s %.2f %s'%('k23=',k23,'')\n",
+ "k32=0.\n",
+ "print'%s %.2f %s'%('k32=',k32,'')\n",
+ "k21=(10**6/8)*(3.3*2*-2+0)\n",
+ "print'%s %.2f %s'%('k21=',k21,'')\n",
+ "k31=(10**6/8)*(0+1.16*4*-4)\n",
+ "print'%s %.2f %s'%('k31=',k31,'')\n",
+ "k33=(10**6/8.)*(0+1.16*16)\n",
+ "print'%s %.2f %s'%('k33=',k33,'')\n",
+ "\n",
+ "kuu=numpy.matrix([[k11 ,k12, k13],[k21 ,k22 ,k23],[k31, k32, k33]])\n",
+ "print(kuu)\n",
+ "kuv=10**6*numpy.matrix([[2.15, -1.16, -0.99],[-0.99, 0, 0.99],[-1.16 ,1.16, 0]])\n",
+ "print(kuv)\n",
+ "kvv=10**6*numpy.matrix([[7.18 ,-0.58, -6.6],[-0.58, 0.58 ,0],[-6.6, 0, 6.6]])\n",
+ "print(kvv)\n",
+ "kvu=numpy.matrix([[2.15, -0.99, -1.16],[-1.16, 0, 1.16],[-0.99, 0.99, 0]])\n",
+ "print(kvu)\n",
+ "\n",
+ "\n",
+ "\n",
+ "##solution b:\n",
+ "Fx=0\n",
+ "Fy=0.077 ##N/cm**2\n",
+ "Qbe=[0,0,0,-0.0308,-0.0308,-0.0308]##N\n",
+ "print(Qbe)\n",
+ "\n",
+ "\n",
+ "Qp3=numpy.matrix([[0,-420,-420,0,-840,-840]])\n",
+ "print('Qp3')\n",
+ "\n",
+ "epsilon=alpha*T\n",
+ "print'%s %.2f %s'%('epsilon=',epsilon,'')\n",
+ "##Qte=[B']*[D]*epsilon*At\n",
+ "Qte=(1/8.)*numpy.matrix([[-2, 0, -4],[2, 0, 0],[0, 0, 4],[0, -4, -2],[0 ,0, 2],[0, 4 ,0]])*((200*10**5)/0.91)*numpy.matrix([[1, 0.3, 0,],[0.3 ,1 ,0],[0, 0 ,0.35]])*numpy.matrix([[0.0006],[0.0006],[0]])*(1.2)\n",
+ "print(Qte)\n",
+ "\n",
+ "Qe=numpy.matrix([[-5142.85,4742.85,-400,-10285.71,-840.03,9445.67]])\n",
+ "print (Qe)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[[ 3.33 0.99 0. ]\n",
+ " [ 0.99 3.3 0. ]\n",
+ " [ 0. 0. 1.16]]\n",
+ "[[ 416250. 123750. 0.]\n",
+ " [ 123750. 412500. 0.]\n",
+ " [ 0. 0. 145000.]]\n",
+ "(-4.0, -4.0)\n",
+ "(0.0, 0.0)\n",
+ "(4.0, 4.0)\n",
+ "(-2, -2)\n",
+ "(2.0, 2.0)\n",
+ "(0.0, 0.0)\n",
+ "k11= 3970000.00 \n",
+ "k12= -1650000.00 \n",
+ "k13= -2320000.00 \n",
+ "k22= 1650000.00 \n",
+ "k23= 0.00 \n",
+ "k32= 0.00 \n",
+ "k21= -1650000.00 \n",
+ "k31= -2320000.00 \n",
+ "k33= 2320000.00 \n",
+ "[[ 3970000. -1650000. -2320000.]\n",
+ " [-1650000. 1650000. 0.]\n",
+ " [-2320000. 0. 2320000.]]\n",
+ "[[ 2150000. -1160000. -990000.]\n",
+ " [ -990000. 0. 990000.]\n",
+ " [-1160000. 1160000. 0.]]\n",
+ "[[ 7180000. -580000. -6600000.]\n",
+ " [ -580000. 580000. 0.]\n",
+ " [-6600000. 0. 6600000.]]\n",
+ "[[ 2.15 -0.99 -1.16]\n",
+ " [-1.16 0. 1.16]\n",
+ " [-0.99 0.99 0. ]]\n",
+ "[0, 0, 0, -0.0308, -0.0308, -0.0308]\n",
+ "Qp3\n",
+ "epsilon= 0.00 \n",
+ "[[ -5142.85714286]\n",
+ " [ 5142.85714286]\n",
+ " [ 0. ]\n",
+ " [-10285.71428571]\n",
+ " [ 0. ]\n",
+ " [ 10285.71428571]]\n",
+ "[[ -5142.85 4742.85 -400. -10285.71 -840.03 9445.67]]\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate epsilon and sigma \n",
+ "import numpy\n",
+ "from numpy.linalg import inv\n",
+ "t=0.3 ##cm\n",
+ "E=200 ##GPa\n",
+ "v=0.3\n",
+ "i=2.\n",
+ "j=4.\n",
+ "m=3.\n",
+ "L=5000. ##N\n",
+ "\n",
+ "a1=0-4\n",
+ "a2=0-4\n",
+ "print(a1,a2)\n",
+ "aj=4-0\n",
+ "a4=4-0\n",
+ "print(aj,a4)\n",
+ "am=4-4\n",
+ "a3=4-4\n",
+ "print(am,a3)\n",
+ "\n",
+ "bi=1-1\n",
+ "b2=1-1\n",
+ "print(bi,b2)\n",
+ "bj=1+1\n",
+ "b4=1+1\n",
+ "print(bj,b4)\n",
+ "bm=-1-1\n",
+ "b3=-1-1\n",
+ "print(bm,b3)\n",
+ "\n",
+ "k22=(10**6/8.)*(3.3*0+1.16*16)\n",
+ "print'%s %.2f %s'%('k22=\\n',k22,'')\n",
+ "k44=(10**6/8.)*(3.3*4*+1.16*16)\n",
+ "print'%s %.2f %s'%('k44=\\n',k44,'')\n",
+ "k24=(10**6/8.)*(3.3*0+1.16*4*-4)\n",
+ "print'%s %.2f %s'%('k24=\\n',k24,'')\n",
+ "k42=(10**6/8)*(3.3*0+1.16*4*-4)\n",
+ "print'%s %.2f %s'%('k42=\\n',k42,'')\n",
+ "k23=0\n",
+ "print'%s %.2f %s'%('k23=\\n',k23,'')\n",
+ "k32=0\n",
+ "print'%s %.2f %s'%('k32=\\n',k32,'')\n",
+ "k43=(10**6/8)*(3.3*2*-2+1.16*0)\n",
+ "print'%s %.2f %s'%('k43=\\n',k43,'')\n",
+ "k34=(10**6/8)*(3.3*2*-2+1.16*0)\n",
+ "print'%s %.2f %s'%('k34=\\n',k34,'')\n",
+ "k33=(10**6/8)*(3.3*4+1.16*0)\n",
+ "print'%s %.2f %s'%('k33=\\n',k33,'')\n",
+ "\n",
+ "\n",
+ "kuu=numpy.matrix([[k22, k23, k24],[k32, k33, k34,],[k42, k43, k44]])\n",
+ "print(kuu)\n",
+ "kuv=10**6*numpy.matrix([[0 ,1.16 ,-1.16],[0.99 ,0 ,-0.99],[-0.99, -1.16, 2.15]])\n",
+ "print(kuv)\n",
+ "kvv=10**6*numpy.matrix([[6.6, 0 ,-6.6],[0, 0.58, -0.58],[-6.6 ,-0.58, 7.18]])\n",
+ "print(kvv)\n",
+ "kvu=10**6*numpy.matrix([[0 ,0.99, -0.99],[1.16, 0, -1.16],[-1.16 ,-0.99, 2.15]])\n",
+ "print(kvu)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "k1=numpy.matrix([[3.97, -1.65, -2.32, 0],[-1.65, 1.65 ,0 ,0],[-2.32, 0, 2.32, 0],[0, 0 ,0 ,0]])\n",
+ "print(k1)\n",
+ "k2=numpy.matrix([[2.15, -1.16, -0.99, 0],[-0.99, 0, 0.99, 0],[-1.16, 1.16, 0, 0],[0, 0 ,0 ,0]])\n",
+ "print(k2)\n",
+ "k3=numpy.matrix([[2.15, -0.99 ,-1.16, 0],[-1.16, 0 ,1.16, 0],[-0.99 ,0.99, 0 ,0],[0 ,0, 0, 0]])\n",
+ "print(k3)\n",
+ "k4=numpy.matrix([[7.18 ,-0.58, -6.6, 0],[-0.58, 0.58, 0 ,0],[-6.6, 0, 6.6, 0],[0, 0 ,0, 0]])\n",
+ "print(k4)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "k5=numpy.matrix([[0, 0 ,0 ,0],[0 ,2.32, 0, -2.32],[0, 0, 1.65, -1.65],[0 ,-2.32, -1.65, 3.97]])\n",
+ "print(k5)\n",
+ "k6=numpy.matrix([[0, 0, 0 ,0],[0, 0 ,1.16, -1.16],[0, 0.99, 0 ,-0.99],[0, -0.99, -1.16, 2.15]])\n",
+ "print(k6)\n",
+ "k7=numpy.matrix([[0, 0 ,0 ,0],[0, 0, 0.99, -0.99],[0 ,1.16, 0, -1.16],[0, -1.16, -0.99, 2.15]])\n",
+ "print(k7)\n",
+ "k8=numpy.matrix([[0 ,0, 0 ,0],[0 ,6.6 ,0 ,-6.6],[0, 0 ,0.58 ,-0.58],[0 ,-6.6 ,-0.58, 7.18]])\n",
+ "print(k8)\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "Qy4=((3.*(-5000.))/4.*1.)*((1./2.)*(1.+1.)+0.33*(-0.25*(1.-1.+1.)-0.75))\n",
+ "print'%s %.2f %s'%('Qy4=',Qy4,'') ## textbook ans is wrong\n",
+ "Qy2=((3*(-5000))/4*1)*((1/2)*(1+1)-0.33*(1+0.75*(1-1+1)-0.75))\n",
+ "print'%s %.2f %s'%('Qy2=',Qy2,'') ## textbook ans is wrong\n",
+ "\n",
+ "Q=numpy.matrix([[0, 0, 0, 0 ,0 ,Qy4 ,0, Qy2]])\n",
+ "print(Q)\n",
+ "u1=0\n",
+ "u3=0\n",
+ "v1=0\n",
+ "v3=0\n",
+ "\n",
+ "Z=numpy.matrix([[3.97, -2.32, 0, -1.16],[-2.32, 3.97, -0.99, 2.15],[0, -0.99, 7.18, -6.6],[-1.16, 2.15, -6.6, 7.18]])\n",
+ "print(Z)\n",
+ "z=numpy.linalg.inv(Z)\n",
+ "print(z)\n",
+ "X=z*numpy.matrix([[0],[0],[-2512.5],[-2512.5]]) \n",
+ "print(X)\n",
+ "X1= X*10**-6\n",
+ "print(\"u2 u4 v2 v4 is= \",X1,\"\")\n",
+ "\n",
+ "Y=numpy.matrix([[-2, 2, 0, 0, 0, 0],[0, 0, 0, -4, 0, 4],[-4 ,0, 4, -2, 2, 0]])\n",
+ "print(Y)\n",
+ "W=Y*numpy.matrix([[0],[-0.0012],[0],[0],[-0.0068],[0]])\n",
+ "print(W)\n",
+ "W1=W*(1./8.)\n",
+ "print(\"W1\")\n",
+ "\n",
+ "y=numpy.matrix([[1, 0.3, 0],[0.3, 1, 0],[0, 0, 0.35]])*W1\n",
+ "print(y)\n",
+ "u=(200.*10**9/0.91)\n",
+ "print(u)\n",
+ "U=u*y\n",
+ "print(U,\"sigmax sigmay tauxy in Pa is= \")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(-4, -4)\n",
+ "(4, 4)\n",
+ "(0, 0)\n",
+ "(0, 0)\n",
+ "(2, 2)\n",
+ "(-2, -2)\n",
+ "k22=\n",
+ " 2320000.00 \n",
+ "k44=\n",
+ " 30624000.00 \n",
+ "k24=\n",
+ " -2320000.00 \n",
+ "k42=\n",
+ " -2320000.00 \n",
+ "k23=\n",
+ " 0.00 \n",
+ "k32=\n",
+ " 0.00 \n",
+ "k43=\n",
+ " -1650000.00 \n",
+ "k34=\n",
+ " -1650000.00 \n",
+ "k33=\n",
+ " 1650000.00 \n",
+ "[[ 2320000. 0. -2320000.]\n",
+ " [ 0. 1650000. -1650000.]\n",
+ " [ -2320000. -1650000. 30624000.]]\n",
+ "[[ 0. 1160000. -1160000.]\n",
+ " [ 990000. 0. -990000.]\n",
+ " [ -990000. -1160000. 2150000.]]\n",
+ "[[ 6600000. 0. -6600000.]\n",
+ " [ 0. 580000. -580000.]\n",
+ " [-6600000. -580000. 7180000.]]\n",
+ "[[ 0. 990000. -990000.]\n",
+ " [ 1160000. 0. -1160000.]\n",
+ " [-1160000. -990000. 2150000.]]\n",
+ "[[ 3.97 -1.65 -2.32 0. ]\n",
+ " [-1.65 1.65 0. 0. ]\n",
+ " [-2.32 0. 2.32 0. ]\n",
+ " [ 0. 0. 0. 0. ]]\n",
+ "[[ 2.15 -1.16 -0.99 0. ]\n",
+ " [-0.99 0. 0.99 0. ]\n",
+ " [-1.16 1.16 0. 0. ]\n",
+ " [ 0. 0. 0. 0. ]]\n",
+ "[[ 2.15 -0.99 -1.16 0. ]\n",
+ " [-1.16 0. 1.16 0. ]\n",
+ " [-0.99 0.99 0. 0. ]\n",
+ " [ 0. 0. 0. 0. ]]\n",
+ "[[ 7.18 -0.58 -6.6 0. ]\n",
+ " [-0.58 0.58 0. 0. ]\n",
+ " [-6.6 0. 6.6 0. ]\n",
+ " [ 0. 0. 0. 0. ]]\n",
+ "[[ 0. 0. 0. 0. ]\n",
+ " [ 0. 2.32 0. -2.32]\n",
+ " [ 0. 0. 1.65 -1.65]\n",
+ " [ 0. -2.32 -1.65 3.97]]\n",
+ "[[ 0. 0. 0. 0. ]\n",
+ " [ 0. 0. 1.16 -1.16]\n",
+ " [ 0. 0.99 0. -0.99]\n",
+ " [ 0. -0.99 -1.16 2.15]]\n",
+ "[[ 0. 0. 0. 0. ]\n",
+ " [ 0. 0. 0.99 -0.99]\n",
+ " [ 0. 1.16 0. -1.16]\n",
+ " [ 0. -1.16 -0.99 2.15]]\n",
+ "[[ 0. 0. 0. 0. ]\n",
+ " [ 0. 6.6 0. -6.6 ]\n",
+ " [ 0. 0. 0.58 -0.58]\n",
+ " [ 0. -6.6 -0.58 7.18]]\n",
+ "Qy4= -2512.50 \n",
+ "Qy2= 1237.50 \n",
+ "[[ 0. 0. 0. 0. 0. -2512.5 0. 1237.5]]\n",
+ "[[ 3.97 -2.32 0. -1.16]\n",
+ " [-2.32 3.97 -0.99 2.15]\n",
+ " [ 0. -0.99 7.18 -6.6 ]\n",
+ " [-1.16 2.15 -6.6 7.18]]\n",
+ "[[ 0.42911692 0.17986034 0.25168713 0.24682604]\n",
+ " [ 0.17986034 0.4831756 -0.25583582 -0.3507947 ]\n",
+ " [ 0.25168713 -0.25583582 1.36613468 1.37304916]\n",
+ " [ 0.24682604 -0.3507947 1.37304916 1.54633026]]\n",
+ "[[-1252.51435698]\n",
+ " [ 1524.15919903]\n",
+ " [-6882.19940602]\n",
+ " [-7334.94080944]]\n",
+ "('u2 u4 v2 v4 is= ', matrix([[-0.00125251],\n",
+ " [ 0.00152416],\n",
+ " [-0.0068822 ],\n",
+ " [-0.00733494]]), '')\n",
+ "[[-2 2 0 0 0 0]\n",
+ " [ 0 0 0 -4 0 4]\n",
+ " [-4 0 4 -2 2 0]]"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "[[-0.0024]\n",
+ " [ 0. ]\n",
+ " [-0.0136]]\n",
+ "W1\n",
+ "[[ -3.00000000e-04]\n",
+ " [ -9.00000000e-05]\n",
+ " [ -5.95000000e-04]]"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "2.1978021978e+11\n",
+ "(matrix([[ -6.59340659e+07],\n",
+ " [ -1.97802198e+07],\n",
+ " [ -1.30769231e+08]]), 'sigmax sigmay tauxy in Pa is= ')\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate sigma \n",
+ "L=76.2 ##mm\n",
+ "h=50.8 ##mm\n",
+ "t=25.4 ##mm\n",
+ "p=6895. ##kPa\n",
+ "E=207. ##GPa\n",
+ "v=0.15\n",
+ "\n",
+ "##solution a: exact solution\n",
+ "##p=Mh/I\n",
+ "##sigmax=-(y/h)*p\n",
+ "sigmay=0.\n",
+ "tauxy=0.\n",
+ "##derivative(u,x)=-(yp/Eh)\n",
+ "##derivative(v,y)=(v*y*p)/(Eh)\n",
+ "##derivative(u,y)+derivative(v,x)=0\n",
+ "##u=-(p/E*h)*x*y ## for u(0,0)=v(0,0)=0 and u(L,0)=0\n",
+ "##v=-(p/2*E*h)*(x**2+v*y**2)\n",
+ "##sigmax=-(1/0.0508)*(y*p)\n",
+ "sigmaxmax=6895. ##kPa\n",
+ "##u(0.0762,-0.0254)=25.4*10**-6 ##m\n",
+ "##v(0.0762,0)=1.905*10**-6 ##m\n",
+ "\n",
+ "##solution b:\n",
+ "Qx10=((0.0254*0.0254)/6.)*((2.*sigmaxmax)+3447.5)\n",
+ "print'%s %.2f %s'%(\"in mN is= \",Qx10,\"\")\n",
+ "Qx11=((0.0254*0.0254)/6.)*(2*3447.5+sigmaxmax)+((0.0254*0.0254)/6)*(2*3447.5+0.)\n",
+ "print'%s %.2f %s'%(\"in mN is= \",Qx11,\"\")\n",
+ "Qx12=((0.0254*0.0254)/6.)*(0+3447.5)\n",
+ "print'%s %.2f %s'%(\"in mN is= \",Qx12,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "in mN is= 1.85 \n",
+ "in mN is= 2.22 \n",
+ "in mN is= 0.37 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |