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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 839 - (hide annotations) (download) (as text)
Fri Sep 8 07:46:53 2006 UTC (16 years, 3 months ago) by johnpye
File MIME type: text/x-ascend
File size: 1762 byte(s)
Removed some debug output from cond_config.c
Added superposition test (beam2.a4c)
Fixed up problems in beam.a4c (ongoing).
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     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 johnpye 839 isrightp[1..n] IS_A boolean_var;
19 johnpye 838
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 johnpye 839 END FOR;
24    
25     CONDITIONAL
26     FOR i IN [1..n] CREATE
27 johnpye 838 isright[i]: x[i] > a;
28 johnpye 839 END FOR;
29     END CONDITIONAL;
30 johnpye 838
31 johnpye 839 FOR i IN [1..n] CREATE
32 johnpye 838 isrightp[i] == SATISFIED(isright[i]);
33    
34     WHEN (isrightp[i])
35     CASE TRUE:
36     USE v_right[i];
37     CASE FALSE:
38     USE v_left[i];
39     END WHEN;
40     END FOR;
41 johnpye 839 METHODS
42     METHOD specify;
43     FIX P, a, x[1..n];
44     END specify;
45     METHOD values;
46     a.upper_bound := 100 {m};
47     b.upper_bound := 100 {m};
48     L.upper_bound := 100 {m};
49     END values;
50 johnpye 838
51     END beam_parameterised;
52    
53     (*
54     Model of a simply-supported beam of length L
55     with a single vertical point load P at 0 < a < L
56     *)
57    
58     MODEL beam;
59     n IS_A integer_constant;
60     n :== 1;
61     E IS_A youngs_modulus;
62     I IS_A second_moment_of_area;
63     L IS_A distance;
64     B IS_A beam_parameterised(n,E,I,L);
65    
66     P ALIASES B.P;
67     a ALIASES B.a;
68     b ALIASES B.b;
69    
70     x ALIASES B.x[1];
71     v ALIASES B.v[1];
72    
73     METHODS
74     METHOD specify;
75     FIX E, I, L;
76     FIX P, a;
77     FIX x;
78     END specify;
79    
80     METHOD values;
81     E := 200 {GPa}; (* approx, for steel *)
82     I := 142e6 {mm^4}; (* AISC Universal Beam 360UB50.7 *)
83     L := 3.5 {m};
84     P := 14.0 {kN};
85     a := 1.75 {m};
86     x := 2.0 {m};
87     END values;
88    
89     METHOD on_load;
90     RUN reset;
91     RUN values;
92     END on_load;
93    
94     END beam;
95    

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