/[ascend]/trunk/models/johnpye/beam.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/beam.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 838 - (show annotations) (download) (as text)
Fri Sep 8 06:57:55 2006 UTC (16 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1512 byte(s)
Added beam model.
1 REQUIRE "atoms.a4l";
2
3 (* a parameterised simply-supported beam model *)
4
5 MODEL beam_parameterised(
6 n WILL_BE integer_constant;
7 E WILL_BE youngs_modulus;
8 I WILL_BE second_moment_of_area;
9 L WILL_BE distance;
10 );
11 v[1..n] IS_A distance;
12 x[1..n] IS_A distance;
13
14 P IS_A force;
15 a,b IS_A distance;
16 a + b = L;
17
18 isrightp[1..n] IS_A distance;
19
20 FOR i IN [1..n] CREATE
21 v_left[i]: v[i] = P*b/(6*E*I*L)*((L^2 - b^2)*x[i] - x[i]^3);
22 v_right[i]: v[i] = P*b/(6*E*I*L)*((L^2 - b^2)*x[i] - x[i]^3 + (L/b)*(x[i]-a)^3 );
23
24 CONDITIONAL
25 isright[i]: x[i] > a;
26 END CONDITIONAL;
27
28 isrightp[i] == SATISFIED(isright[i]);
29
30 WHEN (isrightp[i])
31 CASE TRUE:
32 USE v_right[i];
33 CASE FALSE:
34 USE v_left[i];
35 END WHEN;
36 END FOR;
37
38 END beam_parameterised;
39
40 (*
41 Model of a simply-supported beam of length L
42 with a single vertical point load P at 0 < a < L
43 *)
44
45 MODEL beam;
46 n IS_A integer_constant;
47 n :== 1;
48 E IS_A youngs_modulus;
49 I IS_A second_moment_of_area;
50 L IS_A distance;
51 B IS_A beam_parameterised(n,E,I,L);
52
53 P ALIASES B.P;
54 a ALIASES B.a;
55 b ALIASES B.b;
56
57 x ALIASES B.x[1];
58 v ALIASES B.v[1];
59
60 METHODS
61 METHOD specify;
62 FIX E, I, L;
63 FIX P, a;
64 FIX x;
65 END specify;
66
67 METHOD values;
68 E := 200 {GPa}; (* approx, for steel *)
69 I := 142e6 {mm^4}; (* AISC Universal Beam 360UB50.7 *)
70 L := 3.5 {m};
71 P := 14.0 {kN};
72 a := 1.75 {m};
73 x := 2.0 {m};
74 END values;
75
76 METHOD on_load;
77 RUN reset;
78 RUN values;
79 END on_load;
80
81 END beam;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22