# Changeset 147 for branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

Ignore:
Timestamp:
Jan 31, 2007, 5:02:46 PM (16 years ago)
Message:

testing the new language

File:
1 edited

Unmodified
Added
Removed
• ## branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

 r146 PARAMETERS outer PP                as Plugin               (Brief="External Physical Properties"); HE              as Plugin               (Brief="STHE Calculations",File="heatex"); outer NComp     as Integer      (Brief="Number of Components"); M(NComp)  as molweight  (Brief="Component Mol Weight"); VARIABLES R               as positive; P               as positive; Pc              as positive; Rho     as positive; #Phi    as positive; R                       as positive; P                       as positive; Pc                      as positive; Rho             as positive; Phi     as positive; lambdaN as positive; lambda1 as positive; EQUATIONS Rho*(1-P*R) = (1-P); "Capacity Ratio for LMTD Correction Fator" "R: Capacity Ratio for LMTD Correction Fator" R*(Outlet.Cold.T - Inlet.Cold.T ) = (Inlet.Hot.T-Outlet.Hot.T); "Non - Dimensional Variable for LMTD Correction Fator" "P: Non - Dimensional Variable for LMTD Correction Fator" P*(Inlet.Hot.T- Inlet.Cold.T)= (Outlet.Cold.T-Inlet.Cold.T); "Temperature Difference at Outlet" DTL = Outlet.Hot.T - Inlet.Cold.T; switch LMTDcorrection case "Bowmann": lambdaN =1; lambda1 =1; Phi = 1; if R equal 1 then Pc*(2-P)= P; Fc= (sqrt(2)*Pc)/((1-Pc)*ln( abs( ( 2-Pc*0.585786)/( 2-Pc*3.414214)))); else Pc = (sqrt(abs(( 1-P*R)/(1-P)))-1)/(sqrt(abs(( 1-P*R)/(1-P)))-R); 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)))))); end end 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)))))); end case "Fakeri": Pc = P; 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))); if Rho equal 1 then lambdaN =       1; lambda1 =       1; Fc = (2*Phi )/(ln(abs((1+Phi )/(1-Phi )))); else lambdaN = (1/ln(sqrt(abs(Rho))))*((2*sqrt(abs(Rho))-2)/(sqrt(abs(Rho))+1)); lambda1 = (1/ln(abs(Rho)))*((2*Rho-2)/(Rho+1)); Fc =    ((2*Phi *(lambdaN/lambda1))/(ln(abs((1+Phi *(lambdaN/lambda1))/(1-Phi *(lambdaN/lambda1))))))*(1/lambdaN); end end end #===================================================================== # NTU Method
Note: See TracChangeset for help on using the changeset viewer.