source: trunk/sample/miscellaneous/tenprobs/prob02.mso @ 957

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

Add more detailed header

File size: 3.6 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* 2. Material balance on a separation train
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*       * Introduction to Chemical Engineering
26*
27*       Concepts utilized:
28*               Material balances on a steady-state process with no recycle.
29*
30*       Numerical method:
31*               * Simultaneous linear 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
50#*---------------------------------------------------------------------
51*       Model of a stream
52*--------------------------------------------------------------------*#
53Model stream
54        PARAMETERS
55outer NComp     as Integer      (Brief="Number of chemical components", Lower=1);
56       
57        VARIABLES
58        F               as flow_mol     (Brief="Molar flow rate", DisplayUnit='mol/min');
59        X(NComp)as fraction     (Brief="Mole fraction");
60end
61
62
63#*---------------------------------------------------------------------
64*       Model of a column
65*--------------------------------------------------------------------*#
66Model column
67        VARIABLES
68in      Feed    as stream;
69out     Top             as stream;
70out Bottom      as stream;
71       
72        EQUATIONS       
73        "Component balance"
74        Feed.F*Feed.X = Top.F*Top.X + Bottom.F*Bottom.X;
75end
76
77
78#*---------------------------------------------------------------------
79*       Array of distillation columns
80*--------------------------------------------------------------------*#
81FlowSheet distillation_columns
82        PARAMETERS
83        NComp   as Integer;
84       
85       
86        VARIABLES
87        feed    as stream;
88       
89       
90        DEVICES
91        column1 as column; # 1
92        column2 as column; # 2
93        column3 as column; # 3
94       
95       
96        CONNECTIONS
97        feed                    to column1.Feed;
98        column1.Top     to column2.Feed;
99        column1.Bottom  to column3.Feed;
100       
101       
102        SET
103        NComp = 4; # xylene, styrene, toluene, benzene
104       
105       
106        EQUATIONS
107        "Overall balance for #2"       
108        column2.Feed.F = column2.Top.F + column2.Bottom.F;
109       
110        "Overall balance for #3"
111        column3.Feed.F = column3.Top.F + column3.Bottom.F;
112
113       
114        SPECIFY
115        # Feed to column 1
116        feed.F = 70*'mol/min';
117        feed.X = [0.15, 0.25, 0.40, 0.20];
118
119        # Column 2
120        column2.Top.X = [0.07, 0.04, 0.54, 0.35];
121        column2.Bottom.X = [0.18, 0.24, 0.42, 0.16];
122       
123        # Column 3
124        column3.Top.X = [0.15, 0.10, 0.54, 0.21];
125        column3.Bottom.X = [0.24, 0.65, 0.10, 0.01];
126
127
128        OPTIONS
129        Dynamic = false;
130end
Note: See TracBrowser for help on using the repository browser.