Changeset 210
- Timestamp:
- Mar 15, 2007, 9:52:28 AM (17 years ago)
- Location:
- branches/newlanguage
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/pressure_changers/compressor.mso
r196 r210 33 33 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 34 34 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 35 Effs as positive (Default = 0.72, Brief = "Isentropic efficiency", Lower = 0, Upper = 1);36 35 R as positive (Default = 8.31451, Brief = "Constant of Gases", Unit= 'kJ/kmol/K'); 37 36 Mw(NComp) as molweight (Brief = "Molar Weight"); 38 37 39 38 VARIABLES 40 n as positive (Brief = "Politropic Coefficient" );41 k as positive (Brief = "Isentropic Coefficient" );39 n as positive (Brief = "Politropic Coefficient", Lower=0); 40 k as positive (Brief = "Isentropic Coefficient", Lower=0); 42 41 Cp as cp_mol (Brief = "Heat Capacity"); 43 42 Cv as cv_mol (Brief = "Heat Capacity"); … … 47 46 Ws as energy_mol (Brief = "Isentropic Head"); 48 47 Tiso as temperature (Brief = "Isentropic Temperature"); 49 Effp as positive (Brief = "Politropic efficiency", Lower = 0, Upper = 1); 48 Effp as efficiency (Brief = "Politropic efficiency"); 49 Effs as efficiency (Brief = "Isentropic efficiency"); 50 50 FPower as power (Brief = "Fluid Power"); 51 51 Mwm as molweight (Brief = "Mixture Molar Weight"); 52 52 53 53 SET 54 54 Mw = PP.MolecularWeight(); … … 57 57 58 58 "Calculate Mwm for Inlet Mixture" 59 Mwm = sum(Mw ([1:NComp])*Inlet.z([1:NComp]));59 Mwm = sum(Mw*Inlet.z); 60 60 61 61 "Calculate Outlet Stream Pressure" … … 72 72 73 73 "Calculate Isentropic Coeficient" 74 k = Cp/Cv;74 k * Cv = Cp; 75 75 76 76 "Calculate Isentropic Head" … … 87 87 88 88 "Calculate Politropic Efficiency" 89 Effp = (n/(n-1))/(k/(k-1));89 Effp * (n-1) * k = n * (k-1); 90 90 91 91 "Calculate Politropic Head" … … 99 99 100 100 Outlet.z = Inlet.z; 101 102 103 101 end -
branches/newlanguage/eml/pressure_changers/turbine.mso
r196 r210 37 37 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 38 38 Mw(NComp) as molweight (Brief = "Molar Weight"); 39 Eff as positive (Default = 0.72, Brief = "Pump efficiency");40 Meff as positive (Default = 1.0, Brief = "Brake efficiency");41 Beta as positive (Default = 0, Brief = "Volumetric expansivity", Unit = '1/K');42 43 39 44 40 VARIABLES 41 Eff as efficiency (Brief = "Pump efficiency"); 42 Meff as efficiency (Brief = "Brake efficiency"); 43 Beta as positive (Brief = "Volumetric expansivity", Unit = '1/K'); 45 44 Head as head (Brief = "Head Developed"); 46 45 FPower as power (Brief = "Fluid Power"); … … 59 58 #Mixtures Properties 60 59 "Calculate Mwm for Inlet Mixture" 61 Mwm = sum(Mw ([1:NComp])*Inlet.z([1:NComp]));62 60 Mwm = sum(Mw*Inlet.z); 61 63 62 "Calculate rho using a External Physical Properties Routine" 64 63 rho = PP.LiquidDensity(Inlet.T,Inlet.P,Inlet.z); … … 78 77 79 78 "Calculate Fluid Power" 80 FPower = Pdiff * Inlet.F / (rho/Mwm);79 FPower * rho = Pdiff * Inlet.F * Mwm; 81 80 82 81 "Calculate Brake Power" … … 87 86 88 87 "Calculate Outlet Temperature" 89 (Outlet.T - Inlet.T)*Cp = (Outlet.h - Inlet.h) - Pdiff /(rho/Mwm) * (1-Beta*Inlet.T); 88 (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho 89 - Pdiff * Mwm * (1-Beta*Inlet.T); 90 90 91 91 "Calculate Outlet Enthalpy" 92 Outlet.h - Inlet.h = Pdiff / (rho/Mwm);92 (Outlet.h - Inlet.h) * rho = Pdiff * Mwm; 93 93 94 94 "Molar Balance" … … 99 99 100 100 "Calculate Head" 101 Head = Pdiff/rho; 102 101 Head * rho = Pdiff; 103 102 end -
branches/newlanguage/eml/stage_separators/column.mso
r176 r210 46 46 Model Section_Column 47 47 PARAMETERS 48 outer PP as Plugin ;48 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 49 49 outer NComp as Integer; 50 50 NTrays as Integer(Brief="Number of trays", Default=2); … … 86 86 Model Distillation_kettle_cond 87 87 PARAMETERS 88 outer PP as Plugin ;88 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 89 89 outer NComp as Integer; 90 90 NTrays as Integer(Brief="Number of trays", Default=2); … … 157 157 Model Distillation_thermosyphon_subcooling 158 158 PARAMETERS 159 outer PP as Plugin ;159 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 160 160 outer NComp as Integer; 161 161 NTrays as Integer(Brief="Number of trays", Default=2); … … 233 233 Model Distillation_thermosyphon_cond 234 234 PARAMETERS 235 outer PP as Plugin ;235 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 236 236 outer NComp as Integer; 237 237 NTrays as Integer(Brief="Number of trays", Default=2); … … 305 305 Model Distillation_kettle_subcooling 306 306 PARAMETERS 307 outer PP as Plugin ;307 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 308 308 outer NComp as Integer; 309 309 NTrays as Integer(Brief="Number of trays", Default=2); … … 372 372 Model Rectifier 373 373 PARAMETERS 374 outer PP as Plugin ;374 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 375 375 outer NComp as Integer; 376 376 NTrays as Integer(Brief="Number of trays", Default=2); … … 428 428 Model Rectifier_subcooling 429 429 PARAMETERS 430 outer PP as Plugin ;430 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 431 431 outer NComp as Integer; 432 432 NTrays as Integer(Brief="Number of trays", Default=2); … … 483 483 Model Refluxed_Stripping 484 484 PARAMETERS 485 outer PP as Plugin ;485 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 486 486 outer NComp as Integer; 487 487 NTrays as Integer(Brief="Number of trays", Default=2); … … 539 539 Model Refluxed_Stripping_subcooling 540 540 PARAMETERS 541 outer PP as Plugin ;541 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 542 542 outer NComp as Integer; 543 543 NTrays as Integer(Brief="Number of trays", Default=2); … … 594 594 Model Refluxed_Absorption 595 595 PARAMETERS 596 outer PP as Plugin ;596 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 597 597 outer NComp as Integer; 598 598 NTrays as Integer(Brief="Number of trays", Default=2); … … 651 651 Model Refluxed_Absorption_subcooling 652 652 PARAMETERS 653 outer PP as Plugin ;653 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 654 654 outer NComp as Integer; 655 655 NTrays as Integer(Brief="Number of trays", Default=2); … … 706 706 Model Reboiled_Stripping_kettle 707 707 PARAMETERS 708 outer PP as Plugin ;708 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 709 709 outer NComp as Integer; 710 710 NTrays as Integer(Brief="Number of trays", Default=2); … … 762 762 Model Reboiled_Stripping_thermosyphon 763 763 PARAMETERS 764 outer PP as Plugin ;764 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 765 765 outer NComp as Integer; 766 766 NTrays as Integer(Brief="Number of trays", Default=2); … … 820 820 Model Reboiled_Absorption_kettle 821 821 PARAMETERS 822 outer PP as Plugin ;822 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 823 823 outer NComp as Integer; 824 824 NTrays as Integer(Brief="Number of trays", Default=2); … … 876 876 Model Reboiled_Absorption_thermosyphon 877 877 PARAMETERS 878 outer PP as Plugin ;878 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 879 879 outer NComp as Integer; 880 880 NTrays as Integer(Brief="Number of trays", Default=2); … … 930 930 Model ReactiveDistillation 931 931 PARAMETERS 932 outer PP as Plugin ;932 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 933 933 outer NComp as Integer; 934 934 NTrays as Integer(Brief="Number of trays", Default=2); -
branches/newlanguage/eml/stage_separators/condenser.mso
r209 r210 43 43 Model condenser 44 44 PARAMETERS 45 outer PP as Plugin( Type="PP");45 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 46 46 outer NComp as Integer; 47 47 V as volume (Brief="Condenser total volume"); … … 109 109 Model condenserSteady 110 110 PARAMETERS 111 outer PP as Plugin ;111 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 112 112 outer NComp as Integer; 113 113 … … 135 135 Model condenserReact 136 136 PARAMETERS 137 outer PP as Plugin( Type="PP");137 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 138 138 outer NComp as Integer; 139 139 V as volume (Brief="Condenser total volume"); -
branches/newlanguage/eml/stage_separators/flashPH.mso
r209 r210 38 38 Model FlashPHSteady 39 39 PARAMETERS 40 outer PP as Plugin( Type="PP");40 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 41 41 outer NComp as Integer; 42 42 B as Real(Default=1000, Brief="Regularization Factor"); -
branches/newlanguage/eml/stage_separators/reboiler.mso
r209 r210 48 48 Model reboiler 49 49 PARAMETERS 50 outer PP as Plugin( Type="PP");50 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 51 51 outer NComp as Integer; 52 52 Across as area (Brief="Cross Section Area of reboiler"); … … 119 119 Model reboilerSteady 120 120 PARAMETERS 121 outer PP as Plugin( Type="PP");121 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 122 122 outer NComp as Integer; 123 123 DP as press_delta (Brief="Pressure Drop in the reboiler"); … … 155 155 Model reboilerSteady_fakeH 156 156 PARAMETERS 157 outer PP as Plugin( Type="PP");157 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 158 158 outer NComp as Integer; 159 159 DP as press_delta (Brief="Pressure Drop in the reboiler"); … … 191 191 Model reboilerReact 192 192 PARAMETERS 193 outer PP as Plugin( Type="PP");193 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 194 194 outer NComp as Integer; 195 195 Across as area (Brief="Cross Section Area of reboiler"); -
branches/newlanguage/eml/stage_separators/tank.mso
r209 r210 39 39 40 40 PARAMETERS 41 outer PP as Plugin( Type="PP");41 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 42 42 outer NComp as Integer; 43 43 Across as area (Brief="Tank cross section area", Default=2); … … 84 84 85 85 PARAMETERS 86 outer PP as Plugin( Type="PP");86 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 87 87 outer NComp as Integer; 88 88 radius as length(Brief="Tank radius"); … … 148 148 149 149 PARAMETERS 150 outer PP as Plugin( Type="PP");150 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 151 151 outer NComp as Integer; 152 152 Across as area (Brief="Tank cross section area", Default=2); -
branches/newlanguage/eml/stage_separators/tray.mso
r209 r210 56 56 57 57 PARAMETERS 58 outer PP as Plugin( Type="PP");58 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 59 59 outer NComp as Integer; 60 60 V as volume(Brief="Total Volume of the tray"); … … 159 159 160 160 PARAMETERS 161 outer PP as Plugin( Type="PP");161 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 162 162 outer NComp as Integer; 163 163 V as volume(Brief="Total Volume of the tray"); … … 232 232 OutletV.P = OutletL.P; 233 233 234 "vaporization fraction "235 OutletV.v = 1.0;236 OutletL.v = 0.0;237 238 234 "Level of clear liquid over the weir" 239 235 Level = ML*vL/Ap; … … 258 254 OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/'Pa'))/2 * 259 255 Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * 'atm') / (alfa*rhoV) ); 260 261 256 262 257 "Chemical Equilibrium" -
branches/newlanguage/eml/types.mso
r193 r210 34 34 percent as Real (Brief = "Percent", Default=50, final Lower=0, final Upper=100); 35 35 control_signal as Real (Brief = "Control Signal", Default=1, Lower=-1e9, Upper=1e9); 36 efficiency as Real (Brief = "Efficiency", Default=0.5, final Lower=0, final Upper=1); 36 37 37 38 # Pressure -
branches/newlanguage/sample/pressure_changers/sample_compressor.mso
r196 r210 44 44 PP.VapourModel = "Ideal"; 45 45 NComp = PP.NumberOfComponents; 46 C1.Effs = 0.75;47 46 PP.Derivatives = 0; 48 49 47 50 48 SPECIFY 49 C1.Effs = 0.75; 51 50 S1.Outlet.F = 41.05 * 'kmol/h'; 52 51 S1.Outlet.P = 1 * 'atm'; -
branches/newlanguage/sample/pressure_changers/sample_turbine.mso
r196 r210 46 46 PP.Derivatives = 0; 47 47 NComp = PP.NumberOfComponents; 48 49 SPECIFY 48 50 HT1.Beta = 425e-6 / 'K'; 49 51 HT1.Meff = 0.95; 50 52 HT1.Eff = 0.72; 51 52 SPECIFY53 53 S1.Outlet.F = 1000 * 'kmol/h'; 54 54 S1.Outlet.P = 5 * 'atm' ;
Note: See TracChangeset
for help on using the changeset viewer.