#*------------------------------------------------------------------- * 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. * *-------------------------------------------------------------------- * Descrição do flowsheet de uma coluna batelada com controle ótimo * de composição. * Modelo proposto por Logsdson e Biegler. * *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: sample_bc.mso 350 2007-08-26 23:37:51Z arge $ *--------------------------------------------------------------------*# Model BatchColumn PARAMETERS Np as Integer(Brief="Number of Plates"); Nc as Integer(Brief="Number of Components"); purity as Real; Hi as Real; A(Nc) as Real; B(Nc) as Real; C(Nc) as Real; P as Real; V as Real; VARIABLES H0 as Real(Default=1); x1(Np+1) as Real(Default=0.55, Lower = 0, Upper = 1); x2(Np+1) as Real(Default=0.45, Lower = 0, Upper = 1); y1(Np+1) as Real(Default=0.3, Lower = 0, Upper = 1); y2(Np+1) as Real(Default=0.7, Lower = 0, Upper = 1); T(Np+1) as Real(Default=85, Lower = 0, Upper = 400); R as Real(Default=1); EQUATIONS "Balanço no Prato 0" diff(H0)*'s' = -V/(R+1); diff(x1(1))*'s' = V/H0 * (x1(1)-y1(1) + R * ((x1(2) - x1(1))/(R+1))); "Balanço demais pratos" diff(x1(2:Np))*'s' = V/Hi * (y1(1:Np-1) - y1(2:Np) + (R * ( x1(3:Np+1) - x1(2:Np) ) / (R+1))); "Balanço último prato" diff(x1(Np+1))*'s' = V * ( y1(Np) - x1(Np+1) )/Hi; x1 = 1 - x2; y1*P = x1 * exp(A(1) - (B(1)/(T + 273.15 + C(1))) ); y1 = 1 - y2; y2*P = x2 * exp(A(2) - (B(2)/(T + 273.15 + C(2))) ); "Equação de Controle Ótimo" x1(Np+1) = purity; INITIAL H0 = 100; x1(1) = 0.55; T(2:9) = [89.8, 87.5, 85.4, 83.8, 82.6, 81.7, 81.1, 81.0]; R = 1; end FlowSheet batch as BatchColumn SET Nc = 2; Np = 11; A = [15.7527, 16.0137]; B = [2766.63, 3096.52]; C = [ -50.5, -53.67]; purity = 0.998; P = 760; Hi = 1; V = 120; OPTIONS TimeStep = 0.01; TimeEnd = 2.1; Integration = "original"; #original, index0 or index 1 DAESolver( File = "dasslc" # "mebdf" ); end