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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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