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

Diff of /trunk/models/johnpye/beam2.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 839 by johnpye, Fri Sep 8 07:46:53 2006 UTC revision 840 by johnpye, Sun Sep 10 06:10:36 2006 UTC
# Line 13  MODEL beam2; Line 13  MODEL beam2;
13      I IS_A second_moment_of_area;      I IS_A second_moment_of_area;
14      L IS_A distance;      L IS_A distance;
15            
16      B[1..2] IS_A beam_parameterised(n,E,I,L);      S IS_A beam_superposition(n,E,I,L);
       
     P1 ALIASES B[1].P;  
     a1 ALIASES B[1].a;  
     P2 ALIASES B[2].P;  
     a2 ALIASES B[2].a;  
       
     v[1..n] IS_A distance;  
     x[1..n] IS_A distance;  
     FOR i IN [1..n] CREATE  
         B[1..n].x[i], x[i] ARE_THE_SAME;  
         v[i] = SUM[B[j].v[i] | j IN [1..2]];  
     END FOR;  
17            
18        P1 ALIASES S.B[1].P;
19        a1 ALIASES S.x[1];
20        P2 ALIASES S.B[2].P;
21        a2 ALIASES S.x[2];
22    
23        v1 ALIASES S.v[1];  
24        v2 ALIASES S.v[2];
25  METHODS  METHODS
26  METHOD specify;  METHOD specify;
27      RUN B[1..n].specify;      FIX E,I,L;
28      FIX E,I,L;      FIX P1,a1;
29        FIX P2,a2;
30  END specify;  END specify;
31    
32    METHOD bound_self;
33        RUN S.bound_self;
34        L.upper_bound := 500 {m};
35    END bound_self;
36    
37  METHOD values;  METHOD values;
     RUN B[1..n].values;  
38      E := 200 {GPa};      E := 200 {GPa};
39      I := 0.5e6{mm^4};      I := 0.5e6{mm^4};
40      L := 3 {m};      L := 3 {m};
41      P1 := 10 {kN}; a1 := 1 {m};      P1 := 10 {kN}; a1 := 1 {m};
42      P2 := 10 {kN}; a2 := 2 {m};      P2 := 10 {kN}; a2 := 2 {m};
     x[1] := 1{m};  
     x[2] := 2{m};  
43  END values;  END values;
44    
45  METHOD on_load;  METHOD on_load;
46      RUN reset; RUN values;      RUN reset; RUN bound_self; RUN values;
47  END on_load;  END on_load;
48    
49  END beam2;  END beam2;

Legend:
Removed from v.839  
changed lines
  Added in v.840

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