summaryrefslogtreecommitdiff
path: root/Principles_Of_Geotechnical_Engineering/Chapter10.ipynb
blob: 5d4082c610d5b8611ff9cbcbe2dd54fe5960f9bb (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:a91d8543aecc1fd44cfae5fb69812b5536263b0841045f12cbdb74f6f431640e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter10-Stresses in a Soil Mass"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg257"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#principal stress and normal stresses and shear stresses\n",
      "##initialisation of variables\n",
      "sx= 2000. ##lb/ft^3\n",
      "sy= 2500. ##lb/ft^3\n",
      "T= 800. ##lb/ft^3\n",
      "t= 0.348##radians\n",
      "##calculations\n",
      "s1= (sx+sy)/2.+math.sqrt(((sy-sx)/2.)**2+T**2)\n",
      "s2= (sx+sy)/2.-math.sqrt(((sy-sx)/2.)**2+T**2)\n",
      "sn= (sx+sy)/2.+(sy-sx)*math.cos(2.*t)/2.-T*math.sin(2*t)\n",
      "Tn= (sy-sx)*math.sin(2.*t)/2.+T*math.cos(2*t)\n",
      "##results\n",
      "print'%s %.2f %s'% ('principle stress s1 = ',s1,' lb/ft^3 ')\n",
      "print'%s %.2f %s'% ('principle stress s2 = ',s2,' lb/ft^3 ')\n",
      "print'%s %.2f %s'% ('normal stress = ',sn,' lb/ft^3 ')\n",
      "print'%s %.2f %s'% ('shear stress = ',Tn,' lb/ft^3 ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "principle stress s1 =  3088.15  lb/ft^3 \n",
        "principle stress s2 =  1411.85  lb/ft^3 \n",
        "normal stress =  1928.93  lb/ft^3 \n",
        "shear stress =  774.22  lb/ft^3 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate vertical stress increase\n",
      "##initialisation of variables\n",
      "x= 3. ##m\n",
      "y= 4. ##m\n",
      "P= 5. ##kN\n",
      "z= 2. ##m\n",
      "##calculations\n",
      "r= math.sqrt(x**2+y**2)\n",
      "k= r/z\n",
      "I= 3./(2.*math.pi*((r/z)**2+1)**2.5)\n",
      "s= P*I/z**2\n",
      "##results\n",
      "print'%s %.4f %s'% ('verticle stress increase at 2m = ',s,' kN/m^3 ')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "verticle stress increase at 2m =  0.0042  kN/m^3 \n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}