source: trunk/sample/optimization/flash_opt.mso @ 957

Last change on this file since 957 was 921, checked in by Argimiro Resende Secchi, 13 years ago

Checking new EML.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
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 for optimization
17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
22* Author: Rafael de Pelegrini Soares
23* $Id: flash_opt.mso 921 2010-02-28 05:06:16Z arge $
24*--------------------------------------------------------------------*#
25
26using "stage_separators/flash";
27
28# exemplo baseado nos dados do artigo do Gani 1985.
29FlowSheet FlashSteadyTest
30        PARAMETERS
31        PP      as Plugin(Brief="Physical Properties",Type="PP",Components = ["1,3-butadiene", "isobutene", "n-pentane", "1-pentene", "1-hexene", "benzene"],
32                                                        LiquidModel = "PR",
33                                                        VapourModel = "PR");
34        NComp   as Integer;
35
36        VARIABLES
37        Q       as energy_source (Brief="Heat supplied");
38        leves as fraction;
39       
40        SET
41       
42        NComp = PP.NumberOfComponents;
43       
44        DEVICES
45        fl as flash_steady;
46        s1 as source;
47       
48        CONNECTIONS
49        s1.Outlet to fl.Inlet;
50        Q.OutletQ to fl.InletQ;
51       
52        EQUATIONS
53        leves = fl.OutletVapour.z(1)+fl.OutletVapour.z(2);
54       
55        SPECIFY
56        s1.F = 496.3 * 'kmol/h';
57        s1.T = 338 * 'K';
58        s1.P = 507.1 * 'kPa';
59        s1.Composition = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
60       
61        fl.OutletLiquid.P = 2.5 * 'atm';
62
63        #Q.OutletQ = 0 * 'kJ/h';
64        fl.OutletLiquid.T = 315.06 * 'K';
65       
66        OPTIONS
67        Dynamic = false;
68end
69
70#*
71 * Maximização da pureza dos leves no topo do flash.
72 * Achou : 0.83 frente a 0.79 da simulação do FlowSheet
73 *#
74Optimization FlashOpt1 as FlashSteadyTest
75        MAXIMIZE
76        leves;
77       
78        FREE
79        fl.OutletLiquid.T;
80        #fl.OutletLiquid.P;
81       
82        EQUATIONS
83        fl.OutletLiquid.T < 320 * 'K';
84        fl.OutletLiquid.T > 300 * 'K';
85
86        OPTIONS
87        Dynamic = false;
88        NLPSolveNLA = true;
89        NLPSolver(#File = "complex",
90                          #File = "optpp_emso",
91                          File = "ipopt_emso",
92                          MaxIterations = 1000,
93                          RelativeAccuracy = 1e-6);
94end
95
Note: See TracBrowser for help on using the repository browser.