Changeset 766


Ignore:
Timestamp:
Jun 16, 2009, 11:29:18 AM (13 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Better code organization for this sample.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/sample/stage_separators/sample_flash_steady.mso

    r749 r766  
    2020        DEVICES
    2121        Heat as energy_source;
     22        Feed as simple_source;
     23        VaporProduct as sink;
     24        LiquidProduct as sink;
     25        flash_steady_1 as flash_steady;
    2226
    23         SET
    24 
    25         SPECIFY
    26 
    27         INITIAL
    28 
    29         GUESS
    30 
    31         DEVICES
    32         Feed as simple_source;
     27        CONNECTIONS
     28        flash_steady_1.OutletVapour to VaporProduct.Inlet;
     29        flash_steady_1.OutletLiquid to LiquidProduct.Inlet;
     30        Feed.Outlet to flash_steady_1.Inlet;
     31        Heat.OutletQ to flash_steady_1.InletQ;
    3332
    3433        SET
     
    4342        Feed.P = 5 * 'atm';
    4443
    45         INITIAL
    46 
    47         GUESS
    48 
    49         DEVICES
    50         VaporProduct as sink;
    51 
    52         SET
    53 
    54         SPECIFY
    55 
    56         INITIAL
    57 
    58         GUESS
    59 
    60         DEVICES
    61         LiquidProduct as sink;
    62 
    63         SET
    64 
    65         SPECIFY
    66 
    67         INITIAL
    68 
    69         GUESS
    70 
    71         DEVICES
    72         flash_steady_1 as flash_steady;
    73 
    74         SET
    75 
    76         SPECIFY
    7744        flash_steady_1.OutletLiquid.T = 330 * 'K';
    7845        flash_steady_1.OutletLiquid.P = 0.6 * 'atm';
    7946
    80         INITIAL
    81 
    82         GUESS
    83 
    84         CONNECTIONS
    85         flash_steady_1.OutletVapour to VaporProduct.Inlet;
    86         flash_steady_1.OutletLiquid to LiquidProduct.Inlet;
    87         Feed.Outlet to flash_steady_1.Inlet;
    88         Heat.OutletQ to flash_steady_1.InletQ;
    89 
    9047        OPTIONS
    9148        Dynamic = false;
    92         Integration = "original";
    93         NLASolver(
    94                 File = "sundials",
    95                 RelativeAccuracy = 1e-3,
    96                 AbsoluteAccuracy = 1e-3,
    97                 MaxIterations = 100
    98         );
    99         DAESolver(
    100                 File = "sundials",
    101                 RelativeAccuracy = 1e-3,
    102                 AbsoluteAccuracy = 1e-6,
    103                 EventAccuracy = 1e-2
    104         );
    10549end
Note: See TracChangeset for help on using the changeset viewer.