#*------------------------------------------------------------------- * Model of a mixer *-------------------------------------------------------------------- * * Streams: * * "Ninlet" inlet streams * * a outlet stream * * Assumptions: * * thermodynamics equilibrium * * adiabatic * * Specify: * * the inlet streams * *---------------------------------------------------------------------- * Author: Maurício Carvalho Maciel * $Id: mixer.mso 1 2006-06-20 17:33:53Z rafael $ *--------------------------------------------------------------------*# using "stage_separators/flash"; Model mixer as flash_Steady PARAMETERS ext 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", Lower = 1); out Outlet as stream; #(Brief = "Outlet stream", Default = 1, Lower = 1, Upper = 1); out Out_int as stream; #(Brief = "Intermediate Outlet stream", Default = 1, Lower = 1, Upper = 1); zeroQ as heat_rate (Brief="No Heat rate supplied"); CONNECTIONS Out_int to Inlet; zeroQ to Q; 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; SPECIFY zeroQ = 0*"kW"; end