Index: /branches/gui/eml/stage_separators/tank.mso
===================================================================
 /branches/gui/eml/stage_separators/tank.mso (revision 782)
+++ /branches/gui/eml/stage_separators/tank.mso (revision 783)
@@ 45,43 +45,56 @@
* the Inlet stream;
* the outlet flow;
* the tank Q.
+* the InletQ (requires an energy source).
== Initial Conditions ==
* the tank initial temperature (OutletL.T);
* the tank initial level (Level);
* (NoComps  1) OutletL (OR OutletV) compositions.
+* the tank initial temperature;
+* the tank initial level;
+* the tank initial composition.
";
PARAMETERS
 outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
+ outer PP as Plugin (Brief = "External Physical Properties", Type="PP");
outer NComp as Integer;
 Across as area (Brief="Tank cross section area", Default=2);
 L as length (Brief="Tank length");
 Vtotal as volume (Brief="Tank total volume");

 Initial_Level as length (Brief="Initial Level of the Tank");
 Initial_Temperature as temperature (Brief="Initial Temperature of Liquid");
 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition");
+
+ pi as positive (Brief="Pi value", Default=3.141593,Hidden=true);
+ Diameter as length (Brief="Tank internal Diameter",Default=1.5);
+ Across as area (Brief="Tank cross section area", Hidden=true);
+ L as length (Brief="Tank length",Default=5);
+
+
+ Initial_Level as length (Brief="Initial Level of the Tank",Default=1);
+ Initial_Temperature as temperature (Brief="Initial Temperature of Liquid",Default=300);
+ Initial_Composition(NComp) as positive (Brief="Initial Liquid Composition",Lower=1E8, Default=0.10);
SET
 Vtotal =Across*L;
+
+ Across = 0.25*pi*(Diameter)^2;
VARIABLES
in Inlet as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}");
+in Inlet as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}");
out Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}");
in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}");
 Vfilled as volume (Brief="Tank volume content");
 Level as length (Brief="Tank level");
 M(NComp) as mol (Brief="Molar Holdup in the tank");
 E as energy (Brief="Total Energy Holdup on tank");
 vL as volume_mol (Brief="Liquid Molar Volume");
+in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}",Protected=true);
+ Vtotal as volume (Brief="Tank total volume",Protected=true);
+ Vfilled as volume (Brief="Tank volume content",Protected=true);
+ Level as length (Brief="Tank level",Protected=true);
+ E as energy (Brief="Total Energy Holdup on tank",Protected=true);
+ vL as volume_mol (Brief="Liquid Molar Volume",Protected=true);
+ M(NComp) as mol (Brief="Molar Holdup in the tank",Protected=true);
INITIAL
 Level = Initial_Level;
 Outlet.T = Initial_Temperature;
 Outlet.z(1:NComp1) = Initial_Composition(1:NComp1)/sum(Initial_Composition);
+"Initial Level"
+ Level = Initial_Level;
+
+"Initial Liquid Temperature"
+ Outlet.T = Initial_Temperature;
+
+"Initial Liquid Composition"
+ Outlet.z(1:NComp1) = Initial_Composition(1:NComp1)/sum(Initial_Composition);
EQUATIONS
+
+"Tank total volume"
+ Vtotal = Across*L;
"Mass balance"