source: mso/sample/optimization/flash_opt.mso @ 107

Last change on this file since 107 was 85, checked in by Paula Bettio Staudt, 16 years ago

Updated optimization sample files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 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 85 2006-12-08 20:43:24Z paula $
24*--------------------------------------------------------------------*#
25
26using "stage_separators/flash";
27
28# exemplo baseado nos dados do artigo do Gani 1985.
29FlowSheet FlashSteadyTest
30        PARAMETERS
31        PP      as CalcObject(Brief="Physical Properties",File="vrpp");
32        NComp   as Integer;
33
34        VARIABLES
35        Q       as heat_rate (Brief="Heat supplied");
36        leves as fraction;
37       
38        SET
39        PP.Components = ["1,3-butadiene", "isobutene", "n-pentane", "1-pentene", "1-hexene", "benzene"];
40        PP.LiquidModel = "PR";
41        PP.VapourModel = "PR";
42        NComp = PP.NumberOfComponents;
43       
44        DEVICES
45        fl as flash_Steady;
46        s1 as stream_therm;
47       
48        CONNECTIONS
49        s1 to fl.Inlet;
50        Q to fl.Q;
51       
52        EQUATIONS
53        leves = fl.OutletV.z(1)+fl.OutletV.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.v = 0.1380;
60        s1.z = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
61       
62        fl.OutletL.P = 2.5 * "atm";
63
64        #Q = 0 * "kJ/h";
65        fl.OutletL.T = 315.06 * "K";
66       
67        OPTIONS
68        mode = "steady";
69end
70
71#*
72 * Maximização da pureza dos leves no topo do flash.
73 * Achou : 0.83 frente a 0.79 da simulação do FlowSheet
74 *#
75Optimization FlashOpt1 as FlashSteadyTest
76        MAXIMIZE
77        leves;
78       
79        FREE
80        fl.OutletL.T;
81        #fl.OutletL.P;
82       
83        EQUATIONS
84        fl.OutletL.T < 320 * "K";
85        fl.OutletL.T > 300 * "K";
86
87        OPTIONS
88        mode = "steady";
89end
90
Note: See TracBrowser for help on using the repository browser.