- Timestamp:
- Sep 3, 2008, 4:39:33 PM (15 years ago)
- Location:
- branches/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/columnTeste.mso
r613 r615 68 68 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 69 69 outer NComp as Integer; 70 NTrays as Integer (Brief="Number of trays", Default=2); 70 #NumberOfTrays as Integer (Brief="Number of trays", Default=2); 71 NTrays as Integer (Brief="Number of trays", Default=2,Hidden=false); 71 72 SpecialTrayIndex(NTrays) as Integer (Brief="Number of trays", Default=0,Hidden=true); 72 73 FeedTray as Integer (Brief="Number of Feed tray", Default=2); … … 77 78 Mw(NComp) as molweight (Brief="Component Mol Weight"); 78 79 80 VapourFlowModel as Switcher (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer"); 81 LiquidFlowModel as Switcher (Valid = ["default", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "default"); 82 83 V as volume (Brief="Total Volume of the tray"); 84 Q as heat_rate (Brief="Rate of heat supply"); 85 Ap as area (Brief="Plate area = Atray - Adowncomer"); 79 86 80 87 Ah as area (Brief="Total holes area"); … … 90 97 VapourFlow as Switcher (Valid = ["on", "off"], Default = "on",Hidden=true); 91 98 LiquidFlow as Switcher (Valid = ["on", "off"], Default = "on",Hidden=true); 92 VapourFlowModel as Switcher (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer");93 LiquidFlowModel as Switcher (Valid = ["default", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "default");94 99 95 100 SET 101 #NTrays = NumberOfTrays ; 96 102 top = (NTrays-1)*(1-topdown)/2+1; 97 103 bot = NTrays/top; … … 99 105 Mw = PP.MolecularWeight(); 100 106 107 101 108 VARIABLES 102 109 in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.50); … … 109 116 out Vout as vapour_stream (Brief="Feed stream", PosX=0.55, PosY=0); 110 117 111 LiquidConnector as stream(Brief="Feed stream", PosX=0.75, PosY=1,Hidden=true);118 LiquidConnector as stream (Brief="Feed stream", PosX=0.75, PosY=1,Hidden=true); 112 119 VapourConnector as stream (Brief="Feed stream", PosX=0.55, PosY=0,Hidden=true); 113 120 … … 140 147 Lout.P = trays(NTrays).OutletL.P; 141 148 Lout.z = trays(NTrays).OutletL.z; 142 #Lout.v = trays(NTrays).OutletL.v;143 # Lout.h = trays(NTrays).OutletL.h;144 149 145 150 Vout.F= trays(1).OutletV.F; … … 147 152 Vout.P = trays(1).OutletV.P; 148 153 Vout.z = trays(1).OutletV.z; 149 #Vout.v = trays(1).OutletV.v;150 #Vout.h = trays(1).OutletV.h;151 154 152 155 # Connecting Trays … … 157 160 Inlet.v = trays.Inlet.v; 158 161 Inlet.h = trays.Inlet.h; 159 162 160 163 for i in [1:NTrays] do 164 165 "Level of clear liquid over the weir" 166 trays(i).Level = trays(i).ML*trays(i).vL/Ap; 167 168 "Geometry Constraint" 169 V = trays(i).ML* trays(i).vL + trays(i).MV*trays(i).vV; 170 171 "Energy Holdup" 172 trays(i).E = trays(i).ML*trays(i).OutletL.h + trays(i).MV*trays(i).OutletV.h - trays(i).OutletL.P*V; 173 174 "Energy Balance" 175 diff(trays(i).E) = ( trays(i).Inlet.F*trays(i).Inlet.h + trays(i).InletL.F*trays(i).InletL.h + trays(i).InletV.F*trays(i).InletV.h- trays(i).OutletL.F*trays(i).OutletL.h - trays(i).OutletV.F*trays(i).OutletV.h + Q ); 161 176 162 177 switch LiquidFlow … … 171 186 172 187 case "Olsen": 173 trays(i).OutletL.F / 'mol/s'= lw*Np*trays(i).rhoL/sum(Mw*trays(i).OutletV.z)/(0.665*fw)^1.5 * ((trays(i).ML*sum(Mw*trays(i).OutletL.z)/trays(i).rhoL/ trays(i).Ap)-hw)^1.5 * 'm^0.5/mol';188 trays(i).OutletL.F / 'mol/s'= lw*Np*trays(i).rhoL/sum(Mw*trays(i).OutletV.z)/(0.665*fw)^1.5 * ((trays(i).ML*sum(Mw*trays(i).OutletL.z)/trays(i).rhoL/Ap)-hw)^1.5 * 'm^0.5/mol'; 174 189 175 190 case "Feehery_Fl": … … 177 192 178 193 case "Roffel_Fl": 179 trays(i).OutletL.F = 2/3*sqrt(2*g)*trays(i).rhoL/sum(Mw*trays(i).OutletL.z)*lw*(2*trays(i).btemp-1)*(trays(i).ML*sum(Mw*trays(i).OutletL.z)/( trays(i).Ap*1.3)/trays(i).rhoL/(2*trays(i).btemp-1))^1.5;194 trays(i).OutletL.F = 2/3*sqrt(2*g)*trays(i).rhoL/sum(Mw*trays(i).OutletL.z)*lw*(2*trays(i).btemp-1)*(trays(i).ML*sum(Mw*trays(i).OutletL.z)/(Ap*1.3)/trays(i).rhoL/(2*trays(i).btemp-1))^1.5; 180 195 end 181 196 when trays(i).Level < (beta *hw) switchto "off"; … … 187 202 end 188 203 189 trays(i).btemp = 1 - 0.3593/'Pa^0.0888545'*abs(trays(i).OutletV.F*sum(Mw*trays(i).OutletV.z)/( trays(i).Ap*1.3)/sqrt(trays(i).rhoV))^0.177709; #/'(kg/m)^0.0888545/s^0.177709';204 trays(i).btemp = 1 - 0.3593/'Pa^0.0888545'*abs(trays(i).OutletV.F*sum(Mw*trays(i).OutletV.z)/(Ap*1.3)/sqrt(trays(i).rhoV))^0.177709; #/'(kg/m)^0.0888545/s^0.177709'; 190 205 191 206 switch VapourFlow … … 196 211 197 212 case "Feehery_Fv": 198 trays(i).InletV.F = trays(i).rhoV/ trays(i).Ap/w/sum(Mw*trays(i).OutletV.z) * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-(trays(i).rhoV*g*trays(i).ML*trays(i).vL/trays(i).Ap))/trays(i).rhoV);213 trays(i).InletV.F = trays(i).rhoV/Ap/w/sum(Mw*trays(i).OutletV.z) * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-(trays(i).rhoV*g*trays(i).ML*trays(i).vL/Ap))/trays(i).rhoV); 199 214 200 215 case "Roffel_Fv": 201 trays(i).InletV.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (trays(i).InletV.P - trays(i).OutletV.P)*1e5 - (beta*sum(trays(i).M*Mw)/( trays(i).Ap*1.3)*g*1e5) * (trays(i).rhoV*Ah/sum(Mw*trays(i).OutletV.z))^1.08 * 'm^1.08/mol^1.08';216 trays(i).InletV.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (trays(i).InletV.P - trays(i).OutletV.P)*1e5 - (beta*sum(trays(i).M*Mw)/(Ap*1.3)*g*1e5) * (trays(i).rhoV*Ah/sum(Mw*trays(i).OutletV.z))^1.08 * 'm^1.08/mol^1.08'; 202 217 203 218 case "Klingberg": 204 trays(i).InletV.F * trays(i).vV = trays(i).Ap * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-trays(i).rhoL*g*trays(i).Level)/trays(i).rhoV);219 trays(i).InletV.F * trays(i).vV = Ap * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-trays(i).rhoL*g*trays(i).Level)/trays(i).rhoV); 205 220 206 221 case "Wang_Fv": 207 trays(i).InletV.F * trays(i).vV = trays(i).Ap * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-trays(i).rhoL*g*trays(i).Level)/trays(i).rhoV*alfa);222 trays(i).InletV.F * trays(i).vV = Ap * sqrt(((trays(i).InletV.P - trays(i).OutletV.P)-trays(i).rhoL*g*trays(i).Level)/trays(i).rhoV*alfa); 208 223 209 224 case "Elgue": -
branches/gui/eml/stage_separators/trayTeste.mso
r613 r615 40 40 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 41 41 outer NComp as Integer; 42 V as volume (Brief="Total Volume of the tray"); 43 Q as heat_rate (Brief="Rate of heat supply"); 44 Ap as area (Brief="Plate area = Atray - Adowncomer"); 45 42 46 43 VARIABLES 47 44 … … 65 62 "Component Molar Balance" 66 63 diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z- OutletL.F*OutletL.z - OutletV.F*OutletV.z; 67 68 "Energy Balance" 69 diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h- OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ); 70 64 71 65 "Molar Holdup" 72 66 M = ML*OutletL.z + MV*OutletV.z; 73 74 "Energy Holdup" 75 E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; 76 67 77 68 "Mol fraction normalisation" 78 69 sum(OutletL.z)= 1.0; 79 70 sum(OutletL.z)= sum(OutletV.z); 80 71 81 72 "Liquid Volume" 82 73 vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); 83 74 84 75 "Vapour Volume" 85 76 vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 86 77 87 78 "Chemical Equilibrium" 88 79 PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; … … 90 81 "Murphree Efficiency" 91 82 OutletV.z = Emv * (yideal - InletV.z) + InletV.z; 92 83 93 84 "Thermal Equilibrium" 94 85 OutletV.T = OutletL.T; 95 86 96 87 "Mechanical Equilibrium" 97 88 OutletV.P = OutletL.P; 98 99 "Geometry Constraint"100 V = ML* vL + MV*vV;101 102 "Level of clear liquid over the weir"103 Level = ML*vL/Ap;104 89 105 90 end -
branches/gui/sample/stage_separators/sample_columnTeste.mso
r613 r615 50 50 sec.NTrays = 2; 51 51 #COLUMN 52 sec. trays.V = 4 * 'ft^3';52 sec.V = 4 * 'ft^3'; 53 53 sec.Ah = 0.394 * 'ft^2'; 54 54 sec.lw = 20.94 * 'in'; 55 55 sec.hw = 0.125 * 'ft'; 56 sec. trays.Q = 0 * 'kW';56 sec.Q = 0 * 'kW'; 57 57 sec.beta = 0.6; 58 58 sec.alfa = 4; 59 sec. trays.Ap = 3.94 * 'ft^2';59 sec.Ap = 3.94 * 'ft^2'; 60 60 61 61 CONNECTIONS
Note: See TracChangeset
for help on using the changeset viewer.