summaryrefslogtreecommitdiff
path: root/Advanced_Strength_and_Applied_Elasticity/Chapter2.ipynb
blob: 8f910d4c3baa5828049046a6c594313692e40a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
 "metadata": {
  "name": "",
  "signature": "sha256:e953f526db565d7aa504d8011697e642d2061a58d6ef5161bb85dc3f3417f791"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter2-Strain and stress -strain relations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate radius of circle and principal stresses and distance between o and c and strain and shear strain and maxi shear stress\n",
      "radius=((math.sqrt(195**2.+130**2.))*10**(-6.));\n",
      "print'%s %.5f %s'%(\"radius of the circle in degree = \",radius,\"\")\n",
      "theta1=(math.atan(130./195.))*57.3\n",
      "print'%s %.2f %s'%(\"pricipal stresses in degree\",theta1,\"\");## print'%s %.2f %s'%laying result\n",
      "epsilonx=510.*10**(-6.)\n",
      "epsilony=120.*10**(-6.)\n",
      "epsilon=(epsilonx+epsilony)/2.\n",
      "print'%s %.5f %s'%(\"distance between O and c=\",epsilon,\"\")\n",
      "\n",
      "##solution a\n",
      "angle=60.- theta1\n",
      "print'%s %.2f %s'%(\"angle of ACA1 in degree = \",angle,\"\")## print'%s %.2f %s'%laying result\n",
      "epsilonx1=epsilon+radius*math.cos(26.3/57.3)\n",
      "print'%s %.5f %s'%(\"strains in x axis= \",epsilonx1,\"\")## print'%s %.2f %s'%laying result\n",
      "epsilony1=epsilon-radius*math.cos(26.3/57.3)\n",
      "print'%s %.5f %s'%(\"strains in y axis= \",epsilony1,\"\")## print'%s %.2f %s'%laying result\n",
      "gammaxy=-2*(radius*math.sin(26.3/57.3))\n",
      "print'%s %.5f %s'%(\"shear strain\",gammaxy,\"\")## print'%s %.2f %s'%laying result\n",
      "\n",
      "##solution b\n",
      "epsilon1=epsilon+radius\n",
      "print'%s %.5f %s'%(\"strains in x axis= \",epsilon1,\"\")## print'%s %.2f %s'%laying result\n",
      "epsilon2=epsilon-radius\n",
      "print'%s %.5f %s'%(\"strains in x axis= \",epsilon2,\"\")## print'%s %.2f %s'%laying result\n",
      "\n",
      "##solution c\n",
      "gammamax=-+468*10**(-6)\n",
      "print'%s %.5f %s'%(\"maxi shear stress= \",gammamax,\"\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radius of the circle in degree =  0.00023 \n",
        "pricipal stresses in degree 33.69 \n",
        "distance between O and c= 0.00031 \n",
        "angle of ACA1 in degree =  26.31 \n",
        "strains in x axis=  0.00053 \n",
        "strains in y axis=  0.00010 \n",
        "shear strain -0.00021 \n",
        "strains in x axis=  0.00055 \n",
        "strains in x axis=  0.00008 \n",
        "maxi shear stress=  -0.00047 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg46"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate value of epsilon and gamma\n",
      "epsilon0=190.*10**(-6)\n",
      "epsilon60=200.*10**(-6)\n",
      "epsilon120=-300.*10**(-6)\n",
      "E=200.## GPa\n",
      "v=0.3\n",
      "epsilonx=epsilon0\n",
      "print'%s %.4f %s'%(\"value of epsilonx is= \",epsilonx,\"\")\n",
      "\n",
      "## epsilon60=((epsilonx+epsilony)/2)-((epsilonx-epsilony)/4)+(gammaxy*sqrt(3))/4 eqn 1\n",
      "## epsilon120=((epsilonx+epsilony)/2)-((epsilonx-epsilony)/4)-(gammaxy*sqrt(3))/4 eqn 2\n",
      "\n",
      "epsilony=(2.*(epsilon60+epsilon120)-epsilon0)/3.\n",
      "print'%s %.4f %s'%(\"value of epsilony is= \",epsilony,\"\")\n",
      "gammaxy=(2./math.sqrt(3.))*(epsilon60-epsilon120)## from eqn 1 and eqn 2\n",
      "print'%s %.5f %s'%(\"value of gammaxy is= \",gammaxy,\"\")\n",
      "epsilon1=((epsilonx+epsilony)/2.)+math.sqrt(((epsilonx-epsilony)/2.)**2.+(gammaxy/2.)**2.)## epsilony value is in negative so the sign changes in the eqn\n",
      "print'%s %.5f %s'%(\"value of epsilon1 is= \",epsilon1,\"\")\n",
      "epsilon2=((epsilonx+epsilony)/2.)-math.sqrt(((epsilonx-epsilony)/2.)**2+(gammaxy/2.)**2.)##epsilony value is in negative so the sign changes in the eqn\n",
      "print'%s %.4f %s'%(\"value of epsilon2 is= \",epsilon2,\"\")\n",
      "\n",
      "gammamax=(2.*10**-6)*math.sqrt(((epsilonx-epsilony)/2.)**2.+(gammaxy/2.)**2)\n",
      "print'%s %.3e %s'%(\"max shear strain is= \",gammamax,\"\")\n",
      "thetap=math.atan((577./320.)/2.)*57.3\n",
      "print'%s %.2f %s'%(\"orientations of principal axes is= \",thetap,\"\") ## or\n",
      "thetap1=math.atan((577./320.)*2.)*57.\n",
      "print'%s %.2f %s'%(\"orientations of principal axes is= \",thetap1,\"\")\n",
      "sigma1=(200.*10**9/(1.-0.09))*(epsilon1+0.3*epsilon2)\n",
      "print'%s %.2f %s'%(\"plane stresss is Pa= \",sigma1,\"\")\n",
      "sigma2=(200*10**3/(1-0.09))*(epsilon2+0.3*epsilon1)\n",
      "print'%s %.2f %s'%(\"plane stresss is MPa= \",sigma2,\"\")\n",
      "\n",
      "taumax=(200.*10**9./(2.*(1.+0.3)))*gammamax\n",
      "print'%s %.2f %s'%(\"plane stresss is MPa= \",taumax,\"\")\n",
      "#error in orientationd of principal axes because of round off error \n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "value of epsilonx is=  0.0002 \n",
        "value of epsilony is=  -0.0001 \n",
        "value of gammaxy is=  0.00058 \n",
        "value of epsilon1 is=  0.00036 \n",
        "value of epsilon2 is=  -0.0003 \n",
        "max shear strain is=  6.601e-10 \n",
        "orientations of principal axes is=  42.04 \n",
        "orientations of principal axes is=  74.12 \n",
        "plane stresss is Pa=  59348428.75 \n",
        "plane stresss is MPa=  -42.21 \n",
        "plane stresss is MPa=  50.78 \n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}