summaryrefslogtreecommitdiff
path: root/Mechanics_of_Materials_by_Pytel_and_Kiusalaas/Chapter07_1.ipynb
blob: 9d4c3a369f6e7c3d1a974dd2dfdaf65b82c640af (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:07968d92ed399b52b001ac620304d00a18188f4412f8dbbd944ed3ed617c5439"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 07:Statically Indeterminate Beams"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.7.3, Page No:251"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#Variable Decleration\n",
      "P=5000 #Load in N\n",
      "L=2 #Half span in m\n",
      "\n",
      "#Calculations\n",
      "#After carrying put the variable computation \n",
      "#We obtain three equations which can be solved simultaneously\n",
      "A=np.array([[1,1,0],[-L*2,0,1],[32,0,-24]]) #Array of the unknowns\n",
      "B=np.array([P,-P*L,2000]) #Array of RHS\n",
      "C=np.linalg.solve(A,B)\n",
      "\n",
      "#Result\n",
      "print \"The values are as follows\"\n",
      "print \"Ra=\",C[0],\"N  Rb=\",C[1],\"N and Ma=\",C[2],\"N.m\"\n",
      "\n",
      "#Answer in the textbook is incorrect"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The values are as follows\n",
        "Ra= 3718.75 N  Rb= 1281.25 N and Ma= 4875.0 N.m\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.7.4, Page No:252"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "import numpy as np\n",
      "\n",
      "#Variable Decleration\n",
      "w=60 #Continous Load in lb/ft\n",
      "L1=3 #Length in ft\n",
      "L2=9 #Length in ft\n",
      "\n",
      "#Calculations\n",
      "#After carrying out the variable computations we get\n",
      "A=np.array([[1,1,0,0],[(L1+L2),0,1,1],[0.5*(L1+L2)**2,0,-(L1+L2),0],[6**-1*(L1+L2)**3,0,-0.5*(L1+L2)**2,0]])\n",
      "B=np.array([w*L2,w*L2*0.5*L2,L2**3*10,L2**4*2.5])\n",
      "C=np.linalg.solve(A,B)\n",
      "\n",
      "#Result\n",
      "print \"The values are as follows\"\n",
      "print \"Ra=\",round(C[0]),\"lb Ma=\",round(C[2]),\"lb.ft Rb=\",round(C[1]),\"lb and Mb=\",round(C[3]),\"lb.ft\"\n",
      "\n",
      "#NOTE:The answer for Mb in the textbook is incorrect"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The values are as follows\n",
        "Ra= 190.0 lb Ma= 532.0 lb.ft Rb= 350.0 lb and Mb= -380.0 lb.ft\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}