59 |
mdot IS_A mass_rate; |
mdot IS_A mass_rate; |
60 |
p IS_A pressure; |
p IS_A pressure; |
61 |
f IS_A positive_factor; (* pipe friction factor *) |
f IS_A positive_factor; (* pipe friction factor *) |
62 |
|
f_LO IS_A positive_factor; (* liquid-only friction factor *) |
63 |
u IS_A specific_energy; |
u IS_A specific_energy; |
64 |
h IS_A specific_enthalpy; |
h IS_A specific_enthalpy; |
65 |
vel IS_A speed; |
vel IS_A speed; |
66 |
qdott, qdotl,qdots IS_A power_per_length; |
qdott, qdotl,qdots IS_A power_per_length; |
67 |
mu IS_A viscosity; |
mu IS_A viscosity; |
68 |
v IS_A specific_volume; |
v IS_A specific_volume; |
69 |
T, T1, Tw, T2, Tamb IS_A temperature; |
T, Tw, Tamb IS_A temperature; |
70 |
ekdot IS_A specific_power; |
ekdot IS_A specific_power; |
71 |
|
|
72 |
rhou IS_A energy_per_volume; |
rhou IS_A energy_per_volume; |
94 |
|
|
95 |
friction: dsg_friction_factor( |
friction: dsg_friction_factor( |
96 |
Re, eps_on_D : INPUT; |
Re, eps_on_D : INPUT; |
97 |
f : OUTPUT |
f_LO : OUTPUT |
98 |
); |
); |
99 |
|
|
100 |
phi2 IS_A positive_factor; |
phi2 IS_A positive_factor; |
107 |
that's a bit tricky and needs conditional modelling, so maybe try putting |
that's a bit tricky and needs conditional modelling, so maybe try putting |
108 |
it in the external code. *) |
it in the external code. *) |
109 |
|
|
110 |
|
f = f_LO*rho2; |
111 |
|
|
112 |
cavity_losses: dsg_ext_heat_loss( |
cavity_losses: dsg_ext_heat_loss( |
113 |
T2,Tamb,D2,hw : INPUT; |
Tw,Tamb,D2,hw : INPUT; |
114 |
qdotl : OUTPUT |
qdotl : OUTPUT |
115 |
); |
); |
116 |
|
|
|
Tw = (T1 + T2)/2; |
|
|
|
|
117 |
mdoth IS_A energy_rate; |
mdoth IS_A energy_rate; |
118 |
mdoth = mdot * h; |
mdoth = mdot * h; |
119 |
|
|
124 |
|
|
125 |
h1 IS_A heat_transfer_coefficient; |
h1 IS_A heat_transfer_coefficient; |
126 |
|
|
127 |
qdott = h1 * 1{PI} * D * (T1 - T); |
qdott = h1 * 1{PI} * D * (Tw - T); |
128 |
|
|
129 |
twophconv: dsg_conv_coeff_two_phase( |
twophconv: dsg_conv_coeff_two_phase( |
130 |
p, h, mdot, D, f : INPUT; |
p, h, mdot, D, f : INPUT; |
143 |
END specify; |
END specify; |
144 |
|
|
145 |
METHOD fix_states; |
METHOD fix_states; |
146 |
FIX T1, T2, p, h, mdot; |
FIX Tw, p, h, mdot; |
147 |
END fix_states; |
END fix_states; |
148 |
|
|
149 |
METHOD fix_design; |
METHOD fix_design; |
178 |
Tamb := 300 {K}; |
Tamb := 300 {K}; |
179 |
|
|
180 |
(* states *) |
(* states *) |
181 |
T1 := 600 {K}; |
Tw := 600 {K}; |
|
T2 := 500 {K}; |
|
182 |
p := 10 {bar}; |
p := 10 {bar}; |
183 |
h := 4000 {kJ/kg}; |
h := 4000 {kJ/kg}; |
184 |
mdot := 0.001 {kg/s}; |
mdot := 0.001 {kg/s}; |