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

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

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

revision 758 by johnpye, Thu Jul 13 01:15:58 2006 UTC revision 771 by johnpye, Fri Jul 14 04:31:54 2006 UTC
# Line 10  MODEL dsg_array; Line 10  MODEL dsg_array;
10    
11      node[1..n] IS_A dsg;      node[1..n] IS_A dsg;
12            
13        (* consistent design *)
14        node[1..n].rhow ARE_THE_SAME;
15        node[1..n].D2 ARE_THE_SAME;
16        node[1..n].cw ARE_THE_SAME;
17        node[1..n].hw ARE_THE_SAME;
18        node[1..n].qdots ARE_THE_SAME;
19        node[1..n].Tamb ARE_THE_SAME;
20        
21      (* central difference *)      (* central difference *)
     (*  
22      FOR i IN [2..(n-1)] CREATE      FOR i IN [2..(n-1)] CREATE
23          node[i].dp_dz = (node[i+1].p - node[i-1].p)/(2*dz);          node[i].dp_dz = (node[i+1].p - node[i-1].p)/(2*dz);
24          node[i].dmdot_dz = (node[i+1].mdot - node[i-1].mdot)/(2*dz);          node[i].dmdot_dz = (node[i+1].mdot - node[i-1].mdot)/(2*dz);
# Line 19  MODEL dsg_array; Line 26  MODEL dsg_array;
26          node[i].drhovel2_dz = (node[i+1].rhovel2 - node[i-1].rhovel2)/(2*dz);          node[i].drhovel2_dz = (node[i+1].rhovel2 - node[i-1].rhovel2)/(2*dz);
27          node[i].dekdot_dz = (node[i+1].ekdot - node[i-1].ekdot)/(2*dz);          node[i].dekdot_dz = (node[i+1].ekdot - node[i-1].ekdot)/(2*dz);
28      END FOR;      END FOR;
     *)  
29    
30      (* backward difference *)      (* backward difference *)
31      FOR i IN [2..n] CREATE      FOR i IN [n] CREATE
32          dz_p[i]:       node[i].dp_dz = (node[i].p - node[i-1].p)/dz;          dz_p[i]:       node[i].dp_dz = (node[i].p - node[i-1].p)/dz;
33          dz_mdot[i]:    node[i].dmdot_dz = (node[i].mdot - node[i-1].mdot)/dz;          dz_mdot[i]:    node[i].dmdot_dz = (node[i].mdot - node[i-1].mdot)/dz;
34          dz_mdoth[i]:   node[i].dmdoth_dz = (node[i].mdoth - node[i-1].mdoth)/dz;          dz_mdoth[i]:   node[i].dmdoth_dz = (node[i].mdoth - node[i-1].mdoth)/dz;
# Line 31  MODEL dsg_array; Line 37  MODEL dsg_array;
37      END FOR;      END FOR;
38    
39      (* forward difference *)      (* forward difference *)
     (*  
40      FOR i IN [1] CREATE      FOR i IN [1] CREATE
41          node[i].dp_dz = (node[i+1].p - node[i].p)/dz;          node[i].dp_dz = (node[i+1].p - node[i].p)/dz;
42          node[i].dmdot_dz = (node[i+1].mdot - node[i].mdot)/dz;          node[i].dmdot_dz = (node[i+1].mdot - node[i].mdot)/dz;
# Line 39  MODEL dsg_array; Line 44  MODEL dsg_array;
44          node[i].drhovel2_dz = (node[i+1].rhovel2 - node[i].rhovel2)/dz;          node[i].drhovel2_dz = (node[i+1].rhovel2 - node[i].rhovel2)/dz;
45          node[i].dekdot_dz = (node[i+1].ekdot - node[i].ekdot)/dz;          node[i].dekdot_dz = (node[i+1].ekdot - node[i].ekdot)/dz;
46      END FOR;      END FOR;
     *)  
47            
48  METHODS  METHODS
49  METHOD specify;  METHOD specify;
50      FOR i IN [1..n] DO      FOR i IN [1..n] DO
51          RUN node[i].specify;          RUN node[i].fix_design;
52            RUN node[i].fix_states;
53      END FOR;      END FOR;
54        RUN node[1].fix_temporals;
55        RUN node[2].fix_temporals;
56  END specify;  END specify;
57    
58  METHOD values;  METHOD values;

Legend:
Removed from v.758  
changed lines
  Added in v.771

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