#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * FlowSheet with a bio-reactor based on Monod model. *-------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: sample_bio.mso 182 2007-03-06 00:02:04Z rafael $ *--------------------------------------------------------------------*# using "types"; FlowSheet bio PARAMETERS miMax as frequency(Brief="Monod parameter", DisplayUnit='1/h'); Km as conc_mass(Brief="Monod parameter", Default=0.12); K1 as inv_conc_mass(Brief="Monod parameter", Default=0.4545); Y as coefficient(Brief="Yield biomass/substrate", Default=0.4); x2f as conc_mass(Brief="Substrate feed concentration", Default=4); VARIABLES biomass as conc_mass (Brief="Biomass concentration"); substrate as conc_mass (Brief="Substrate concentration"); mi as frequency (Brief="Specific growth rate", DisplayUnit='1/h'); D as frequency(Brief="Dilution rate F/V", DisplayUnit='1/h'); tempo as time_h (Brief="Independent variable"); EQUATIONS "Specific growth rate" mi = miMax*substrate/(Km+substrate+(K1*substrate^2)); "Biomass production" diff(biomass)/biomass = mi-D; "Substrate consumption" diff(substrate) = D*(x2f-substrate)-(biomass*mi/Y); "Independent variable to use in explicit functions" diff(tempo) = 1; "Manipulated variable" D = 0.3 * (1 + tempo/'10*h'*sin(tempo*'rad/h'))/'h'; SET miMax = 0.53 * '1/h'; INITIAL biomass = 1 * 'kg/m^3'; substrate = 0.5 * 'kg/m^3'; tempo = 0 * 'h'; OPTIONS TimeStart = 0; TimeStep = 0.5; TimeEnd = 10; TimeUnit = 'h'; # InitialFile = "bio"; # use with reverse=1 and compare with reverse=0 DAESolver(File = "reverse", reverse=0); end