source: mso/eml/reactors/cstr.mso @ 1

Last change on this file since 1 was 1, checked in by Rafael de Pelegrini Soares, 16 years ago

Initial import of the library

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1#*---------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2004  the author
6*----------------------------------------------------------------------
7* Author: Paula B. Staudt
8* $Id: cstr.mso 1 2006-06-20 17:33:53Z rafael $
9*--------------------------------------------------------------------*#
10
11using "streams";
12
13Model cstr_basic
14        PARAMETERS
15ext     NComp as Integer;
16        NReac as Integer;
17        stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix");
18
19        VARIABLES
20in      Inlet  as stream;
21out     Outlet as stream_therm;
22        q    as heat_rate;
23        Vr   as volume (Brief="Reacting Volume");
24        M    as mol (Brief = "Molar total amount");
25        C(NComp)  as conc_mol(Brief="Components concentration");
26
27        EQUATIONS
28        "Molar fraction"
29        Outlet.z * M = C * Vr;
30        "Vapourisation Fraction"
31        Outlet.v = Inlet.v;
32end
33
34Model cstr_yield as cstr_basic
35        PARAMETERS
36        yield(NReac) as fraction;
37       
38        EQUATIONS
39        Outlet.z*Outlet.F = Inlet.z*Inlet.F * sumt(stoic*(1-yield));
40        "Reactor Energy Balance"
41        diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h - q;
42end
43
44
45Model cstr as cstr_basic
46        VARIABLES
47        r(NReac) as reaction_mol;
48        Hr(NReac) as heat_reaction;
49       
50        EQUATIONS
51        "Component Molar Balance"
52        diff(Outlet.z*M) = (Inlet.F*Inlet.z - Outlet.F*Outlet.z) + sumt(stoic*r)*Vr;
53
54        "Reactor Energy Balance"
55        diff(M*Outlet.h) = Inlet.F*Inlet.h - Outlet.F*Outlet.h +
56                sum(Hr*sum(stoic*r))*Vr - q;
57end
Note: See TracBrowser for help on using the repository browser.