#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * Sample file for optimization *-------------------------------------------------------------------- * * This sample file needs VRTherm (www.vrtech.com.br) to run. * *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: flash_opt.mso 85 2006-12-08 20:43:24Z paula $ *--------------------------------------------------------------------*# using "stage_separators/flash"; # exemplo baseado nos dados do artigo do Gani 1985. FlowSheet FlashSteadyTest PARAMETERS PP as CalcObject(Brief="Physical Properties",File="vrpp"); NComp as Integer; VARIABLES Q as heat_rate (Brief="Heat supplied"); leves as fraction; SET PP.Components = ["1,3-butadiene", "isobutene", "n-pentane", "1-pentene", "1-hexene", "benzene"]; PP.LiquidModel = "PR"; PP.VapourModel = "PR"; NComp = PP.NumberOfComponents; DEVICES fl as flash_Steady; s1 as stream_therm; CONNECTIONS s1 to fl.Inlet; Q to fl.Q; EQUATIONS leves = fl.OutletV.z(1)+fl.OutletV.z(2); SPECIFY s1.F = 496.3 * "kmol/h"; s1.T = 338 * "K"; s1.P = 507.1 * "kPa"; s1.v = 0.1380; s1.z = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283]; fl.OutletL.P = 2.5 * "atm"; #Q = 0 * "kJ/h"; fl.OutletL.T = 315.06 * "K"; OPTIONS mode = "steady"; end #* * Maximização da pureza dos leves no topo do flash. * Achou : 0.83 frente a 0.79 da simulação do FlowSheet *# Optimization FlashOpt1 as FlashSteadyTest MAXIMIZE leves; FREE fl.OutletL.T; #fl.OutletL.P; EQUATIONS fl.OutletL.T < 320 * "K"; fl.OutletL.T > 300 * "K"; OPTIONS mode = "steady"; end