source: trunk/sample/miscellaneous/sample_bio.mso @ 391

Last change on this file since 391 was 182, checked in by Rafael de Pelegrini Soares, 17 years ago

More updates on samples to run on the new language

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 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        D       as frequency(Brief="Dilution rate F/V", DisplayUnit='1/h');
28        Km      as conc_mass(Brief="Monod parameter", Default=0.12);
29        K1      as inv_conc_mass(Brief="Monod parameter", Default=0.4545);
30        Y       as coefficient(Brief="Yield biomass/substrate", Default=0.4);
31        x2f     as conc_mass(Brief="Substrate feed concentration", Default=4);
32 
33        VARIABLES
34        biomass   as conc_mass (Brief="Biomass concentration");
35        substrate as conc_mass (Brief="Substrate concentration");
36        mi        as frequency (Brief="Specific growth rate", DisplayUnit='1/h');
37       
38        EQUATIONS
39        "Specific growth rate"
40        mi = miMax*substrate/(Km+substrate+(K1*substrate^2));
41       
42        "Biomass production"
43        diff(biomass)/biomass = mi-D;
44       
45        "Substrate consumption"
46        diff(substrate) = D*(x2f-substrate)-(biomass*mi/Y);
47       
48        SET
49        miMax = 0.53  *  '1/h';
50        D      = 0.3  *  '1/h';
51       
52        INITIAL
53        biomass = 1  *  'kg/m^3';
54        substrate = 0.5  *  'kg/m^3';
55 
56        OPTIONS
57        TimeStep = 0.5;
58        TimeEnd = 10;
59        TimeUnit = 'h';
60        SparseAlgebra = true;
61end
Note: See TracBrowser for help on using the repository browser.