#*------------------------------------------------------------------- * 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 $ *--------------------------------------------------------------------*# using "types"; Model CSTR PARAMETERS ko as frequency; At as area; Ea as energy_mol; R as Real (Unit ='kJ/mol/K'); ro as dens_mass; Cp as cp_mass; U as heat_trans_coeff; Hr as heat_reaction; V as volume; Tw as temperature(Lower=100,Upper=1000); Cae as conc_mol; F as flow_vol; Te as temperature; VARIABLES Ca as conc_mol(Lower=0,Upper=500); T as temperature(Lower=100,Upper=1000); EQUATIONS "Component Mass Balance" diff(Ca)= F * (Cae - Ca) / V - ko * exp(-Ea/(R*T)) * Ca; "Energy Balance" diff(T) = 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* 'kJ/kmol/K'; CSTR1.U = 300 * 'kJ/h/m^2/K'; CSTR1.ro = 1000 * 'kg/m^3'; CSTR1.Cp = 4*'kJ/kg/K'; CSTR1.Hr = -7000 * 'kJ/kmol'; CSTR1.Ea = 6e4 * 'kJ/kmol'; CSTR1.ko = 89 * '1/s'; CSTR1.At = 25 * 'm^2'; CSTR1.V = 13.5 * 'm^3'; CSTR1.Tw = 200*'K'; # CSTR1.Tw = 300*'K'; CSTR1.Cae = 300*'kmol/m^3'; CSTR1.F = 3.5*'m^3/h'; # CSTR1.Te = 300*'K'; CSTR1.Te = 350*'K'; INITIAL # "Concentration" CSTR1.Ca = 38.62*'kmol/m^3'; # "Temperature" CSTR1.T = 595.65*'K'; # "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*'kmol/m^3'; "Temperature" CSTR1.T = 498*'K'; GUESS CSTR1.T = 450*'K'; CSTR1.Ca = 150*'kmol/m^3'; OPTIONS Dynamic = true; TimeStep = 0.1; TimeEnd = 30; TimeUnit = 'h'; DAESolver(File = "dassl"); end