Changeset 339
- Timestamp:
- Aug 14, 2007, 2:46:50 PM (16 years ago)
- Location:
- branches/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/tests/eml/heat_exchangers/HeatExchangerSimplified.mso
r325 r339 36 36 VARIABLES 37 37 38 in InletHot as stream (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915);38 in InletHot as streamTherm (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915); 39 39 out OutletHot as streamPH (Brief="Outlet Hot Stream", PosX=1, PosY=0.4915); 40 in InletCold as stream (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1);40 in InletCold as streamTherm (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1); 41 41 out OutletCold as streamPH (Brief="Outlet Cold Stream", PosX=0.5237, PosY=0); 42 43 xh(NComp) as fraction (Brief = "Liquid Molar Fraction in Hot Side");44 yh(NComp) as fraction (Brief = "Vapour Molar Fraction in Hot Side");45 vh as fraction (Brief = "Vapour Molar Fraction in Hot Side");46 47 xc(NComp) as fraction (Brief = "Liquid Molar Fraction in Cold Side");48 yc(NComp) as fraction (Brief = "Vapour Molar Fraction in Cold Side");49 vc as fraction (Brief = "Vapour Molar Fraction in Cold Side");50 42 51 43 Details as Details_Main (Brief="Heat Exchanger Details"); … … 60 52 EQUATIONS 61 53 62 "Flash Calculation in Hot Side"63 [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z);64 65 "Flash Calculation in Cold Side"66 [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z);54 #"Flash Calculation in Hot Side" 55 # [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z); 56 57 #"Flash Calculation in Cold Side" 58 # [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z); 67 59 68 60 "Hot Stream Average Temperature" … … 91 83 92 84 "Cold Stream Average Heat Capacity" 93 ColdSide.Properties.Average.Cp = (1-InletCold.v)*PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, xc) +94 InletCold.v*PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, yc);85 ColdSide.Properties.Average.Cp = (1-InletCold.v)*PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x) + 86 InletCold.v*PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); 95 87 96 88 "Cold Stream Inlet Heat Capacity" 97 ColdSide.Properties.Inlet.Cp = (1-InletCold.v)*PP.LiquidCp(InletCold.T,InletCold.P, xc)+98 InletCold.v*PP.VapourCp(InletCold.T,InletCold.P, yc);89 ColdSide.Properties.Inlet.Cp = (1-InletCold.v)*PP.LiquidCp(InletCold.T,InletCold.P,InletCold.x)+ 90 InletCold.v*PP.VapourCp(InletCold.T,InletCold.P,InletCold.y); 99 91 100 92 "Cold Stream Outlet Heat Capacity" … … 103 95 104 96 "Cold Stream Average Mass Density" 105 ColdSide.Properties.Average.rho = (1-InletCold.v)*PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, xc)+106 InletCold.v*PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, yc);97 ColdSide.Properties.Average.rho = (1-InletCold.v)*PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ 98 InletCold.v*PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); 107 99 108 100 "Cold Stream Inlet Mass Density" 109 ColdSide.Properties.Inlet.rho = (1-InletCold.v)*PP.LiquidDensity(InletCold.T,InletCold.P, xc)+110 InletCold.v*PP.VapourDensity(InletCold.T,InletCold.P, yc);101 ColdSide.Properties.Inlet.rho = (1-InletCold.v)*PP.LiquidDensity(InletCold.T,InletCold.P,InletCold.x)+ 102 InletCold.v*PP.VapourDensity(InletCold.T,InletCold.P,InletCold.y); 111 103 112 104 "Cold Stream Outlet Mass Density" … … 115 107 116 108 "Cold Stream Average Viscosity" 117 ColdSide.Properties.Average.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, xc)+118 InletCold.v*PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, yc);109 ColdSide.Properties.Average.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ 110 InletCold.v*PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); 119 111 120 112 "Cold Stream inlet Viscosity" 121 ColdSide.Properties.Inlet.Mu = (1-InletCold.v)*PP.LiquidViscosity(InletCold.T,InletCold.P, xc)+122 InletCold.v*PP.VapourViscosity(InletCold.T,InletCold.P, yc);113 ColdSide.Properties.Inlet.Mu = (1-InletCold.v)*PP.LiquidViscosity(InletCold.T,InletCold.P,InletCold.x)+ 114 InletCold.v*PP.VapourViscosity(InletCold.T,InletCold.P,InletCold.y); 123 115 124 116 "Cold Stream Outlet Viscosity" … … 127 119 128 120 "Cold Stream Average Conductivity" 129 ColdSide.Properties.Average.K = (1-InletCold.v)*PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, xc)+130 InletCold.v*PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P, yc);121 ColdSide.Properties.Average.K = (1-InletCold.v)*PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ 122 InletCold.v*PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); 131 123 132 124 "Cold Stream Inlet Conductivity" 133 ColdSide.Properties.Inlet.K = (1-InletCold.v)*PP.LiquidThermalConductivity(InletCold.T,InletCold.P, xc)+134 InletCold.v*PP.VapourThermalConductivity(InletCold.T,InletCold.P, yc);125 ColdSide.Properties.Inlet.K = (1-InletCold.v)*PP.LiquidThermalConductivity(InletCold.T,InletCold.P,InletCold.x)+ 126 InletCold.v*PP.VapourThermalConductivity(InletCold.T,InletCold.P,InletCold.y); 135 127 136 128 "Cold Stream Outlet Conductivity" … … 139 131 140 132 "Cold Stream Viscosity at Wall Temperature" 141 ColdSide.Properties.Wall.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P, xc)+142 InletCold.v*PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P, yc);133 ColdSide.Properties.Wall.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.x)+ 134 InletCold.v*PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.y); 143 135 144 136 "Hot Stream Average Heat Capacity" 145 HotSide.Properties.Average.Cp = (1-InletHot.v)*PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P, xc) +146 InletHot.v*PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P, yc);137 HotSide.Properties.Average.Cp = (1-InletHot.v)*PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x) + 138 InletHot.v*PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); 147 139 148 140 "Hot Stream Inlet Heat Capacity" 149 HotSide.Properties.Inlet.Cp = (1-InletHot.v)*PP.LiquidCp(InletHot.T,InletHot.P, xc)+150 InletHot.v*PP.VapourCp(InletHot.T,InletHot.P, yc);141 HotSide.Properties.Inlet.Cp = (1-InletHot.v)*PP.LiquidCp(InletHot.T,InletHot.P,InletHot.x)+ 142 InletHot.v*PP.VapourCp(InletHot.T,InletHot.P,InletHot.y); 151 143 152 144 "Hot Stream Outlet Heat Capacity" … … 155 147 156 148 "Hot Stream Average Mass Density" 157 HotSide.Properties.Average.rho = (1-InletHot.v)*PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, xc)+158 InletHot.v*PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, yc);149 HotSide.Properties.Average.rho = (1-InletHot.v)*PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ 150 InletHot.v*PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); 159 151 160 152 "Hot Stream Inlet Mass Density" 161 HotSide.Properties.Inlet.rho = (1-InletHot.v)*PP.LiquidDensity(InletHot.T,InletHot.P, xc)+162 InletHot.v*PP.VapourDensity(InletHot.T,InletHot.P, yc);153 HotSide.Properties.Inlet.rho = (1-InletHot.v)*PP.LiquidDensity(InletHot.T,InletHot.P,InletHot.x)+ 154 InletHot.v*PP.VapourDensity(InletHot.T,InletHot.P,InletHot.y); 163 155 164 156 "Hot Stream Outlet Mass Density" … … 167 159 168 160 "Hot Stream Average Viscosity" 169 HotSide.Properties.Average.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, xc)+170 InletHot.v*PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, yc);161 HotSide.Properties.Average.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ 162 InletHot.v*PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); 171 163 172 164 "Hot Stream inlet Viscosity" 173 HotSide.Properties.Inlet.Mu = (1-InletHot.v)*PP.LiquidViscosity(InletHot.T,InletHot.P, xc)+174 InletHot.v*PP.VapourViscosity(InletHot.T,InletHot.P, yc);165 HotSide.Properties.Inlet.Mu = (1-InletHot.v)*PP.LiquidViscosity(InletHot.T,InletHot.P,InletHot.x)+ 166 InletHot.v*PP.VapourViscosity(InletHot.T,InletHot.P,InletHot.y); 175 167 176 168 "Hot Stream Outlet Viscosity" … … 179 171 180 172 "Hot Stream Average Conductivity" 181 HotSide.Properties.Average.K = (1-InletHot.v)*PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, xc)+182 InletHot.v*PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P, yc);173 HotSide.Properties.Average.K = (1-InletHot.v)*PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ 174 InletHot.v*PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); 183 175 184 176 "Hot Stream Inlet Conductivity" 185 HotSide.Properties.Inlet.K = (1-InletHot.v)*PP.LiquidThermalConductivity(InletHot.T,InletHot.P, xc)+186 InletHot.v*PP.VapourThermalConductivity(InletHot.T,InletHot.P, yc);177 HotSide.Properties.Inlet.K = (1-InletHot.v)*PP.LiquidThermalConductivity(InletHot.T,InletHot.P,InletHot.x)+ 178 InletHot.v*PP.VapourThermalConductivity(InletHot.T,InletHot.P,InletHot.y); 187 179 188 180 "Hot Stream Outlet Conductivity" … … 191 183 192 184 "Hot Stream Viscosity at Wall Temperature" 193 HotSide.Properties.Wall.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P, xc)+194 InletHot.v*PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P, yc);185 HotSide.Properties.Wall.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.x)+ 186 InletHot.v*PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.y); 195 187 196 188 "Energy Balance Hot Stream" -
branches/tests/eml/streams.mso
r325 r339 35 35 36 36 VARIABLES 37 F as flow_mol ;38 T as temperature ;39 P as pressure ;37 F as flow_mol(Brief = "Molar Flow"); 38 T as temperature(Brief = "Temperature"); 39 P as pressure(Brief = "Pressure"); 40 40 z(NComp) as fraction(Brief = "Overall Molar Fraction"); 41 h as enth_mol ;41 h as enth_mol(Brief = "Molar Enthalpy"); 42 42 v as fraction(Brief = "Vapourization fraction"); 43 end 44 45 Model streamTherm as stream 46 ATTRIBUTES 47 Pallete = false; 48 Brief = "General Material Stream"; 49 Info = 50 "comments."; 51 52 PARAMETERS 53 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 54 55 VARIABLES 56 x(NComp) as fraction(Brief = "Liquid Molar Fraction"); 57 y(NComp) as fraction(Brief = "Vapour Molar Fraction"); 58 43 59 end 44 60 … … 60 76 "Liquid stream" 61 77 v = 0; 78 62 79 end 63 80 … … 79 96 "Vapour stream" 80 97 v = 1; 81 end 82 83 Model streamPH as stream 98 99 end 100 101 Model streamPH as streamTherm 84 102 ATTRIBUTES 85 103 Brief = "Stream with built-in flash calculation"; … … 99 117 PARAMETERS 100 118 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 101 102 VARIABLES103 x(NComp) as fraction(Brief = "Liquid Molar Fraction");104 y(NComp) as fraction(Brief = "Vapour Molar Fraction");105 119 106 120 EQUATIONS … … 150 164 151 165 VARIABLES 152 out Outlet as stream (Brief = "Outlet stream", PosX=1, PosY=0.5256); 153 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 154 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 166 out Outlet as streamTherm (Brief = "Outlet stream", PosX=1, PosY=0.5256); 155 167 hl as enth_mol; 156 168 hv as enth_mol; … … 165 177 EQUATIONS 166 178 "Flash Calculation" 167 [Outlet.v, x,y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z);179 [Outlet.v, Outlet.x, Outlet.y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 168 180 169 181 "Overall Enthalpy" 170 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +171 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);172 173 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);174 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);182 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, Outlet.x) + 183 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, Outlet.y); 184 185 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, Outlet.x); 186 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, Outlet.y); 175 187 176 188 "Average Molecular Weight" … … 184 196 case "correlation": 185 197 "Mass Density" 186 rho*((1-Outlet.v)/PP.LiquidDensity(Outlet.T,Outlet.P, x) + Outlet.v/PP.VapourDensity(Outlet.T,Outlet.P,y)) = 1;198 rho*((1-Outlet.v)/PP.LiquidDensity(Outlet.T,Outlet.P,Outlet.x) + Outlet.v/PP.VapourDensity(Outlet.T,Outlet.P,Outlet.y)) = 1; 187 199 end 188 200 … … 194 206 195 207 "Molar Volume" 196 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y);208 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, Outlet.x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,Outlet.y); 197 209 198 210 "Volumetric Flow" … … 226 238 227 239 VARIABLES 228 out Outlet as stream (Brief = "Outlet stream", PosX=1, PosY=0.5256); 229 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 230 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 240 out Outlet as streamTherm (Brief = "Outlet stream", PosX=1, PosY=0.5256); 231 241 hl as enth_mol; 232 242 hv as enth_mol; … … 234 244 EQUATIONS 235 245 "Flash Calculation" 236 [Outlet.v, x,y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z);246 [Outlet.v, Outlet.x, Outlet.y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 237 247 238 248 "Overall Enthalpy" 239 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) +240 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);241 242 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);243 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);249 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, Outlet.x) + 250 Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, Outlet.y); 251 252 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, Outlet.x); 253 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, Outlet.y); 244 254 end 245 255 … … 274 284 275 285 VARIABLES 276 in Inlet as stream (Brief = "Inlet Stream", PosX=0, PosY=0.5308); 277 v as fraction (Brief = "Vapourization fraction"); 278 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 279 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 286 in Inlet as streamTherm (Brief = "Inlet Stream", PosX=0, PosY=0.5308); 280 287 zmass(NComp) as fraction (Brief = "Mass Fraction"); 281 288 Mw as molweight (Brief = "Average Mol Weight"); … … 287 294 288 295 EQUATIONS 289 "Flash Calculation"290 [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z);291 292 296 "Average Molecular Weight" 293 297 Mw = sum(M*Inlet.z); … … 300 304 case "correlation": 301 305 "Mass Density" 302 rho * ((1- v)/PP.LiquidDensity(Inlet.T,Inlet.P,x) + v/PP.VapourDensity(Inlet.T,Inlet.P,y)) = 1;306 rho * ((1-Inlet.v)/PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.x) + Inlet.v/PP.VapourDensity(Inlet.T,Inlet.P,Inlet.y)) = 1; 303 307 end 304 308 … … 310 314 311 315 "Molar Volume" 312 vm = (1- v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y);316 vm = (1-Inlet.v)*PP.LiquidVolume(Inlet.T, Inlet.P, Inlet.x) + Inlet.v*PP.VapourVolume(Inlet.T,Inlet.P,Inlet.y); 313 317 314 318 "Volumetric Flow" -
branches/tests/sample/heat_exchangers/Sample_DoublePipe.mso
r236 r339 99 99 100 100 Dynamic = false; 101 GuessFile = "GuessPipe";101 #GuessFile = "GuessPipe"; 102 102 103 103 end … … 178 178 Dynamic = false; 179 179 180 GuessFile = "GuessPipe";180 #GuessFile = "GuessPipe"; 181 181 182 182 end
Note: See TracChangeset
for help on using the changeset viewer.