/
README.asv
195 lines (150 loc) · 7.54 KB
/
README.asv
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Shear Force & Bending Moment Examples
This program calculates the shear force and bending moment profiles,
draws the free body, shear force and bending moment diagrams of the
problem.
Under the free body diagram, the equations of each section is clearly
written with Latex
## How to call the function
To use this program, you need to call the solve function on the instance
of the SFBMProb object that has the complete problem description.
You first create the SFBMProb Object and then add the loads in no
partcular order.
## How to create the SFBMProb object
create an instance of SFBMProb by calling "SFBMProb" with three
arguments. The first is the name of the problem. For instance,
"Example 1", the second argument is Length of the beam, and the third
is locations of the supports.
prob = SFBMProb(name, length, supports)
### Cantilever
If the problem is a cantilever problem, then you have only one clamped
support, at the beginning or end of the beam. In such a case, the number is
second argument contains 2 elements instead of three.
For instance, for a cantilever of length 20m, supported at the beginning,
prob = SFBMProb("Cantilever", 20, 0)
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Cantilever.png?raw=true)
and if supported at the end,
prob = SFBMProb("Cantilever", 20, 20)
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Cantilever2.png?raw=true)
### Beam on the floor
Its possible to have a problem in which the body is lying on the floor
without any point support. In such scenario,
prob = SFBMProb("BeamOnFloor", 20, [])
## Set Units
We have just two primary physical quantities here: Force and Legnth.
ForceUnit default is KN
LengthUnit default is m
but to set a preferred unit, use
prob.ForceUnit = "lb";
prob.LengthUnit = "inch";
## Load Description
Loads can be Force: such point or distributed load, or Torque that we
call Moment here. In general Load would have value and location.
The sign of the value can indicate whether it is pointing upwards, or
downwards in the case of force, or clockwise/anticlockwise in case of
moment. While moment and point load have scalars for value and
location, distributed load have vector of value and location.
## How to add loads to the object.
### Moment(Torque)
To add a clockwise moment of magnitude 3KN-m applied at point 5m
prob.AddMomentLoad(-3, 5);
For an anticlockwise moment of magnitude 7KN-m applied at point 8m
prob.AddMomentLoad(7, 8);
### Concentrated Load(Force)
To add a downward point load of magnitude 0.8KN applied at point 3m
prob.AddPointLoad(-0.8, 3);
For an upward point load of magnitude 5KN-m applied at point 7m
prob.AddMomentLoad(5, 7);
### Distributed Force
To add uniform upward distributed load of magnitude 2KN/m applied from point 3 to 5m
prob.AddDistLoad([2, 2], [3, 5])
For linearly increasing distributed load 2KN/m to 5KN/m applied from point 3 to 5m
prob.AddDistLoad([2, 5], [3, 5]);
### Example(1)
-Problem Name
Name = 'Example 1';
-Length and Supports
Length = 10; Supports = [2, 10]; % length = 10, supports at 2 and 10;
prob = SFBMProb(Name, Length, Supports);
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example1prob.png)
-Set Unit
prob.ForceUnit = "lb";
prob.LengthUnit = "inch";
-Concetrated Loads
prob.AddPointLoad(-5, 0); % 5N downward at point 0
prob.AddPointLoad(-10, 8); % 10N downward at point 8
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example1pointload.png)
-Torques
prob.AddMoment(10, 3); % ACW 10Nm at point 3
prob.AddMoment(-10, 7); % CW 10Nm at point 7
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example1torque.png)
-Solve the problem
prob.Solve()
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example1.png)
### Example(2)
-Problem Name
Name = 'Example 2';
-Length and Supports
Length = 20; Supports = 0; % length = 20m, Cantilever supported at 0 m;
prob = SFBMProb(Name, Length, Supports);
-Concentrated Loads
prob.AddPointLoad(-5, 6); % 5N downward at point 6
prob.AddPointLoad(-10, 13); % 10N downward at point 13
-Distributed Loads
prob.AddDistLoad([5,5],[1,3]); % Constant 5N/m upwards from 1m to 3 m
prob.AddDistLoad([-4,-4],[14,17]); % Constant 4N/m downwards from 14m to 17 m
-Solve the problem
prob.Solve()
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example2.png)
### Example(3)
-Problem Name
Name = 'Example 3';
Length and Supports
Length = 30; Supports = [0,20]; % length = 30m, supports at 0m and 20m;
prob = SFBMProb(Name, Length, Supports);
-Concentrated Loads
prob.AddPointLoad(-20, 6); % 20N downward at point 6
prob.AddPointLoad(-10, 13); % 10N downward at point 13
prob.AddPointLoad(5, 27); % 5N upward at point 27
-Torques
prob.AddMoment(50, 8); % ACW 50Nm at point 8
prob.AddMoment(-45, 25); % CW 45Nm at point 25
-Distributed Loads
prob.AddDistLoad([7, 7], [1,3]); % Constant 7N/m upwards from 1m to 3m
prob.AddDistLoad([-5,-5], [12,18]); % Constant 5N/m downwards from 12m to 18m
-Solve the problem
prob.Solve()
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example3.png)
### Example(4)
-Problem Name
Name = 'Example 5';
-Length and Supports
Length = 20; Supports = [6,20]; % length = 20m, supports at 5m and 20m;
prob = SFBMProb(Name, Length, Supports);
-Concetrated Loads
prob.AddPointLoad(-2,0); % 2N downward at point 0
-Torques
prob.AddMoment(10,8); % ACW 10Nm at point 8
prob.AddMoment(-15,12); % CW 10Nm at point 12
-Distributed Loads
prob.AddDistLoad([5, 2, 5], [1, 3, 5]); % Constant 5N/m upwards from 1m to 3m and
prob.AddDistLoad([-4, -2, -4],[14, 16, 18]); % Constant 4N/m downwards from 14m to 17m
-Solve the problem
prob.Solve()
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example4.png)
### Example(5)
-Problem Name
Name = 'Example 5';
-Length and Supports
Length = 20; Supports = [6,20]; % length = 20m, supports at 5m and 20m;
prob = SFBMProb(Name, Length, Supports);
-Concetrated Loads
prob.AddPointLoad(-2,0); % 2N downward at point 0
-Torques
prob.AddMoment(10,8); % ACW 10Nm at point 8
prob.AddMoment(-15,12); % CW 10Nm at point 12
-Distributed Loads
prob.AddDistLoad([5, 2, 5], [1, 3, 5]); % Constant 5N/m upwards from 1m to 3m and
prob.AddDistLoad([-4, -2, -4],[14, 16, 18]); % Constant 4N/m downwards from 14m to 17m
-Solve the problem
prob.Solve()
![alt text](https://github.com/talk2laton/Shear-Force-Bending-Moment/blob/main/Example5.png)