Changeset 147 for branches/newlanguage/eml
- Timestamp:
- Jan 31, 2007, 5:02:46 PM (17 years ago)
- Location:
- branches/newlanguage/eml
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/newlanguage/eml/heat_exchangers/HEX_Engine.mso
r146 r147 86 86 VARIABLES 87 87 # Must be streamPH 88 Hot as vapour_stream(Brief="Outlet Hot Stream");89 Cold as liquid_stream(Brief="Outlet Cold Stream");88 Hot as streamPH (Brief="Outlet Hot Stream"); 89 Cold as streamPH (Brief="Outlet Cold Stream"); 90 90 91 91 end -
branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso
r146 r147 30 30 PARAMETERS 31 31 outer PP as Plugin (Brief="External Physical Properties"); 32 HE as Plugin (Brief="STHE Calculations",File="heatex");33 32 outer NComp as Integer (Brief="Number of Components"); 34 33 M(NComp) as molweight (Brief="Component Mol Weight"); … … 553 552 VARIABLES 554 553 555 R as positive; 556 P as positive; 557 Pc as positive; 558 Rho as positive; 559 #Phi as positive; 554 R as positive; 555 P as positive; 556 Pc as positive; 557 Rho as positive; 558 Phi as positive; 559 lambdaN as positive; 560 lambda1 as positive; 560 561 561 562 EQUATIONS … … 564 565 Rho*(1-P*R) = (1-P); 565 566 566 " Capacity Ratio for LMTD Correction Fator"567 "R: Capacity Ratio for LMTD Correction Fator" 567 568 R*(Outlet.Cold.T - Inlet.Cold.T ) = (Inlet.Hot.T-Outlet.Hot.T); 568 569 569 " Non - Dimensional Variable for LMTD Correction Fator"570 "P: Non - Dimensional Variable for LMTD Correction Fator" 570 571 P*(Inlet.Hot.T- Inlet.Cold.T)= (Outlet.Cold.T-Inlet.Cold.T); 571 572 … … 575 576 "Temperature Difference at Outlet" 576 577 DTL = Outlet.Hot.T - Inlet.Cold.T; 577 578 579 switch LMTDcorrection 580 581 case "Bowmann": 582 583 lambdaN =1; 584 lambda1 =1; 585 Phi = 1; 586 578 587 if R equal 1 579 588 580 589 then 581 590 Pc*(2-P)= P; 582 583 591 Fc= (sqrt(2)*Pc)/((1-Pc)*ln( abs( ( 2-Pc*0.585786)/( 2-Pc*3.414214)))); 584 592 585 593 else 586 594 Pc = (sqrt(abs(( 1-P*R)/(1-P)))-1)/(sqrt(abs(( 1-P*R)/(1-P)))-R); 587 Fc =sqrt(R*R+1)*ln(abs((1-Pc*R)/(1-Pc)))/((1-R)*ln( abs( ( 2-Pc*(R+1-sqrt(R*R+1)))/ ( 2-Pc*(R + 1 + sqrt(R*R+1)))))); 588 589 end 590 591 592 end 593 595 Fc = sqrt(R*R+1)*ln(abs((1-Pc*R)/(1-Pc)))/((1-R)*ln( abs( ( 2-Pc*(R+1-sqrt(R*R+1)))/ ( 2-Pc*(R + 1 + sqrt(R*R+1)))))); 596 597 end 598 599 case "Fakeri": 600 Pc = P; 601 Phi = (sqrt(((Inlet.Hot.T - Outlet.Hot.T)*(Inlet.Hot.T- Outlet.Hot.T))+((Outlet.Cold.T - Inlet.Cold.T)*(Outlet.Cold.T - Inlet.Cold.T))))/(2*((Inlet.Hot.T + Outlet.Hot.T)-( Inlet.Cold.T + Outlet.Cold.T))); 602 603 if Rho equal 1 604 605 then 606 lambdaN = 1; 607 lambda1 = 1; 608 Fc = (2*Phi )/(ln(abs((1+Phi )/(1-Phi )))); 609 610 else 611 612 lambdaN = (1/ln(sqrt(abs(Rho))))*((2*sqrt(abs(Rho))-2)/(sqrt(abs(Rho))+1)); 613 614 lambda1 = (1/ln(abs(Rho)))*((2*Rho-2)/(Rho+1)); 615 616 Fc = ((2*Phi *(lambdaN/lambda1))/(ln(abs((1+Phi *(lambdaN/lambda1))/(1-Phi *(lambdaN/lambda1))))))*(1/lambdaN); 617 618 end 619 620 621 end 622 623 624 end 594 625 #===================================================================== 595 626 # NTU Method -
branches/newlanguage/eml/heat_exchangers/Mheatex.mso
r144 r147 67 67 68 68 VARIABLES 69 # Must be streamPH 70 Hot (Nhot) as liquid_stream(Brief="Outlet Hot Streams");71 Cold (Ncold) as liquid_stream(Brief="Outlet Cold Streams");69 70 Hot (Nhot) as streamPH (Brief="Outlet Hot Streams"); 71 Cold (Ncold) as streamPH (Brief="Outlet Cold Streams"); 72 72 73 73 end -
branches/newlanguage/eml/streams.mso
r125 r147 107 107 108 108 PARAMETERS 109 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 110 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 111 109 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 110 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 111 M(NComp) as molweight (Brief="Component Mol Weight"); 112 113 SET 114 115 M = PP.MolecularWeight(); 116 112 117 VARIABLES 113 118 out Outlet as stream; … … 116 121 hl as enth_mol; 117 122 hv as enth_mol; 123 zmass(NComp) as fraction (Brief = "Mass Fraction"); 124 Mw as molweight (Brief="Average Mol Weight"); 125 vm as volume_mol (Brief="Molar Volume"); 126 rho as dens_mass (Brief="Stream Density"); 127 Fw as flow_mass (Brief="Stream Mass Flow"); 128 Fvol as flow_vol (Brief = "Volumetric Flow"); 118 129 119 130 EQUATIONS 120 131 "Flash Calculation" 121 132 [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z); 133 122 134 "Overall Enthalpy" 123 135 Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + … … 126 138 hl = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x); 127 139 hv = PP.VapourEnthalpy(Outlet.T, Outlet.P, y); 140 141 "Average Molecular Weight" 142 Mw = sum(M*Outlet.z); 143 144 "Mass Density" 145 rho = (1-Outlet.v)*PP.LiquidDensity(Outlet.T,Outlet.P,x) + Outlet.v*PP.VapourDensity(Outlet.T,Outlet.P,y); 146 147 "Flow Mass" 148 Fw = Mw*Outlet.F; 149 150 "Molar Volume" 151 vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y); 152 153 "Volumetric Flow" 154 Fvol = Outlet.F*vm ; 155 156 "Mass Fraction" 157 zmass = M*Outlet.z / Mw; 158 128 159 end 129 160 … … 135 166 136 167 PARAMETERS 137 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 138 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 168 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 169 outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); 170 M(NComp) as molweight (Brief="Component Mol Weight"); 171 172 SET 173 174 M = PP.MolecularWeight(); 139 175 140 176 VARIABLES 141 177 in Inlet as stream; 142 178 v as fraction; 143 x(NComp) as fraction(Brief = "Liquid Molar Fraction"); 144 y(NComp) as fraction(Brief = "Vapour Molar Fraction"); 179 x(NComp) as fraction (Brief = "Liquid Molar Fraction"); 180 y(NComp) as fraction (Brief = "Vapour Molar Fraction"); 181 zmass(NComp) as fraction (Brief = "Mass Fraction"); 182 Mw as molweight (Brief="Average Mol Weight"); 183 vm as volume_mol (Brief="Molar Volume"); 184 rho as dens_mass (Brief="Stream Density"); 185 Fw as flow_mass (Brief="Stream Mass Flow"); 186 Fvol as flow_vol (Brief = "Volumetric Flow"); 145 187 146 188 EQUATIONS 147 189 "Flash Calculation" 148 190 [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z); 149 end 191 192 "Average Molecular Weight" 193 Mw = sum(M*Inlet.z); 194 195 "Mass Density" 196 rho = (1-v)*PP.LiquidDensity(Inlet.T,Inlet.P,x) + v*PP.VapourDensity(Inlet.T,Inlet.P,y); 197 198 "Flow Mass" 199 Fw = Mw*Inlet.F; 200 201 "Molar Volume" 202 vm = (1-v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y); 203 204 "Volumetric Flow" 205 Fvol = Inlet.F*vm ; 206 207 "Mass Fraction" 208 zmass = M*Inlet.z / Mw; 209 210 end
Note: See TracChangeset
for help on using the changeset viewer.