source: trunk/sample/miscellaneous/tenprobs/prob08.mso

Last change on this file was 228, checked in by Rodolfo Rodrigues, 15 years ago

Add more detailed header

File size: 3.0 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* 8. Binary batch distillation
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*       * Separation Processes
26*
27*       Concepts utilized:
28*               Batch distillation of an ideal binary mixture.
29*
30*       Numerical method:
31*               * System of ODEs and NLA equations
32*
33*   Reference:
34*               * CUTLIP et al. A collection of 10 numerical problems in
35*       chemical engineering solved by various mathematical software
36*       packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998.
37*       * More informations and a detailed description of all problems
38*       is available online in http://www.polymath-software.com/ASEE
39*
40*----------------------------------------------------------------------
41* Author: Rodolfo Rodrigues
42* GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation,
43*                                       Control, and Optimization of Processes
44* $Id$
45*--------------------------------------------------------------------*#
46using "types";
47
48
49
50FlowSheet batch_distillation
51        PARAMETERS
52        NComp           as Integer      (Brief="Number of chemical components", Upper=2);
53       
54        A(NComp)        as Real         (Brief="Antoin equation constant");
55        B(NComp)        as Real         (Brief="Antoin equation constant");
56        C(NComp)        as Real         (Brief="Antoin equation constant");
57       
58        Pt                      as pressure     (Brief="Total pressure");
59       
60       
61        VARIABLES
62        L                       as mol          (Brief="Mole of liquid remaining", DisplayUnit='mol');
63        x(NComp)        as fraction     (Brief="Mole fraction");
64        k(NComp)        as Real         (Brief="Vapor-liquid equilibrium ratio", Lower=0);
65        P(NComp)        as pressure     (Brief="Vapor pressure");
66        T                       as temperature;
67       
68       
69        EQUATIONS
70        "Change time in x(2)"
71        x(2) = time/'s';
72       
73        "Mole of liquid remaining"
74        diff(L) = L/(x(2)*(k(2) - 1))/'s';
75       
76        "Vapor-liquid equilibrium ratio"
77        k = P/Pt;
78       
79        "Vapor pressure" # Antoine equation
80        log(P/'mmHg') = A - B/((T/'K'-273.15) + C);
81       
82        "Bubble point"
83        sum(k*x) = 1;
84       
85        "Mole fraction normalisation"
86        sum(x) = 1;
87       
88       
89        SET
90        NComp = 2; # benzene, toluene
91       
92        # Antoin equation constants
93        A = [6.90565, 6.95464];
94        B = [1211.033, 1344.8];
95        C = [220.790, 219.482];
96       
97        Pt = 1.2*'atm';
98       
99       
100        INITIAL
101        L = 100*'mol';
102       
103
104        OPTIONS
105        TimeStart = 0.4;
106        TimeStep = 1e-3;
107        TimeEnd = 0.8;
108end
Note: See TracBrowser for help on using the repository browser.