#*------------------------------------------------------------------- * 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. * *------------------------------------------------------------------- * Author: Maurício Carvalho Maciel * $Id: mixer.mso 313 2007-07-14 16:45:55Z arge $ *--------------------------------------------------------------------*# using "stage_separators/flash"; Model mixer as flash_steady ATTRIBUTES Pallete = true; Icon = "icon/mixer"; Brief = "Model of a mixer"; Info = " Assumptions: * thermodynamics equilibrium * adiabatic Specify: * the inlet streams"; PARAMETERS outer NComp as Integer (Brief = "Number of chemical components", Lower = 1); Ninlet as Integer (Brief = "Number of Inlet Streams", Lower = 1, Default = 2); VARIABLES in Inlet_mixer(Ninlet) as stream (Brief = "Inlet streams"); out Outlet as stream (Brief = "Outlet stream"); out Out_int as stream (Brief = "Intermediate Outlet stream"); zeroQ as energy_source (Brief="No Heat rate supplied"); CONNECTIONS Out_int to Inlet; zeroQ.OutletQ to InletQ; EQUATIONS "Flow" Out_int.F = sum(Inlet_mixer.F); for i in [1:NComp] "Composition" Out_int.F*Out_int.z(i) = sum(Inlet_mixer.F*Inlet_mixer.z(i)); end "Energy Balance" Out_int.F*Out_int.h = sum(Inlet_mixer.F*Inlet_mixer.h); "Pressure" Out_int.P = min(Inlet_mixer.P); Out_int.P = OutletV.P; "Temperature" Out_int.T = OutletV.T; "Vapourisation Fraction" Out_int.v = vfrac; Outlet.F = Inlet.F; Outlet.z = Inlet.z; Outlet.v = Inlet.v; Outlet.T = Inlet.T; Outlet.h = Inlet.h; Outlet.P = Inlet.P; zeroQ.OutletQ.Q = 0*'kW'; end