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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 840 - (hide annotations) (download) (as text)
Sun Sep 10 06:10:36 2006 UTC (16 years ago) by johnpye
File MIME type: text/x-ascend
File size: 3537 byte(s)
Added 'deflection' to atoms.a4l.
Updated beam models to use 'abs' instead of full conditional modelling.
1 johnpye 838 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 johnpye 840 v[1..n] IS_A deflection;
12 johnpye 838 x[1..n] IS_A distance;
13    
14 johnpye 840 P,R1,R2 IS_A force;
15 johnpye 838 a,b IS_A distance;
16     a + b = L;
17 johnpye 840
18     (*
19 johnpye 839 isrightp[1..n] IS_A boolean_var;
20 johnpye 838
21     FOR i IN [1..n] CREATE
22     v_left[i]: v[i] = P*b/(6*E*I*L)*((L^2 - b^2)*x[i] - x[i]^3);
23     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 );
24 johnpye 839 END FOR;
25    
26     CONDITIONAL
27     FOR i IN [1..n] CREATE
28 johnpye 838 isright[i]: x[i] > a;
29 johnpye 839 END FOR;
30     END CONDITIONAL;
31 johnpye 838
32 johnpye 839 FOR i IN [1..n] CREATE
33 johnpye 838 isrightp[i] == SATISFIED(isright[i]);
34    
35     WHEN (isrightp[i])
36     CASE TRUE:
37     USE v_right[i];
38     CASE FALSE:
39     USE v_left[i];
40     END WHEN;
41 johnpye 840 END FOR;
42     *)
43     FOR i IN [1..n] CREATE
44     defl[i]: v[i] = P*b/(6*E*I*L)*((L^2 - b^2)*x[i] - x[i]^3 + (L/b)*( 0.5 * (x[i]-a + abs(x[i]-a)) )^3 );
45     END FOR;
46    
47     (* sum of vertical forces *)
48     R1 + P + R2 = 0 {N};
49     (* sum of moments about left end *)
50     P * a + R2 * L = 0 {N*m};
51    
52 johnpye 839 METHODS
53     METHOD specify;
54     FIX P, a, x[1..n];
55     END specify;
56 johnpye 840 METHOD values;
57     RUN bound_self;
58     END values;
59     METHOD bound_self;
60 johnpye 839 a.upper_bound := 100 {m};
61     b.upper_bound := 100 {m};
62 johnpye 840 L.upper_bound := 100 {m};
63     P.lower_bound := -2e4 {kN};
64     P.upper_bound := 2e4 {kN};
65     v[1..n].upper_bound := 10 {m};
66     v[1..n].lower_bound := -10 {m};
67     x[1..n].upper_bound := 100 {m};
68     x[1..n].lower_bound := -100 {m};
69     R1.lower_bound := -1e4 {kN};
70     R1.upper_bound := 1e4 {kN};
71     R2.lower_bound := -1e4 {kN};
72     R2.upper_bound := 1e4 {kN};
73     END bound_self;
74 johnpye 838
75     END beam_parameterised;
76 johnpye 840
77     (* superposition of n beams with displacements calculated at n locations *)
78     MODEL beam_superposition(
79     n WILL_BE integer_constant;
80     E WILL_BE youngs_modulus;
81     I WILL_BE second_moment_of_area;
82     L WILL_BE distance;
83     );
84    
85     B[1..n] IS_A beam_parameterised(n,E,I,L);
86    
87     v[1..n] IS_A deflection;
88     x[1..n] IS_A distance;
89     R1,R2 IS_A force;
90 johnpye 838
91 johnpye 840 FOR i IN [1..n] CREATE
92     B[1..n].x[i], x[i] ARE_THE_SAME;
93     v[i] = SUM[B[j].v[i] | j IN [1..n]];
94     END FOR;
95    
96     (* displacements are calculated at the locations of the loads *)
97     FOR i IN [1..n] CREATE
98     B[i].a, x[i] ARE_THE_SAME;
99     END FOR;
100    
101     R1 = SUM[B[i].R1 | i IN [1..n]];
102     R2 = SUM[B[i].R2 | i IN [1..n]];
103    
104     METHODS
105     METHOD bound_self;
106     FOR i IN [1..n] DO
107     RUN B[i].bound_self;
108     v[i].upper_bound := 10 {m};
109     v[i].lower_bound := -10 {m};
110     x[i].upper_bound := 500 {m};
111     x[i].lower_bound := -500 {m};
112     END FOR;
113     R1.lower_bound := -1e4 {kN};
114     R1.upper_bound := 1e4 {kN};
115     R2.lower_bound := -1e4 {kN};
116     R2.upper_bound := 1e4 {kN};
117     END bound_self;
118    
119     END beam_superposition;
120    
121 johnpye 838 (*
122     Model of a simply-supported beam of length L
123     with a single vertical point load P at 0 < a < L
124     *)
125    
126     MODEL beam;
127     n IS_A integer_constant;
128     n :== 1;
129     E IS_A youngs_modulus;
130     I IS_A second_moment_of_area;
131     L IS_A distance;
132     B IS_A beam_parameterised(n,E,I,L);
133    
134     P ALIASES B.P;
135     a ALIASES B.a;
136     b ALIASES B.b;
137    
138     x ALIASES B.x[1];
139     v ALIASES B.v[1];
140    
141     METHODS
142     METHOD specify;
143     FIX E, I, L;
144     FIX P, a;
145     FIX x;
146     END specify;
147    
148     METHOD values;
149     E := 200 {GPa}; (* approx, for steel *)
150     I := 142e6 {mm^4}; (* AISC Universal Beam 360UB50.7 *)
151     L := 3.5 {m};
152     P := 14.0 {kN};
153     a := 1.75 {m};
154     x := 2.0 {m};
155 johnpye 840 END values;
156    
157     METHOD bound_self;
158     RUN B.bound_self;
159     L.lower_bound := 500 {m};
160     L.upper_bound := 0{m};
161     END bound_self;
162 johnpye 838
163     METHOD on_load;
164 johnpye 840 RUN reset;
165     RUN bound_self;
166 johnpye 838 RUN values;
167     END on_load;
168    
169     END beam;
170    

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