#*------------------------------------------------------------------- * 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, Paula B. Staudt, Rafael P. Soares * $Id: splitter.mso 910 2010-02-20 03:24:41Z arge $ *--------------------------------------------------------------------*# using "streams"; Model splitter_n ATTRIBUTES Pallete = false; Icon = "icon/splitter_n"; Brief = "Model of a splitter (NOT Handled by the GUI)"; Info = "== Assumptions == * thermodynamics equilibrium * adiabatic == Specify == * the inlet stream * (Noutlet - 1) fraction of split of the outlet streams: frac(i) = (Mole Flow of the outlet stream i / Mole Flow of the inlet stream) where i = 1, 2,...,Noutlet "; PARAMETERS NOutlet as Integer (Brief = "Number of Outlet Streams", Lower = 1); VARIABLES in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5001, Symbol="_{in}"); out Outlet(NOutlet) as stream (Brief = "Outlet streams", PosX=1, PosY=0.5, Symbol="_{out}"); frac(NOutlet) as fraction (Brief = "Distribution of Outlets", Default=0.5, Symbol="\phi"); EQUATIONS sum(frac) = 1; for i in [1:NOutlet] do "Flow" Outlet(i).F = Inlet.F*frac(i); "Composition" Outlet(i).z = Inlet.z; "Pressure" Outlet(i).P = Inlet.P; "Enthalpy" Outlet(i).h = Inlet.h; "Temperature" Outlet(i).T = Inlet.T; "Vapourisation Fraction" Outlet(i).v = Inlet.v; end end Model splitter2 ATTRIBUTES Pallete = true; Icon = "icon/splitter_column"; Brief = "Splitter with 2 outlet streams"; Info = "== Assumptions == *Thermodynamics equilibrium *Adiabatic == Specify == * The inlet stream * One FlowRatios of split of the outlet streams: FlowRatios(i) = (Mole Flow of the outlet stream i / Mole Flow of the inlet stream) where i = 1, 2 "; VARIABLES in Inlet as stream (Brief = "Inlet stream", PosX=0.5, PosY=0, Symbol="_{in}"); out Outlet1 as stream (Brief = "Outlet stream 1", PosX=0.25, PosY=1, Symbol="_{out1}"); out Outlet2 as stream (Brief = "Outlet stream 2", PosX=0.75, PosY=1, Symbol="_{out2}"); FlowRatios(2) as fraction (Brief = "Distribution of Outlets", Default=0.33, Symbol="\phi"); EQUATIONS "Normalize Flow Ratios" sum(FlowRatios) = 1; "Flow" Outlet1.F = Inlet.F * FlowRatios(1); Outlet1.F + Outlet2.F = Inlet.F; "Composition" Outlet1.z = Inlet.z; Outlet2.z = Inlet.z; "Pressure" Outlet1.P = Inlet.P; Outlet2.P = Inlet.P; "Enthalpy" Outlet1.h = Inlet.h; Outlet2.h = Inlet.h; "Temperature" Outlet1.T = Inlet.T; Outlet2.T = Inlet.T; "Vapourisation Fraction" Outlet1.v = Inlet.v; Outlet2.v = Inlet.v; end Model splitter3 ATTRIBUTES Pallete = true; Icon = "icon/splitter"; Brief = "Model of a splitter with 3 outlet streams"; Info = "== Assumptions == * Thermodynamics equilibrium * Adiabatic == Specify == *The inlet stream *Two FlowRatios of split of the outlet streams: FlowRatios(i) = (Mole Flow of the outlet stream i / Mole Flow of the inlet stream) where i = 1, 2, 3 "; VARIABLES in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.5001, Symbol="_{in}"); out Outlet1 as stream (Brief = "Outlet stream 1", PosX=1, PosY=0.25, Symbol="_{Out1}"); out Outlet2 as stream (Brief = "Outlet stream 2", PosX=1, PosY=0.5059, Symbol="_{Out2}"); out Outlet3 as stream (Brief = "Outlet stream 3", PosX=1, PosY=0.75, Symbol="_{Out3}"); FlowRatios(3) as fraction (Brief = "Distribution of Outlets", Default=0.33, Symbol="\phi"); EQUATIONS "Normalize Flow Ratios" sum(FlowRatios) = 1; "Outlet1 Flow" Outlet1.F = Inlet.F*FlowRatios(1); "Outlet2 Flow" Outlet2.F = Inlet.F*FlowRatios(2); "Outlet3 Flow" Outlet3.F = Inlet.F*FlowRatios(3); "Outlet1 Composition" Outlet1.z = Inlet.z; "Outlet2 Composition" Outlet2.z = Inlet.z; "Outlet3 Composition" Outlet3.z = Inlet.z; "Outlet1 Pressure" Outlet1.P = Inlet.P; "Outlet2 Pressure" Outlet2.P = Inlet.P; "Outlet3 Pressure" Outlet3.P = Inlet.P; "Outlet1 Enthalpy" Outlet1.h = Inlet.h; "Outlet2 Enthalpy" Outlet2.h = Inlet.h; "Outlet3 Enthalpy" Outlet3.h = Inlet.h; "Outlet1 Temperature" Outlet1.T = Inlet.T; "Outlet2 Temperature" Outlet2.T = Inlet.T; "Outlet3 Temperature" Outlet3.T = Inlet.T; "Outlet1 Vapourisation Fraction" Outlet1.v = Inlet.v; "Outlet2 Vapourisation Fraction" Outlet2.v = Inlet.v; "Outlet3 Vapourisation Fraction" Outlet3.v = Inlet.v; end Model splitter_column ATTRIBUTES Pallete = true; Icon = "icon/splitter_column"; Brief = "Splitter with 2 outlet streams to be used with column section model"; Info = "== Assumptions == *Thermodynamics equilibrium *Adiabatic == Specify == * The inlet stream * One Split Flow of the outlet stream: **SplitFlow_RefluxStream: split of the outlet Reflux stream **SplitFlow_DistillateStream: split of the outlet Distillate stream OR * The inlet stream and the RefluxRatio "; VARIABLES in Inlet as stream (Brief = "Inlet stream", PosX=0.5, PosY=0, Symbol="_{in}"); out Reflux as stream (Brief = "Reflux stream", PosX=0.25, PosY=1, Symbol="_{reflux}"); out Distillate as stream (Brief = "Distillate stream", PosX=0.75, PosY=1, Symbol="_{distillate}"); SplitFlow_RefluxStream as fraction (Brief = "split of the outlet Reflux stream", Default=0.33); SplitFlow_DistillateStream as fraction (Brief = "split of the outlet Distillate stream", Default=0.33); RefluxRatio as positive (Brief = "Reflux Ratio", Default=10, Lower = 0.05); EQUATIONS "Reflux Ratio" #Reflux.F*RefluxRatio = SplitFlow_RefluxStream*(Reflux.F*RefluxRatio + Reflux.F); SplitFlow_RefluxStream*(1 + RefluxRatio) = RefluxRatio; "Normalize Flow Ratios" SplitFlow_RefluxStream + SplitFlow_DistillateStream = 1; "Flow" Reflux.F = Inlet.F * SplitFlow_RefluxStream; Inlet.F = Reflux.F + Distillate.F; "Composition" Reflux.z = Inlet.z; Distillate.z = Inlet.z; "Pressure" Reflux.P = Inlet.P; Distillate.P = Inlet.P; "Enthalpy" Reflux.h = Inlet.h; Distillate.h = Inlet.h; "Temperature" Reflux.T = Inlet.T; Distillate.T = Inlet.T; "Vapourisation Fraction" Reflux.v = Inlet.v; Distillate.v = Inlet.v; end