- Timestamp:
- Sep 21, 2007, 7:17:36 PM (16 years ago)
- Location:
- trunk/eml
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/eml/heat_exchangers/heater.mso
r358 r372 39 39 Lfrac as fraction (Brief = "Liquid fraction Outlet Stream",Symbol="L_{frac}"); 40 40 Kvalue(NComp) as Real (Brief = "Phase Equilibrium K-values",Symbol="K_{value}"); 41 in Inlet(Ninlet ) as stream (Brief="Inlet Streams", PosX=0, PosY=0.4833, Symbol="^{in}"); 42 out Outlet as streamPH (Brief="Outlet Stream", PosX=1, PosY=0.4782, Symbol="^{out}"); 41 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 42 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 43 in Inlet(Ninlet ) as stream (Brief = "Inlet Streams", PosX=0, PosY=0.4833, Symbol="^{in}"); 44 out Outlet as streamPH (Brief = "Outlet Stream", PosX=1, PosY=0.4782, Symbol="^{out}"); 43 45 44 46 EQUATIONS … … 63 65 QDuty = Outlet.F*Outlet.h - sum(Inlet.F*Inlet.h); 64 66 67 "Pressure Drop" 68 Outlet.P = Inlet.P - Pdrop; 69 70 "Pressure Ratio" 71 Outlet.P = Inlet.P * Pratio; 72 65 73 switch Kvalues # Fix for better convergence !!! 66 74 case "yes": -
trunk/eml/pressure_changers/compressor.mso
r353 r372 48 48 Cp as cp_mol (Brief = "Heat Capacity"); 49 49 Cv as cv_mol (Brief = "Heat Capacity"); 50 P diff as press_delta (Brief = "Pressure Increase", DisplayUnit='kPa');51 P ratio as positive (Brief = "Pressure Ratio");50 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 51 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 52 52 Wp as energy_mol (Brief = "Politropic Head"); 53 53 Ws as energy_mol (Brief = "Isentropic Head"); … … 68 68 Mwm = sum(Mw*Inlet.z); 69 69 70 "Calculate Outlet Stream Pressure" 71 Outlet.P = Inlet.P + Pdiff; 72 73 "Pratio Definition" 70 "Pressure Ratio" 74 71 Outlet.P = Inlet.P * Pratio; 75 72 73 "Pressure Drop" 74 Outlet.P = Inlet.P - Pdrop; 75 76 76 "Calculate Cp Using a External Physical Properties Routine" 77 77 Cp = PP.VapourCp(Inlet.T,Inlet.P,Inlet.z); … … 106 106 FPower*Effs = Inlet.F*Ws; 107 107 108 " Molar Balance"108 "Overall Molar Balance" 109 109 Outlet.F = Inlet.F; 110 110 111 "Component Molar Balance" 111 112 Outlet.z = Inlet.z; 112 113 end -
trunk/eml/pressure_changers/pump.mso
r353 r372 54 54 BPower as power (Brief = "Brake Power"); 55 55 EPower as power (Brief = "Eletrical Potency"); 56 P diff as press_delta (Brief = "Pressure Increase", DisplayUnit='kPa');57 P ratio as positive (Brief = "Pressure Ratio");56 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 57 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 58 58 Head as head (Brief = "Head Developed"); 59 59 Head_is as head (Brief = "Isoentripic Head"); … … 90 90 vm = PP.LiquidVolume(Inlet.T,Inlet.P,Inlet.z); 91 91 92 #Mass and Energy Balance and Pump Equations 93 "Calculate Outlet Stream Pressure" 94 Outlet.P = Inlet.P + Pdiff; 95 96 "Pratio Definition" 92 "Pressure Ratio" 97 93 Outlet.P = Inlet.P * Pratio; 98 94 95 "Pressure Drop" 96 Outlet.P = Inlet.P - Pdrop; 97 99 98 "Calculate Isentropic Head" 100 Head_is = Pdiff* Mwm/rho;99 Head_is = -Pdrop * Mwm/rho; 101 100 102 101 "Calculate Real Head" … … 116 115 117 116 "Calculate Outlet Temperature" 118 (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) - Pdiff* Mwm / rho * (1 - Beta * Inlet.T);117 (Outlet.T - Inlet.T) * Cp = (Outlet.h - Inlet.h) + Pdrop * Mwm / rho * (1 - Beta * Inlet.T); 119 118 120 119 "Molar Balance" -
trunk/eml/pressure_changers/turbine.mso
r353 r372 53 53 BPower as power (Brief = "Brake Power"); 54 54 EPower as power (Brief = "Eletrical Potency"); 55 P diff as press_delta (Brief = "Pressure Increase");56 P ratio as positive (Brief = "Pressure Ratio");55 Pratio as positive (Brief = "Pressure Ratio"); 56 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 57 57 Mwm as molweight (Brief = "Mixture Molar Weight"); 58 58 rho as dens_mass (Brief = "Specific Mass"); … … 78 78 Cp = PP.LiquidCp(Inlet.T,Inlet.P,Inlet.z); 79 79 80 #Mass and Energy Balance and Turbine Equations 81 "Calculate Outlet Stream Pressure" 82 Outlet.P = Inlet.P + Pdiff; 83 84 "Pratio Definition" 80 "Pressure Ratio" 85 81 Outlet.P = Inlet.P * Pratio; 86 82 83 "Pressure Drop" 84 Outlet.P = Inlet.P - Pdrop; 85 87 86 "Calculate Fluid Power" 88 FPower * rho = Pdiff* Inlet.F * Mwm;89 87 FPower * rho = -Pdrop * Inlet.F * Mwm; 88 90 89 "Calculate Brake Power" 91 90 BPower = FPower * Eff; … … 96 95 "Calculate Outlet Temperature" 97 96 (Outlet.T - Inlet.T) * rho * Cp = (Outlet.h - Inlet.h) * rho 98 - Pdiff* Mwm * (1-Beta*Inlet.T);97 + Pdrop * Mwm * (1-Beta*Inlet.T); 99 98 100 99 "Calculate Outlet Enthalpy" 101 (Outlet.h - Inlet.h) * rho = Pdiff* Mwm;100 (Outlet.h - Inlet.h) * rho = -Pdrop * Mwm; 102 101 103 102 "Molar Balance" -
trunk/eml/pressure_changers/valve.mso
r353 r372 54 54 55 55 VARIABLES 56 Pdiff as press_delta (Brief = "Pressure Increase"); 56 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 57 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 57 58 Qv as flow_vol (Brief = "Volumetric Flow"); 58 59 fc as positive (Brief = "Opening Function"); … … 69 70 70 71 EQUATIONS 71 "Calculate Outlet Stream Pressure" 72 Inlet.P - Outlet.P = Pdiff; 72 "Pressure Drop" 73 Outlet.P = Inlet.P - Pdrop; 74 75 "Pressure Ratio" 76 Outlet.P = Inlet.P * Pratio; 73 77 74 78 "Enthalpy Balance" … … 81 85 Outlet.z = Inlet.z; 82 86 83 if Pd iff> 0 then87 if Pdrop > 0 then 84 88 "Valve Equation - Flow" 85 Qv = fc*cv*sqrt(Pd iff/Gf);89 Qv = fc*cv*sqrt(Pdrop/Gf); 86 90 else 87 91 "Valve Equation - Closed" … … 169 173 rho as dens_mass (Brief="Fluid Density", Default=1e3); 170 174 v as vol_mol (Brief="Specific volume", Default=1e3); 175 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 176 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 171 177 172 178 PARAMETERS … … 175 181 176 182 EQUATIONS 177 " Molar Balance"183 "Overall Molar Balance" 178 184 Inlet.F = Outlet.F; 185 186 "Componente Molar Balance" 179 187 Inlet.z = Outlet.z; 180 188 181 189 "Energy Balance" 182 190 Inlet.h = Outlet.h; 191 192 "Pressure Drop" 193 Outlet.P = Inlet.P - Pdrop; 194 195 "Pressure Ratio" 196 Outlet.P = Inlet.P * Pratio; 183 197 184 198 "Density" … … 190 204 (1-Inlet.v)*PP.LiquidVolume((Inlet.T+Outlet.T)/2, (Inlet.P+Outlet.P)/2, Outlet.z); 191 205 192 if Inlet.P > Outlet.Pthen206 if Pdrop > 0 then 193 207 "Flow" 194 Outlet.F * v = k*x*sqrt( (Inlet.P - Outlet.P)*rho_ref / rho ) ;208 Outlet.F * v = k*x*sqrt(Pdrop * rho_ref / rho ) ; 195 209 else 196 210 "Closed" -
trunk/eml/stage_separators/flash.mso
r353 r372 64 64 Across as area (Brief="Flash Cross section area"); 65 65 vfrac as positive (Brief="Vapourization fraction", Symbol="\phi"); 66 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 67 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 66 68 67 69 EQUATIONS … … 102 104 "Mechanical Equilibrium" 103 105 OutletV.P = OutletL.P; 104 106 107 "Pressure Drop" 108 OutletL.P = Inlet.P - Pdrop; 109 110 "Pressure Ratio" 111 OutletL.P = Inlet.P * Pratio; 112 105 113 "Geometry Constraint" 106 114 V = ML * vL + MV * vV; … … 151 159 in InletQ as energy_stream (Brief="Rate of heat supply", PosX=1, PosY=0.7559, Symbol="_{in}"); 152 160 vfrac as fraction (Brief="Vapourization fraction", Symbol="\phi"); 161 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 162 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 153 163 154 164 EQUATIONS … … 170 180 "Mechanical Equilibrium" 171 181 OutletV.P = OutletL.P; 182 183 "Pressure Drop" 184 OutletL.P = Inlet.P - Pdrop; 185 186 "Pressure Ratio" 187 OutletL.P = Inlet.P * Pratio; 172 188 end 173 189 … … 203 219 vfrac as fraction(Brief="Vaporization fraction", Symbol="\phi"); 204 220 h as enth_mol(Brief="Mixture enthalpy"); 221 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 222 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 205 223 206 224 EQUATIONS … … 222 240 "Mechanical Equilibrium" 223 241 OutletV.P = OutletL.P; 242 243 "Pressure Drop" 244 OutletL.P = Inlet.P - Pdrop; 245 246 "Pressure Ratio" 247 OutletL.P = Inlet.P * Pratio; 224 248 end 225 249 … … 264 288 xsat(NComp) as Real(Lower=0, Upper=1, Brief="Liquid composition if saturated"); 265 289 ysat(NComp) as Real(Lower=0, Upper=1, Brief="Vapour composition if saturated"); 290 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}"); 291 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P"); 266 292 267 293 zero_one as fraction(Brief="Regularization Variable"); … … 295 321 "Mechanical Equilibrium" 296 322 OutletV.P = OutletL.P; 297 323 324 "Pressure Drop" 325 OutletL.P = Inlet.P - Pdrop; 326 327 "Pressure Ratio" 328 OutletL.P = Inlet.P * Pratio; 329 298 330 # regularization functions 299 331 zero_one = (1 + tanh(B * vsat))/2;
Note: See TracChangeset
for help on using the changeset viewer.