#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2008 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 - 2008 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. * *-------------------------------------------------------------------- * Sample file for CSTR *---------------------------------------------------------------------- * Author: Argimiro R. Secchi * $Id: CSTR_noniso.mso 295 2008-06-15 19:48:17Z arge $ *--------------------------------------------------------------------*# Model CSTR PARAMETERS ko as Real; At as Real; Ea as Real; R as Real; ro as Real; Cp as Real; U as Real; Hr as Real; V as Real; Tw as Real(Lower=100, Upper=1000); Cae as Real; F as Real; Te as Real; VARIABLES Ca as Real(Lower=0, Upper=500); T as Real(Lower=100, Upper=1000); EQUATIONS "Component Mass Balance" diff(Ca)*'s' = F * (Cae - Ca) / V - ko * exp(-Ea/(R*T)) * Ca; "Energy Balance" diff(T)*'s' = F * (Te - T) / V + (-Hr) * ko * exp(-Ea/(R*T)) * Ca / (ro * Cp) - U * At * (T - Tw) / (V * ro * Cp); end # Process with uncontrolled CSTR and multiple steady-states FlowSheet CSTR_bif DEVICES CSTR1 as CSTR; SET # CSTR Parameters CSTR1.R = 8.3144; CSTR1.U = 300; CSTR1.ro = 1000; CSTR1.Cp = 4; CSTR1.Hr = -7000; CSTR1.Ea = 6e4; CSTR1.ko = 320400; CSTR1.At = 25; CSTR1.V = 13.5; CSTR1.Tw = 200; # CSTR1.Tw = 300; CSTR1.Cae = 300; CSTR1.F = 3.5; # CSTR1.Te = 300; CSTR1.Te = 350; INITIAL "Concentration" CSTR1.Ca = 38.62; "Temperature" CSTR1.T = 595.65; # "Concentration" CSTR1.Ca = 50; # "Temperature" CSTR1.T = 578; # increase to 579 to change steady-state (Tw = 300, Te = 300) # "Concentration" CSTR1.Ca = 350; # "Temperature" CSTR1.T = 300; # "Concentration" CSTR1.Ca = 154.5; # "Temperature" CSTR1.T = 498; GUESS CSTR1.T = 450; CSTR1.Ca = 150; OPTIONS Dynamic = true; TimeStep = 1; TimeEnd = 300; TimeUnit = 's'; DAESolver(File = "dassl"); end