1 | #* |
---|
2 | * EMSO template file for new flowsheets. |
---|
3 | * |
---|
4 | * The user should edit the contents of this file in order |
---|
5 | * to develop a new flowsheet. |
---|
6 | * |
---|
7 | * $Id: flowsheet.mso 14 2006-08-26 20:15:39Z rafael $ |
---|
8 | *# |
---|
9 | |
---|
10 | #* |
---|
11 | * The using command makes available entities declared in another files. |
---|
12 | * |
---|
13 | * With this command the user can make use of the EML models |
---|
14 | *# |
---|
15 | using "stage_separators/flash"; |
---|
16 | |
---|
17 | #* |
---|
18 | * A new flowsheet is declared with the FlowSheet keyword and a name. |
---|
19 | * A flowhseet can have several sections presented above: |
---|
20 | *# |
---|
21 | FlowSheet MyFlowSheet |
---|
22 | #* |
---|
23 | * In the PARAMETERS section we can define the constants of the |
---|
24 | * FlowSheet. When the model requires thermodynamic calculations |
---|
25 | * we should create an special parameter called PP and select |
---|
26 | * the model and components of the mixture, as follows: |
---|
27 | *# |
---|
28 | PARAMETERS |
---|
29 | PP as CalcObject(Brief="Physical Properties", File="vrpp"); |
---|
30 | NComp as Integer; |
---|
31 | SET |
---|
32 | PP.Components = ["1,3-butadiene", "isobutene", "n-pentane", "1-pentene"]; |
---|
33 | PP.LiquidModel = "PR"; |
---|
34 | PP.VapourModel = "PR"; |
---|
35 | NComp = PP.NumberOfComponents; |
---|
36 | |
---|
37 | #* |
---|
38 | * In the DEVICES section the components of the process are declared. |
---|
39 | * Each device is based in a previously defined mathematical model, coming |
---|
40 | * from the EML or developed by the user. |
---|
41 | *# |
---|
42 | DEVICES |
---|
43 | STR101 as stream_therm; |
---|
44 | FLASH101 as flash; |
---|
45 | |
---|
46 | #* |
---|
47 | * Once the devices of the process were declared we can connect them |
---|
48 | * in the CONNECTIONS section |
---|
49 | *# |
---|
50 | CONNECTIONS |
---|
51 | STR101 to FLASH101.Feed; |
---|
52 | |
---|
53 | #* |
---|
54 | * In order to simulate the process the user should specify some variables |
---|
55 | *# |
---|
56 | SPECIFY |
---|
57 | STR101.F = 496.3 * "kmol/h"; |
---|
58 | STR101.T = 338 * "K"; |
---|
59 | STR101.P = 507.1 * "kPa"; |
---|
60 | STR101.v = 0.1380; |
---|
61 | STR101.z = [0.2379, 0.3082, 0.09959, 0.35431]; |
---|
62 | |
---|
63 | FLASH101.OutletV.F = 68.5 * "kmol/h"; |
---|
64 | FLASH101.OutletL.F = 400*sqrt(fl.Level) * "kmol/h"; |
---|
65 | |
---|
66 | #* |
---|
67 | * We can adjust the parameters of the devices in any point after |
---|
68 | * its declaration. |
---|
69 | *# |
---|
70 | SET |
---|
71 | FLASH101.Q = 1 * "kJ/h"; |
---|
72 | FLASH101.V = 2000 * "m^3"; |
---|
73 | FLASH101.Across = 1 * "m^2"; |
---|
74 | |
---|
75 | #* |
---|
76 | * Besides the usual specifications, dynamic models require the specification |
---|
77 | * of initial conditions. |
---|
78 | *# |
---|
79 | INITIAL |
---|
80 | FLASH101.OutletL.T = 330 *"K"; |
---|
81 | FLASH101.Level = 1 * "m"; |
---|
82 | FLASH101.OutletL.z(1) = 0.1; |
---|
83 | FLASH101.OutletL.z(2) = 0.1; |
---|
84 | FLASH101.OutletL.z(3) = 0.1; |
---|
85 | end |
---|
86 | # The end keyword informs that the flowsheet declaration have ended. |
---|
87 | |
---|
88 | |
---|