/[ascend]/trunk/models/steam/dsgsat2.a4c
ViewVC logotype

Diff of /trunk/models/steam/dsgsat2.a4c

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

revision 1054 by johnpye, Sat Jan 6 04:04:47 2007 UTC revision 1055 by johnpye, Sat Jan 6 14:47:13 2007 UTC
# Line 16  REQUIRE "steam/satsteamstream.a4c"; Line 16  REQUIRE "steam/satsteamstream.a4c";
16    
17  MODEL dsgsat2;  MODEL dsgsat2;
18      n IS_A integer_constant;      n IS_A integer_constant;
19      n :== 3;      n :== 5;
20    
21      (* temporal derivatives *)      (* temporal derivatives *)
22      drho_dt[2..n] IS_A density_rate;      drho_dt[2..n] IS_A density_rate;
# Line 114  METHOD values; Line 114  METHOD values;
114          drhou_dt[i] := 0 {kJ/m^3/s};          drhou_dt[i] := 0 {kJ/m^3/s};
115          dTw_dt[i] := 0 {K/s};          dTw_dt[i] := 0 {K/s};
116      END FOR;      END FOR;
117        t := 0 {s};
118  END values;  END values;
119  METHOD on_load;  METHOD on_load;
120      RUN specify;      RUN specify;
# Line 123  METHOD on_load; Line 124  METHOD on_load;
124      RUN values;      RUN values;
125      RUN ode_init;      RUN ode_init;
126      EXTERNAL solvernotes(SELF);      EXTERNAL solvernotes(SELF);
127      (* RUN ode_init;      EXTERNAL solve(SELF);
128      RUN solve; *) (* after fixing the states and freeing the derivatives *)      RUN fixed_states;
129  END on_load;  END on_load;
130  METHOD fixed_states;  METHOD fixed_states;
     t := 0 {s};  
131      qdot_s := 10 {W/m};      qdot_s := 10 {W/m};
132      FOR i IN [2..n] DO      FOR i IN [2..n] DO
133          FREE drho_dt[i];  FIX node[i].rho;          FREE drho_dt[i];  FIX node[i].rho;
# Line 170  METHOD ode_init; Line 170  METHOD ode_init;
170          *)          *)
171      END FOR;      END FOR;
172    
173      FOR i IN [1,n] DO      FOR i IN [1..n] DO
174          p[i].obs_id := 1 + 4*i;          p[i].obs_id := 1 + 4*i;
175          x[i].obs_id := 2 + 4*i+1;          x[i].obs_id := 2 + 4*i+1;
176      END FOR;      END FOR;
177      FOR i IN [2,n] DO      FOR i IN [] DO
178          (* qdot_t[i].obs_id := 3 + 4*i; *)          (* qdot_t[i].obs_id := 3 + 4*i; *)
179            node[i].mdot.obs_id := 3 + 4*i;
180          T_w[i].obs_id := 4 + 4*i;          T_w[i].obs_id := 4 + 4*i;
181      END FOR;      END FOR;
182  END ode_init;  END ode_init;

Legend:
Removed from v.1054  
changed lines
  Added in v.1055

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