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; |
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; |
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; |
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; |