Changeset 146 for branches/newlanguage


Ignore:
Timestamp:
Jan 30, 2007, 7:42:28 PM (17 years ago)
Author:
gerson bicca
Message:

testing with switcher in heat exchangers model

Location:
branches/newlanguage
Files:
3 edited

Legend:

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

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

    r145 r146  
    477477        Info            =
    478478        "write some information";
    479        
    480 EQUATIONS
     479
     480PARAMETERS
     481
     482LMTDcorrection as Switcher(Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakeri"],Default="Bowmann");
     483
     484VARIABLES
     485
     486R               as positive;
     487P               as positive;
     488Rho     as positive;
     489Phi    as positive;
     490
     491EQUATIONS
     492
     493"Capacity Ratio for LMTD Correction Fator"
     494        R*(Outlet.Cold.T - Inlet.Cold.T ) = (Inlet.Hot.T-Outlet.Hot.T);
     495
     496"Non - Dimensional Variable for LMTD Correction Fator"
     497        P*(Inlet.Hot.T- Inlet.Cold.T)= (Outlet.Cold.T-Inlet.Cold.T);
     498
    481499"Temperature Difference at Inlet"
    482500        DT0 = Inlet.Hot.T - Outlet.Cold.T;
     
    484502"Temperature Difference at Outlet"
    485503        DTL = Outlet.Hot.T - Inlet.Cold.T;
    486        
    487 "LMTD Correction Factor"
    488         Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T);
     504
     505"Rho: Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation"
     506        Rho*(1-P*R) = (1-P);
     507
     508"Phi: Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation"
     509        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)));
     510
     511switch LMTDcorrection
     512       
     513        case "Bowmann":
     514
     515 if R equal 1
     516       
     517    then
     518        Fc = (sqrt(2)*P)/((1-P)*ln( abs( ( 2-P*0.585786)/( 2-P*3.414214))));
     519
     520        else
     521        Fc = sqrt(R*R+1)*ln(abs((1-P*R)/(1-P)))/((1-R)*ln( abs( ( 2-P*(R+1-sqrt(R*R+1)))/ ( 2-P*(R + 1 + sqrt(R*R+1))))));
     522
     523end
     524
     525case "Fakeri":
     526
     527if Rho equal 1
     528       
     529        then
     530        Fc = (4*Phi)/(ln(abs((1+2*Phi)/(1-2*Phi))));
     531
     532        else
     533        Fc = (2*Phi*(Rho+1)*ln(abs(Rho)))/( ln(abs((1+2*Phi)/(1-2*Phi)))*(Rho-1));
     534       
     535end
     536
     537end
    489538
    490539end
     
    498547        "write some information";
    499548       
    500 EQUATIONS
     549PARAMETERS
     550
     551LMTDcorrection as Switcher(Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakeri"],Default="Bowmann");
     552
     553VARIABLES
     554
     555R               as positive;
     556P               as positive;
     557Pc              as positive;
     558Rho     as positive;
     559#Phi    as positive;
     560
     561EQUATIONS
     562
     563"Rho: Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation"
     564        Rho*(1-P*R) = (1-P);
     565
     566"Capacity Ratio for LMTD Correction Fator"
     567        R*(Outlet.Cold.T - Inlet.Cold.T ) = (Inlet.Hot.T-Outlet.Hot.T);
     568
     569"Non - Dimensional Variable for LMTD Correction Fator"
     570        P*(Inlet.Hot.T- Inlet.Cold.T)= (Outlet.Cold.T-Inlet.Cold.T);
     571       
    501572"Temperature Difference at Inlet"
    502573        DT0 = Inlet.Hot.T - Outlet.Cold.T;
     
    505576        DTL = Outlet.Hot.T - Inlet.Cold.T;
    506577       
    507 "LMTD Correction Factor"
    508         Fc = HE.FshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T);
     578if R equal 1
     579       
     580        then
     581        Pc*(2-P)= P;
     582       
     583        Fc= (sqrt(2)*Pc)/((1-Pc)*ln( abs( ( 2-Pc*0.585786)/( 2-Pc*3.414214))));
     584       
     585        else
     586        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       
     589end
     590
    509591
    510592end
  • branches/newlanguage/sample/heat_exchangers/sampleEshell_LMTD.mso

    r100 r146  
    2929PARAMETERS
    3030
    31 PP              as CalcObject (Brief="Physical Properties",File="vrpp");
     31PP              as Plugin (Brief="Physical Properties",File="vrpp");
    3232NComp   as Integer;
    3333       
     
    3535DEVICES
    3636exchanger       as E_Shell_LMTD;
    37 streamhot       as streamTP;
    38 streamcold  as streamTP;
     37streamhot       as source;
     38streamcold  as source;
    3939
    4040SET
    4141
    42 PP.LiquidModel  = "PR";
    43 PP.VapourModel  = "PR";
     42PP.LiquidModel          = "PR";
     43PP.VapourModel          = "PR";
    4444PP.Components   = ["water","n-butane", "benzene", "n-octane" ];
    45 NComp                   = PP.NumberOfComponents;
     45NComp                           = PP.NumberOfComponents;
    4646
    47         exchanger.HE.LMTDcorrection     = "Bowmann";
    48 #       exchanger.HE.LMTDcorrection     = "Fakeri";
     47        exchanger.LMTDcorrection        = "Bowmann";
     48#       exchanger.LMTDcorrection        = "Fakeri";
    4949       
    5050
    5151CONNECTIONS
    5252
    53 streamhot       to exchanger.Inlet.Hot;
    54 streamcold      to exchanger.Inlet.Cold;
     53streamhot.Outlet        to exchanger.Inlet.Hot;
     54streamcold.Outlet       to exchanger.Inlet.Cold;
    5555       
    5656SPECIFY
     
    6161exchanger.PressureDrop.Cold.Pdrop   = 0.2*"kPa";
    6262
    63 streamhot.F             = 20    * "kmol/h";
    64 streamhot.T             = 450   * "K";
    65 streamhot.P             = 120   * "kPa";
    66 streamhot.z             = [1,0,0,0];
     63streamhot.Outlet.F              = 20    * "kmol/h";
     64streamhot.Outlet.T              = 450   * "K";
     65streamhot.Outlet.P              = 120   * "kPa";
     66streamhot.Outlet.z              = [1,0,0,0];
    6767
    68 streamcold.F            = 10 * "kmol/h";
    69 streamcold.P            = 120 * "kPa";
    70 streamcold.T            = 300 * "K";   
    71 streamcold.z            = [0,0.5, 0.1, 0.4];
     68streamcold.Outlet.F             = 10 * "kmol/h";
     69streamcold.Outlet.P             = 120 * "kPa";
     70streamcold.Outlet.T             = 300 * "K";   
     71streamcold.Outlet.z             = [0,0.5, 0.1, 0.4];
    7272
    7373exchanger.Outlet.Cold.T = 330*"K";
    7474       
    7575OPTIONS
    76  mode   = "steady";
     76
     77 Dynamic        = false;
     78
    7779 end
Note: See TracChangeset for help on using the changeset viewer.