[Go to previous section: 5.9][Go to next section: 5.11]

[ Go to CENG301 Homepage][ CENG301 Notes Table of Contents]


5.10 The Separator Function: sepe

 

Here is a listing of sepe:

  function hdif=sepe(stop,sbot,ttop,tbot,in,out,t)
  % sepe: energy-balance separator module
  % function hdif=sepe(stop,sbot,ttop,tbot,in,out,t)
  % Argument List:
  % Argument    Gives
  %   stop     state of the top stream: 'v', 'l', or 's'.
  %   sbot     state of the bottom stream.
  %   ttop     the temperature of the top stream in Tdeg.
  %   tbot     the temperature of the bottom stream in Tdeg.
  %    in      the index of feed, 
  %    out     the indices of the top and bottom streams
  %              in that order.
  %     t      the fraction of each compound in the feed
  %              that goes to the top stream.
  % sepe returns the sum of the enthalpies of the exit 
  %    streams minus the enthalpy of the feed stream.
  % Ex. sepe('v','l',120,150,2,[3 5],[.9 .35])
  %    might simulate a fractionator with stream 2 as the
  %    feed, 3 as the top product and 5 as the bottom.
  %    The top comes off as a vapor at 120Tdeg and gets
  %    90% of the first component and 35% of the second.
  % For additional help and picture, see PICSEPE
  % OKB, TYLC
  global ne
  sne=size(ne);
  NS=ne(in,4:sne(2));
  NST=NS.*t;
  jt=find(NST);
  NSB=NS-NST;
  jb=find(NSB);
  setne(stop,out(1),ttop,NST(jt),jt)
  setne(sbot,out(2),tbot,NSB(jb),jb)
  hdif=sum(ne(out,3))-ne(in,3);

Also see The Separator Function: sepe. Back to Chapter 5.


[ Go to previous section: 5.9][Go to next section: 5.11]

[ Go to CENG301 Homepage][ CENG301 Notes Table of Contents]