/[ascend]/trunk/models/johnpye/absorber.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/absorber.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 320 - (show annotations) (download) (as text)
Thu Feb 23 13:38:40 2006 UTC (14 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 3360 byte(s)
Some messing about...
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
28 m_water IS_A mass;
29 m_gas IS_A mass;
30
31 Q IS_A energy_rate; (* heat absorbed *)
32
33 (* assume saturated water at inlet, so any heat added immediately creates some steam *)
34 Hdot_in IS_A energy_rate;
35 Hdot_out IS_A energy_rate;
36 h_water IS_A specific_enthalpy;
37 z01: h_water = 400 {kJ/kg} + p / (1000 {kg/m^3});
38
39 z02: Hdot_in = mdot_water_in * h_water;
40 z03: Hdot_out = mdot_water_out * h_water + mdot_gas_out * S_out.h;
41
42 (* 1st law thermo *)
43 z04: Q = Hdot_out - Hdot_in;
44
45 (* mass conservation *)
46 z05: mdot_water_in = mdot_water_out + mdot_gas_out;
47
48 x_exit IS_A fraction;
49 z06: x_exit * mdot_water_in = mdot_gas_out;
50
51 (* assume that steam evolves linearly along length, so average x allow mass of water to be calculated *)
52 x IS_A fraction;
53 z07: x = (0 + x_exit)/2;
54
55 (* assuming a slip-ratio of 1, we can get the average void ratio, eq 2.13 from Behnia *)
56 alpha IS_A fraction;
57 z08: alpha * S_out.rho * (1-x) = 1000{kg/m^3} * x * (1-alpha);
58
59 z09: m_water = 1000{kg/m^3} * (1-alpha)*V_total;
60 z10: m_gas = S_out.rho * alpha*V_total;
61
62 z11: Vdot_gas_out = mdot_gas_out / rho_gas;
63 V_total IS_A volume;
64
65 METHODS
66 METHOD default_self;
67 RUN reset;
68 RUN values;
69 END default_self;
70 METHOD specify;
71 FIX V_total, mdot_water_in, Q, T;
72 END specify;
73 METHOD values;
74 V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;
75 mdot_water_in := 0.4 {kg/s};
76 Q := 800 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
77 T := 500 {K};
78 (* free vars *)
79 END values;
80
81 END absorber;
82
83
84 (*
85 This model seems completely correct but it won't converge.
86 It's a problem with the S_out converging from defined (p,h).
87
88 Need to investivate
89 *)
90 MODEL absorber2;
91 S_in IS_A iapws95_2phase;
92 S_out IS_A iapws95_2phase;
93 mdot_in IS_A mass_rate;
94 mdot_out IS_A mass_rate;
95 Q IS_A energy_rate;
96 m_water IS_A mass;
97 V_total IS_A volume;
98
99 H_in IS_A energy_rate;
100 H_in = mdot_in*S_in.h;
101 H_out IS_A energy_rate;
102 H_out = mdot_out*S_out.h;
103
104 Q = H_out - H_in;
105
106 mdot_out = mdot_in;
107 S_out.p = S_in.p;
108
109 x_avg IS_A fraction;
110 alpha IS_A fraction;
111 x_avg = (S_in.x + S_out.x) / 2;
112 alpha * S_out.rho * (1-x_avg) = 1000{kg/m^3} * x_avg * (1-alpha);
113
114 m_water = S_in.rhol * (1-alpha) * V_total;
115
116 METHODS
117 METHOD default_self;
118 RUN reset; RUN values;
119 RUN scale_self;
120 END default_self;
121
122 METHOD scale_self;
123 S_out.Sl.rho.nominal := 800 {kg/m^3};
124 END scale_self;
125
126 METHOD specify;
127 FIX V_total, Q;
128 FIX mdot_in, S_in.T, S_in.rho;
129 END specify;
130
131 METHOD values;
132 V_total := 300{m} * 16 * 1{PI}*( 40{mm} )^2;
133 mdot_in := 0.4 {kg/s};
134 Q := 800 {W/m^2} * 27(*concentration*) * 500{mm} * 60{m};
135 S_in.T := 175 {K} + 273.15 {K};
136 S_in.rho := 892 {kg/m^3};
137
138 (* free *)
139 S_out.T := S_in.T;
140 S_out.rho := S_in.rho;
141 END values;
142
143 END absorber2;

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