Changeset 147 for branches/newlanguage/eml/streams.mso
- Timestamp:
- Jan 31, 2007, 5:02:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/streams.mso
r125 r147 107 107 108 108 PARAMETERS 109 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 110 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 111 109 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 110 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 111 M(NComp) as molweight (Brief="Component Mol Weight"); 112 113 SET 114 115 M = PP.MolecularWeight(); 116 112 117 VARIABLES 113 118 out Outlet as stream; … … 116 121 hl as enth_mol; 117 122 hv as enth_mol; 123 zmass(NComp) as fraction (Brief = "Mass Fraction"); 124 Mw as molweight (Brief="Average Mol Weight"); 125 vm as volume_mol (Brief="Molar Volume"); 126 rho as dens_mass (Brief="Stream Density"); 127 Fw as flow_mass (Brief="Stream Mass Flow"); 128 Fvol as flow_vol (Brief = "Volumetric Flow"); 118 129 119 130 EQUATIONS 120 131 "Flash Calculation" 121 132 [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 133 122 134 "Overall Enthalpy" 123 135 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + … … 126 138 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 127 139 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 140 141 "Average Molecular Weight" 142 Mw = sum(M*Outlet.z); 143 144 "Mass Density" 145 rho = (1-Outlet.v)*PP.LiquidDensity(Outlet.T,Outlet.P,x) + Outlet.v*PP.VapourDensity(Outlet.T,Outlet.P,y); 146 147 "Flow Mass" 148 Fw = Mw*Outlet.F; 149 150 "Molar Volume" 151 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y); 152 153 "Volumetric Flow" 154 Fvol = Outlet.F*vm ; 155 156 "Mass Fraction" 157 zmass = M*Outlet.z / Mw; 158 128 159 end 129 160 … … 135 166 136 167 PARAMETERS 137 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 138 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 168 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 169 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 170 M(NComp) as molweight (Brief="Component Mol Weight"); 171 172 SET 173 174 M = PP.MolecularWeight(); 139 175 140 176 VARIABLES 141 177 in Inlet as stream; 142 178 v as fraction; 143 x(NComp) as fraction(Brief = "Liquid Molar Fraction"); 144 y(NComp) as fraction(Brief = "Vapour Molar Fraction"); 179 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 180 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 181 zmass(NComp) as fraction (Brief = "Mass Fraction"); 182 Mw as molweight (Brief="Average Mol Weight"); 183 vm as volume_mol (Brief="Molar Volume"); 184 rho as dens_mass (Brief="Stream Density"); 185 Fw as flow_mass (Brief="Stream Mass Flow"); 186 Fvol as flow_vol (Brief = "Volumetric Flow"); 145 187 146 188 EQUATIONS 147 189 "Flash Calculation" 148 190 [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z); 149 end 191 192 "Average Molecular Weight" 193 Mw = sum(M*Inlet.z); 194 195 "Mass Density" 196 rho = (1-v)*PP.LiquidDensity(Inlet.T,Inlet.P,x) + v*PP.VapourDensity(Inlet.T,Inlet.P,y); 197 198 "Flow Mass" 199 Fw = Mw*Inlet.F; 200 201 "Molar Volume" 202 vm = (1-v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y); 203 204 "Volumetric Flow" 205 Fvol = Inlet.F*vm ; 206 207 "Mass Fraction" 208 zmass = M*Inlet.z / Mw; 209 210 end
Note: See TracChangeset
for help on using the changeset viewer.