source: trunk/sample/miscellaneous/sample_reverse.mso

Last change on this file was 982, checked in by Argimiro Resende Secchi, 6 years ago
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* FlowSheet with a bio-reactor based on Monod model.
17*--------------------------------------------------------------------
18* Author: Rafael de Pelegrini Soares
19* $Id: sample_bio.mso 182 2007-03-06 00:02:04Z rafael $
20*--------------------------------------------------------------------*#
21
22using "types";
23
24FlowSheet bio
25        PARAMETERS
26        miMax   as frequency(Brief="Monod parameter", DisplayUnit='1/h');
27        Km      as conc_mass(Brief="Monod parameter", Default=0.12);
28        K1      as inv_conc_mass(Brief="Monod parameter", Default=0.4545);
29        Y       as coefficient(Brief="Yield biomass/substrate", Default=0.4);
30        x2f     as conc_mass(Brief="Substrate feed concentration", Default=4);
31 
32        VARIABLES
33        biomass   as conc_mass (Brief="Biomass concentration");
34        substrate as conc_mass (Brief="Substrate concentration");
35        mi        as frequency (Brief="Specific growth rate", DisplayUnit='1/h');
36        D         as frequency(Brief="Dilution rate F/V", DisplayUnit='1/h');
37        tempo     as time_h (Brief="Independent variable");
38       
39        EQUATIONS
40        "Specific growth rate"
41        mi = miMax*substrate/(Km+substrate+(K1*substrate^2));
42       
43        "Biomass production"
44        diff(biomass)/biomass = mi-D;
45       
46        "Substrate consumption"
47        diff(substrate) = D*(x2f-substrate)-(biomass*mi/Y);
48       
49        "Independent variable to use in explicit functions"
50        diff(tempo) = 1;
51       
52        "Manipulated variable"
53        D = 0.3 * (1 + tempo/'10*h'*sin(tempo*'rad/h'))/'h';
54       
55        SET
56        miMax = 0.53  *  '1/h';
57       
58        INITIAL
59        biomass = 1  *  'kg/m^3';
60        substrate = 0.5  *  'kg/m^3';
61        tempo = 0 * 'h';
62 
63        OPTIONS
64        TimeStart = 0;
65        TimeStep = 0.5;
66        TimeEnd = 10;
67        TimeUnit = 'h';
68#       InitialFile = "bio"; # use with reverse=1 and compare with reverse=0
69    DAESolver(File = "reverse", reverse=0);
70end
Note: See TracBrowser for help on using the repository browser.