26 |
A, A_w IS_A area; |
A, A_w IS_A area; |
27 |
h_int IS_A heat_transfer_coefficient; (* internal *) |
h_int IS_A heat_transfer_coefficient; (* internal *) |
28 |
h_ext IS_A heat_transfer_coefficient; (* external *) |
h_ext IS_A heat_transfer_coefficient; (* external *) |
29 |
A = 1{PI}*D^2/4; |
z_A: A = 1{PI}*D^2/4; |
30 |
A_w = 1{PI}*(D_2^2 - D^2)/4; |
z_Aw: A_w = 1{PI}*(D_2^2 - D^2)/4; |
31 |
dz IS_A distance; |
dz IS_A distance; |
32 |
L IS_A distance; |
L IS_A distance; |
33 |
dz = L / n; |
z_dz: dz = L / n; |
34 |
|
|
35 |
(* fluid properties *) |
(* fluid properties *) |
36 |
node[1..n] IS_A satsteamstream; |
node[1..n] IS_A satsteamstream; |
37 |
|
|
38 |
(* flow properties *) |
(* flow properties *) |
39 |
vel[1..n] IS_A speed; |
vel[1..n] IS_A speed; |
40 |
T_w[1..n] IS_A temperature; |
T_w[2..n] IS_A temperature; |
41 |
T[1..n] IS_A temperature; |
T[1..n] IS_A temperature; |
42 |
|
|
43 |
(* constants, for the moment: *) |
(* constants, for the moment: *) |
44 |
f IS_A positive_factor; |
f IS_A positive_factor; |
45 |
mu_f IS_A viscosity; |
(* mu_f IS_A viscosity; *) |
46 |
T_amb IS_A temperature; |
T_amb IS_A temperature; |
47 |
|
|
48 |
(* system dynamics *) |
(* system dynamics *) |
51 |
rhou[1..n] IS_A energy_per_volume; |
rhou[1..n] IS_A energy_per_volume; |
52 |
|
|
53 |
FOR i IN [1..n] CREATE |
FOR i IN [1..n] CREATE |
54 |
vel[i] = node[i].v*node[i].mdot/A; |
z_vel[i]: vel[i] = node[i].v*node[i].mdot/A; |
55 |
rhou[i] = node[i].rho * node[i].u; |
z_rhou[i]: rhou[i] = node[i].rho * node[i].u; |
56 |
END FOR; |
END FOR; |
57 |
|
|
58 |
(* some aliases just for easier review of the state of the model *) |
(* some aliases just for easier review of the state of the model *) |
100 |
END configure_steady; |
END configure_steady; |
101 |
METHOD bound_steady; |
METHOD bound_steady; |
102 |
RUN bound_self; |
RUN bound_self; |
103 |
T_w[1..n].upper_bound := 1000 {K}; |
T_w[2..n].upper_bound := 1000 {K}; |
104 |
END bound_steady; |
END bound_steady; |
105 |
METHOD specify_steady; |
METHOD specify_steady; |
106 |
(* change to a proper steady-state problem, with fluid properties FREEd *) |
(* change to a proper steady-state problem, with fluid properties FREEd *) |
114 |
FIX qdot_s; |
FIX qdot_s; |
115 |
FIX D, D_2, L; |
FIX D, D_2, L; |
116 |
FIX h_int, c_w, rho_w, h_ext; |
FIX h_int, c_w, rho_w, h_ext; |
117 |
FIX f, mu_f; |
FIX f; |
118 |
|
(* FIX mu_f; *) |
119 |
FIX T_amb; |
FIX T_amb; |
120 |
(* fix derivatives to zero *) |
(* fix derivatives to zero *) |
121 |
FOR i IN [2..n] DO |
FOR i IN [2..n] DO |