Ignore:
Timestamp:
Jan 15, 2008, 8:30:58 PM (15 years ago)
Author:
gerson bicca
Message:

Updated hairpin heat exchanger with incremental approach (final testing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/tests/eml/heat_exchangers/HairpinIncr.mso

    r445 r447  
    105105        Q(N)            as power                                                        (Brief="Incremental Duty", Default=7000, Lower=1e-8, Upper=1e10);
    106106        Qtotal          as power                                                        (Brief="Total Duty", Default=7000, Lower=1e-8, Upper=1e10);
    107         Uc(N)           as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
     107        #Uc(N)          as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
     108        Uc              as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
    108109        Ud(N)           as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10);
    109110
     
    156157
    157158Plocal(Npoints)         as pressure             (Brief="Incremental Local  Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa');
    158 Pdrop                                           as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
    159 Pd_fric(Npoints)                as press_delta  (Brief="Incremental Pressure Drop for friction",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}");
     159#Pdrop                                          as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
     160#Pd_fric(Npoints)               as press_delta  (Brief="Incremental Pressure Drop for friction",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}");
    160161fi(N)                                           as fricfactor           (Brief="Incremental Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
    161162Re(N)                                           as positive                     (Brief="Incremental Reynolds Number",Default=100,Lower=1);
    162 Pdnozzle_in             as press_delta          (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
    163 Pdnozzle_out            as press_delta          (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
    164 Vnozzle_in              as velocity                     (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
    165 Vnozzle_out             as velocity                     (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
    166 RVsquare_in             as positive                     (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
    167 RVsquare_out            as positive                     (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
     163#Pdnozzle_in            as press_delta          (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
     164#Pdnozzle_out           as press_delta          (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
     165#Vnozzle_in             as velocity                     (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
     166#Vnozzle_out            as velocity                     (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
     167#RVsquare_in            as positive                     (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
     168#RVsquare_out           as positive                     (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
    168169end     
    169170
     
    201202        M(NComp)        as molweight    (Brief="Component Mol Weight");
    202203       
    203         HotSide                                 as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
     204        #HotSide                                        as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
    204205        innerFlowRegime         as Switcher     (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
    205206        outerFlowRegime         as Switcher     (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
     
    216217       
    217218outer   DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
    218 outer   DiInner as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
    219 outer   DiOuter as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
     219outer   DiInner         as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
     220outer   DiOuter         as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
    220221outer   Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
    221222outer   Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
    222 outer   Rfi                     as positive                     (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
    223 outer   Rfo                     as positive                     (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
    224 
    225 outer   Donozzle_Inner  as length       (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    226 outer   Dinozzle_Inner          as length       (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    227 
    228 outer   Donozzle_Outer  as length               (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    229 outer   Dinozzle_Outer  as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    230 
    231 InnerKinlet     as positive                     (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
    232 InnerKoutlet    as positive                     (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
    233 
    234 OuterKinlet             as positive             (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
    235 OuterKoutlet    as positive             (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
     223outer   Rfi                     as positive             (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     224outer   Rfo                     as positive             (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     225
     226#outer  Donozzle_Inner  as length       (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     227#outer  Dinozzle_Inner          as length       (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     228
     229#outer  Donozzle_Outer  as length               (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     230#outer  Dinozzle_Outer  as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    236231
    237232VARIABLES
     
    244239
    245240        Details         as Details_Main         (Brief="Some Details in the Heat Exchanger", Symbol=" ");
    246         Inner                   as Main_Hairpin         (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}");
    247         Outer                   as Main_Hairpin         (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}");
     241        Inner           as Main_Hairpin         (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}");
     242        Outer           as Main_Hairpin         (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}");
    248243
    249244        Lincr(Npoints)          as length               (Brief = "Incremental Tube Length", Symbol = "L_{incr}");
     
    303298"Inner Stream Average Molecular Weight"
    304299        Inner.Properties.Average.Mw = sum(M*InletInner.z);
    305 
    306300
    307301if InletInner.v equal 0
     
    422416end
    423417
    424 switch HotSide
     418"Flow Mass Inlet Inner Stream"
     419        Inner.Properties.Inlet.Fw               =  sum(M*InletInner.z)*InletInner.F;
     420
     421"Flow Mass Outlet Inner Stream"
     422        Inner.Properties.Outlet.Fw              =  sum(M*OutletInner.z)*OutletInner.F;
     423
     424"Flow Mass Inlet Outer Stream"
     425        Outer.Properties.Inlet.Fw               =  sum(M*InletOuter.z)*InletOuter.F;
     426
     427"Flow Mass Outlet Outer Stream"
     428        Outer.Properties.Outlet.Fw      =  sum(M*OutletOuter.z)*OutletOuter.F;
     429
     430"Molar Balance Outer Stream"
     431        OutletOuter.F = InletOuter.F;
     432       
     433"Molar Balance Inner Stream"
     434        OutletInner.F = InletInner.F;
     435
     436"Outer Stream Molar Fraction Constraint"
     437        OutletOuter.z=InletOuter.z;
     438       
     439"InnerStream Molar Fraction Constraint"
     440        OutletInner.z=InletInner.z;
     441
     442"Total Exchange Surface Area for one segment of pipe"
     443        Details.A=Pi*DoInner*Lpipe;
     444
     445
     446"Pipe Initial Length from Left to Right"
     447        Lincr(1) = 0*'m';
     448
     449for i in [1:N]
     450
     451"Incremental Length"
     452        Lincr(i+1) = i*abs(Lpipe)/N;
     453
     454end
     455
     456for i in [1:N]
     457
     458switch innerFlowRegime
     459       
     460        case "laminar":
     461       
     462"Inner Side Friction Factor for Pressure Drop - laminar Flow"
     463        Inner.PressureDrop.fi(i)*Inner.PressureDrop.Re(i) = 16;
     464       
     465        when Inner.PressureDrop.Re(i) > 2300 switchto "transition";
     466
     467        case "transition":
     468       
     469"using Turbulent Flow - to be implemented"
     470        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
     471
     472        when Inner.PressureDrop.Re(i) < 2300 switchto "laminar";
     473        when Inner.PressureDrop.Re(i) > 10000 switchto "turbulent";
     474
     475        case "turbulent":
     476
     477"Inner Side Friction Factor - Turbulent Flow"
     478        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
     479
     480        when Inner.PressureDrop.Re(i) < 10000 switchto "transition";
     481       
     482end     
     483
     484end
     485
     486for i in [1:N]
     487
     488switch outerFlowRegime
     489       
     490        case "laminar":
     491       
     492"Outer Side Friction Factor - laminar Flow"
     493        Outer.PressureDrop.fi(i)*Outer.PressureDrop.Re(i) = 16;
     494       
     495        when Outer.PressureDrop.Re(i) > 2300 switchto "transition";
     496
     497        case "transition":
     498       
     499"using Turbulent Flow - Transition Flow must be implemented"
     500        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
     501
     502        when Outer.PressureDrop.Re(i) < 2300 switchto "laminar";
     503        when Outer.PressureDrop.Re(i) > 10000 switchto "turbulent";
     504
     505        case "turbulent":
     506
     507"Outer Side Friction Factor - Turbulent Flow"
     508        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
     509
     510        when Outer.PressureDrop.Re(i) < 10000 switchto "transition";
     511       
     512end
     513
     514end
     515
     516for i in [1:N]
     517
     518switch innerFlowRegime
     519       
     520        case "laminar":
     521       
     522"Inner Side Friction Factor for Heat Transfer - laminar Flow"
     523        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
     524       
     525switch InnerLaminarCorrelation
     526       
     527        case "Hausen":
     528
     529"Nusselt Number"
     530        Inner.HeatTransfer.Nu(i) = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.467));
     531       
     532        case "Schlunder":
     533
     534"Nusselt Number"
     535        Inner.HeatTransfer.Nu(i) = (49.027896+4.173281*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i)*(DiInner/Lpipe))^(1/3);
     536
     537end
     538       
     539        when Inner.HeatTransfer.Re(i) > 2300 switchto "transition";
     540       
     541        case "transition":
     542       
     543"Inner Side Friction Factor for Heat Transfer - transition Flow"
     544        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
     545       
     546switch InnerTransitionCorrelation
     547       
     548        case "Gnielinski":
     549       
     550"Nusselt Number"
     551        Inner.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*(Inner.HeatTransfer.Re(i)-1000)*Inner.HeatTransfer.PR(i);
     552
     553        case "Hausen":
     554
     555"Nusselt Number"
     556        Inner.HeatTransfer.Nu(i) =0.116*(Inner.HeatTransfer.Re(i)^(0.667)-125)*Inner.HeatTransfer.PR(i)^(0.333)*(1+(DiInner/Lpipe)^0.667);
     557       
     558end
     559
     560        when Inner.HeatTransfer.Re(i) < 2300 switchto "laminar";
     561        when Inner.HeatTransfer.Re(i) > 10000 switchto "turbulent";
     562
     563        case "turbulent":
     564
     565switch InnerTurbulentCorrelation
     566       
     567        case "Petukhov":
     568       
     569"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
     570        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
     571
     572"Nusselt Number"
     573        Inner.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i);
     574       
     575        case "SiederTate":
     576
     577"Nusselt Number"
     578        Inner.HeatTransfer.Nu(i) = 0.027*(Inner.HeatTransfer.PR(i))^(1/3)*(Inner.HeatTransfer.Re(i))^(4/5);
     579
     580"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
     581        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
     582       
     583end
     584       
     585        when Inner.HeatTransfer.Re(i) < 10000 switchto "transition";
     586       
     587end
     588
     589end
     590
     591for i in [1:N]
     592
     593switch outerFlowRegime
     594       
     595        case "laminar":
     596       
     597"Outer Side Friction Factor for Heat Transfer - laminar Flow"
     598        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
     599       
     600switch OuterLaminarCorrelation
     601       
     602        case "Hausen":
     603
     604"Nusselt Number"
     605        Outer.HeatTransfer.Nu(i) = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.467));
     606       
     607        case "Schlunder":
     608
     609"Nusselt Number"
     610        Outer.HeatTransfer.Nu(i) = (49.027896+4.173281*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i)*(Outer.HeatTransfer.Dh/Lpipe))^(1/3);
     611
     612end
     613       
     614        when Outer.HeatTransfer.Re(i) > 2300 switchto "transition";
     615       
     616        case "transition":
     617       
     618switch OuterTransitionCorrelation
     619       
     620        case "Gnielinski":
     621
     622"Outer Side Friction Factor for Heat Transfer - transition Flow"
     623        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
     624
     625"Nusselt Number"
     626        Outer.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*(Outer.HeatTransfer.Re(i)-1000)*Outer.HeatTransfer.PR(i);
     627
     628        case "Hausen":
     629
     630"Nusselt Number"
     631        Outer.HeatTransfer.Nu(i) =      0.116*(Outer.HeatTransfer.Re(i)^(0.667)-125)*Outer.HeatTransfer.PR(i)^(0.333)*(1+(Outer.HeatTransfer.Dh/Lpipe)^0.667);
     632
     633
     634"Outer Side Friction Factor for Heat Transfer - transition Flow"
     635        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
     636       
     637end
     638       
     639        when Outer.HeatTransfer.Re(i) < 2300 switchto "laminar";
     640        when Outer.HeatTransfer.Re(i) > 10000 switchto "turbulent";
     641       
     642        case "turbulent":
     643       
     644switch OuterTurbulentCorrelation
     645       
     646        case "Petukhov":
     647
     648"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
     649        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
     650       
     651"Nusselt Number"
     652        Outer.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i);
     653       
     654        case "SiederTate":
     655
     656"Nusselt Number"
     657        Outer.HeatTransfer.Nu(i) = 0.027*(Outer.HeatTransfer.PR(i))^(1/3)*(Outer.HeatTransfer.Re(i))^(4/5);
     658
     659"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
     660        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
     661       
     662end
     663
     664        when Outer.HeatTransfer.Re(i) < 10000 switchto "transition";
     665
     666end
     667
     668end
     669
     670"Inner Pipe Film Coefficient"
     671        Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi;
     672
     673"Outer Pipe Film Coefficient"
     674        Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
     675
     676"Outer Pipe Phi correction"
     677        Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14;
     678       
     679"Inner Pipe Phi correction"
     680        Inner.HeatTransfer.Phi  = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14;
     681
     682"Outer Pipe Prandtl Number"
     683        Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K;
     684
     685"Inner Pipe Prandtl Number"
     686        Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K;
     687
     688"Outer Pipe Reynolds Number for Heat Transfer"
     689        Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu;
     690
     691"Outer Pipe Reynolds Number for Pressure Drop"
     692        Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu;
     693
     694"Inner Pipe Reynolds Number for Heat Transfer"
     695        Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu;
     696
     697"Inner Pipe Reynolds Number for Pressure Drop"
     698        Inner.PressureDrop.Re = Inner.HeatTransfer.Re;
     699
     700"Outer Pipe Velocity"
     701        Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho)  = Outer.Properties.Inlet.Fw;
     702
     703"Inner Pipe Velocity"
     704        Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho)  = Inner.Properties.Inlet.Fw;
     705
     706"Overall Heat Transfer Coefficient Clean"
     707        #Details.Uc*((DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
     708        Details.Uc*((DoInner/(sum(Inner.HeatTransfer.hcoeff)/N*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(sum(Outer.HeatTransfer.hcoeff)/N)))=1;
     709
     710"Overall Heat Transfer Coefficient Dirty"
     711        Details.Ud=1/(Rfi*(DoInner/DiInner) +  Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)));
     712
     713"Total Duty"
     714        Details.Qtotal = sum(Details.Q);
     715
     716for i in [2:N]
     717
     718"Incremental Enthalpy Inner Stream"
     719        Inner.HeatTransfer.Enth(i) = (1-InletInner.v)*PP.LiquidEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z) + InletInner.v*PP.VapourEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z);
     720
     721"Incremental Enthalpy Outer Stream"
     722        Outer.HeatTransfer.Enth(i) = (1-InletOuter.v)*PP.LiquidEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z) + InletOuter.v*PP.VapourEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z);
     723
     724end
     725
     726#*switch HotSide
    425727
    426728        case "outer":
    427729
    428730"Energy Balance Outer Stream in counter flow"
    429                 Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
     731        Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
    430732
    431733"Energy Balance Inner Stream"
     
    439741        Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(1:N)-Inner.HeatTransfer.Enth(2:Npoints));
    440742
    441         "Energy Balance Cold Stream in counter flow"
    442                 Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
    443                
     743"Energy Balance Cold Stream in counter flow"
     744        Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
     745
    444746        when InletInner.T < InletOuter.T switchto "outer";
    445747
    446748end
    447 
    448 "Flow Mass Inlet Inner Stream"
    449         Inner.Properties.Inlet.Fw               =  sum(M*InletInner.z)*InletInner.F;
    450 
    451 "Flow Mass Outlet Inner Stream"
    452         Inner.Properties.Outlet.Fw              =  sum(M*OutletInner.z)*OutletInner.F;
    453 
    454 "Flow Mass Inlet Outer Stream"
    455         Outer.Properties.Inlet.Fw               =  sum(M*InletOuter.z)*InletOuter.F;
    456 
    457 "Flow Mass Outlet Outer Stream"
    458         Outer.Properties.Outlet.Fw      =  sum(M*OutletOuter.z)*OutletOuter.F;
    459 
    460 "Molar Balance Outer Stream"
    461         OutletOuter.F = InletOuter.F;
    462        
    463 "Molar Balance Inner Stream"
    464         OutletInner.F = InletInner.F;
    465 
    466 "Outer Stream Molar Fraction Constraint"
    467         OutletOuter.z=InletOuter.z;
    468        
    469 "InnerStream Molar Fraction Constraint"
    470         OutletInner.z=InletInner.z;
    471 
    472 "Total Exchange Surface Area for one segment of pipe"
    473         Details.A=Pi*DoInner*Lpipe;
    474 
    475 "Pipe Initial Length from Left to Right - OBS: Left: Always Inlet inner side"
    476         Lincr(1) = 0*'m';
    477 
    478 for i in [1:N]
    479 
    480 "Incremental Length"
    481         Lincr(i+1) = i*abs(Lpipe)/N;
    482 
    483 end
    484 
    485 for i in [1:N]
    486 
    487 switch innerFlowRegime
    488        
    489         case "laminar":
    490        
    491 "Inner Side Friction Factor for Pressure Drop - laminar Flow"
    492         Inner.PressureDrop.fi(i)*Inner.PressureDrop.Re(i) = 16;
    493        
    494         when Inner.PressureDrop.Re(i) > 2300 switchto "transition";
    495 
    496         case "transition":
    497        
    498 "using Turbulent Flow - to be implemented"
    499         (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
    500 
    501         when Inner.PressureDrop.Re(i) < 2300 switchto "laminar";
    502         when Inner.PressureDrop.Re(i) > 10000 switchto "turbulent";
    503 
    504         case "turbulent":
    505 
    506 "Inner Side Friction Factor - Turbulent Flow"
    507         (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
    508 
    509         when Inner.PressureDrop.Re(i) < 10000 switchto "transition";
    510        
    511 end     
    512 
    513 end
    514 
    515 for i in [1:N]
    516 
    517 switch outerFlowRegime
    518        
    519         case "laminar":
    520        
    521 "Outer Side Friction Factor - laminar Flow"
    522         Outer.PressureDrop.fi(i)*Outer.PressureDrop.Re(i) = 16;
    523        
    524         when Outer.PressureDrop.Re(i) > 2300 switchto "transition";
    525 
    526         case "transition":
    527        
    528 "using Turbulent Flow - Transition Flow must be implemented"
    529         (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
    530 
    531         when Outer.PressureDrop.Re(i) < 2300 switchto "laminar";
    532         when Outer.PressureDrop.Re(i) > 10000 switchto "turbulent";
    533 
    534         case "turbulent":
    535 
    536 "Outer Side Friction Factor - Turbulent Flow"
    537         (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
    538 
    539         when Outer.PressureDrop.Re(i) < 10000 switchto "transition";
    540        
    541 end
    542 
    543 end
    544 
    545 for i in [1:N]
    546 
    547 switch innerFlowRegime
    548        
    549         case "laminar":
    550        
    551 "Inner Side Friction Factor for Heat Transfer - laminar Flow"
    552         Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
    553        
    554 switch InnerLaminarCorrelation
    555        
    556         case "Hausen":
    557 
    558 "Nusselt Number"
    559         Inner.HeatTransfer.Nu(i) = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.467));
    560        
    561         case "Schlunder":
    562 
    563 "Nusselt Number"
    564         Inner.HeatTransfer.Nu(i) = (49.027896+4.173281*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i)*(DiInner/Lpipe))^(1/3);
    565 
    566 end
    567        
    568         when Inner.HeatTransfer.Re(i) > 2300 switchto "transition";
    569        
    570         case "transition":
    571        
    572 "Inner Side Friction Factor for Heat Transfer - transition Flow"
    573         Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
    574        
    575 switch InnerTransitionCorrelation
    576        
    577         case "Gnielinski":
    578        
    579 "Nusselt Number"
    580         Inner.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*(Inner.HeatTransfer.Re(i)-1000)*Inner.HeatTransfer.PR(i);
    581 
    582         case "Hausen":
    583 
    584 "Nusselt Number"
    585         Inner.HeatTransfer.Nu(i) =0.116*(Inner.HeatTransfer.Re(i)^(0.667)-125)*Inner.HeatTransfer.PR(i)^(0.333)*(1+(DiInner/Lpipe)^0.667);
    586        
    587 end
    588 
    589         when Inner.HeatTransfer.Re(i) < 2300 switchto "laminar";
    590         when Inner.HeatTransfer.Re(i) > 10000 switchto "turbulent";
    591 
    592         case "turbulent":
    593 
    594 switch InnerTurbulentCorrelation
    595        
    596         case "Petukhov":
    597        
    598 "Inner Side Friction Factor for Heat Transfer - turbulent Flow"
    599         Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
    600 
    601 "Nusselt Number"
    602         Inner.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i);
    603        
    604         case "SiederTate":
    605 
    606 "Nusselt Number"
    607         Inner.HeatTransfer.Nu(i) = 0.027*(Inner.HeatTransfer.PR(i))^(1/3)*(Inner.HeatTransfer.Re(i))^(4/5);
    608 
    609 "Inner Side Friction Factor for Heat Transfer - turbulent Flow"
    610         Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
    611        
    612 end
    613        
    614         when Inner.HeatTransfer.Re(i) < 10000 switchto "transition";
    615        
    616 end
    617 
    618 end
    619 
    620 for i in [1:N]
    621 
    622 switch outerFlowRegime
    623        
    624         case "laminar":
    625        
    626 "Outer Side Friction Factor for Heat Transfer - laminar Flow"
    627         Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
    628        
    629 switch OuterLaminarCorrelation
    630        
    631         case "Hausen":
    632 
    633 "Nusselt Number"
    634         Outer.HeatTransfer.Nu(i) = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.467));
    635        
    636         case "Schlunder":
    637 
    638 "Nusselt Number"
    639         Outer.HeatTransfer.Nu(i) = (49.027896+4.173281*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i)*(Outer.HeatTransfer.Dh/Lpipe))^(1/3);
    640 
    641 end
    642        
    643         when Outer.HeatTransfer.Re(i) > 2300 switchto "transition";
    644        
    645         case "transition":
    646        
    647 switch OuterTransitionCorrelation
    648        
    649         case "Gnielinski":
    650 
    651 "Outer Side Friction Factor for Heat Transfer - transition Flow"
    652         Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
    653 
    654 "Nusselt Number"
    655         Outer.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*(Outer.HeatTransfer.Re(i)-1000)*Outer.HeatTransfer.PR(i);
    656 
    657         case "Hausen":
    658 
    659 "Nusselt Number"
    660         Outer.HeatTransfer.Nu(i) =      0.116*(Outer.HeatTransfer.Re(i)^(0.667)-125)*Outer.HeatTransfer.PR(i)^(0.333)*(1+(Outer.HeatTransfer.Dh/Lpipe)^0.667);
    661 
    662 
    663 "Outer Side Friction Factor for Heat Transfer - transition Flow"
    664         Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
    665        
    666 end
    667        
    668         when Outer.HeatTransfer.Re(i) < 2300 switchto "laminar";
    669         when Outer.HeatTransfer.Re(i) > 10000 switchto "turbulent";
    670        
    671         case "turbulent":
    672        
    673 switch OuterTurbulentCorrelation
    674        
    675         case "Petukhov":
    676 
    677 "Outer Side Friction Factor for Heat Transfer - turbulent Flow"
    678         Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
    679        
    680 "Nusselt Number"
    681         Outer.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i);
    682        
    683         case "SiederTate":
    684 
    685 "Nusselt Number"
    686         Outer.HeatTransfer.Nu(i) = 0.027*(Outer.HeatTransfer.PR(i))^(1/3)*(Outer.HeatTransfer.Re(i))^(4/5);
    687 
    688 "Outer Side Friction Factor for Heat Transfer - turbulent Flow"
    689         Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
    690        
    691 end
    692 
    693         when Outer.HeatTransfer.Re(i) < 10000 switchto "transition";
    694 
    695 end
    696 
    697 end
    698 
    699 "Inner Pipe Film Coefficient"
    700         Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi;
    701 
    702 "Outer Pipe Film Coefficient"
    703         Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
    704 
    705 "Outer Pipe Phi correction"
    706         Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14;
    707        
    708 "Inner Pipe Phi correction"
    709         Inner.HeatTransfer.Phi  = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14;
    710 
    711 "Outer Pipe Prandtl Number"
    712         Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K;
    713 
    714 "Inner Pipe Prandtl Number"
    715         Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K;
    716 
    717 "Outer Pipe Reynolds Number for Heat Transfer"
    718         Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu;
    719 
    720 "Outer Pipe Reynolds Number for Pressure Drop"
    721         Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu;
    722 
    723 "Inner Pipe Reynolds Number for Heat Transfer"
    724         Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu;
    725 
    726 "Inner Pipe Reynolds Number for Pressure Drop"
    727         Inner.PressureDrop.Re = Inner.HeatTransfer.Re;
    728 
    729 "Outer Pipe Velocity"
    730         Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho)  = Outer.Properties.Inlet.Fw;
    731 
    732 "Inner Pipe Velocity"
    733         Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho)  = Inner.Properties.Inlet.Fw;
    734 
    735 "Overall Heat Transfer Coefficient Clean"
    736         Details.Uc*((DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
    737 
    738 "Overall Heat Transfer Coefficient Dirty"
    739         Details.Ud=1/(Rfi*(DoInner/DiInner) +  Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)));
    740 
    741 "Total Duty"
    742         Details.Qtotal = sum(Details.Q);
    743749
    744750switch HotSide
     
    748754"Incremental Duty"
    749755        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T);
    750         #Details.Q = 1.30; good approach
    751756
    752757        when InletInner.T > InletOuter.T switchto "inner";
     
    761766end
    762767
    763 for i in [2:N]
    764 
    765 "Incremental Enthalpy Inner Stream"
    766         Inner.HeatTransfer.Enth(i) = (1-InletInner.v)*PP.LiquidEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z) + InletInner.v*PP.VapourEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z);
    767 
    768 "Incremental Enthalpy Outer Stream"
    769         Outer.HeatTransfer.Enth(i) = (1-InletOuter.v)*PP.LiquidEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z) + InletOuter.v*PP.VapourEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z);
    770 
    771 end
    772 
    773768"Enthalpy of Inner Side - Inlet Boundary"
    774769        Inner.HeatTransfer.Enth(1) = InletInner.h;
     
    806801"Pressure of Outer Side - Outlet Boundary"
    807802        Outer.PressureDrop.Plocal(1) = OutletOuter.P;
    808 
    809 "Total Pressure Drop Outer Stream"
    810         Outer.PressureDrop.Pdrop  = 0*'kPa';#Outer.PressureDrop.Pd_fric(1)+Outer.PressureDrop.Pdnozzle_in+Outer.PressureDrop.Pdnozzle_out;
    811803
    812804for i in [1:N]
     
    828820end
    829821
    830 "Total Pressure Drop Inner Stream"
    831         Inner.PressureDrop.Pdrop  = 0*'kPa';#Inner.PressureDrop.Pd_fric(Npoints)+Inner.PressureDrop.Pdnozzle_in+Inner.PressureDrop.Pdnozzle_out;
    832        
    833822"Inner Pipe Pressure Drop for friction"
    834823        Inner.PressureDrop.Pd_fric(2:Npoints) = (2*Inner.PressureDrop.fi*Lincr(2:Npoints)*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi);
     
    843832        Inner.PressureDrop.Plocal(i+1) =        InletInner.P;
    844833
    845 end
    846 
    847 
    848 "Velocity Inner Side Inlet Nozzle"
    849         Inner.PressureDrop.Vnozzle_in   = Inner.Properties.Inlet.Fw/(Inner.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Inner^2));
    850 
    851 "Velocity Inner Side Outlet Nozzle"
    852         Inner.PressureDrop.Vnozzle_out  = Inner.Properties.Outlet.Fw/(Inner.Properties.Outlet.rho*(0.25*Pi*Donozzle_Inner^2));
    853 
    854 "Velocity Outer Side Inlet Nozzle"
    855         Outer.PressureDrop.Vnozzle_in   = Outer.Properties.Inlet.Fw/(Outer.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Outer^2));
    856 
    857 "Velocity Outer Side Outlet Nozzle"
    858         Outer.PressureDrop.Vnozzle_out  = Outer.Properties.Outlet.Fw/(Outer.Properties.Outlet.rho*(0.25*Pi*Donozzle_Outer^2));
    859 
    860 "Pressure Drop Inner Side Inlet Nozzle"
    861         Inner.PressureDrop.Pdnozzle_in  = 0.5*InnerKinlet*Inner.Properties.Inlet.rho*Inner.PressureDrop.Vnozzle_in^2;
    862 
    863 "Pressure Drop Inner Side Outlet Nozzle"
    864         Inner.PressureDrop.Pdnozzle_out = 0.5*InnerKoutlet*Inner.Properties.Outlet.rho*Inner.PressureDrop.Vnozzle_out^2;
    865 
    866 "Pressure Drop Outer Side Inlet Nozzle"
    867         Outer.PressureDrop.Pdnozzle_in  = 0.5*OuterKinlet*Outer.Properties.Inlet.rho*Outer.PressureDrop.Vnozzle_in^2;
    868 
    869 "Pressure Drop Outer Side Outlet Nozzle"
    870         Outer.PressureDrop.Pdnozzle_out = 0.5*OuterKoutlet*Outer.Properties.Outlet.rho*Outer.PressureDrop.Vnozzle_out^2;
    871 
    872 "Inner Side Inlet Nozzle rho-V^2"
    873         Inner.PressureDrop.RVsquare_in = Inner.Properties.Inlet.rho*(Inner.PressureDrop.Vnozzle_in)^2;
    874 
    875 "Inner Side Outlet Nozzle rho-V^2"
    876         Inner.PressureDrop.RVsquare_out = Inner.Properties.Outlet.rho*(Inner.PressureDrop.Vnozzle_out)^2;
    877 
    878 "Outer Side Inlet Nozzle rho-V^2"
    879         Outer.PressureDrop.RVsquare_in = Outer.Properties.Inlet.rho*(Outer.PressureDrop.Vnozzle_in)^2;
    880 
    881 "Outer Side Outlet Nozzle rho-V^2"
    882         Outer.PressureDrop.RVsquare_out = Outer.Properties.Outlet.rho*(Outer.PressureDrop.Vnozzle_out)^2;
     834end*#
     835
     836end
     837
     838Model UpperPipe_basic as HairpinIncr_basic
     839
     840ATTRIBUTES
     841        Pallete         = false;
     842        Brief           = "Incremental Hairpin Heat Exchanger. ";
     843        Info            =
     844"Incremental approach for Hairpin heat exchanger. ";
     845
     846PARAMETERS
     847
     848outer PP                as Plugin               (Brief="External Physical Properties", Type="PP");
     849outer NComp     as Integer      (Brief="Number of Components");
     850        HotSide         as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
     851
     852        Pi                              as constant     (Brief="Pi Number",Default=3.14159265, Symbol = "\pi");
     853outer   N       as Integer      (Brief="Number of zones", Default = 2);
     854 Npoints                as Integer      (Brief="Number of incremental points", Default = 3);
     855       
     856
     857outer   DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
     858outer   DiInner         as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
     859outer   DiOuter         as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
     860outer   Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
     861outer   Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
     862outer   Rfi                     as positive             (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     863outer   Rfo                     as positive             (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     864
     865#Donozzle_Inner  as length      (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     866#Dinozzle_Inner         as length       (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     867
     868#Donozzle_Outer  as length              (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     869#Dinozzle_Outer         as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     870
     871#InnerKinlet    as positive                     (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
     872#InnerKoutlet   as positive                     (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
     873
     874#OuterKinlet            as positive             (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
     875#OuterKoutlet   as positive             (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
     876
     877SET
     878
     879#"Pi Number"
     880        Pi      = 3.14159265;
     881
     882#"Number of incremental points"
     883        Npoints  = N+1;
     884
     885EQUATIONS
     886
     887switch HotSide
     888
     889        case "outer":
     890
     891"Energy Balance Outer Stream in counter flow"
     892        Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
     893
     894"Energy Balance Inner Stream"
     895        Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(1:N)    -       Inner.HeatTransfer.Enth(2:Npoints));
     896
     897"Incremental Duty"
     898        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T);
     899        #Details.Q = 0.6;
     900       
     901        when InletInner.T > InletOuter.T switchto "inner";
     902
     903        case "inner":
     904
     905"Energy Balance Hot Stream"
     906        Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(1:N)-Inner.HeatTransfer.Enth(2:Npoints));
     907
     908"Energy Balance Cold Stream in counter flow"
     909        Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
     910       
     911"Incremental Duty"
     912        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T);
     913       
     914        when InletInner.T < InletOuter.T switchto "outer";
     915
     916end
     917
     918"Enthalpy of Inner Side - Inlet Boundary"
     919        Inner.HeatTransfer.Enth(1) = InletInner.h;
     920
     921"Enthalpy of inner Side - Outlet Boundary"
     922        Inner.HeatTransfer.Enth(Npoints) = OutletInner.h;
     923
     924"Temperature of Inner Side - Inlet Boundary"
     925        Inner.HeatTransfer.Tlocal(1) = InletInner.T;
     926
     927"Temperature of Inner Side - Outlet Boundary"
     928        Inner.HeatTransfer.Tlocal(Npoints) = OutletInner.T;
     929
     930"Pressure of Inner Side - Inlet Boundary"
     931        Inner.PressureDrop.Plocal(1) = InletInner.P;
     932
     933"Pressure of Inner Side - Outlet Boundary"
     934        Inner.PressureDrop.Plocal(Npoints) = OutletInner.P;
     935
     936"Enthalpy of Outer Side - Inlet Boundary"
     937        Outer.HeatTransfer.Enth(Npoints) = InletOuter.h;
     938
     939"Enthalpy of Outer Side - Outlet Boundary"
     940        Outer.HeatTransfer.Enth(1) = OutletOuter.h;
     941
     942"Temperature of Outer Side - Inlet Boundary"
     943        Outer.HeatTransfer.Tlocal(Npoints) = InletOuter.T;
     944
     945"Temperature of Outer Side - Outlet Boundary"
     946        Outer.HeatTransfer.Tlocal(1) = OutletOuter.T;
     947
     948"Pressure of Outer Side - Inlet Boundary"
     949        Outer.PressureDrop.Plocal(Npoints) = InletOuter.P;
     950
     951"Pressure of Outer Side - Outlet Boundary"
     952        Outer.PressureDrop.Plocal(1) = OutletOuter.P;
     953
     954#for i in [1:N]
     955
     956#"Outer Pipe Pressure Drop for friction"                       
     957#       Outer.PressureDrop.Pd_fric(i) = (2*Outer.PressureDrop.fi(i)*Lincr(1+N-i)*Outer.Properties.Average.rho(i)*Outer.HeatTransfer.Vmean(i)^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi(i));
     958
     959#end
     960
     961#"Outer Pipe Pressure Drop for friction"
     962#       Outer.PressureDrop.Pd_fric(Npoints) = 0*'kPa';
     963
     964for i in [1:N]
     965   
     966"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
     967        #Outer.PressureDrop.Plocal(i) = Outer.PressureDrop.Plocal(Npoints) - Outer.PressureDrop.Pd_fric(i+1);
     968        Outer.PressureDrop.Plocal(i) =  InletOuter.P;
     969
     970end
     971
     972#"Inner Pipe Pressure Drop for friction"
     973#       Inner.PressureDrop.Pd_fric(2:Npoints) = (2*Inner.PressureDrop.fi*Lincr(2:Npoints)*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi);
     974
     975#"Inner Pipe Pressure Drop for friction"
     976#       Inner.PressureDrop.Pd_fric(1) = 0*'kPa';
     977
     978for i in [1:N]
     979
     980"Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
     981#       Inner.PressureDrop.Plocal(i+1) =        Inner.PressureDrop.Plocal(1) - Inner.PressureDrop.Pd_fric(i+1);
     982        Inner.PressureDrop.Plocal(i+1) =        InletInner.P;
     983
     984end
     985
     986end
     987
     988Model LowerPipe_basic as HairpinIncr_basic
     989
     990ATTRIBUTES
     991        Pallete         = false;
     992        Brief           = "Incremental Hairpin Heat Exchanger. ";
     993        Info            =
     994"Incremental approach for Hairpin heat exchanger. ";
     995
     996PARAMETERS
     997
     998outer PP                as Plugin               (Brief="External Physical Properties", Type="PP");
     999outer NComp     as Integer      (Brief="Number of Components");
     1000        HotSide         as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
     1001
     1002        Pi                              as constant     (Brief="Pi Number",Default=3.14159265, Symbol = "\pi");
     1003outer   N       as Integer      (Brief="Number of zones", Default = 2);
     1004 Npoints                as Integer      (Brief="Number of incremental points", Default = 3);
     1005       
     1006
     1007outer   DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
     1008outer   DiInner         as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
     1009outer   DiOuter         as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
     1010outer   Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
     1011outer   Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
     1012outer   Rfi                     as positive             (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     1013outer   Rfo                     as positive             (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     1014
     1015#Donozzle_Inner  as length      (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     1016#Dinozzle_Inner         as length       (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     1017
     1018#Donozzle_Outer  as length              (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     1019#Dinozzle_Outer         as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
     1020
     1021#InnerKinlet    as positive                     (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
     1022#InnerKoutlet   as positive                     (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
     1023
     1024#OuterKinlet            as positive             (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
     1025#OuterKoutlet   as positive             (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
     1026
     1027SET
     1028
     1029#"Pi Number"
     1030        Pi      = 3.14159265;
     1031
     1032#"Number of incremental points"
     1033        Npoints  = N+1;
     1034
     1035EQUATIONS
     1036
     1037switch HotSide
     1038
     1039        case "outer":
     1040
     1041"Energy Balance Outer Stream in counter flow"
     1042        Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
     1043
     1044"Energy Balance Inner Stream"
     1045        Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(2:Npoints)      -       Inner.HeatTransfer.Enth(1:N));
     1046
     1047"Incremental Duty"
     1048        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T);
     1049        #Details.Q = 0.6;
     1050       
     1051        when InletInner.T > InletOuter.T switchto "inner";
     1052
     1053        case "inner":
     1054
     1055"Energy Balance Hot Stream"
     1056        Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(2:Npoints)-Inner.HeatTransfer.Enth(1:N));
     1057
     1058"Energy Balance Cold Stream in counter flow"
     1059        Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
     1060       
     1061"Incremental Duty"
     1062        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T);
     1063       
     1064        when InletInner.T < InletOuter.T switchto "outer";
     1065
     1066end
     1067
     1068"Enthalpy of Inner Side - Inlet Boundary"
     1069        Outer.HeatTransfer.Enth(1) = InletOuter.h;
     1070
     1071"Enthalpy of inner Side - Outlet Boundary"
     1072        Outer.HeatTransfer.Enth(Npoints) = OutletOuter.h;
     1073
     1074"Temperature of Inner Side - Inlet Boundary"
     1075        Outer.HeatTransfer.Tlocal(1) = InletOuter.T;
     1076
     1077"Temperature of Inner Side - Outlet Boundary"
     1078        Outer.HeatTransfer.Tlocal(Npoints) = OutletOuter.T;
     1079
     1080"Pressure of Inner Side - Inlet Boundary"
     1081        Outer.PressureDrop.Plocal(1) = InletOuter.P;
     1082
     1083"Pressure of Inner Side - Outlet Boundary"
     1084        Outer.PressureDrop.Plocal(Npoints) = OutletOuter.P;
     1085
     1086"Enthalpy of Outer Side - Inlet Boundary"
     1087        Inner.HeatTransfer.Enth(Npoints) = InletInner.h;
     1088
     1089"Enthalpy of Outer Side - Outlet Boundary"
     1090        Inner.HeatTransfer.Enth(1) = OutletInner.h;
     1091
     1092"Temperature of Outer Side - Inlet Boundary"
     1093        Inner.HeatTransfer.Tlocal(Npoints) = InletInner.T;
     1094
     1095"Temperature of Outer Side - Outlet Boundary"
     1096        Inner.HeatTransfer.Tlocal(1) = OutletInner.T;
     1097
     1098"Pressure of Outer Side - Inlet Boundary"
     1099        Inner.PressureDrop.Plocal(Npoints) = InletInner.P;
     1100
     1101"Pressure of Outer Side - Outlet Boundary"
     1102        Inner.PressureDrop.Plocal(1) = OutletInner.P;
     1103
     1104#for i in [1:N]
     1105
     1106#"Outer Pipe Pressure Drop for friction"                       
     1107#       Inner.PressureDrop.Pd_fric(i) = (2*Inner.PressureDrop.fi(i)*Lincr(1+N-i)*Inner.Properties.Average.rho(i)*Inner.HeatTransfer.Vmean(i)^2)/(DiInner*Inner.HeatTransfer.Phi(i));
     1108
     1109#end
     1110
     1111#"Outer Pipe Pressure Drop for friction"
     1112        #Inner.PressureDrop.Pd_fric(Npoints) = 0*'kPa';
     1113
     1114for i in [1:N]
     1115   
     1116"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
     1117        #Outer.PressureDrop.Plocal(i) = Outer.PressureDrop.Plocal(Npoints) - Outer.PressureDrop.Pd_fric(i+1);
     1118        Inner.PressureDrop.Plocal(i) =  InletInner.P;
     1119
     1120end
     1121
     1122#"Inner Pipe Pressure Drop for friction"
     1123        #Outer.PressureDrop.Pd_fric(2:Npoints) = (2*Outer.PressureDrop.fi*Lincr(2:Npoints)*Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);
     1124
     1125#"Inner Pipe Pressure Drop for friction"
     1126        #Outer.PressureDrop.Pd_fric(1) = 0*'kPa';
     1127
     1128for i in [1:N]
     1129
     1130"Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
     1131#       Inner.PressureDrop.Plocal(i+1) =        Inner.PressureDrop.Plocal(1) - Inner.PressureDrop.Pd_fric(i+1);
     1132        Outer.PressureDrop.Plocal(i+1) =        InletOuter.P;
     1133
     1134end
    8831135
    8841136end
     
    8981150outer NComp     as Integer      (Brief="Number of Components");
    8991151        N                                       as Integer      (Brief="Number of zones", Default = 2);
    900  Npoints                        as Integer      (Brief="Number of incremental points", Default = 3);
    901        
     1152       
    9021153
    9031154DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
    904 DiInner as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
    905 DiOuter as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
     1155DiInner         as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
     1156DiOuter         as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
    9061157Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
    9071158Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
    908 Rfi                     as positive                     (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
    909 Rfo                     as positive                     (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
    910 
    911 Donozzle_Inner  as length       (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    912 Dinozzle_Inner          as length       (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    913 
    914 Donozzle_Outer  as length               (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    915 Dinozzle_Outer  as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
    916 
    917 SET
    918 
    919 #"Number of incremental points"
    920         Npoints  = N+1;
     1159Rfi                     as positive             (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     1160Rfo                     as positive             (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
     1161
    9211162
    9221163VARIABLES
    9231164
    924         UpperPipe       as HairpinIncr_basic;
    925         LowerPipe       as HairpinIncr_basic;
     1165#InnerPdrop             as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
     1166#OuterPdrop             as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
     1167A                               as area                         (Brief="Total Exchange Surface Area");
     1168Qtotal          as power                        (Brief="Total Duty", Default=7000, Lower=1e-8, Upper=1e10);
     1169
     1170        UpperPipe       as UpperPipe_basic;
     1171        LowerPipe       as LowerPipe_basic;
    9261172
    9271173CONNECTIONS
    9281174
    929         UpperPipe.OutletInner           to LowerPipe.InletInner;
    930         LowerPipe.OutletOuter           to UpperPipe.InletOuter;
    931        
    932 end
     1175        LowerPipe.OutletInner           to UpperPipe.InletInner;
     1176        UpperPipe.OutletOuter           to LowerPipe.InletOuter;
     1177
     1178EQUATIONS
     1179
     1180A = LowerPipe.Details.A+UpperPipe.Details.A;
     1181
     1182Qtotal = LowerPipe.Details.Qtotal+UpperPipe.Details.Qtotal;
     1183
     1184#*OuterPdrop = LowerPipe.Outer.PressureDrop.Pdrop+UpperPipe.Outer.PressureDrop.Pdrop;
     1185
     1186#InnerPdrop = LowerPipe.Inner.PressureDrop.Pdrop+UpperPipe.Inner.PressureDrop.Pdrop;
     1187
     1188
     1189
     1190"Lower Pipe Total Pressure Drop Outer Stream"
     1191        LowerPipe.Outer.PressureDrop.Pdrop  = 0.1;#LowerPipe.Outer.PressureDrop.Pd_fric(1)+LowerPipe.Outer.PressureDrop.Pdnozzle_in;
     1192
     1193"Upper Pipe Total Pressure Drop Outer Stream"
     1194        UpperPipe.Outer.PressureDrop.Pdrop  = 0.1;#UpperPipe.Outer.PressureDrop.Pd_fric(1)+UpperPipe.Outer.PressureDrop.Pdnozzle_out;
     1195
     1196"Upper Pipe Total Pressure Drop Inner Stream"
     1197        UpperPipe.Inner.PressureDrop.Pdrop  = 0.1;#UpperPipe.Inner.PressureDrop.Pd_fric(Npoints)+UpperPipe.Inner.PressureDrop.Pdnozzle_in;
     1198
     1199"Lower Pipe Total Pressure Drop Inner Stream"
     1200        LowerPipe.Inner.PressureDrop.Pdrop  = 0.1;#LowerPipe.Inner.PressureDrop.Pd_fric(Npoints)+LowerPipe.Inner.PressureDrop.Pdnozzle_out;
     1201#*
     1202"Velocity Inner Side Inlet Nozzle"
     1203        UpperPipe.Inner.PressureDrop.Vnozzle_in = UpperPipe.Inner.Properties.Inlet.Fw/(UpperPipe.Inner.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Inner^2));
     1204
     1205"Velocity Inner Side Outlet Nozzle"
     1206        LowerPipe.Inner.PressureDrop.Vnozzle_out        = LowerPipe.Inner.Properties.Outlet.Fw/(LowerPipe.Inner.Properties.Outlet.rho*(0.25*Pi*Donozzle_Inner^2));
     1207
     1208"Velocity Outer Side Inlet Nozzle"
     1209        LowerPipe.Outer.PressureDrop.Vnozzle_in = LowerPipe.Outer.Properties.Inlet.Fw/(LowerPipe.Outer.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Outer^2));
     1210
     1211"Velocity Outer Side Outlet Nozzle"
     1212        UpperPipe.Outer.PressureDrop.Vnozzle_out        = UpperPipe.Outer.Properties.Outlet.Fw/(UpperPipe.Outer.Properties.Outlet.rho*(0.25*Pi*Donozzle_Outer^2));
     1213
     1214"Pressure Drop Inner Side Inlet Nozzle"
     1215        UpperPipe.Inner.PressureDrop.Pdnozzle_in        = 0.5*InnerKinlet*UpperPipe.Inner.Properties.Inlet.rho*UpperPipe.Inner.PressureDrop.Vnozzle_in^2;
     1216
     1217"Pressure Drop Inner Side Outlet Nozzle"
     1218        LowerPipe.Inner.PressureDrop.Pdnozzle_out       = 0.5*InnerKoutlet*LowerPipe.Inner.Properties.Outlet.rho*LowerPipe.Inner.PressureDrop.Vnozzle_out^2;
     1219
     1220"Pressure Drop Outer Side Inlet Nozzle"
     1221        LowerPipe.Outer.PressureDrop.Pdnozzle_in        = 0.5*OuterKinlet*LowerPipe.Outer.Properties.Inlet.rho*LowerPipe.Outer.PressureDrop.Vnozzle_in^2;
     1222
     1223"Pressure Drop Outer Side Outlet Nozzle"
     1224        UpperPipe.Outer.PressureDrop.Pdnozzle_out       = 0.5*OuterKoutlet*UpperPipe.Outer.Properties.Outlet.rho*UpperPipe.Outer.PressureDrop.Vnozzle_out^2;
     1225
     1226"Inner Side Inlet Nozzle rho-V^2"
     1227        UpperPipe.Inner.PressureDrop.RVsquare_in = UpperPipe.Inner.Properties.Inlet.rho*(UpperPipe.Inner.PressureDrop.Vnozzle_in)^2;
     1228
     1229"Inner Side Outlet Nozzle rho-V^2"
     1230        LowerPipe.Inner.PressureDrop.RVsquare_out = LowerPipe.Inner.Properties.Outlet.rho*(LowerPipe.Inner.PressureDrop.Vnozzle_out)^2;
     1231
     1232"Outer Side Inlet Nozzle rho-V^2"
     1233        LowerPipe.Outer.PressureDrop.RVsquare_in = LowerPipe.Outer.Properties.Inlet.rho*(LowerPipe.Outer.PressureDrop.Vnozzle_in)^2;
     1234
     1235"Outer Side Outlet Nozzle rho-V^2"
     1236        UpperPipe.Outer.PressureDrop.RVsquare_out = UpperPipe.Outer.Properties.Outlet.rho*(UpperPipe.Outer.PressureDrop.Vnozzle_out)^2;
     1237
     1238
     1239
     1240"Velocity Inner Side Inlet Nozzle"
     1241        UpperPipe.Inner.PressureDrop.Vnozzle_out        = 0;
     1242
     1243"Velocity Inner Side Outlet Nozzle"
     1244        LowerPipe.Inner.PressureDrop.Vnozzle_in = 0;
     1245
     1246"Velocity Outer Side Inlet Nozzle"
     1247        LowerPipe.Outer.PressureDrop.Vnozzle_out        = 0;
     1248
     1249"Velocity Outer Side Outlet Nozzle"
     1250        UpperPipe.Outer.PressureDrop.Vnozzle_in = 0;
     1251
     1252"Pressure Drop Inner Side Inlet Nozzle"
     1253        UpperPipe.Inner.PressureDrop.Pdnozzle_out= 0;
     1254
     1255"Pressure Drop Inner Side Outlet Nozzle"
     1256        LowerPipe.Inner.PressureDrop.Pdnozzle_in        = 0;
     1257
     1258"Pressure Drop Outer Side Inlet Nozzle"
     1259        LowerPipe.Outer.PressureDrop.Pdnozzle_out       = 0;
     1260
     1261"Pressure Drop Outer Side Outlet Nozzle"
     1262        UpperPipe.Outer.PressureDrop.Pdnozzle_in        =0;
     1263
     1264"Inner Side Inlet Nozzle rho-V^2"
     1265        UpperPipe.Inner.PressureDrop.RVsquare_out= 0;
     1266
     1267"Inner Side Outlet Nozzle rho-V^2"
     1268        LowerPipe.Inner.PressureDrop.RVsquare_in = 0;
     1269
     1270"Outer Side Inlet Nozzle rho-V^2"
     1271        LowerPipe.Outer.PressureDrop.RVsquare_out = 0;
     1272
     1273"Outer Side Outlet Nozzle rho-V^2"
     1274        UpperPipe.Outer.PressureDrop.RVsquare_in= 0;*#
     1275end
Note: See TracChangeset for help on using the changeset viewer.