Changeset 735 for branches/gui/eml/stage_separators/reboiler.mso
- Timestamp:
- Feb 26, 2009, 11:00:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/reboiler.mso
r721 r735 36 36 * the inlet stream; 37 37 * the liquid inlet stream; 38 * the outlet flows: OutletV .F and OutletL.F;38 * the outlet flows: OutletVapour.F and OutletLiquid.F; 39 39 * the heat supply. 40 40 41 41 == Initial Conditions == 42 42 43 * the reboiler temperature (OutletL .T);43 * the reboiler temperature (OutletLiquid.T); 44 44 * the reboiler liquid level (Level); 45 * (NoComps - 1) OutletL (OR OutletV) compositions.45 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 46 46 "; 47 47 … … 58 58 VARIABLES 59 59 60 in InletL as stream (Brief="Liquid inlet stream", PosX=0.15, PosY=1, Symbol="_{inL}");61 out OutletL as liquid_stream (Brief="Liquid outlet stream", PosX=0.40, PosY=1, Symbol="_{outL}");62 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.40, PosY=0, Symbol="_{outV}");60 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.15, PosY=1, Symbol="_{inL}"); 61 out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.40, PosY=1, Symbol="_{outL}"); 62 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.40, PosY=0, Symbol="_{outV}"); 63 63 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0, Symbol="_{in}"); 64 64 … … 75 75 76 76 Level = Initial_Level; 77 OutletL .T = Initial_Temperature;78 OutletL .z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition);77 OutletLiquid.T = Initial_Temperature; 78 OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 79 79 80 80 EQUATIONS 81 81 "Component Molar Balance" 82 diff(M)= InletL .F*InletL.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z;82 diff(M)= InletLiquid.F*InletLiquid.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; 83 83 84 84 "Energy Balance" 85 diff(E) = InletL .F*InletL.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ;85 diff(E) = InletLiquid.F*InletLiquid.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ; 86 86 87 87 "Molar Holdup" 88 M = ML*OutletL .z + MV*OutletV.z;88 M = ML*OutletLiquid.z + MV*OutletVapour.z; 89 89 90 90 "Energy Holdup" 91 E = ML*OutletL .h + MV*OutletV.h - OutletL.P*V;91 E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; 92 92 93 93 "Mol fraction normalisation" 94 sum(OutletL .z)=1.0;95 sum(OutletL .z)=sum(OutletV.z);94 sum(OutletLiquid.z)=1.0; 95 sum(OutletLiquid.z)=sum(OutletVapour.z); 96 96 97 97 "Vapour Density" 98 rhoV = PP.VapourDensity(OutletV .T, OutletV.P, OutletV.z);98 rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); 99 99 100 100 "Liquid Volume" 101 vL = PP.LiquidVolume(OutletL .T, OutletL.P, OutletL.z);101 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); 102 102 103 103 "Vapour Volume" 104 vV = PP.VapourVolume(OutletV .T, OutletV.P, OutletV.z);104 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); 105 105 106 106 "Chemical Equilibrium" 107 PP.LiquidFugacityCoefficient(OutletL .T, OutletL.P, OutletL.z)*OutletL.z = PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;107 PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; 108 108 109 109 "Mechanical Equilibrium" 110 OutletL .P = OutletV.P;110 OutletLiquid.P = OutletVapour.P; 111 111 112 112 "Thermal Equilibrium" 113 OutletL .T = OutletV.T;113 OutletLiquid.T = OutletVapour.T; 114 114 115 115 "Geometry Constraint" … … 136 136 137 137 == Specify == 138 * the InletL stream;139 * the heat supply OR the outlet temperature (OutletV .T);138 * the InletLiquid stream; 139 * the heat supply OR the outlet temperature (OutletVapour.T); 140 140 "; 141 141 … … 146 146 147 147 VARIABLES 148 in InletL as stream (Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");149 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");148 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); 149 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); 150 150 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 151 151 vV as volume_mol (Brief="Vapour Molar volume"); … … 155 155 156 156 "Molar Balance" 157 InletL .F = OutletV.F;158 InletL .z = OutletV.z;157 InletLiquid.F = OutletVapour.F; 158 InletLiquid.z = OutletVapour.z; 159 159 160 160 "Vapour Volume" 161 vV = PP.VapourVolume(OutletV .T, OutletV.P, OutletV.z);161 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); 162 162 163 163 "Vapour Density" 164 rhoV = PP.VapourDensity(OutletV .T, OutletV.P, OutletV.z);164 rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); 165 165 166 166 "Energy Balance" 167 InletL .F*InletL.h + InletQ = OutletV.F*OutletV.h;167 InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; 168 168 169 169 "Pressure" 170 DP = InletL .P - OutletV.P;170 DP = InletLiquid.P - OutletVapour.P; 171 171 172 172 end … … 195 195 196 196 VARIABLES 197 in InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");198 out OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");197 in InletLiquid as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); 198 out OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); 199 199 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 200 200 201 201 EQUATIONS 202 202 "Molar Balance" 203 InletL .F = OutletV.F;204 InletL .z = OutletV.z;203 InletLiquid.F = OutletVapour.F; 204 InletLiquid.z = OutletVapour.z; 205 205 206 206 "Energy Balance" 207 InletL .F*InletL.h + InletQ = OutletV.F*OutletV.h;207 InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; 208 208 209 209 "Pressure" 210 DP = InletL .P - OutletV.P;210 DP = InletLiquid.P - OutletVapour.P; 211 211 212 212 "Fake Vapourisation Fraction" 213 OutletV .v = 1.0;213 OutletVapour.v = 1.0; 214 214 215 215 "Fake output temperature" 216 OutletV .T = 300*'K';216 OutletVapour.T = 300*'K'; 217 217 218 218 "Pressure Drop through the reboiler" 219 OutletV .F = k*InletQ;219 OutletVapour.F = k*InletQ; 220 220 end 221 221 … … 239 239 * the inlet stream; 240 240 * the liquid inlet stream; 241 * the outlet flows: OutletV .F and OutletL.F;241 * the outlet flows: OutletVapour.F and OutletLiquid.F; 242 242 * the heat supply. 243 243 244 244 == Initial Conditions == 245 * the reboiler temperature (OutletL .T);245 * the reboiler temperature (OutletLiquid.T); 246 246 * the reboiler liquid level (Level); 247 * (NoComps - 1) OutletL (OR OutletV) compositions.247 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 248 248 "; 249 249 … … 262 262 263 263 VARIABLES 264 in InletL as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}");265 out OutletL as liquid_stream (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");266 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");264 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}"); 265 out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}"); 266 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}"); 267 267 InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}"); 268 268 … … 282 282 283 283 Level = Initial_Level; 284 OutletL .T = Initial_Temperature;285 OutletL .z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition);284 OutletLiquid.T = Initial_Temperature; 285 OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 286 286 287 287 EQUATIONS 288 288 "Molar Concentration" 289 OutletL .z = vL * C;289 OutletLiquid.z = vL * C; 290 290 291 291 "Reaction" 292 r3 = exp(-7150*'K'/OutletL .T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';292 r3 = exp(-7150*'K'/OutletLiquid.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s'; 293 293 294 294 "Component Molar Balance" 295 diff(M)= InletL .F*InletL.z- OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;295 diff(M)= InletLiquid.F*InletLiquid.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z + stoic*r3*ML*vL; 296 296 297 297 "Energy Balance" 298 diff(E) = InletL .F*InletL.h- OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML;298 diff(E) = InletLiquid.F*InletLiquid.h- OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ + Hr * r3 * vL*ML; 299 299 300 300 "Molar Holdup" 301 M = ML*OutletL .z + MV*OutletV.z;301 M = ML*OutletLiquid.z + MV*OutletVapour.z; 302 302 303 303 "Energy Holdup" 304 E = ML*OutletL .h + MV*OutletV.h - OutletL.P*V;304 E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; 305 305 306 306 "Mol fraction normalisation" 307 sum(OutletL .z)=1.0;307 sum(OutletLiquid.z)=1.0; 308 308 309 309 "Liquid Volume" 310 vL = PP.LiquidVolume(OutletL .T, OutletL.P, OutletL.z);310 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); 311 311 312 312 "Vapour Volume" 313 vV = PP.VapourVolume(OutletV .T, OutletV.P, OutletV.z);313 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); 314 314 315 315 "Vapour Density" 316 rhoV = PP.VapourDensity(OutletV .T, OutletV.P, OutletV.z);316 rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); 317 317 318 318 "Level of liquid phase" … … 322 322 323 323 "Mechanical Equilibrium" 324 OutletL .P = OutletV.P;324 OutletLiquid.P = OutletVapour.P; 325 325 326 326 "Thermal Equilibrium" 327 OutletL .T = OutletV.T;327 OutletLiquid.T = OutletVapour.T; 328 328 329 329 "Geometry Constraint" … … 331 331 332 332 "Chemical Equilibrium" 333 PP.LiquidFugacityCoefficient(OutletL .T, OutletL.P, OutletL.z)*OutletL.z =334 PP.VapourFugacityCoefficient(OutletV .T, OutletV.P, OutletV.z)*OutletV.z;335 336 sum(OutletL .z)=sum(OutletV.z);333 PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = 334 PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; 335 336 sum(OutletLiquid.z)=sum(OutletVapour.z); 337 337 338 338 end
Note: See TracChangeset
for help on using the changeset viewer.