Changeset 150


Ignore:
Timestamp:
Feb 5, 2007, 6:47:18 PM (16 years ago)
Author:
gerson bicca
Message:

updated double pipe heat exchanger model: testing switcher

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

Legend:

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

    r139 r150  
    8989
    9090"Viscosity Cold Stream"
    91         Properties.Cold.Average.Mu              =       PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z);
     91        Properties.Cold.Average.Mu      =       PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z);
    9292        Properties.Cold.Inlet.Mu                =       PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z);
    9393        Properties.Cold.Outlet.Mu               =       PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z);
     
    271271        Outlet.Cold.z=Inlet.Cold.z;
    272272       
    273 "No Phase Change In Cold Stream"
    274         Inlet.Cold.v=Outlet.Cold.v;
    275 
    276 "No Phase Change In Hot Stream"
    277         Inlet.Hot.v=Outlet.Hot.v;
    278        
    279273if Inner.PressureDrop.Re < 2300
    280274
     
    314308PARAMETERS
    315309
    316         HE                      as Plugin                       (Brief="STHE Calculations",File="heatex");
    317         Pi                              as constant             (Brief="Pi Number",Default=3.14159265);
    318         Hside       as Integer                  (Brief="Fluid Alocation Flag-Default:Outer",Lower=0,Upper=1);
    319         Side                    as Integer                      (Brief="Flow Direction",Lower=0,Upper=1);
    320         DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
    321         DiInner         as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
    322         DiOuter         as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
    323         Lpipe                   as length                       (Brief="Effective Tube Length",Lower=0.1);
    324         Kwall                   as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0);
     310        HotSide                                                 as Switcher             (Brief="Hot Side in the Exchanger",Valid=["inner","outer"],Default="outer");
     311        innerFlowRegime                                 as Switcher             (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
     312        outerFlowRegime                                 as Switcher             (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
     313
     314        InnerLaminarCorrelation         as Switcher             (Brief="Heat Transfer Correlation in Laminar Flow for the Inner Side",Valid=["Hausen","Schlunder"],Default="Hausen");
     315        InnerTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the Inner Side",Valid=["Gnielinski","ESDU"],Default="Gnielinski");
     316        InnerTurbulentCorrelation  as Switcher                  (Brief="Heat Transfer Correlation in Turbulent Flow for the Inner Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
     317
     318        OuterLaminarCorrelation         as Switcher             (Brief="Heat Transfer Correlation in Laminar Flow for the Outer Side",Valid=["Hausen","Schlunder"],Default="Hausen");
     319        OuterTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the OuterSide",Valid=["Gnielinski","ESDU"],Default="Gnielinski");
     320        OuterTurbulentCorrelation  as Switcher          (Brief="Heat Transfer Correlation in Turbulent Flow for the Outer Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
     321
     322        Pi                                                                      as constant             (Brief="Pi Number",Default=3.14159265);
     323        DoInner                                                 as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
     324        DiInner                                                 as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
     325        DiOuter                                                 as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
     326        Lpipe                                                           as length                       (Brief="Effective Tube Length",Lower=0.1);
     327        Kwall                                                           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0);
    325328       
    326329SET
    327330
    328331        Pi      = 3.14159265;
    329         Hside   = HE.FluidAlocation();
    330         Side    = HE.FlowDir();
     332
     333EQUATIONS
    331334
    332335#"Inner Pipe Cross Sectional Area for Flow"
     
    348351        Outer.PressureDrop.Dh=DiOuter-DoInner;
    349352
    350 EQUATIONS
    351 
    352353"Exchange Surface Area"
    353354        Details.A=Pi*DoInner*Lpipe;
    354355
    355 if Hside equal 1
    356        
    357         then
    358        
     356
     357switch innerFlowRegime
     358       
     359        case "laminar":
     360       
     361        Inner.HeatTransfer.fi   = 1/(0.79*ln(Inner.HeatTransfer.Re)-1.64)^2;
     362        switch InnerLaminarCorrelation
     363       
     364        case "Hausen":
     365        Inner.HeatTransfer.Nu = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR)^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR)^0.467));
     366       
     367        case "Schlunder":
     368        Inner.HeatTransfer.Nu = (49.027896+4.173281*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR*(DiInner/Lpipe))^(1/3);
     369
     370end
     371       
     372        when Inner.HeatTransfer.Re > 2300 switchto "transition";
     373       
     374        case "transition":
     375       
     376        Inner.HeatTransfer.fi   = 1/(0.79*ln(Inner.HeatTransfer.Re)-1.64)^2;
     377        switch InnerTransitionCorrelation
     378       
     379        case "Gnielinski":
     380        Inner.HeatTransfer.Nu*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi)*((Inner.HeatTransfer.PR)^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi*(Inner.HeatTransfer.Re-1000)*Inner.HeatTransfer.PR;
     381
     382        case "ESDU":
     383        Inner.HeatTransfer.Nu =1;#to be implemented
     384       
     385end
     386
     387        when Inner.HeatTransfer.Re < 2300 switchto "laminar";
     388        when Inner.HeatTransfer.Re > 10000 switchto "turbulent";
     389
     390        case "turbulent":
     391
     392        switch InnerTurbulentCorrelation
     393       
     394        case "Petukhov":
     395        Inner.HeatTransfer.fi   = 1/(1.82*log(Inner.HeatTransfer.Re)-1.64)^2;
     396        Inner.HeatTransfer.Nu*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi)*((Inner.HeatTransfer.PR)^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR;
     397       
     398        case "SiederTate":
     399        Inner.HeatTransfer.Nu = 0.027*(Inner.HeatTransfer.PR)^(1/3)*(Inner.HeatTransfer.Re)^(4/5);
     400        Inner.HeatTransfer.fi   = 1/(1.82*log(Inner.HeatTransfer.Re)-1.64)^2;
     401       
     402end
     403       
     404        when Inner.HeatTransfer.Re < 10000 switchto "transition";
     405       
     406end
     407
     408switch outerFlowRegime
     409       
     410        case "laminar":
     411       
     412        Outer.HeatTransfer.fi   = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2;
     413        switch OuterLaminarCorrelation
     414       
     415        case "Hausen":
     416        Outer.HeatTransfer.Nu = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR)^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR)^0.467));
     417       
     418        case "Schlunder":
     419        Outer.HeatTransfer.Nu = (49.027896+4.173281*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR*(Outer.HeatTransfer.Dh/Lpipe))^(1/3);
     420
     421end
     422       
     423        when Outer.HeatTransfer.Re > 2300 switchto "transition";
     424       
     425        case "transition":
     426       
     427        switch OuterTransitionCorrelation
     428       
     429        case "Gnielinski":
     430        Outer.HeatTransfer.fi   = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2;
     431        Outer.HeatTransfer.Nu*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi)*((Outer.HeatTransfer.PR)^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi*(Outer.HeatTransfer.Re-1000)*Outer.HeatTransfer.PR;
     432
     433        case "ESDU":
     434        Outer.HeatTransfer.Nu =1;#to be implemented
     435        Outer.HeatTransfer.fi   = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2;
     436end
     437       
     438        when Outer.HeatTransfer.Re < 2300 switchto "laminar";
     439        when Outer.HeatTransfer.Re > 10000 switchto "turbulent";
     440       
     441        case "turbulent":
     442       
     443        switch OuterTurbulentCorrelation
     444       
     445        case "Petukhov":
     446        Outer.HeatTransfer.fi   = 1/(1.82*log(Outer.HeatTransfer.Re)-1.64)^2;
     447        Outer.HeatTransfer.Nu*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi)*((Outer.HeatTransfer.PR)^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR;
     448       
     449        case "SiederTate":
     450        Outer.HeatTransfer.Nu = 0.027*(Outer.HeatTransfer.PR)^(1/3)*(Outer.HeatTransfer.Re)^(4/5);
     451        Outer.HeatTransfer.fi   = 1/(1.82*log(Outer.HeatTransfer.Re)-1.64)^2;
     452end
     453
     454        when Outer.HeatTransfer.Re < 10000 switchto "transition";
     455
     456end
     457
     458
     459switch HotSide
     460       
     461        case "outer":
     462
     463"Inner Pipe Film Coefficient"
     464        Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Properties.Cold.Average.K/DiInner)*Inner.HeatTransfer.Phi;
     465
     466"Outer Pipe Film Coefficient"
     467        Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Properties.Hot.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
     468
    359469"Pressure Drop Hot Stream"
    360470        Outlet.Hot.P  = Inlet.Hot.P - Outer.PressureDrop.Pdrop;
     
    363473        Outlet.Cold.P  = Inlet.Cold.P - Inner.PressureDrop.Pdrop;
    364474       
    365 "Outer Pipe Film Coefficient"
    366         Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Hot.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi;
    367 
    368 "Inner Pipe Film Coefficient"
    369         Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Cold.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi;
    370 
    371475"Outer Pipe Pressure Drop"
    372476        Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);
     
    376480
    377481"Outer Pipe Phi correction"
    378         Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu);
     482        Outer.HeatTransfer.Phi = (Properties.Hot.Average.Mu/Properties.Hot.Wall.Mu)^0.14;
    379483       
    380484"Inner Pipe Phi correction"
    381         Inner.HeatTransfer.Phi  = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu);
     485        Inner.HeatTransfer.Phi  = (Properties.Cold.Average.Mu/Properties.Cold.Wall.Mu)^0.14;
    382486
    383487"Outer Pipe Prandtl Number"
     
    405509        Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Cold.Average.rho)  = Properties.Cold.Inlet.Fw;
    406510
    407         else
    408        
     511        case "inner":
     512
     513"Outer Pipe Film Coefficient"
     514        Outer.HeatTransfer.hcoeff = (Outer.HeatTransfer.Nu*Properties.Cold.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
     515
     516"InnerPipe Film Coefficient"
     517        Inner.HeatTransfer.hcoeff= (Inner.HeatTransfer.Nu*Properties.Hot.Average.K/DiInner)*Inner.HeatTransfer.Phi;
     518
    409519"Pressure Drop Hot Stream"
    410520        Outlet.Hot.P  = Inlet.Hot.P - Inner.PressureDrop.Pdrop;
     
    413523        Outlet.Cold.P  = Inlet.Cold.P - Outer.PressureDrop.Pdrop;
    414524       
    415 "Inner Pipe Film Coefficient"
    416         Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Hot.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi;
    417 
    418 "Outer Pipe Film Coefficient"
    419         Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Cold.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi;
    420 
    421525"Outer Pipe Pressure Drop"
    422526        Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);
     
    426530
    427531"Outer Pipe Phi correction"
    428         Outer.HeatTransfer.Phi          = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu);
     532        Outer.HeatTransfer.Phi          = (Properties.Cold.Average.Mu/Properties.Cold.Wall.Mu)^0.14;
    429533       
    430534"Inner Pipe Phi correction"
    431         Inner.HeatTransfer.Phi          = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu);
     535        Inner.HeatTransfer.Phi          = (Properties.Hot.Average.Mu/Properties.Hot.Wall.Mu)^0.14;
    432536       
    433537"Outer Pipe Prandtl Number"
     
    540644end
    541645
    542 Model DoublePipe_LMTD                           as DoublePipe_Basic_LMTD
     646Model DoublePipe_LMTD                                   as DoublePipe_Basic_LMTD
    543647
    544648ATTRIBUTES
     
    547651        Info            =
    548652        "write some information";
    549        
     653
     654PARAMETERS
     655
     656        FlowDirection   as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
     657
    550658EQUATIONS
    551659
    552 if Side equal 0
    553 
    554         then
     660switch FlowDirection
     661
     662        case "cocurrent":
    555663"Temperature Difference at Inlet - Cocurrent Flow"
    556664        DT0 = Inlet.Hot.T - Inlet.Cold.T;
     
    559667        DTL = Outlet.Hot.T - Outlet.Cold.T;
    560668
    561         else
     669        case "counter":
    562670"Temperature Difference at Inlet - Counter Flow"
    563671        DT0 = Inlet.Hot.T - Outlet.Cold.T;
     
    576684        Info            =
    577685        "write some information";
    578        
     686
     687PARAMETERS
     688
     689        FlowDirection as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
     690
    579691EQUATIONS
    580692
     
    587699        else
    588700
    589 if Side equal 0
    590 
    591 then
     701switch  FlowDirection
     702
     703        case "cocurrent":
     704       
    592705"Effectiveness in Cocurrent Flow"
    593706        Eft*(1+Details.Cr) = (1-exp(-Details.NTU*(1+Details.Cr)));
    594707       
    595         else
     708        case "counter":
    596709
    597710if Details.Cr equal 1
  • branches/newlanguage/eml/heat_exchangers/HEX_Engine.mso

    r147 r150  
    391391        "write some information";
    392392       
    393 PARAMETERS
    394 As              as area         (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);
    395 Dh      as length       (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);
    396 
    397 VARIABLES
     393VARIABLES
     394As                      as area                                         (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);
     395Dh              as length                                       (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);
    398396Re              as positive                             (Brief="Reynolds Number",Default=100,Lower=1);
    399397hcoeff  as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
     398fi              as fricfactor                   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
     399Nu              as positive                             (Brief="Nusselt Number",Default=0.5,Lower=1e-8);
    400400PR              as positive                             (Brief="Prandtl Number",Default=0.5,Lower=1e-8);
    401401Phi             as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
     
    412412        "write some information";
    413413       
    414 PARAMETERS
     414VARIABLES
     415
    415416Dh      as length               (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6);
    416 
    417 VARIABLES
    418417Pdrop   as press_delta  (Brief="Pressure Drop",Default=0.01, Lower=1e-10);
    419418fi      as fricfactor   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
Note: See TracChangeset for help on using the changeset viewer.