Changeset 794 for branches/gui/eml/stage_separators/tank.mso
- Timestamp:
- Jul 15, 2009, 5:28:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/tank.mso
r783 r794 124 124 end 125 125 126 #*---------------------------------------------------------- 127 * 128 *Model of a tank with a lain cylinder geometry 129 * 130 *---------------------------------------------------------*# 131 Model tank_cylindrical 132 ATTRIBUTES 126 Model RefluxDrum 127 128 ATTRIBUTES 133 129 Pallete = true; 134 Icon = "icon/ TankHorizontal";135 Brief = "Model of a tankwith a lain cylinder geometry.";130 Icon = "icon/RefluxDrum"; 131 Brief = "Model of a Reflux Drum with a lain cylinder geometry."; 136 132 Info = 137 133 "== Specify == … … 161 157 162 158 SET 163 radius = Diameter/2;159 radius = 0.5*Diameter; 164 160 165 161 VARIABLES … … 220 216 end 221 217 218 Model tank_cylindrical 219 ATTRIBUTES 220 Pallete = true; 221 Icon = "icon/TankHorizontal"; 222 Brief = "Model of a tank with a lain cylinder geometry."; 223 Info = 224 "== Specify == 225 * the Inlet stream; 226 * the outlet flow; 227 * the InletQ (requires an energy source). 228 229 == Initial Conditions == 230 * the tank initial temperature; 231 * the tank initial level; 232 * the tank initial composition. 233 "; 234 235 PARAMETERS 236 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 237 outer NComp as Integer (Brief = "Number of Components"); 238 239 pi as positive (Brief="Pi value", Default=3.141593,Hidden=true); 240 eps as positive (Brief="small number",Default=1E-8,Hidden=true); 241 Diameter as length (Brief="Tank internal Diameter",Default=1.5); 242 radius as length (Brief="Tank radius",Hidden=true); 243 L as length (Brief="Tank length",Default=5); 244 245 Initial_Level as length (Brief="Initial Level of the Tank",Default=1); 246 Initial_Temperature as temperature (Brief="Initial Temperature of Liquid",Default=300); 247 Initial_Composition(NComp) as positive (Brief="Initial Liquid Composition",Lower=1E-8,Default=0.1); 248 249 SET 250 radius = Diameter/2; 251 252 VARIABLES 253 in Inlet as stream (Brief="Inlet stream", PosX=0.1825, PosY=0, Symbol="_{in}"); 254 out Outlet as liquid_stream (Brief="Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}"); 255 in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.6160, Symbol="_{in}",Protected=true); 256 Level as length (Brief="Tank level",Protected=true); 257 Vtotal as volume (Brief="Tank total volume",Protected=true); 258 Vfilled as volume (Brief="Tank volume content",Protected=true); 259 Across as area (Brief="Tank cross section area", Default=2,Protected=true); 260 E as energy (Brief="Total Energy Holdup on tank",Protected=true); 261 vL as volume_mol (Brief="Liquid Molar Volume",Protected=true); 262 M(NComp) as mol (Brief="Molar Holdup in the tank",Protected=true); 263 264 INITIAL 265 266 "Initial Level" 267 Level = Initial_Level; 268 269 "Initial Liquid Temperature" 270 Outlet.T = Initial_Temperature; 271 272 "Initial Liquid Composition" 273 Outlet.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 274 275 EQUATIONS 276 277 "Tank total volume" 278 Vtotal = (0.25*pi*(Diameter)^2)*L; 279 280 "Mass balance" 281 diff(M) = Inlet.F*Inlet.z - Outlet.F*Outlet.z; 282 283 "Energy balance" 284 diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ; 285 286 "Energy Holdup" 287 E = sum(M)*Outlet.h; 288 289 "Mechanical Equilibrium" 290 Inlet.P = Outlet.P; 291 292 "Liquid Volume" 293 vL = PP.LiquidVolume(Outlet.T, Outlet.P, Outlet.z); 294 295 "Composition" 296 M = Outlet.z*sum(M); 297 298 "Cylindrical Area" 299 Across = radius^2 * (asin(1) - asin((radius-Level)/radius) ) + (Level-radius)*sqrt(Level*(2*radius - Level)+eps*'m^2'); 300 301 "Level of liquid phase" 302 L*Across = sum(M)*vL; 303 304 "Volume Filled of liquid phase" 305 Vfilled = L*Across; 306 307 end 308 222 309 Model tank_feed 223 310 ATTRIBUTES
Note: See TracChangeset
for help on using the changeset viewer.