Ignore:
Timestamp:
Jan 30, 2007, 4:01:53 PM (17 years ago)
Author:
gerson bicca
Message:

testing some modifications for the new language

Location:
branches/newlanguage/sample/heat_exchangers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/sample/heat_exchangers/Mheatex_sample1.mso

    r140 r144  
     1#*-------------------------------------------------------------------
     2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
     3*
     4* This LIBRARY is free software; you can distribute it and/or modify
     5* it under the therms of the ALSOC FREE LICENSE as available at
     6* http://www.enq.ufrgs.br/alsoc.
     7*
     8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
     9* from http://www.rps.eng.br Copyright (C) 2002-2004.
     10* All rights reserved.
     11*
     12* EMSO is distributed under the therms of the ALSOC LICENSE as
     13* available at http://www.enq.ufrgs.br/alsoc.
     14*
     15*--------------------------------------------------------------------
     16* Sample file with cocurrent flow Multistream Heat Exchanger
     17*--------------------------------------------------------------------
     18*
     19* This sample file needs VRTherm (www.vrtech.com.br) to run.
     20*
     21*----------------------------------------------------------------------
     22* Author: Gerson B. Bicca
     23* $Id: Mheatex_sample1.mso 135 2007-01-25 20:00:26Z bicca $
     24*--------------------------------------------------------------------*#
    125using "heat_exchangers/Mheatex";
    226
    3 FlowSheet Discreto_A
     27FlowSheet Mheatex_cocurrent
    428       
    529DEVICES
    630
    7         Mheater1                as Mheatex;
    8         Mheater2                as Mheatex;
     31        Mheater         as Mheatex;
    932       
    10        
    11         streamhot1              as stream_therm;
    12         streamhot2              as stream_therm;
    13        
    14         streamcold1     as stream_therm;
    15         streamcold2             as stream_therm;
     33        streamhot1              as source;
     34        streamcold1     as source;
     35        streamcold2     as source;
    1636       
    1737PARAMETERS
    1838
    19         PP                      as CalcObject   (File="vrpp");
    20         NComp           as Integer              (Brief="Number Components");
     39        PP                      as Plugin       (File="vrpp");
     40        NComp           as Integer      (Brief="Number Components");
    2141       
    2242SET
    2343
    24         PP.LiquidModel  = "PR";
     44        PP.LiquidModel          = "PR";
    2545        PP.VapourModel  = "PR";
    2646        PP.Components   = ["water","methanol","benzene","toluene"];
    27         NComp                   = PP.NumberOfComponents;
     47        NComp                           = PP.NumberOfComponents;
    2848       
    29         Mheater1.Nhot           = 2;
    30         Mheater2.Nhot           = 2;
     49        Mheater.Nhot          = 1;
     50    Mheater.Ncold         = 2;
    3151       
    32     Mheater1.Ncold          = 2;
    33     Mheater2.Ncold          = 2;
    34        
    35         Mheater1.HE.FlowDirection  = "Cocurrent";
    36         Mheater2.HE.FlowDirection  = "Cocurrent";
     52        Mheater.FlowDirection  = "cocurrent";
    3753       
    3854CONNECTIONS
    3955
    40         streamcold1     to Mheater1.Inlet.Cold(1);
    41         streamhot1      to Mheater1.Inlet.Hot(1);
    42        
    43         streamhot2      to Mheater1.Inlet.Hot(2);
    44         streamcold2     to Mheater1.Inlet.Cold(2);
    45        
    46         Mheater1.Outlet.Cold(1)         to Mheater2.Inlet.Cold(1);
    47        
    48        
    49         Mheater1.Outlet.Cold(2)         to Mheater2.Inlet.Cold(2);
    50 
    51        
    52        
    53         Mheater1.Outlet.Hot(1)          to Mheater2.Inlet.Hot(1);
    54 
    55        
    56        
    57         Mheater1.Outlet.Hot(2)          to Mheater2.Inlet.Hot(2);
    58 
    59        
     56        streamcold1.Outlet      to Mheater.Inlet.Cold(1);
     57        streamhot1.Outlet       to Mheater.Inlet.Hot(1);
     58        streamcold2.Outlet      to Mheater.Inlet.Cold(2);
    6059       
    6160SPECIFY
     
    6362#       Cold Streams
    6463#=====================================================================
    65         streamcold1.F           = 500   * "kmol/h";
    66         streamcold1.P           = 1     * "atm";
    67         streamcold1.T           = 278   * "K";
    68         streamcold1.v           = 0;
    69         streamcold1.z           = [1,0,0,0];
     64        streamcold1.Outlet.F            = 500   * "kmol/h";
     65        streamcold1.Outlet.P            = 1     * "atm";
     66        streamcold1.Outlet.T            = 278   * "K";
     67        streamcold1.Outlet.z            = [1,0,0,0];
    7068
    71        
    72         streamcold2.F           = 50   * "kmol/h";
    73         streamcold2.P           = 1     * "atm";
    74         streamcold2.T           = 298   * "K";
    75         streamcold2.v           = 0;
    76     streamcold2.z               = [1,0,0,0];
    77 
     69        streamcold2.Outlet.F            = 50   * "kmol/h";
     70        streamcold2.Outlet.P            = 1     * "atm";
     71        streamcold2.Outlet.T            = 298   * "K";
     72    streamcold2.Outlet.z                = [0,0.1,0.65,0.25];
    7873
    7974#=====================================================================
    80 #       Hot Streams  
     75#       Hot Streams
    8176#=====================================================================
    82         streamhot1.F            = 100* "kmol/h";
    83         streamhot1.P            = 1     * "atm";
    84         streamhot1.T            = 330   * "K";
    85         streamhot1.v            = 0;
    86     streamhot1.z                = [0,1,0,0];
     77        streamhot1.Outlet.F             = 100* "kmol/h";
     78        streamhot1.Outlet.P             = 1     * "atm";
     79        streamhot1.Outlet.T             = 330   * "K";
     80    streamhot1.Outlet.z                 = [1,0,0,0];
    8781
    88         streamhot2.F            = 100* "kmol/h";
    89         streamhot2.P            = 1     * "atm";
    90         streamhot2.T            = 340   * "K";
    91         streamhot2.v            = 0;
    92     streamhot2.z                = [0,0,0.75,0.25];
    93 
    94        
    9582#=====================================================================
    9683#       Temperature Outlet
    9784#===================================================================== 
    98         Mheater2.Outlet.Hot(1).T        = 308*"K";
    99         Mheater2.Outlet.Hot(2).T        = 303*"K";
    100        
    101         Mheater2.Outlet.Cold(2).T       = 299*"K";
     85        Mheater.Outlet.Hot(1).T         = 308*"K";
     86        Mheater.Outlet.Cold(2).T   = 310*"K";
    10287
    10388#=====================================================================
    10489#       Pressure Outlet
    10590#=====================================================================
    106         Mheater2.Outlet.Hot(1).P        = 1 * "atm";
    107         Mheater2.Outlet.Hot(2).P        = 1 * "atm";
    108        
    109         Mheater2.Outlet.Cold(1).P   = 1 * "atm";
    110         Mheater2.Outlet.Cold(2).P   = 1 * "atm";
     91        Mheater.Outlet.Hot(1).P         = 1 * "atm";
     92        Mheater.Outlet.Cold(1).P   = 1 * "atm";
     93        Mheater.Outlet.Cold(2).P   = 1 * "atm";
    11194       
    11295OPTIONS
    11396 
    114         mode                    = "steady";
    115         relativeAccuracy        = 1e-8;
     97        Dynamic     = false;
    11698       
    11799end     
  • branches/newlanguage/sample/heat_exchangers/Mheatex_sample2.mso

    r135 r144  
    1 
     1#*-------------------------------------------------------------------
     2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
     3*
     4* This LIBRARY is free software; you can distribute it and/or modify
     5* it under the therms of the ALSOC FREE LICENSE as available at
     6* http://www.enq.ufrgs.br/alsoc.
     7*
     8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
     9* from http://www.rps.eng.br Copyright (C) 2002-2004.
     10* All rights reserved.
     11*
     12* EMSO is distributed under the therms of the ALSOC LICENSE as
     13* available at http://www.enq.ufrgs.br/alsoc.
     14*
     15*--------------------------------------------------------------------
     16* Sample file with counter flow Multistream Heat Exchanger
     17*--------------------------------------------------------------------
     18*
     19* This sample file needs VRTherm (www.vrtech.com.br) to run.
     20*
     21*----------------------------------------------------------------------
     22* Author: Gerson B. Bicca
     23* $Id: Mheatex_sample2.mso 135 2007-01-25 20:00:26Z bicca $
     24*--------------------------------------------------------------------*#
    225using "heat_exchangers/Mheatex";
    326
    4 FlowSheet MHeater
     27FlowSheet MHeatex_counter
    528
    629PARAMETERS
     
    3154        Mheater.Nhot      = 2;
    3255    Mheater.Ncold     = 2;
     56       
     57    Mheater.FlowDirection    = "counter";
    3358       
    3459SPECIFY
  • branches/newlanguage/sample/heat_exchangers/Sample_Simplified.mso

    r100 r144  
    8282
    8383        exchanger       as HeatExchanger_NTU;
    84         streamhot       as stream_therm;
    85         streamcold      as stream_therm;
     84        streamhot       as source;
     85        streamcold      as source;
    8686
    8787CONNECTIONS
    8888
    89         streamhot       to exchanger.Inlet.Hot;
    90         streamcold      to exchanger.Inlet.Cold;
     89        streamhot.Outlet        to exchanger.Inlet.Hot;
     90        streamcold.Outlet       to exchanger.Inlet.Cold;
    9191       
    9292PARAMETERS
    93         PP                      as CalcObject   (File="vrpp");
     93        PP                      as Plugin       (File="vrpp");
    9494        NComp           as Integer;
    9595SET
     
    100100        NComp                           = PP.NumberOfComponents;
    101101       
    102         exchanger.HE.FlowDirection      = "Cocurrent";
     102        exchanger.FlowDirection      = "cocurrent";
    103103#       exchanger.HE.FlowDirection      = "Counter";
    104104
     
    111111        exchanger.PressureDrop.Cold.Pdrop   = 0*"atm";
    112112       
    113         streamhot.F                                     = 1000    * "kmol/h";
    114         streamhot.T                                     = 450     * "K";
    115         streamhot.v                                     = 1;
    116         streamhot.P                                     = 1.5     * "atm";
    117         streamhot.z                                     = [1];
     113        streamhot.Outlet .F                                     = 1000    * "kmol/h";
     114        streamhot.Outlet .T                                     = 450     * "K";
     115#streamhot.v                                    = 1;
     116        streamhot.Outlet .P                                     = 1.5     * "atm";
     117        streamhot.Outlet .z                                     = [1];
    118118
    119         streamcold.F                                    = 500   * "kmol/h";
    120         streamcold.P                                    = 1     * "atm";
    121         streamcold.T                                    = 350   * "K";
    122         streamcold.v                                    = 0;
    123     streamcold.z                                        = [1];
     119        streamcold.Outlet .F                                    = 500   * "kmol/h";
     120        streamcold.Outlet .P                                    = 1     * "atm";
     121        streamcold.Outlet .T                                    = 350   * "K";
     122#streamcold.v                                   = 0;
     123    streamcold.Outlet .z                                        = [1];
    124124       
    125125OPTIONS
    126  mode  = "steady";
     126Dynamic= false;
    127127end
    128128
  • branches/newlanguage/sample/heat_exchangers/sampleLMTD.mso

    r100 r144  
    2929PARAMETERS
    3030
    31 PP               as CalcObject (Brief="Physical Properties",File="vrpp");
     31PP               as Plugin (Brief="Physical Properties",File="vrpp");
    3232NComp   as Integer;
    3333       
     34DEVICES
    3435
    35        
    36 DEVICES
    3736exchanger       as HeatExchanger_LMTD;
    38 streamhot       as streamTP;
    39 streamcold  as streamTP;
     37streamhot       as source;
     38streamcold  as source;
     39
    4040SET
    4141
     
    4343PP.VapourModel          = "PR";
    4444PP.Components           = ["water","n-butane", "benzene", "n-octane" ];
    45 NComp                           = PP.NumberOfComponents;
    46 exchanger.HE.FlowDirection    = "Cocurrent";   
     45NComp                                   = PP.NumberOfComponents;
     46
     47exchanger.FlowDirection    = "cocurrent";
     48
    4749CONNECTIONS
    4850
    49 streamhot       to exchanger.Inlet.Hot;
    50 streamcold      to exchanger.Inlet.Cold;
    51        
     51streamhot.Outlet                to exchanger.Inlet.Hot;
     52streamcold.Outlet               to exchanger.Inlet.Cold;
     53
    5254SPECIFY
    5355
    5456"LMTD Correction Factor"
    55         exchanger.Fc = 1;
     57        exchanger.Fc = 0.8;
    5658       
    5759"Overall Heat Transfer Coefficient"     
     
    6264exchanger.PressureDrop.Cold.Pdrop   = 0.2*"kPa";
    6365
    64 streamhot.F             = 20    * "kmol/h";
    65 streamhot.T             = 450     * "K";
    66 streamhot.P             = 120    * "kPa";
    67 streamhot.z             = [1,0,0,0];
     66streamhot.Outlet.F              = 20    * "kmol/h";
     67streamhot.Outlet.T              = 400     * "K";
     68streamhot.Outlet.P              = 120    * "kPa";
     69streamhot.Outlet.z              = [1,0,0,0];
    6870
    69 streamcold.F            = 10 * "kmol/h";
    70 streamcold.P            = 120 * "kPa";
    71 streamcold.T            = 300 * "K";   
    72 streamcold.z            = [0,0.5, 0.1, 0.4];
     71streamcold.Outlet.F             = 5 * "kmol/h";
     72streamcold.Outlet.P             = 120 * "kPa";
     73streamcold.Outlet.T             = 300 * "K";   
     74streamcold.Outlet.z             = [0,0.5, 0.1, 0.4];
    7375
    74 exchanger.Outlet.Cold.T = 340*"K";
     76exchanger.Outlet.Cold.T = 305*"K";
    7577       
    7678OPTIONS
    77  mode                     = "steady";
     79
     80Dynamic           = false;
     81
    7882 end
  • branches/newlanguage/sample/heat_exchangers/sampleNTU.mso

    r100 r144  
    2929PARAMETERS
    3030
    31 PP        as CalcObject (Brief="Physical Properties",File="vrpp");
    32 NComp as Integer;
     31PP               as Plugin (Brief="Physical Properties",File="vrpp");
     32NComp   as Integer;
    3333       
    3434DEVICES
    3535
    3636exchanger       as HeatExchanger_NTU;
    37 streamhot       as streamTP;
    38 streamcold  as streamTP;
     37streamhot       as source;
     38streamcold  as source;
     39
    3940
    4041SET
     
    4546NComp                           = PP.NumberOfComponents;
    4647
    47 exchanger.HE.FlowDirection = "Cocurrent";
     48exchanger.FlowDirection = "cocurrent";
    4849
    4950CONNECTIONS
    5051
    51 streamhot               to exchanger.Inlet.Hot;
    52 streamcold              to exchanger.Inlet.Cold;
     52streamhot.Outlet                to exchanger.Inlet.Hot;
     53streamcold.Outlet               to exchanger.Inlet.Cold;
     54
    5355       
    5456SPECIFY
     
    5961exchanger.PressureDrop.Cold.Pdrop   = 0.2*"kPa";
    6062
    61 streamhot.F             = 20    * "kmol/h";
    62 streamhot.T             = 450     * "K";
    63 streamhot.P             = 120    * "kPa";
    64 streamhot.z             = [1,0,0,0];
     63streamhot.Outlet.F              = 20    * "kmol/h";
     64streamhot.Outlet.T              = 450     * "K";
     65streamhot.Outlet.P              = 120    * "kPa";
     66streamhot.Outlet.z              = [1,0,0,0];
    6567
    66 streamcold.F            = 10 * "kmol/h";
    67 streamcold.P            = 120 * "kPa";
    68 streamcold.T            = 300 * "K";   
    69 streamcold.z            = [0,0.5, 0.1, 0.4];
     68streamcold.Outlet.F             = 10 * "kmol/h";
     69streamcold.Outlet.P             = 120 * "kPa";
     70streamcold.Outlet.T             = 300 * "K";   
     71streamcold.Outlet.z             = [0,0.5, 0.1, 0.4];
    7072
    7173exchanger.Details.A = 20*"m^2";
     
    7375OPTIONS
    7476
    75  mode = "steady";
     77Dynamic = false;
    7678
    7779end
Note: See TracChangeset for help on using the changeset viewer.