1 |
REQUIRE "johnpye/beam.a4c"; |
2 |
REQUIRE "johnpye/aiscbeams.a4c"; |
3 |
|
4 |
(* |
5 |
Model of a beam with four supports and one central load. |
6 |
|
7 |
Uses superposition of deflections to overcome force indeterminancy. |
8 |
*) |
9 |
MODEL beam4; |
10 |
n IS_A integer_constant; |
11 |
n :== 3; (* five superpositions for the four supports and the applied load *) |
12 |
|
13 |
E IS_A youngs_modulus; |
14 |
I IS_A second_moment_of_area; |
15 |
L IS_A distance; |
16 |
c IS_A distance; (* max distance from neutral axis *) |
17 |
Ag IS_A area; |
18 |
|
19 |
aisc IS_A aiscbeams; |
20 |
|
21 |
designation IS_A symbol; |
22 |
|
23 |
S IS_A beam_superposition(n,E,I,L); |
24 |
|
25 |
P ALIASES S.B[2].P; |
26 |
a ALIASES S.B[2 ].a; |
27 |
x2 ALIASES S.B[1].a; |
28 |
x3 ALIASES S.B[3].a; |
29 |
|
30 |
v ALIASES S.v[2]; |
31 |
|
32 |
R1 ALIASES S.R1; |
33 |
R2 ALIASES S.B[1].P; |
34 |
R3 ALIASES S.B[3].P; |
35 |
R4 ALIASES S.R2; |
36 |
|
37 |
M IS_A moment; |
38 |
M + R3*(S.B[3].a - a) + R4*(L-a) = 0; |
39 |
|
40 |
sigma_max IS_A stress; |
41 |
sigma_max = M*c/I; |
42 |
tau_max IS_A stress; |
43 |
tau_max = sigma_max / 2; (* no shear here at point of max bending *) |
44 |
|
45 |
a = L / 2; |
46 |
S.B[1].a = L/3; |
47 |
S.B[3].a = 2*L/3; |
48 |
|
49 |
METHODS |
50 |
METHOD specify; |
51 |
FIX E,I,L,c,Ag; |
52 |
FIX P; |
53 |
FIX S.v[1,3]; |
54 |
END specify; |
55 |
|
56 |
METHOD bound_self; |
57 |
L.upper_bound := 500 {m}; |
58 |
L.lower_bound := 0 {m}; |
59 |
RUN S.bound_self; |
60 |
END bound_self; |
61 |
|
62 |
METHOD beam_lookup; |
63 |
I := aisc.Ix[designation]; |
64 |
c := aisc.d[designation] / 2; |
65 |
Ag := aisc.Ag[designation]; |
66 |
END beam_lookup; |
67 |
|
68 |
METHOD values; |
69 |
(* beam properties *) |
70 |
E := 200 {GPa}; |
71 |
designation := '150UB18.0'; |
72 |
RUN beam_lookup; |
73 |
|
74 |
L := 9 {m}; |
75 |
|
76 |
(* load *) |
77 |
P := 10 {kN}; |
78 |
|
79 |
(* deflections at supports *) |
80 |
FOR i IN [1,3] DO |
81 |
S.v[i] := 0 {m}; |
82 |
END FOR; |
83 |
|
84 |
END values; |
85 |
|
86 |
METHOD on_load; |
87 |
RUN reset; RUN bound_self; |
88 |
RUN values; |
89 |
END on_load; |
90 |
|
91 |
END beam4; |