source: branches/gui/sample/miscellaneous/tenprobs/prob04.mso @ 715

Last change on this file since 715 was 228, checked in by Rodolfo Rodrigues, 16 years ago

Add more detailed header

File size: 2.7 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* 4. Reaction equilibrium for multiple gas phase reactions
17*----------------------------------------------------------------------
18*
19*   Description:
20*      This problem is part of a collection of 10 representative
21*       problems in Chemical Engineering for solution by numerical methods
22*       developed for Cutlip (1998).
23*
24*   Subject:
25*       * Thermodynamics
26*               * Reaction Engineering
27*
28*       Concepts utilized:
29*               Complex chemical equilibrium calculations involving multiple
30*       reactions.
31*
32*       Numerical method:
33*               * Simultaneous nonlinear equations
34*
35*   Reference:
36*       * CUTLIP et al. A collection of 10 numerical problems in
37*       chemical engineering solved by various mathematical software
38*       packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998.
39*       * More informations and a detailed description of all problems
40*       is available online in http://www.polymath-software.com/ASEE
41*
42*----------------------------------------------------------------------
43* Author: Rodolfo Rodrigues
44* GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation,
45*                                       Control, and Optimization of Processes
46* $Id$
47*--------------------------------------------------------------------*#
48
49
50
51Model problem
52        PARAMETERS
53        NComp           as Integer      (Brief="Number of components", Lower=1);
54        NReac           as Integer      (Brief="Number of reactions", Default=1);
55       
56        VARIABLES
57        K(NReac)        as Real         (Brief="Equillibrium constant");
58        Co(NComp)       as Real         (Brief="Initial concentration", Lower=-0.001);
59        C(NComp)        as Real         (Brief="Concentration", Lower=-0.001);
60       
61        SET
62        NComp = 7; # A,B,C,D,X,Y,Z
63        NReac = 3;
64       
65        EQUATIONS
66        K(1)*(C(1)*C(2)) = C(3)*C(4);
67        K(2)*(C(2)*C(3)) = C(5)*C(6);
68        K(3)*(C(1)*C(5)) = C(7);
69       
70        C(1) - Co(1) = -C(4) - C(7);
71        C(2) - Co(2) = -C(4) - C(6);
72        C(3) = C(4) - C(6);
73        C(6) = C(5) + C(7);
74end
75
76
77FlowSheet solution
78        DEVICES
79        reac    as problem;
80       
81        SPECIFY
82        reac.Co = [1.5, 1.5, 0, 0, 0, 0, 0];
83        reac.K = [1.06, 2.63, 5];
84       
85        GUESS
86        reac.C(4) = reac.C(5);
87        reac.C(5) = reac.C(7);
88       
89        reac.C(4) = 0;  # (a)   
90#       reac.C(4) = 1;  # (b)
91#       reac.C(4) = 10; # (c)
92       
93        OPTIONS
94        Dynamic = false;
95end
Note: See TracBrowser for help on using the repository browser.