source: trunk/sample/auto/cstr_bif.mso @ 984

Last change on this file since 984 was 984, checked in by Argimiro Resende Secchi, 6 years ago
File size: 2.4 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2008 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 - 2008 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* Sample file for CSTR
17*----------------------------------------------------------------------
18* Author: Argimiro R. Secchi
19* $Id: CSTR_noniso.mso 295 2008-06-15 19:48:17Z arge $
20*--------------------------------------------------------------------*#
21
22Model CSTR
23
24        PARAMETERS
25        ko  as Real;
26        At  as Real;
27        Ea  as Real;
28        R   as Real;
29        ro  as Real;
30        Cp  as Real;
31        U   as Real;
32        Hr  as Real;
33        V   as Real;
34        Tw  as Real(Lower=100, Upper=1000);
35        Cae as Real;
36        F   as Real;
37        Te  as Real;
38
39        VARIABLES
40        Ca       as Real(Lower=0, Upper=500);
41        T        as Real(Lower=100, Upper=1000);
42
43        EQUATIONS
44
45        "Component Mass Balance"
46        diff(Ca)*'s' = F * (Cae - Ca) / V - ko * exp(-Ea/(R*T)) * Ca;
47
48        "Energy Balance"
49        diff(T)*'s' = F * (Te - T) / V + (-Hr) * ko * exp(-Ea/(R*T)) * Ca / (ro * Cp) - U * At * (T - Tw) / (V * ro * Cp);
50end
51
52# Process with uncontrolled CSTR and multiple steady-states
53FlowSheet CSTR_bif
54
55        DEVICES
56        CSTR1 as CSTR;
57
58        SET
59#       CSTR Parameters
60        CSTR1.R   = 8.3144;
61        CSTR1.U   = 300;
62        CSTR1.ro  = 1000;
63        CSTR1.Cp  = 4;
64        CSTR1.Hr  = -7000;
65        CSTR1.Ea  = 6e4;
66        CSTR1.ko  = 320400;
67        CSTR1.At  = 25;
68        CSTR1.V   = 13.5;
69        CSTR1.Tw  = 200;
70#       CSTR1.Tw  = 300;
71        CSTR1.Cae = 300;
72        CSTR1.F   = 3.5;
73#       CSTR1.Te  = 300;
74        CSTR1.Te  = 350;
75
76        INITIAL
77
78        "Concentration" CSTR1.Ca = 38.62;
79        "Temperature" CSTR1.T = 595.65;
80
81#       "Concentration" CSTR1.Ca = 50;
82#       "Temperature" CSTR1.T = 578; # increase to 579 to change steady-state (Tw = 300, Te = 300)
83
84#       "Concentration" CSTR1.Ca = 350;
85#       "Temperature" CSTR1.T = 300;
86
87#       "Concentration" CSTR1.Ca = 154.5;
88#       "Temperature" CSTR1.T = 498;
89
90        GUESS
91        CSTR1.T = 450;
92        CSTR1.Ca = 150;
93
94        OPTIONS
95        Dynamic = true;
96        TimeStep = 1;
97        TimeEnd = 300;
98        TimeUnit = 's';
99        DAESolver(File = "dassl");
100end
Note: See TracBrowser for help on using the repository browser.