Changeset 421 for trunk/eml/reactors/tank_basic.mso
- Timestamp:
- Nov 29, 2007, 10:05:51 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eml/reactors/tank_basic.mso
r403 r421 17 17 *---------------------------------------------------------------------- 18 18 * 19 * Description: 20 * Generic model for a dynamic tank. 19 21 * 22 * Assumptions: 23 * * single- and two-phases involved 24 * * dynamic 20 25 * 21 26 *---------------------------------------------------------------------- … … 28 33 29 34 Model tank_basic 35 ATTRIBUTES 36 Brief = "Basic model for a dynamic tank"; 37 30 38 PARAMETERS 31 outer PP as Plugin(Brief="External physical properties", Type="PP");32 outer NComp as Integer(Brief="Number of components", Default=1);39 outer PP as Plugin (Brief="External physical properties", Type="PP"); 40 outer NComp as Integer (Brief="Number of components", Default=1); 33 41 34 42 VARIABLES 35 in Inlet as stream ; # Inlet stream36 out Outletm as stream ; # Intermediary outlet stream43 in Inlet as stream (Brief="Inlet stream", PosX=0, PosY=0, Symbol="_{in}"); 44 out Outletm as stream (Brief="Intermediary outlet stream", Symbol="_{outm}"); 37 45 38 46 M(NComp)as mol (Brief="Component molar holdup"); 39 47 Mt as mol (Brief="Total component molar holdup"); 40 V as volume (Brief="Volume of reactional mixture");48 Vr as volume (Brief="Volume of reactional mixture"); 41 49 E as energy (Brief="Internal energy"); 42 50 Q as heat_rate(Brief="Reactor duty", Default=0); … … 53 61 54 62 "Mole fraction normalisation" 55 sum(Outletm.z) = 1 .0;63 sum(Outletm.z) = 1; 56 64 57 65 "Energy balance" … … 59 67 60 68 "Geometry" 61 V = Across*Level; 62 end 63 64 65 #*--------------------------------------------------------------------- 66 * only liquid phase 67 *--------------------------------------------------------------------*# 68 69 Model tank_liq as tank_basic 70 EQUATIONS 71 "Vapourisation fraction" 72 Outletm.v = 0.0; 73 74 "Liquid Enthalpy" 75 Outletm.h = PP.LiquidEnthalpy(Outletm.T,Outletm.P,Outletm.z); 76 77 "Volume constraint" 78 V = Mt*PP.LiquidVolume(Outletm.T,Outletm.P,Outletm.z); 79 80 "Total internal energy" 81 E = Mt*Outletm.h - Outletm.P*V; 69 Vr = Across*Level; 82 70 end 83 71 … … 86 74 * only vapour phase 87 75 *--------------------------------------------------------------------*# 88 89 76 Model tank_vap as tank_basic 77 ATTRIBUTES 78 Brief = "Model of a generic vapour-phase tank"; 79 90 80 EQUATIONS 91 81 "Vapourisation fraction" 92 Outletm.v = 1 .0;82 Outletm.v = 1; 93 83 94 84 "Vapour Enthalpy" … … 96 86 97 87 "Volume constraint" 98 V = Mt*PP.VapourVolume(Outletm.T,Outletm.P,Outletm.z);88 Vr = Mt*PP.VapourVolume(Outletm.T,Outletm.P,Outletm.z); 99 89 100 90 "Total internal energy" … … 104 94 105 95 #*--------------------------------------------------------------------- 96 * only liquid phase 97 *--------------------------------------------------------------------*# 98 Model tank_liq as tank_basic 99 ATTRIBUTES 100 Brief = "Model of a generic liquid-phase tank"; 101 102 EQUATIONS 103 "Vapourisation fraction" 104 Outletm.v = 0; 105 106 "Liquid Enthalpy" 107 Outletm.h = PP.LiquidEnthalpy(Outletm.T,Outletm.P,Outletm.z); 108 109 "Volume constraint" 110 Vr = Mt*PP.LiquidVolume(Outletm.T,Outletm.P,Outletm.z); 111 112 "Total internal energy" 113 E = Mt*Outletm.h - Outletm.P*Vr; 114 end 115 116 117 #*--------------------------------------------------------------------- 106 118 * liquid and vapour phases 107 119 *--------------------------------------------------------------------*# 108 109 120 Model tank_liqvap 121 ATTRIBUTES 122 Brief = "Model of a generic two-phase tank"; 123 110 124 PARAMETERS 111 125 outer PP as Plugin(Brief="External physical properties", Type="PP"); … … 113 127 114 128 VARIABLES 115 in Inlet as stream ; # Inlet stream116 out OutletmL as liquid_stream ; # Intermediary liquid outlet stream117 out OutletV as vapour_stream ; # Outlet vapour stream129 in Inlet as stream (Brief="Inlet stream", PosX=0, PosY=0, Symbol="_{in}"); 130 out OutletmL as liquid_stream (Brief="Intermediary liquid outlet stream", Symbol="_{outmL}"); 131 out OutletV as vapour_stream (Brief="Outlet vapour stream", Symbol="_{outV}"); 118 132 119 133 M(NComp)as mol (Brief="Component molar holdup"); 120 134 ML as mol (Brief="Molar liquid holdup"); 121 135 MV as mol (Brief="Molar vapour holdup"); 122 V as volume (Brief="Volume of reactional mixture");136 Vr as volume (Brief="Volume of reactional mixture"); 123 137 E as energy (Brief="Internal energy"); 124 138 Q as heat_rate (Brief="Reactor duty", Default=0); … … 137 151 138 152 "Mole fraction normalisation" 139 sum(OutletmL.z) = 1 .0;153 sum(OutletmL.z) = 1; 140 154 141 155 "Mole fraction normalisation" … … 144 158 145 159 "Vapourisation fraction" 146 OutletV.v = 1 .0;160 OutletV.v = 1; 147 161 148 162 "Vapourisation fraction" 149 OutletmL.v = 0 .0;163 OutletmL.v = 0; 150 164 151 165 … … 157 171 158 172 "Geometry constraint" 159 V = ML*vL + MV*PP.VapourVolume(OutletV.T,OutletV.P,OutletV.z);173 Vr = ML*vL + MV*PP.VapourVolume(OutletV.T,OutletV.P,OutletV.z); 160 174 161 175
Note: See TracChangeset
for help on using the changeset viewer.