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

testing the new language

Location:
branches/newlanguage/eml/heat_exchangers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/eml/heat_exchangers/HEX_Engine.mso

    r146 r147  
    8686VARIABLES
    8787# Must be streamPH
    88 Hot     as vapour_stream (Brief="Outlet Hot Stream");
    89 Cold    as liquid_stream (Brief="Outlet Cold Stream");
     88Hot     as streamPH (Brief="Outlet Hot Stream");
     89Cold    as streamPH (Brief="Outlet Cold Stream");
    9090
    9191end
  • branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso

    r146 r147  
    3030PARAMETERS
    3131outer PP                as Plugin               (Brief="External Physical Properties");
    32                 HE              as Plugin               (Brief="STHE Calculations",File="heatex");
    3332outer NComp     as Integer      (Brief="Number of Components");
    3433                M(NComp)  as molweight  (Brief="Component Mol Weight");
     
    553552VARIABLES
    554553
    555 R               as positive;
    556 P               as positive;
    557 Pc              as positive;
    558 Rho     as positive;
    559 #Phi    as positive;
     554R                       as positive;
     555P                       as positive;
     556Pc                      as positive;
     557Rho             as positive;
     558Phi     as positive;
     559lambdaN as positive;
     560lambda1 as positive;
    560561
    561562EQUATIONS
     
    564565        Rho*(1-P*R) = (1-P);
    565566
    566 "Capacity Ratio for LMTD Correction Fator"
     567"R: Capacity Ratio for LMTD Correction Fator"
    567568        R*(Outlet.Cold.T - Inlet.Cold.T ) = (Inlet.Hot.T-Outlet.Hot.T);
    568569
    569 "Non - Dimensional Variable for LMTD Correction Fator"
     570"P: Non - Dimensional Variable for LMTD Correction Fator"
    570571        P*(Inlet.Hot.T- Inlet.Cold.T)= (Outlet.Cold.T-Inlet.Cold.T);
    571572       
     
    575576"Temperature Difference at Outlet"
    576577        DTL = Outlet.Hot.T - Inlet.Cold.T;
    577        
     578
     579switch LMTDcorrection
     580       
     581        case "Bowmann":
     582       
     583        lambdaN =1;
     584        lambda1 =1;
     585        Phi = 1;
     586
    578587if R equal 1
    579588       
    580589        then
    581590        Pc*(2-P)= P;
    582        
    583591        Fc= (sqrt(2)*Pc)/((1-Pc)*ln( abs( ( 2-Pc*0.585786)/( 2-Pc*3.414214))));
    584592       
    585593        else
    586594        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       
     597end
     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
     603if 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
     618end
     619
     620
     621end
     622
     623
     624end
    594625#=====================================================================
    595626# NTU Method
  • branches/newlanguage/eml/heat_exchangers/Mheatex.mso

    r144 r147  
    6767
    6868VARIABLES
    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
     70Hot  (Nhot)     as streamPH (Brief="Outlet Hot Streams");
     71Cold (Ncold)    as streamPH (Brief="Outlet Cold Streams");
    7272       
    7373end
Note: See TracChangeset for help on using the changeset viewer.