#*------------------------------------------------------------------- * 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. * *-------------------------------------------------------------------- * Arquivo de demonstração de otimização de processos * (baseado no arquivo disponível em www.vrtech.com.br) *-------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: ammonia_opt.mso 428 2007-12-11 01:28:47Z arge $ *--------------------------------------------------------------------*# using "ammonia"; Optimization AmmoniaOPT as Ammonia MINIMIZE (abs(Q1.OutletQ.Q) + abs(Q2.OutletQ.Q))*1e-6 #loose / 'lbmol/h' # C102.Pot/'kW'*180 # + F101.Q/'kW'/10 ; FREE #F101.OutletV.T S101.frac; EQUATIONS #F102.OutletL.z(5) > 0.95; loose < 1 * 'lbmol/h'; production > 90 * 'lbmol/h'; OPTIONS Dynamic = false; NLPSolveNLA = true; NLPSolver(#File = "complex", #File = "optpp_emso", File = "ipopt_emso", MaxIterations = 300, RelativeAccuracy = 1e-6); end