Changeset 316


Ignore:
Timestamp:
Jul 18, 2007, 3:50:58 PM (16 years ago)
Author:
gerson bicca
Message:

modified heater/cooler model: included energy stream

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/heat_exchangers/heater.mso

    r307 r316  
    1919using "streams.mso";
    2020
    21 Model Heater_Cooler_Basic
     21Model heater
    2222
    2323ATTRIBUTES
    24         Pallete         = false;
    25         Brief           = "Heater or Cooler Basic Equations";
     24        Pallete         = true;
     25        Icon            = "icon/heater";       
     26        Brief   = "Heater or Cooler";
    2627        Info            =
    27         "Determines thermal and phase conditions of outlet stream";
     28        "Determines thermal and phase conditions of an outlet stream";
    2829       
    2930PARAMETERS
    30         outer PP                as Plugin               (Brief="Physical Properties", Type="PP");
    31         outer   NComp   as Integer              (Brief="Number of Components");
    32         Ninlet                          as Integer              (Brief="Number of Inlet Streams",Lower=1);
     31        outer PP                        as Plugin               (Brief="Physical Properties", Type="PP");
     32        outer NComp     as Integer      (Brief="Number of Components");
     33                        Ninlet          as Integer      (Brief="Number of Inlet Streams");
    3334       
     35SUBMODELS
     36        in  Inlet(Ninlet )  as stream                           (Brief="Inlet Streams");
     37        out Outlet              as streamPH                             (Brief="Outlet Stream");
     38        in InletHeat            as energy_stream                (Brief ="Inlet Heat Stream");
     39        out OutletHeat  as energy_stream                (Brief ="Outlet Heat Stream");
     40
    3441VARIABLES
    35         in  Inlet(Ninlet)       as stream                       (Brief="Inlet Streams");
    36         out Outlet              as streamPH             (Brief="Outlet Stream");
    37         Q                                       as power                        (Brief = "Heat Transfer");
    38         Vfrac                                   as fraction                     (Brief = "Vapor fraction Outlet Stream");
    39         Lfrac                                   as fraction                     (Brief = "Liquid fraction Outlet Stream");
     42        QDuty                                   as power                        (Brief = "Actual Duty");
     43        Vfrac                                   as fraction             (Brief = "Vapor fraction Outlet Stream");
     44        Lfrac                                           as fraction             (Brief = "Liquid fraction Outlet Stream");
     45        Kvalue(NComp)   as Real                         (Brief = "Phase Equilibrium K-values");
    4046       
    4147EQUATIONS
     
    4349"Flow"
    4450        Outlet.F = sum(Inlet.F);       
    45        
     51
    4652for j in [1 : NComp]
    4753       
     
    5662"Liquid fraction Outlet Stream"
    5763        Lfrac = 1-Vfrac;
    58        
     64
     65"Heat Duty"
     66        QDuty = Outlet.F*Outlet.h - sum(Inlet.F*Inlet.h);
     67
     68"Net Duty"
     69        OutletHeat.Q = InletHeat.Q - QDuty;
     70
     71"Phase Equilibrium"
     72        Kvalue*(Outlet.x) = Outlet.y;
     73
    5974end
    6075
    61 Model heater            as Heater_Cooler_Basic
    62 
    63 ATTRIBUTES
    64         Pallete         = true;
    65         Icon = "icon/heater";   
    66         Brief           = "Model of a Heater";
    67         Info            =
    68         "This model determines thermal and phase conditions of outlet stream";
    69        
    70 EQUATIONS
    71 
    72 "Heat Duty"
    73         Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
    74        
    75 end
    76 
    77 Model cooler            as Heater_Cooler_Basic
    78        
    79 ATTRIBUTES
    80         Pallete         = true;
    81         Icon = "icon/cooler";   
    82         Brief           = "Model of a Cooler";
    83         Info            =
    84         "This model determines thermal and phase conditions of outlet stream";
    85        
    86 EQUATIONS
    87 
    88 "Heat Duty"
    89         Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
    90        
    91 end
  • trunk/eml/heat_exchangers/icon/heater.svg

    r96 r316  
    1212   id="svg10172"
    1313   sodipodi:version="0.32"
    14    inkscape:version="0.44.1"
     14   inkscape:version="0.45.1"
    1515   width="210mm"
    1616   height="297mm"
    17    sodipodi:docbase="C:\Documents and Settings\Administrador\Meus documentos\Bolsa Simulação\Desenhos2"
    18    sodipodi:docname="heater.svg">
     17   sodipodi:docbase="E:\Documentos Pessoais\Gerson\repositorio\trunk\eml\heat_exchangers\icon"
     18   sodipodi:docname="heater.svg"
     19   inkscape:output_extension="org.inkscape.output.svg.inkscape">
    1920  <metadata
    2021     id="metadata10177">
     
    6566  </defs>
    6667  <sodipodi:namedview
    67      inkscape:window-height="900"
    68      inkscape:window-width="1280"
     68     inkscape:window-height="719"
     69     inkscape:window-width="1024"
    6970     inkscape:pageshadow="2"
    7071     inkscape:pageopacity="0.0"
     
    7778     id="base"
    7879     showgrid="true"
    79      inkscape:zoom="0.71648335"
    80      inkscape:cx="361.30813"
    81      inkscape:cy="720.9626"
    82      inkscape:window-x="-4"
    83      inkscape:window-y="-4"
     80     inkscape:zoom="0.71648337"
     81     inkscape:cx="285.99484"
     82     inkscape:cy="609.30613"
     83     inkscape:window-x="0"
     84     inkscape:window-y="22"
    8485     inkscape:current-layer="svg10172" />
    85   <path
    86      style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
    87      d="M 400,524.36218 C 400,574.36218 400,574.36218 400,574.36218"
    88      id="path13752" />
    8986  <path
    9087     sodipodi:type="arc"
     
    9895     transform="translate(0,74)" />
    9996  <path
    100      style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.29729998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
    101      d="M 294.8661,552.0059 L 286.57865,542.09316 L 275.53047,559.33946 L 294.8661,552.0059 z "
    102      id="path10086"
    103      inkscape:transform-center-x="24.676988"
    104      inkscape:transform-center-y="43.910133" />
     97     style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00203896px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
     98     d="M 542.55625,414.8632 L 542.35323,424.87098 L 557.49898,420.1197 L 542.55625,414.8632 z "
     99     id="path14641"
     100     inkscape:transform-center-x="-38.963517"
     101     inkscape:transform-center-y="-14.381614" />
    105102  <path
    106      style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:3.16504693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
    107      d="M 402,283.79326 C 402,324.68111 402,324.68111 402,324.68111 L 402,324.68111 L 402,324.68111 L 402,283.79326 z "
    108      id="path12861" />
     103     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3.58121324;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     104     d="M 508.2094,314.15279 L 368.69382,426.21556 L 456.58322,407.15622 L 291.7906,540.57158 L 291.7906,540.57158"
     105     id="path1885"
     106     sodipodi:nodetypes="ccccc" />
    109107  <path
    110      style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00203896px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
    111      d="M 397.8852,283.60708 L 407.89298,283.8101 L 403.1417,268.66435 L 397.8852,283.60708 z "
    112      id="path14641"
    113      inkscape:transform-center-x="14.381618"
    114      inkscape:transform-center-y="-38.963519" />
     108     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3.16504693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     109     d="M 542.47037,420.77966 C 501.58252,420.77966 501.58252,420.77966 501.58252,420.77966 L 501.58252,420.77966 L 501.58252,420.77966 L 542.47037,420.77966 z "
     110     id="path2343" />
    115111  <path
    116      style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.00203896px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
    117      d="M 394.50102,541.51905 L 404.50502,541.86116 L 399.96473,526.65085 L 394.50102,541.51905 z "
    118      id="path14643"
    119      inkscape:transform-center-x="13.942458"
    120      inkscape:transform-center-y="-39.123144" />
     112     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:3.16504693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     113     d="M 283.41748,421.94471 C 242.52963,421.94471 242.52963,421.94471 242.52963,421.94471 L 242.52963,421.94471 L 242.52963,421.94471 L 283.41748,421.94471 z "
     114     id="path2427" />
    121115  <path
    122      style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
    123      d="M 490,308.36218 L 360,428.36218 L 440,408.36218 L 290,548.36218 L 290,548.36218"
    124      id="path1885" />
     116     style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00203896px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
     117     d="M 283.70404,416.85338 L 283.50102,426.86116 L 298.64677,422.10988 L 283.70404,416.85338 z "
     118     id="path2169"
     119     inkscape:transform-center-x="-38.963517"
     120     inkscape:transform-center-y="-14.381614" />
    125121</svg>
  • trunk/sample/heat_exchangers/Sample_Heater.mso

    r240 r316  
    3131
    3232        Heater                  as heater;
    33         streamcold1     as source;
    34         streamcold2     as source;
     33        streamcold      as simple_source;
     34        Qin                             as energy_source;
    3535       
    3636CONNECTIONS
    3737
    38         streamcold1.Outlet      to Heater.Inlet(1);
    39         streamcold2.Outlet      to Heater.Inlet(2);
     38        streamcold.Outlet       to Heater.Inlet(1);
     39        Qin.OutletQ                             to Heater.InletHeat;
     40       
    4041       
    4142PARAMETERS
    4243
    4344        PP                      as Plugin (Type ="PP", LiquidModel = "PR",VapourModel  = "PR",
    44                                                                         Components      = ["water","ethanol"]);
     45                                                                        Components      = ["isobutane","benzene"]);
    4546        NComp           as Integer;
    4647       
    4748SET
    4849
    49         NComp   = PP.NumberOfComponents;
    50        
    51         Heater.Ninlet   = 2;
     50        NComp           = PP.NumberOfComponents;
     51        Heater.Ninlet           = 1;
    5252
    5353SPECIFY
    5454
    55         streamcold1.Outlet.F            = 100   * 'kmol/h';
     55        streamcold.Outlet.F             = 10   * 'kmol/h';
     56        streamcold.Outlet.P             = 1     * 'atm';
     57        streamcold.Outlet.T             = 310   * 'K';
     58    streamcold.Outlet.z                 = [0.5,0.5];
     59
     60        Heater.Outlet.T                 = 360*'K';
     61        Heater.Outlet.P                 = 0.999* 'atm';
     62        Heater.InletHeat.Q      = 10* 'kW';
     63       
     64OPTIONS
     65        Dynamic = false;
     66end
     67
     68FlowSheet Sample_Cooler
     69       
     70DEVICES
     71
     72        Cooler                  as heater;
     73        streamhot       as simple_source;
     74        Qin                             as energy_source;
     75       
     76CONNECTIONS
     77
     78        streamhot.Outlet        to Cooler.Inlet(1);
     79        Qin.OutletQ                     to Cooler.InletHeat;
     80       
     81       
     82PARAMETERS
     83
     84        PP                      as Plugin (Type ="PP", LiquidModel = "PR",VapourModel  = "PR",
     85                                                                        Components      = ["isobutane","benzene"]);
     86        NComp           as Integer;
     87       
     88SET
     89
     90        NComp           = PP.NumberOfComponents;
     91        Cooler.Ninlet           = 1;
     92
     93SPECIFY
     94
     95        streamhot.Outlet.F              = 10   * 'kmol/h';
     96        streamhot.Outlet.P              = 1     * 'atm';
     97        streamhot.Outlet.T              = 310   * 'K';
     98    streamhot.Outlet.z                  = [0.5,0.5];
     99
     100        Cooler.Outlet.T                 = 300*'K';
     101        Cooler.Outlet.P                 = 0.999* 'atm';
     102        Cooler.InletHeat.Q      = 0* 'J/s';
     103       
     104OPTIONS
     105        Dynamic = false;
     106end
     107
     108FlowSheet Sample_TwoHeater
     109       
     110DEVICES
     111
     112        Heater1                         as heater;
     113        Heater2                         as heater;
     114        streamcold1     as simple_source;
     115        streamcold2     as simple_source;
     116        streamcold3     as simple_source;
     117        Qin                                     as energy_source;
     118       
     119CONNECTIONS
     120
     121        streamcold1.Outlet      to Heater1.Inlet(1);
     122        streamcold2.Outlet      to Heater1.Inlet(2);
     123        streamcold3.Outlet      to Heater1.Inlet(3);
     124        Qin.OutletQ                             to Heater1.InletHeat;
     125        Heater1.OutletHeat      to Heater2.InletHeat;
     126        Heater1.Outlet                  to Heater2.Inlet(1);
     127       
     128PARAMETERS
     129
     130        PP                      as Plugin (Type ="PP", LiquidModel = "PR",VapourModel  = "PR",
     131                                                                        Components      = ["water","isobutane","benzene"]);
     132        NComp           as Integer;
     133       
     134SET
     135
     136        NComp           = PP.NumberOfComponents;
     137        Heater1.Ninlet          = 3;
     138        Heater2.Ninlet          = 1;
     139       
     140       
     141SPECIFY
     142
     143        streamcold1.Outlet.F            = 10  * 'kmol/h';
    56144        streamcold1.Outlet.P            = 1     * 'atm';
    57145        streamcold1.Outlet.T            = 300   * 'K';
    58     streamcold1.Outlet.z                = [1,0];
    59 
    60         streamcold2.Outlet.F            = 20*'kmol/h';
     146    streamcold1.Outlet.z                = [1,0,0];
     147       
     148        streamcold2.Outlet.F            = 5   * 'kmol/h';
    61149        streamcold2.Outlet.P            = 1     * 'atm';
    62150        streamcold2.Outlet.T            = 300   * 'K';
    63     streamcold2.Outlet.z                = [0,1];
     151    streamcold2.Outlet.z                = [0,1,0];
    64152       
    65         Heater.Outlet.T         = 310*'K';
    66         Heater.Outlet.P   = 1 * 'atm';
     153        streamcold3.Outlet.F            = 12   * 'kmol/h';
     154        streamcold3.Outlet.P            = 1     * 'atm';
     155        streamcold3.Outlet.T            = 315   * 'K';
     156    streamcold3.Outlet.z                = [0.2,0.5,0.3];
    67157
     158        Heater1.Outlet.T                        = 353*'K';
     159        Heater1.Outlet.P                = 0.999* 'atm';
     160        Heater1.InletHeat.Q     = 0* 'J/s';
     161       
     162        Heater2.Outlet.P        = 0.999* 'atm';
     163        Heater2.Outlet.T                = 370*'K';
     164       
    68165OPTIONS
    69 
    70166        Dynamic = false;
    71        
    72167end
    73 
Note: See TracChangeset for help on using the changeset viewer.