1 |
REQUIRE "johnpye/iapws95.a4c"; |
2 |
REQUIRE "johnpye/iapws_sat_curves.a4c"; |
3 |
|
4 |
|
5 |
MODEL absorber; |
6 |
(* assumptions: |
7 |
outlet is saturated steam |
8 |
inlet is saturated water at the specified pressure |
9 |
no pressure drop |
10 |
no temperature change |
11 |
all Q is absorbed by water |
12 |
steam generation is constant along length as mass rate, so x rises linearly. |
13 |
*) |
14 |
S_out IS_A iapws95_2phase; (* outlet steam state *) |
15 |
sat IS_A iapws_sat_density; |
16 |
T ALIASES S_out.T; |
17 |
T,sat.T ARE_THE_SAME; |
18 |
rho_gas ALIASES S_out.rho; |
19 |
rho_gas, sat.rhog ARE_THE_SAME; |
20 |
|
21 |
p ALIASES S_out.p; |
22 |
|
23 |
mdot_water_in IS_A mass_rate; |
24 |
mdot_water_out IS_A mass_rate; |
25 |
mdot_gas_out IS_A mass_rate; |
26 |
Vdot_gas_out IS_A volume_rate; |
27 |
mdot_out ALIASES mdot_water_in; |
28 |
|
29 |
m_water IS_A mass; |
30 |
m_gas IS_A mass; |
31 |
|
32 |
Q IS_A energy_rate; (* heat absorbed *) |
33 |
|
34 |
(* assume saturated water at inlet, so any heat added immediately creates some steam *) |
35 |
Hdot_in IS_A energy_rate; |
36 |
Hdot_out IS_A energy_rate; |
37 |
h_water IS_A specific_enthalpy; |
38 |
z01: h_water = 400 {kJ/kg} + p / (1000 {kg/m^3}); |
39 |
|
40 |
z02: Hdot_in = mdot_water_in * h_water; |
41 |
z03: Hdot_out = mdot_water_out * h_water + mdot_gas_out * S_out.h; |
42 |
|
43 |
(* 1st law thermo *) |
44 |
z04: Q = Hdot_out - Hdot_in; |
45 |
|
46 |
(* mass conservation *) |
47 |
z05: mdot_water_in = mdot_water_out + mdot_gas_out; |
48 |
|
49 |
x_exit IS_A fraction; |
50 |
z06: x_exit * mdot_water_in = mdot_gas_out; |
51 |
|
52 |
(* assume that steam evolves linearly along length, so average x allow mass of water to be calculated *) |
53 |
x IS_A fraction; |
54 |
z07: x = (0 + x_exit)/2; |
55 |
|
56 |
(* assuming a slip-ratio of 1, we can get the average void ratio, eq 2.13 from Behnia *) |
57 |
alpha IS_A fraction; |
58 |
z08: alpha * S_out.rho * (1-x) = 1000{kg/m^3} * x * (1-alpha); |
59 |
|
60 |
z09: m_water = 1000{kg/m^3} * (1-alpha)*V_total; |
61 |
z10: m_gas = S_out.rho * alpha*V_total; |
62 |
|
63 |
z11: Vdot_gas_out = mdot_gas_out / rho_gas; |
64 |
V_total IS_A volume; |
65 |
|
66 |
METHODS |
67 |
METHOD default_self; |
68 |
RUN reset; |
69 |
RUN values; |
70 |
END default_self; |
71 |
METHOD specify; |
72 |
FIX V_total, mdot_water_in, Q, T; |
73 |
END specify; |
74 |
METHOD values; |
75 |
V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2; |
76 |
mdot_water_in := 0.4 {kg/s}; |
77 |
Q := 800 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m}; |
78 |
T := 500 {K}; |
79 |
(* free vars *) |
80 |
END values; |
81 |
|
82 |
END absorber; |
83 |
|
84 |
|
85 |
(* |
86 |
This model seems completely correct but it won't converge. |
87 |
It's a problem with the S_out converging from defined (p,h). |
88 |
|
89 |
Need to investivate |
90 |
*) |
91 |
MODEL absorber2; |
92 |
S_in IS_A iapws95_2phase; |
93 |
S_out IS_A iapws95_2phase; |
94 |
mdot_in IS_A mass_rate; |
95 |
mdot_out IS_A mass_rate; |
96 |
Q IS_A energy_rate; |
97 |
m_water IS_A mass; |
98 |
V_total IS_A volume; |
99 |
|
100 |
H_in IS_A energy_rate; |
101 |
H_in = mdot_in*S_in.h; |
102 |
H_out IS_A energy_rate; |
103 |
H_out = mdot_out*S_out.h; |
104 |
|
105 |
Q = H_out - H_in; |
106 |
|
107 |
mdot_out = mdot_in; |
108 |
S_out.T = S_in.T; (* only valid so long as outlet is saturated as wel!!!!*) |
109 |
|
110 |
x_avg IS_A fraction; |
111 |
alpha IS_A fraction; |
112 |
x_avg = (S_in.x + S_out.x) / 2; |
113 |
alpha * S_out.rho * (1-x_avg) = 1000{kg/m^3} * x_avg * (1-alpha); |
114 |
|
115 |
m_water = S_in.rhol * (1-alpha) * V_total; |
116 |
|
117 |
METHODS |
118 |
METHOD default_self; |
119 |
RUN reset; RUN values; |
120 |
RUN scale_self; |
121 |
END default_self; |
122 |
|
123 |
METHOD scale_self; |
124 |
S_out.Sl.rho.nominal := 800 {kg/m^3}; |
125 |
END scale_self; |
126 |
|
127 |
METHOD specify; |
128 |
FIX V_total, Q; |
129 |
FIX mdot_in, S_in.T, S_in.rho; |
130 |
END specify; |
131 |
|
132 |
METHOD values; |
133 |
V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2; |
134 |
mdot_in := 0.4 {kg/s}; |
135 |
Q := 800 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m}; |
136 |
S_in.T := 175 {K} + 273.15 {K}; |
137 |
S_in.rho := 892 {kg/m^3}; |
138 |
|
139 |
(* free *) |
140 |
S_out.T := S_in.T; |
141 |
S_out.rho := S_in.rho; |
142 |
END values; |
143 |
|
144 |
END absorber2; |