source: trunk/sample/miscellaneous/sample_cstr_simple.mso @ 488

Last change on this file since 488 was 176, checked in by Argimiro Resende Secchi, 16 years ago

Fix some new language syntax.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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* Author: Rafael de Pelegrini Soares
17* $Id: sample_cstr_simple.mso 176 2007-03-04 04:56:54Z arge $
18*---------------------------------------------------------------------*#
19
20using "reactors/cstr";
21
22FlowSheet CSTR
23
24        PARAMETERS
25        Fin as flow_vol;
26        Fout as flow_vol;
27        CA0 as conc_mol;
28        CB0 as conc_mol;
29        FA0 as flow_mol;
30        FB0 as flow_mol;
31        # Troca térmica
32        Tw as temperature;
33        U as heat_trans_coeff;
34        A as area;
35        # Reação
36        k0 as frequency;
37        Ea as energy_mol (Brief = "Energia de Ativação");
38        R  as entr_mol;
39       
40        VARIABLES
41        q as heat_rate;
42        HR as energy_mol;
43        T as temperature;
44        k as frequency;
45        CA as conc_mol;
46        CB as conc_mol;
47        V as volume;
48        rA as reaction_mol;
49        rB as reaction_mol;
50        Cps as cp_mol; # (Unit='cal/mol/K');
51        T0 as temperature;
52       
53        EQUATIONS
54       
55        "Troca térmica"
56        q=U*A*(T-Tw); #j/s
57       
58        "Constante de Reação"
59        k=k0*exp(Ea/R*(1/(436.15*'K') - 1/T));
60       
61        "Taxas de Reação"
62        rA=-k*CA; # (mol/m^3/h)  >> reação de primeira ordem <<
63        rB=-rA;
64       
65        "Calor de Reação"
66        HR=-(80*250)*'cal/mol';
67       
68        "Cp da mistura"
69        Cps=(0.5*250)*3*'J/mol/K';
70       
71        "Balanço de Energia"
72        diff(T)=((U*A*(Tw-T)-FA0*Cps*(T-T0)+HR*rA*V)/(CA0*V*Cps));
73       
74        "Bal. Material Global"
75        diff(V)=Fin-Fout;
76       
77        "Bal. Material A"
78        diff(V*CA)=(FA0-Fout*CA+V*rA);
79       
80        "Bal. Material B"
81        diff(V*CB)=(FB0-Fout*CB+V*rB);
82       
83        "Temperatura da corrente de alimentação"
84        T0= (40 + 273.15 + time*200/1000/'s') * 'K';
85       
86        SET
87        Fin = 0.125997903*'m^3/h';
88        Fout = 0.125997903*'m^3/h';
89        CA0=9.3652352*'mol/m^3';
90        CB0=0*'mol/m^3';
91        FA0 = Fin*CA0;
92        FB0 = Fin*CB0;
93        Tw = (140+273)*'K';
94        k0=0.8*'1/h'; #constante para T=436.15 K
95        Ea=28960*'cal/mol';
96        R=1.98*'cal/mol/K';
97        U = 0 *'cal/m^2/K/s';#isolado
98        A = 1*'m^2';
99       
100        INITIAL
101        T = (140 + 273) * 'K';
102        V = 0.9*6*'m^3';
103        CA = 2*'mol/m^3';
104        CB = 6*'mol/m^3';
105       
106        OPTIONS
107        TimeStep = 10;
108        TimeEnd = 1200;
109end
Note: See TracBrowser for help on using the repository browser.