Ignore:
Timestamp:
Jul 28, 2009, 6:24:54 PM (14 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r749 r806  
    55using "streams";
    66using "stage_separators/column";
    7 using "pressure_changers/pump";
     7using "pressure_changers/valve";
     8using "controllers/heat_flow";
     9using "controllers/PIDs";
    810
    911FlowSheet Column_Distillation_Kettle_Diagram
     
    3941
    4042        DEVICES
    41         vapourOutlet as simple_sink;
    42 
    43         SET
    44 
    45         SPECIFY
    46 
    47         INITIAL
    48 
    49         GUESS
    50 
    51         DEVICES
    52         liquidOut as simple_sink;
    53 
    54         SET
    55 
    56         SPECIFY
    57 
    58         INITIAL
    59 
    60         GUESS
    61 
    62         DEVICES
    63         LiquidBottom as simple_sink;
    64 
    65         SET
    66 
    67         SPECIFY
    68 
    69         INITIAL
    70 
    71         GUESS
    72 
    73         DEVICES
    74         ToAnotherColumn as simple_sink;
    75 
    76         SET
    77 
    78         SPECIFY
    79 
    80         INITIAL
    81 
    82         GUESS
    83 
    84         DEVICES
    85         energy_source_1 as energy_source;
    86 
    87         SET
    88 
    89         SPECIFY
    90         energy_source_1.OutletQ = 3.77 * 'kW';
    91 
    92         INITIAL
    93 
    94         GUESS
    95 
    96         DEVICES
    97         energy_source_2 as energy_source;
    98 
    99         SET
    100 
    101         SPECIFY
    102         energy_source_2.OutletQ = -4E6 * 'kJ/h';
    103 
    104         INITIAL
    105 
    106         GUESS
    107 
    108         DEVICES
    109         Distillation_kettle_cond_1 as Distillation_kettle_cond;
    110 
    111         SET
    112         Distillation_kettle_cond_1.VolumeOfTray = 0.113267 * 'm^3';
    113         Distillation_kettle_cond_1.HeatSupply = 0 * 'kW';
    114         Distillation_kettle_cond_1.PlateArea = 0.366038 * 'm^2';
    115         Distillation_kettle_cond_1.HolesArea = 0.0366038 * 'm^2';
    116         Distillation_kettle_cond_1.WeirLength = 0.531876 * 'm';
    117         Distillation_kettle_cond_1.WeirHeight = 0.0381 * 'm';
    118         Distillation_kettle_cond_1.beta = 0.6;
    119         Distillation_kettle_cond_1.alfa = 4;
    120         Distillation_kettle_cond_1.CONDENSER.V = 2 * 'm^3';
    121         Distillation_kettle_cond_1.CONDENSER.Across = 1 * 'm^2';
    122         Distillation_kettle_cond_1.CONDENSER.Initial_Level = 1 * 'm';
    123         Distillation_kettle_cond_1.CONDENSER.Initial_Temperature = 260 * 'K';
    124 
    125         SPECIFY
    126         Distillation_kettle_cond_1.VapourDrawOffFlow = 0 * 'kmol/h';
    127         Distillation_kettle_cond_1.LiquidDrawOffFlow = 1 * 'kmol/h';
    128         Distillation_kettle_cond_1.MurphreeEff = 1;
    129         Distillation_kettle_cond_1.alfaTopo = 2;
    130         Distillation_kettle_cond_1.CONDENSER.OutletVapour.F = 0 * 'kmol/h';
    131         Distillation_kettle_cond_1.REBOILER.OutletLiquid.F = 28 * 'kmol/h';
    132         Distillation_kettle_cond_1.SPLITTER.FlowRatios(1) = 0.4;
    133         Distillation_kettle_cond_1.SPLITTER.Outlet2.F = 85 * 'kmol/h';
    134         Distillation_kettle_cond_1.PUMP.dP = 16 * 'kPa';
    135 
    136         INITIAL
    137 
    138         GUESS
    139 
    140         DEVICES
    141         Pump_Device as centrifugal_pump;
    142 
    143         SET
    144         Pump_Device.PumpEfficiency = 0.80;
    145         Pump_Device.MechanicalEff = 0.95;
    146         Pump_Device.NPSH_Options = "Default";
    147         Pump_Device.SuctionArea = 0.01 * 'm^2';
    148 
    149         SPECIFY
    150         Pump_Device.Pratio = 7;
    151         Pump_Device.StaticHead = 12 * 'm';
    152 
    153         INITIAL
    154 
    155         GUESS
    156 
    157         DEVICES
    158         work_inlet_1 as work_source;
    159 
    160         SET
    161 
    162         SPECIFY
     43        Column_KC as Distillation_kettle_cond;
     44
     45        SET
     46        Column_KC.FeedTrayLocation(1) = 9;
     47        Column_KC.NumberOfTrays = 16;
     48        Column_KC.VolumeOfTray = 0.12 * 'm^3';
     49        Column_KC.HeatSupply = 0 * 'kW';
     50        Column_KC.PlateArea = 0.37 * 'm^2';
     51        Column_KC.HolesArea = 0.037 * 'm^2';
     52        Column_KC.WeirLength = 0.53 * 'm';
     53        Column_KC.WeirHeight = 0.038 * 'm';
     54        Column_KC.beta = 0.6;
     55        Column_KC.alfa = 4;
     56        Column_KC.INITIALIZATION.TopTemperature = 328 * 'K';
     57        Column_KC.INITIALIZATION.BottomTemperature = 330 * 'K';
     58        Column_KC.INITIALIZATION.LevelFraction = 1;
     59        Column_KC.CONDENSER.V = 2 * 'm^3';
     60        Column_KC.CONDENSER.Across = 1 * 'm^2';
     61        Column_KC.CONDENSER.Initial_Level = 0.50 * 'm';
     62        Column_KC.CONDENSER.Initial_Temperature = 300 * 'K';
     63        Column_KC.REBOILER.Across = 2 * 'm^2';
     64        Column_KC.REBOILER.V = 3 * 'm^3';
     65        Column_KC.REBOILER.Initial_Level = 0.50 * 'm';
     66        Column_KC.REBOILER.Initial_Temperature = 328 * 'K';
     67
     68        SPECIFY
     69        Column_KC.VapourDrawOffFlow = 0 * 'kmol/h';
     70        Column_KC.LiquidDrawOffFlow = 0 * 'kmol/h';
     71        Column_KC.MurphreeEff = 1;
     72        Column_KC.CONDENSER.OutletVapour.F = 0 * 'kmol/h';
     73        Column_KC.SPLITTER.FlowRatios(1) = 0.6;
     74        Column_KC.PUMP.dP = 16 * 'kPa';
     75
     76        INITIAL
     77
     78        GUESS
     79
     80        DEVICES
     81        STR1 as simple_sink2;
     82
     83        SET
     84
     85        SPECIFY
     86
     87        INITIAL
     88
     89        GUESS
     90
     91        DEVICES
     92        V1 as valve_flow;
     93
     94        SET
     95        V1.MinFlow = 0 * 'kmol/h';
     96        V1.MaxFlow = 600 * 'kmol/h';
     97
     98        SPECIFY
     99
     100        INITIAL
     101
     102        GUESS
     103
     104        DEVICES
     105        STR2 as simple_sink;
     106
     107        SET
     108
     109        SPECIFY
     110
     111        INITIAL
     112
     113        GUESS
     114
     115        DEVICES
     116        V2 as valve_flow;
     117
     118        SET
     119        V2.MinFlow = 0 * 'kmol/h';
     120        V2.MaxFlow = 100 * 'kmol/h';
     121
     122        SPECIFY
     123
     124        INITIAL
     125
     126        GUESS
     127
     128        DEVICES
     129        STR3 as simple_sink;
     130
     131        SET
     132
     133        SPECIFY
     134
     135        INITIAL
     136
     137        GUESS
     138
     139        DEVICES
     140        V3 as heat_flow;
     141
     142        SET
     143        V3.MinHeatFlow = 0 * 'kW';
     144        V3.MaxHeatFlow = 1000 * 'kW';
     145
     146        SPECIFY
     147
     148        INITIAL
     149
     150        GUESS
     151
     152        DEVICES
     153        PIDT_reb as PID;
     154
     155        SET
     156        PIDT_reb.PID_Select = "Ideal_AW";
     157        PIDT_reb.Action = "Reverse";
     158        PIDT_reb.Mode = "Automatic";
     159        PIDT_reb.Clip = "Clipped";
     160        PIDT_reb.alpha = 0.2;
     161        PIDT_reb.beta = 1;
     162        PIDT_reb.bias = 0.2;
     163        PIDT_reb.derivTime = 1 * 's';
     164        PIDT_reb.intTime = 10 * 's';
     165        PIDT_reb.gain = 3;
     166        PIDT_reb.gamma = 1;
     167        PIDT_reb.tau = 1 * 's';
     168        PIDT_reb.tauSet = 1 * 's';
     169        PIDT_reb.MinInput = 200;
     170        PIDT_reb.MaxInput = 400;
     171        PIDT_reb.MinOutput = 0;
     172        PIDT_reb.MaxOutput = 1;
     173
     174        SPECIFY
     175        PIDT_reb.SetPoint = (58+273);
     176
     177        INITIAL
     178
     179        GUESS
     180
     181        DEVICES
     182        PIDL_reb as PID;
     183
     184        SET
     185        PIDL_reb.PID_Select = "Ideal_AW";
     186        PIDL_reb.Action = "Direct";
     187        PIDL_reb.Mode = "Automatic";
     188        PIDL_reb.Clip = "Clipped";
     189        PIDL_reb.alpha = 1;
     190        PIDL_reb.beta = 1;
     191        PIDL_reb.bias = 0;
     192        PIDL_reb.derivTime = 0 * 's';
     193        PIDL_reb.intTime = 20 * 's';
     194        PIDL_reb.gain = 5;
     195        PIDL_reb.gamma = 1;
     196        PIDL_reb.tau = 1 * 's';
     197        PIDL_reb.tauSet = 1 * 's';
     198        PIDL_reb.MinInput = 0.1;
     199        PIDL_reb.MaxInput = 0.8;
     200        PIDL_reb.MinOutput = 0;
     201        PIDL_reb.MaxOutput = 1;
     202
     203        SPECIFY
     204        PIDL_reb.SetPoint = 0.5;
     205
     206        INITIAL
     207
     208        GUESS
     209
     210        DEVICES
     211        PIDT_cond as PID;
     212
     213        SET
     214        PIDT_cond.PID_Select = "Ideal_AW";
     215        PIDT_cond.Action = "Reverse";
     216        PIDT_cond.Mode = "Automatic";
     217        PIDT_cond.Clip = "Clipped";
     218        PIDT_cond.alpha = 0.2;
     219        PIDT_cond.beta = 1;
     220        PIDT_cond.bias = 0.5;
     221        PIDT_cond.derivTime = 10 * 's';
     222        PIDT_cond.intTime = 100 * 's';
     223        PIDT_cond.gain = 5;
     224        PIDT_cond.gamma = 1;
     225        PIDT_cond.tau = 1 * 's';
     226        PIDT_cond.tauSet = 1 * 's';
     227        PIDT_cond.MinInput = 250;
     228        PIDT_cond.MaxInput = 380;
     229        PIDT_cond.MinOutput = 0;
     230        PIDT_cond.MaxOutput = 1;
     231
     232        SPECIFY
     233        PIDT_cond.SetPoint = (273+45);
     234
     235        INITIAL
     236
     237        GUESS
     238
     239        DEVICES
     240        V4 as heat_flow;
     241
     242        SET
     243        V4.MinHeatFlow = -3000 * 'kW';
     244        V4.MaxHeatFlow = 0 * 'kW';
     245
     246        SPECIFY
     247
     248        INITIAL
     249
     250        GUESS
     251
     252        DEVICES
     253        PIDL_cond as PID;
     254
     255        SET
     256        PIDL_cond.PID_Select = "Ideal_AW";
     257        PIDL_cond.Action = "Direct";
     258        PIDL_cond.Mode = "Automatic";
     259        PIDL_cond.Clip = "Clipped";
     260        PIDL_cond.alpha = 1;
     261        PIDL_cond.beta = 1;
     262        PIDL_cond.bias = 0;
     263        PIDL_cond.derivTime = 0 * 's';
     264        PIDL_cond.intTime = 20 * 's';
     265        PIDL_cond.gain = 2;
     266        PIDL_cond.gamma = 1;
     267        PIDL_cond.tau = 1 * 's';
     268        PIDL_cond.tauSet = 1 * 's';
     269        PIDL_cond.MinInput = 0;
     270        PIDL_cond.MaxInput = 1;
     271        PIDL_cond.MinOutput = 0;
     272        PIDL_cond.MaxOutput = 1;
     273
     274        SPECIFY
     275        PIDL_cond.SetPoint = 0.5;
    163276
    164277        INITIAL
     
    167280
    168281        CONNECTIONS
    169         feed.Outlet to Distillation_kettle_cond_1.FeedTray;
    170         energy_source_1.OutletQ to Distillation_kettle_cond_1.HeatToReboiler;
    171         Distillation_kettle_cond_1.BottomProduct to LiquidBottom.Inlet;
    172         Distillation_kettle_cond_1.LiquidDistillate to liquidOut.Inlet;
    173         energy_source_2.OutletQ to Distillation_kettle_cond_1.HeatToCondenser;
    174         Distillation_kettle_cond_1.VapourDistillate to vapourOutlet.Inlet;
    175         Distillation_kettle_cond_1.LiquidDrawOff to Pump_Device.Inlet;
    176         Pump_Device.Outlet to ToAnotherColumn.Inlet;
    177         work_inlet_1.Work to Pump_Device.WorkIn;
     282        feed.Outlet to Column_KC.FeedTray;
     283        Column_KC.VapourDistillate to STR1.Inlet;
     284        Column_KC.LiquidDistillate to V1.Inlet;
     285        V1.Outlet to STR2.Inlet;
     286        Column_KC.BottomProduct to V2.Inlet;
     287        V2.Outlet to STR3.Inlet;
     288        V3.HeatFlow to Column_KC.HeatToReboiler;
     289        PIDL_reb.Output to V2.FlowFraction;
     290        Column_KC.LI_reb to PIDL_reb.Input;
     291        PIDT_reb.Output to V3.HeatFlowFraction;
     292        Column_KC.TI_reb to PIDT_reb.Input;
     293        V4.HeatFlow to Column_KC.HeatToCondenser;
     294        PIDT_cond.Output to V4.HeatFlowFraction;
     295        Column_KC.TI_cond to PIDT_cond.Input;
     296        Column_KC.LI_cond to PIDL_cond.Input;
     297        PIDL_cond.Output to V1.FlowFraction;
    178298
    179299        OPTIONS
    180300        Dynamic = true;
    181         TimeStep = 0.1;
     301        TimeStep = 0.01;
    182302        TimeEnd = 100;
    183303        TimeUnit = 's';
     
    185305        NLASolver(
    186306                File = "sundials",
    187                 RelativeAccuracy = 1e-3,
     307                RelativeAccuracy = 1e-2,
    188308                AbsoluteAccuracy = 1e-6,
    189309                MaxIterations = 100
     
    191311        DAESolver(
    192312                File = "sundials",
    193                 RelativeAccuracy = 1e-3,
     313                RelativeAccuracy = 1e-2,
    194314                AbsoluteAccuracy = 1e-6,
    195315                EventAccuracy = 1e-2
Note: See TracChangeset for help on using the changeset viewer.