source: trunk/sample/auto/cstr_bifd.mso @ 1009

Last change on this file since 1009 was 984, checked in by Argimiro Resende Secchi, 7 years ago
File size: 2.5 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
22using "types";
23
24Model CSTR
25
26        PARAMETERS
27        ko  as frequency;
28        At  as area;
29        Ea  as energy_mol;
30        R   as Real (Unit ='kJ/mol/K');
31        ro  as dens_mass;
32        Cp  as cp_mass;
33        U   as heat_trans_coeff;
34        Hr  as heat_reaction;
35        V   as volume;
36        Tw  as temperature(Lower=100,Upper=1000);
37        Cae as conc_mol;
38        F   as flow_vol;
39        Te  as temperature;
40
41        VARIABLES
42        Ca       as conc_mol(Lower=0,Upper=500);
43        T        as temperature(Lower=100,Upper=1000);
44       
45       
46
47
48        EQUATIONS
49
50        "Component Mass Balance"
51        diff(Ca)= F * (Cae - Ca) / V - ko * exp(-Ea/(R*T)) * Ca;
52
53        "Energy Balance"
54        diff(T) = F * (Te - T) / V + (-Hr) * ko * exp(-Ea/(R*T)) * Ca / (ro * Cp) - U * At * (T - Tw) / (V * ro * Cp);
55end
56
57# Process with uncontrolled CSTR and multiple steady-states
58FlowSheet CSTR_bif
59
60        DEVICES
61        CSTR1 as CSTR;
62
63        SET
64#       CSTR Parameters
65        CSTR1.R   = 8.3144* 'kJ/kmol/K';
66        CSTR1.U   = 300 * 'kJ/h/m^2/K';
67        CSTR1.ro  = 1000 * 'kg/m^3';
68        CSTR1.Cp  = 4*'kJ/kg/K';
69        CSTR1.Hr  = -7000 * 'kJ/kmol';
70        CSTR1.Ea  = 6e4 * 'kJ/kmol';
71        CSTR1.ko  = 89 * '1/s';
72        CSTR1.At  = 25 * 'm^2';
73        CSTR1.V   = 13.5 * 'm^3';
74        CSTR1.Tw  = 200*'K';
75#       CSTR1.Tw  = 300*'K';
76        CSTR1.Cae = 300*'kmol/m^3';
77        CSTR1.F   = 3.5*'m^3/h';
78#       CSTR1.Te  = 300*'K';
79        CSTR1.Te  = 350*'K';
80
81
82       
83
84        INITIAL
85
86#       "Concentration" CSTR1.Ca = 38.62*'kmol/m^3';
87#       "Temperature" CSTR1.T = 595.65*'K';
88
89#       "Concentration" CSTR1.Ca = 50;
90#       "Temperature" CSTR1.T = 578; # increase to 579 to change steady-state (Tw = 300, Te = 300)
91
92#       "Concentration" CSTR1.Ca = 350;
93#       "Temperature" CSTR1.T = 300;
94
95        "Concentration" CSTR1.Ca = 154.5*'kmol/m^3';
96        "Temperature" CSTR1.T = 498*'K';
97
98        GUESS
99        CSTR1.T = 450*'K';
100        CSTR1.Ca = 150*'kmol/m^3';
101
102        OPTIONS
103        Dynamic = true;
104        TimeStep = 0.1;
105        TimeEnd = 30;
106        TimeUnit = 'h';
107        DAESolver(File = "dassl");
108end
Note: See TracBrowser for help on using the repository browser.