#*--------------------------------------------------------------------- * 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. * *---------------------------------------------------------------------- * 4. Reaction equilibrium for multiple gas phase reactions *---------------------------------------------------------------------- * * Description: * This problem is part of a collection of 10 representative * problems in Chemical Engineering for solution by numerical methods * developed for Cutlip (1998). * * Subject: * * Thermodynamics * * Reaction Engineering * * Concepts utilized: * Complex chemical equilibrium calculations involving multiple * reactions. * * Numerical method: * * Simultaneous nonlinear equations * * Reference: * * CUTLIP et al. A collection of 10 numerical problems in * chemical engineering solved by various mathematical software * packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998. * * More informations and a detailed description of all problems * is available online in http://www.polymath-software.com/ASEE * *---------------------------------------------------------------------- * Author: Rodolfo Rodrigues * GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation, * Control, and Optimization of Processes * $Id$ *--------------------------------------------------------------------*# Model problem PARAMETERS NComp as Integer (Brief="Number of components", Lower=1); NReac as Integer (Brief="Number of reactions", Default=1); VARIABLES K(NReac) as Real (Brief="Equillibrium constant"); Co(NComp) as Real (Brief="Initial concentration", Lower=-0.001); C(NComp) as Real (Brief="Concentration", Lower=-0.001); SET NComp = 7; # A,B,C,D,X,Y,Z NReac = 3; EQUATIONS K(1)*(C(1)*C(2)) = C(3)*C(4); K(2)*(C(2)*C(3)) = C(5)*C(6); K(3)*(C(1)*C(5)) = C(7); C(1) - Co(1) = -C(4) - C(7); C(2) - Co(2) = -C(4) - C(6); C(3) = C(4) - C(6); C(6) = C(5) + C(7); end FlowSheet solution DEVICES reac as problem; SPECIFY reac.Co = [1.5, 1.5, 0, 0, 0, 0, 0]; reac.K = [1.06, 2.63, 5]; GUESS reac.C(4) = reac.C(5); reac.C(5) = reac.C(7); reac.C(4) = 0; # (a) # reac.C(4) = 1; # (b) # reac.C(4) = 10; # (c) OPTIONS Dynamic = false; end