Changeset 794 for branches/gui/eml/stage_separators/reboiler.mso
- Timestamp:
- Jul 15, 2009, 5:28:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/reboiler.mso
r793 r794 20 20 using "streams"; 21 21 22 Model reboiler223 ATTRIBUTES24 Pallete = true;25 Icon = "icon/Reboiler";26 Brief = "Model of a dynamic reboiler - kettle.";27 Info =28 "== Assumptions ==29 30 * perfect mixing of both phases;31 * thermodynamics equilibrium;32 * no liquid entrainment in the vapour stream.33 34 == Specify ==35 36 * the inlet stream;37 * the liquid inlet stream;38 * the outlet flows: OutletVapour.F and OutletLiquid.F;39 * the heat supply.40 41 == Initial Conditions ==42 43 * the reboiler temperature (OutletLiquid.T);44 * the reboiler liquid level (Level);45 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.46 ";47 48 PARAMETERS49 outer PP as Plugin (Brief = "External Physical Properties", Type="PP");50 outer NComp as Integer;51 Across as area (Brief="Cross Section Area of reboiler");52 V as volume (Brief="Total volume of reboiler");53 54 Initial_Level as length (Brief="Initial Level of liquid phase");55 Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler");56 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition");57 58 VARIABLES59 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 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0, Symbol="_{in}");64 65 M(NComp) as mol (Brief="Molar Holdup in the tray");66 ML as mol (Brief="Molar liquid holdup");67 MV as mol (Brief="Molar vapour holdup");68 E as energy (Brief="Total Energy Holdup on tray");69 vL as volume_mol (Brief="Liquid Molar Volume");70 vV as volume_mol (Brief="Vapour Molar volume");71 Level as length (Brief="Level of liquid phase");72 rhoV as dens_mass (Brief="Vapour Density");73 74 INITIAL75 76 Level = Initial_Level;77 OutletLiquid.T = Initial_Temperature;78 OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition);79 80 EQUATIONS81 "Component Molar Balance"82 diff(M)= InletLiquid.F*InletLiquid.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z;83 84 "Energy Balance"85 diff(E) = InletLiquid.F*InletLiquid.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ;86 87 "Molar Holdup"88 M = ML*OutletLiquid.z + MV*OutletVapour.z;89 90 "Energy Holdup"91 E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V;92 93 "Mol fraction normalisation"94 sum(OutletLiquid.z)=1.0;95 sum(OutletLiquid.z)=sum(OutletVapour.z);96 97 "Vapour Density"98 rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z);99 100 "Liquid Volume"101 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);102 103 "Vapour Volume"104 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z);105 106 "Chemical Equilibrium"107 PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z;108 109 "Mechanical Equilibrium"110 OutletLiquid.P = OutletVapour.P;111 112 "Thermal Equilibrium"113 OutletLiquid.T = OutletVapour.T;114 115 "Geometry Constraint"116 V = ML*vL + MV*vV;117 118 "Level of liquid phase"119 Level = ML*vL/Across;120 121 end122 123 #*----------------------------------------------------------------------124 * Model of a Steady State reboiler with no thermodynamics equilibrium125 *---------------------------------------------------------------------*#126 22 Model reboilerSteady 127 ATTRIBUTES 23 24 ATTRIBUTES 128 25 Pallete = true; 129 26 Icon = "icon/ReboilerSteady"; 130 27 Brief = "Model of a Steady State reboiler with no thermodynamics equilibrium - thermosyphon."; 131 28 Info = 132 "== A ssumptions==29 "== ASSUMPTIONS == 133 30 * perfect mixing of both phases; 134 31 * no thermodynamics equilibrium; 135 32 * no liquid entrainment in the vapour stream. 136 137 == Specify == 33 34 == SET == 35 * the pressure drop in the reboiler; 36 37 == SPECIFY == 138 38 * the InletLiquid stream; 139 * the heat supply OR the outlet temperature (OutletVapour.T); 39 * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model) 40 OR the outlet temperature (OutletVapour.T); 41 42 == OPTIONAL == 43 * the reboiler model has two control ports 44 ** TI OutletVapour Temperature Indicator; 45 ** PI OutletVapour Pressure Indicator; 140 46 "; 141 47 142 48 PARAMETERS 143 outer PP as Plugin(Brief = "External Physical Properties", Type="PP");144 outer NComp as Integer ;145 Pdrop as press_delta (Brief="Pressure Drop in the reboiler");49 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 50 outer NComp as Integer (Brief="Number of Components"); 51 Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); 146 52 147 53 VARIABLES 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 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 151 vV as volume_mol (Brief="Vapour Molar volume"); 152 rhoV as dens_mass (Brief="Vapour Density"); 54 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); 55 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); 56 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); 57 vV as volume_mol (Brief="Vapour Molar volume", Protected = true); 58 rhoV as dens_mass (Brief="Vapour Density", Symbol = "\rho", Protected = true); 59 60 out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=0.44, PosY=0); 61 out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.35, PosY=0); 153 62 154 63 EQUATIONS … … 172 81 OutletVapour.P = InletLiquid.P - Pdrop; 173 82 83 "Temperature indicator" 84 TI * 'K' = OutletVapour.T; 85 86 "Pressure indicator" 87 PI * 'atm' = OutletVapour.P; 88 174 89 end 175 90 176 #*----------------------------------------------------------------------177 * Model of a Steady State reboiler with fake calculation of178 * vaporisation fraction and output temperature, but with a real179 * calculation of the output stream enthalpy180 *---------------------------------------------------------------------*#181 91 Model reboilerSteady_fakeH 182 92 ATTRIBUTES … … 190 100 "; 191 101 192 193 outer PP as Plugin(Brief = "External Physical Properties", Type="PP");102 PARAMETERS 103 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 194 104 outer NComp as Integer; 195 DP as press_delta (Brief="Pressure Drop in the reboiler"); 196 k as Real (Brief = "Flow Constant", Unit='mol/J'); 197 198 VARIABLES 199 in InletLiquid as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); 200 out OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); 201 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 202 203 EQUATIONS 204 "Molar Balance" 105 Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); 106 FlowConstant as Real (Brief = "Flow Constant"); 107 k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol/J'); 108 109 SET 110 111 k = 1*'mol/J'; 112 113 VARIABLES 114 in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); 115 out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); 116 in InletQ as power (Brief="Heat Duty", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); 117 118 EQUATIONS 119 120 "Molar Balance" 205 121 InletLiquid.F = OutletVapour.F; 122 123 "Composition Balance" 206 124 InletLiquid.z = OutletVapour.z; 207 125 208 126 "Energy Balance" 209 127 InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; 210 128 211 "Pressure"212 DP = InletLiquid.P - OutletVapour.P;213 214 129 "Pressure Drop" 130 OutletVapour.P = InletLiquid.P - Pdrop ; 131 132 "Fake Vapourisation Fraction" 215 133 OutletVapour.v = 1.0; 216 134 217 135 "Fake output temperature" 218 136 OutletVapour.T = 300*'K'; 219 137 220 "Pressure Drop through the reboiler" 221 OutletVapour.F = k*InletQ; 138 "Pressure Drop through the reboiler" 139 OutletVapour.F = FlowConstant*k*InletQ; 140 222 141 end 223 142 224 #*-------------------------------------------------------------------225 * Model of a dynamic reboiler with reaction226 *-------------------------------------------------------------------*#227 143 Model reboilerReact 228 144 ATTRIBUTES
Note: See TracChangeset
for help on using the changeset viewer.