Ignore:
Timestamp:
Nov 9, 2009, 2:11:31 PM (13 years ago)
Author:
gerson bicca
Message:

updated dynamic models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/stage_separators/reboiler.mso

    r869 r879  
    1818*--------------------------------------------------------------------*#
    1919
    20 using "streams";
     20using "tank";
    2121
    2222Model thermosyphon
     
    373373        outer NComp     as Integer      (Brief="Number of Components");
    374374       
    375         pi                      as positive             (Brief="Pi value", Default=3.141593,Hidden=true, Symbol="\pi");
    376         g                               as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true);
    377        
    378         Orientation     as Switcher (Valid=["vertical","horizontal"],Default="vertical");
    379         Heads                   as Switcher (Valid=["elliptical","hemispherical"],Default="elliptical");
    380 
    381         Diameter                as length       (Brief="Vessel diameter", Symbol="D_{i}");
    382         Lenght                  as length       (Brief="Side length of the cylinder shell", Symbol="L_{vessel}");
    383        
    384         Vhead_elliptical                as volume       (Brief="Elliptical Head Total Volume",Hidden=true, Symbol="V_{head}^{elliptical}");
    385         Vhead_hemispherical     as volume       (Brief="Hemispherical Head Total Volume",Hidden=true, Symbol="V_{head}^{hemispherical}");
    386         Vcylinder                               as volume       (Brief="Cylinder Total Volume",Hidden=true, Symbol="V_{cylinder}");
    387         radius                                  as length       (Brief="Vessel radius",Hidden=true, Symbol="R_{cylinder}");
    388        
    389375        Levelpercent_Initial            as positive     (Brief="Initial liquid height in Percent", Default = 0.70);
    390376        Initial_Temperature                     as temperature  (Brief="Initial Temperature of Reboiler");
    391377        Initial_Composition(NComp)      as positive     (Brief="Initial Liquid Composition",Lower=1E-6);
    392378
    393 SET
    394         pi = 3.141593;
    395         g = 9.81 * 'm/(s^2)';
    396         Vhead_elliptical        = (pi*Diameter^3)/12;
    397         Vhead_hemispherical = (pi*Diameter^3)/6;
    398         Vcylinder = 0.25*(pi*Diameter^2)*Lenght;
    399         radius = 0.5*Diameter;
    400        
    401379VARIABLES
     380
     381        Geometry                as VesselVolume (Brief="Vessel Geometry", Symbol=" ");
    402382
    403383in      InletLiquid     as stream                       (Brief="Liquid inlet stream", PosX=0.17, PosY=1, Symbol="_{in}^{Liquid}");
     
    417397        vV                      as volume_mol   (Brief="Vapour Molar volume", Protected = true);
    418398        rhoV            as dens_mass    (Brief="Vapour Density", Protected = true, Symbol="\rho");
    419         Level           as length               (Brief="Level of liquid phase", Protected = true);
    420399        Pdrop           as press_delta  (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true);
    421400
    422         Vtotal                  as volume                       (Brief="Vessel total volume",Protected=true, Symbol="V_{total}");
    423         Vfilled                 as volume                       (Brief="Vessel volume content",Protected=true, Symbol="V_{filled}");
    424         Across                  as area         (Brief="Cross Section Area of reboiler",Protected=true);
    425 
    426        
    427401INITIAL
    428402
     
    438412EQUATIONS
    439413
    440 switch Orientation
    441 
    442 case "vertical":
    443 
    444 "Vessel Cross Section Area"
    445         Across = 0.25*(pi*Diameter^2);
    446 
    447 switch Heads
    448 
    449 case "elliptical":
    450 
    451 "Vessel Total Volume"
    452         Vtotal = Vhead_elliptical +     Vcylinder;
    453 
    454 if Level < 0.25*Diameter then
    455 
    456 "Vessel Filled Volume"
    457         Vfilled = 0.25*pi*(((Diameter*Level)/(0.25*Diameter))^2)*(0.25*Diameter-Level/3);
    458 
    459 else
    460 
    461 "Vessel Filled Volume"
    462         Vfilled = 0.25*pi*(Diameter^2)*(Level - 0.25*Diameter/3);
    463 
    464 end
    465 
    466 case "hemispherical":
    467 
    468 "Vessel Total Volume"
    469         Vtotal = Vhead_hemispherical + Vcylinder;
    470 
    471 if Level < 0.5*Diameter then
    472 
    473 "Vessel Filled Volume"
    474         Vfilled = 0.25*pi*(Level^2)*(2*Diameter-4*Level/3);
    475 
    476 else
    477 
    478 "Vessel Filled Volume"
    479         Vfilled = 0.25*pi*((2/3)*((0.5*Diameter)^3) - (0.25*(Diameter)^3) + Level*Diameter^2);
    480 
    481 end
    482 
    483 end
    484 
    485 case "horizontal":
    486 
    487 "Vessel Cross Section Area"
    488         Across = (radius^2)*acos((radius-Level)/radius)-(radius-Level)*sqrt((2*radius*Level-Level^2));
    489 
    490 switch Heads
    491 
    492 case "elliptical":
    493 
    494 "Vessel Total Volume"
    495         Vtotal = Vhead_elliptical +     Vcylinder;
    496 
    497 "Vessel Filled Volume"
    498         Vfilled = 0.5236*Level^2*(1.5*Diameter-Level) + Across*Lenght;
    499 
    500 case "hemispherical":
    501 
    502 "Vessel Total Volume"
    503         Vtotal = Vhead_hemispherical + Vcylinder;
    504 
    505 "Vessel Filled Volume"
    506         Vfilled = 1.0472*Level^2*(1.5*Diameter-Level) + Across*Lenght;
    507 
    508 end
    509 
    510 end
    511 
    512414"Component Molar Balance"
    513415        diff(M)= InletLiquid.F*InletLiquid.z    - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z;
     
    520422
    521423"Energy Holdup"
    522         E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*Vtotal;
     424        E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*Geometry.Vtotal;
    523425
    524426"Mol Fraction Normalisation"
     
    550452
    551453"Geometry Constraint"
    552         Vtotal = ML*vL + MV*vV;
     454        Geometry.Vtotal = ML*vL + MV*vV;
    553455
    554456"Liquid Level"
    555         ML * vL = Vfilled;
     457        ML * vL = Geometry.Vfilled;
    556458
    557459"Temperature Indicator"
     
    562464
    563465"Level indicator"
    564         LI*Vtotal= Vfilled;
     466        LI*Geometry.Vtotal= Geometry.Vfilled;
    565467
    566468end
Note: See TracChangeset for help on using the changeset viewer.