# doc-cache created by Octave 9.1.0
# name: cache
# type: cell
# rows: 3
# columns: 7
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
bissection


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 244
 Syntax:

 [x2]=bissection(f,x1,x2)

 bissection computes the root of
  a function using the method of bissection
  given it is found between the guess values.
 bissection is an auxiliary function of
  the mccabe-thiele toolbox for GNU Octave.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
doplots


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 299
 Syntax:

 doplots(dots,updown,f,x,y,data,X,q,R)

 doplots produces a x-y diagram with
  a representation of the theoretical stages of equilibrium
  computed for a distillation column using the
  McCabe-Thiele method.
 doplots is an auxiliary function of
  the mccabe-thiele toolbox for GNU Octave.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
qR2S


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1166
 Syntax:

 [S]=qR2S(X,q,R)

 qR2S computes the reflux ratio at the bottom
  of a distillation column
  using the McCabe-Thiele method given
  the reflux ratio at the top of the column,
  the vector of the fractions of the products and the feed, and
  the feed quality.
 If feed is a saturated liquid, feed quality q = 1,
  feed quality is reset to q = 1 - 1e-10.
 qR2S is a main function of
  the mccabe-thiele toolbox for GNU Octave.

 Examples:

 # Compute the reflux ratio at the bottom of the column given
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the composition of the column's bottom product is 11 %,
 # the feed quality is 54 %, and
 # the reflux ratio R at the top of the column is 2:
 x=[0.88 0.46 0.11];
 q=0.54;
 R=2;
 S=qR2S(x,q,R)

 # Compute the reflux ratio at the bottom of the column given
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the composition of the column's bottom product is 11 %,
 # the feed is saturated liquid, and
 # the reflux ratio R at the top of the column is 2:
 x=[0.88 0.46 0.11];
 q=1;
 R=2;
 S=qR2S(x,q,R)

 See also: stages, refmin.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
refmin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1440
 Syntax:

 [R]=refmin(data,X,q)

 refmin computes the minimum value of the reflux ratio
  of a distillation column
  using the McCabe-Thiele method given
  a function y = y(x) that relates the liquid fraction x and the vapor fraction y, or
  a x-y matrix of the liquid and the vapor fractions,
  the vector of the fractions of the distillate and the feed, and
  the feed quality.
 If feed is a saturated liquid, feed quality q = 1,
  feed quality is reset to q = 1 - 1e-10.
 refmin is a main function of
  the mccabe-thiele toolbox for GNU Octave.

 Examples:

 # Compute the minimum value of the reflux ratio
 # of a distillation column given
 # a matrix that relates the liquid fraction and the vapor fraction,
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the feed quality is 54 %:
 data=[0.  0.;
       0.1 0.212;
       0.2 0.384;
       0.3 0.529;
       0.4 0.651;
       0.5 0.752;
       0.6 0.833;
       0.7 0.895;
       0.8 0.942;
       0.9 0.974;
       1.  1.];
 x=[0.88 0.46];
 q=0.54;
 r=refmin(data,x,q)

 # Compute the number of theoretical stages
 # of a distillation column given
 # the function that compute the vapor fraction given the liquid fraction,
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the feed is saturated liquid:
 y=@(x) (x.^0.9 .* (1-x).^1.2 + x);
 x=[0.88 0.46];
 q=1;
 r=refmin(y,x,q)

 See also: stages, qR2S.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
stages


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2392
 Syntax:

 [N]=stages(data,X,q,R[,updown[,fig=true]])

 stages computes the number of theoretical stages
  of a distillation column
  using the McCabe-Thiele method given
  a function y = y(x) that relates the liquid fraction x and the vapor fraction y, or
  a x-y matrix of the liquid and the vapor fractions,
  the vector of the fractions of the products and the feed,
  the feed quality, and
  the reflux ratio at the top of the column.
 If feed is a saturated liquid, feed quality q = 1,
  feed quality is reset to q = 1 - 1e-10.
 By default, theoretical stages are computed
  from the stripping section to the rectifying section, updown = true.
 If updown = false is given, theoretical stages are computed
  from the rectifying section to the stripping section.
 By default, stages plots a schematic diagram of the solution, fig = true.
 If fig = false is given, no plot is shown.
 stages is a main function of
  the mccabe-thiele toolbox for GNU Octave.

 Examples:

 # Compute the number of theoretical stages
 # of a distillation column
 # from the bottom to the top of the column given
 # a matrix that relates the liquid fraction and the vapor fraction,
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the composition of the column's bottom product is 11 %,
 # the feed quality is 54 %, and
 # the reflux ratio R at the top of the column is
 # 70 % higher that the minimum reflux ratio r:
 data=[0.  0.;
       0.1 0.212;
       0.2 0.384;
       0.3 0.529;
       0.4 0.651;
       0.5 0.752;
       0.6 0.833;
       0.7 0.895;
       0.8 0.942;
       0.9 0.974;
       1.  1.];
 x=[0.88 0.46 0.11];
 q=0.6;
 r=refmin(data,x,q);
 R=1.70*r;
 N=stages(data,x,q,R,false,false)

 # Compute the number of theoretical stages
 # of a distillation column
 # from the top to the bottom of the column given
 # the function that compute the vapor fraction given the liquid fraction,
 # the composition of the distillate is 88 %,
 # the composition of the feed is 46 %,
 # the composition of the column's bottom product is 11 %,
 # the feed is saturated liquid, and
 # the reflux ratio R at the top of the column is
 # 70 % higher that the minimum reflux ratio r
 # and plot a schematic diagram of the solution:
 y=@(x) (x.^0.9 .* (1-x).^1.2 + x);
 x=[0.88 0.46 0.11];
 q=.8;
 r=refmin(y,x,q);
 R=1.70*r;
 N=stages(y,x,q,R)

 See also: refmin, qR2S.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
stages_downup


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 316
 Syntax:

 [N,x,y]=stages_downup(f,X,R)

 stages_downup computes the number of
  theoretical stages of equilibrium of
  a distillation column using the
  McCabe-Thiele method, strating from
  the bottom to the top of the column.
 stages_downup is an auxiliary function of
  the mccabe-thiele toolbox for GNU Octave.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
stages_updown


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 316
 Syntax:

 [N,x,y]=stages_updown(f,X,R)

 stages_updown computes the number of
  theoretical stages of equilibrium of
  a distillation column using the
  McCabe-Thiele method, strating from
  the top to the bottom of the column.
 stages_updown is an auxiliary function of
  the mccabe-thiele toolbox for GNU Octave.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
 Syntax:





