ponchon-savarit
Toolbox for GNU-Octave
# e.g. this call installs version 1.0.0
pkg install https://github.com/aumpierre-unb/Ponchon-Savarit-for-GNU-Octave/archive/refs/tags/v1.0.0.tar.gz
pkg load ponchon-savarit
You can cite all versions (both released and pre-released), by using DOI 10.5281/zenodo.7133683. This DOI represents all versions, and will always resolve to the latest one.
The following is a very short introduction to the ponchon-savarit
toolbox for GNU Octave.
This text is divided in two main sections: The Theory and The ponchon-savarit
Toolbox.
The Ponchón-Savarit graphical method is a method to calculate the number of theoretical stages of equilibrium of a distillation column for a two component mixture. It allows for variations on the heat of vaporization, the most demanding premise of the McCabe-Thiele method. Ponchón-Savarit method demands that the column be adiabatic, except for its bottom and top, where there must heat exchange in order to maintain reflux streams.
Distillation is a unit operation based on the difference of volatility to separate different chemical species of a mixture and on gravity to separate vapor and liquid streams. There are several types of distillation.
Typically, continuous distillation is performed in a vertical column fed at its intermediate section while products at its top and bottom are recovered. As a rule of thumb, the higher the column, the higher the number of stages of equilibrium and the best is the separations of the components of the mixture fed.
A theoretical stage of equilibrium is an abstract control volume such that the effluent currents are all in thermodynamic equilibrium. All multistage operations are based on the concept of stage of equilibrium.
The global and specific material balances and the enthalpy balance for any equilibrium stage n are given by
where Ln+1 and Vn are the liquid and the vapor streams, xn+1 and yn are compositions of liquid and vapor streams, and hn+1 and Hn are the material enthalpy of liquid and vapor streams.
For any theoretical stage of the rectifying section,
where
Also, the material balances at the top of the column are
where D, xD and hD are the distillate stream and its composition. It follows that
The ratio between the distillate D and the refluxing current LN+1 is the reflux ratio at the top of the column,
Given the enthalpy diagram of the vapor and the liquid at equilibrium and the composition of the distillate xD and the reflux ratio R it is possible to calculate x
The balances of the column is given by
where xF and hF are the composition and the enthalpy of the feed and
The enthalpy of the feed hF can be calculated from the composition xF and the quality q of the feed,
So that
Analogously to the rectifying section,
ponchon-savarit
provides the following functions:
stages
refmin
qR2S
qS2R
RS2q
stages
computes the number of theoretical stages of a distillation column using the Ponchón-Savarit method given a x-h-y-H matrix of the liquid and the vapor fractions at equilibrium and their enthalpies, the vector of the fractions of the products and the feed and two paramaeters aong the feed quality, the reflux ratio at the top of the column and the reflux ratio at the bottom of the column.
Syntax:
N=stages(data,X,q,R,:[,fig=true])
N=stages(data,X,q,:,S[,fig=true])
N=stages(data,X,:,R,S[,fig=true])
By default, stages plots a schematic diagram of the solution, fig = true. If fig = false is given, no plot is shown.
By default, stages
plots a schematic diagram of the solution, fig = true.
Examples:
Compute the number of theoretical stages of a distillation column for acetone and methanol from the bottom to the top of the column given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 93 %, the composition of the feed is 41 %, the composition of the bottoms is 7 %, the feed is a saturated liquid and the reflux ratio at the top of the column is 55 % higher that the minimum reflux ratio, and plot a schematic diagram of the solution:
data=[2.5e-4 3.235 1.675e-3 20.720; # enthalpy in kcal/mol
0.05 2.666 0.267 20.520;
0.1 2.527 0.418 20.340;
0.15 2.459 0.517 20.160;
0.2 2.422 0.579 20.000;
0.3 2.384 0.665 19.640;
0.4 2.358 0.729 19.310;
0.5 2.338 0.779 18.970;
0.6 2.320 0.825 18.650;
0.7 2.302 0.87 18.310;
0.8 2.284 0.915 17.980;
0.9 2.266 0.958 17.680;
1. 2.250 1. 17.390];
x=[0.93;0.41;0.07];
[r,s]=refmin(data,x,q=1)
N=stages(data,x,q,R=1.55*r)
Compute the number of theoretical stages of a distillation column for oxygen and nitrogen from the bottom to the top of the column given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 44 %, the composition of the bottoms is 8 %, the feed quality is 55 % and the reflux ratio at the bottom of the column is 46 % higher that the minimum reflux ratio and plot a schematic diagram of the solution:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.88;0.44;0.08];
[r,s]=refmin(data,x,q=0.55)
N=stages(data,x,q,:,S=1.46*s)
Compute the number of theoretical stages of a distillation column for oxygen and nitrogen from the bottom to the top of the column given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 92 %, the composition of the feed is 59 %, the composition of the bottoms is 9 %, the reflux ratio at the bottom of the column is 1.9, the reflux ratio at the top of the column is 1.5:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.92;0.59;0.09];
q=RS2q(data,x,R=1.5,S=1.9)
N=stages(data,x,:,R,S,fig=false)
refmin
computes the minimum value of the reflux ratio of a distillation column using the Ponchón-Savarit method given a x-h-y-H matrix of the liquid and the vapor fractions at equilibrium and their enthalpies, the vector of the fractions of the products and the feed and the feed quality.
Syntax:
[R,S]=refmin(data,X,q)
If feed is saturated liquid q = 1, q is reset to q = 1 - 1e-10.
Examples:
Compute the minimum value of the reflux ratio of a distillation column for oxygen and nitrogen given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 46 %, the composition of the column's bottom product is 11 % and the feed quality is 52 %:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.88;0.46;0.08];
[r,s]=refmin(data,x,q=0.52)
Compute the minimum value of the reflux ratio of a distillation column for acetone and methanol given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 46 %, the composition of the column's bottom product is 11 % and the feed is a saturated liquid:
data=[2.5e-4 3.235 1.675e-3 20.720; # enthalpy in kcal/mol
0.05 2.666 0.267 20.520;
0.1 2.527 0.418 20.340;
0.15 2.459 0.517 20.160;
0.2 2.422 0.579 20.000;
0.3 2.384 0.665 19.640;
0.4 2.358 0.729 19.310;
0.5 2.338 0.779 18.970;
0.6 2.320 0.825 18.650;
0.7 2.302 0.87 18.310;
0.8 2.284 0.915 17.980;
0.9 2.266 0.958 17.680;
1 2.250 1 17.390];
x=[0.88;0.46;0.08];
[r,s]=refmin(data,x,q=1)
qR2S
computes the reflux ratio at the bottom of a distillation column using the Ponchón-Savarit method given a x-h-y-H matrix of the liquid and the vapor fractions at equilibrium and their enthalpies, the vector of the fractions of the products and the feed, the feed quality and the reflux ratio at the top of the column.
Syntax:
S=qR2S(data,X,q,R)
Examples:
Compute the reflux ratio at the bottom of a distillation column for acetone and methanol given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 93 %, the composition of the feed is 41 %, the composition of the bottoms is 7 %, the feed is a saturated liquid and the reflux ratio at the top of the column is 2:
data=[2.5e-4 3.235 1.675e-3 20.720; # enthalpy in kcal/mol
0.05 2.666 0.267 20.520;
0.1 2.527 0.418 20.340;
0.15 2.459 0.517 20.160;
0.2 2.422 0.579 20.000;
0.3 2.384 0.665 19.640;
0.4 2.358 0.729 19.310;
0.5 2.338 0.779 18.970;
0.6 2.320 0.825 18.650;
0.7 2.302 0.87 18.310;
0.8 2.284 0.915 17.980;
0.9 2.266 0.958 17.680;
1. 2.250 1. 17.390];
x=[0.93;0.41;0.07];
S=qR2S(data,x,1,2)
Compute the reflux ratio at the bottom of the column of a distillation column for oxygen and nitrogen given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 44 %, the composition of the bottoms is 8 %, the feed quality is 55 % and the reflux ratio at the top of the column is 2:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.88;0.44;0.08];
S=qR2S(data,x,0.55,2)
qS2R
computes the reflux ratio at the top of a distillation column using the Ponchón-Savarit method given a x-h-y-H matrix of the liquid and the vapor fractions at equilibrium and their enthalpies, the vector of the fractions of the products and the feed, the feed quality and the reflux ratio at the bottom of the column.
Syntax:
R=qS2R(data,X,q,R)
Examples:
Compute the reflux ratio at the top of a distillation column for acetone and methanol given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 93 %, the composition of the feed is 41 %, the composition of the bottoms is 7 %, the feed is a saturated liquid and the reflux ratio at the bottom of the column is 1.7:
data=[2.5e-4 3.235 1.675e-3 20.720; # enthalpy in kcal/mol
0.05 2.666 0.267 20.520;
0.1 2.527 0.418 20.340;
0.15 2.459 0.517 20.160;
0.2 2.422 0.579 20.000;
0.3 2.384 0.665 19.640;
0.4 2.358 0.729 19.310;
0.5 2.338 0.779 18.970;
0.6 2.320 0.825 18.650;
0.7 2.302 0.87 18.310;
0.8 2.284 0.915 17.980;
0.9 2.266 0.958 17.680;
1. 2.250 1. 17.390];
x=[0.93;0.41;0.07];
R=qS2R(data,x,1,1.7)
Compute the reflux ratio at the top of a distillation column for oxygen and nitrogen given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 44 %, the composition of the bottoms is 8 %, the feed quality is 55 % and the reflux ratio at the bottom of the column is 1.3:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.88;0.44;0.08];
R=qS2R(data,x,0.55,1.3)
RS2q
computes the feed quality of a distillation column using the Ponchón-Savarit method given a x-h-y-H matrix of the liquid and the vapor fractions at equilibrium and their enthalpies, the vector of the fractions of the products and the feed, the reflux ratio at the top of the column and the reflux ratio at the bottom of the column.
Syntax:
q=RS2q(data,X,q,R)
Examples:
Compute the feed quality of a distillation column for acetone and methanol given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 93 %, the composition of the feed is 41 %, the composition of the bottoms is 7 %, the reflux ratio at the top of the column is 2 and the reflux ratio at the bottom of the column is 1.7:
data=[2.5e-4 3.235 1.675e-3 20.720; # enthalpy in kcal/mol
0.05 2.666 0.267 20.520;
0.1 2.527 0.418 20.340;
0.15 2.459 0.517 20.160;
0.2 2.422 0.579 20.000;
0.3 2.384 0.665 19.640;
0.4 2.358 0.729 19.310;
0.5 2.338 0.779 18.970;
0.6 2.320 0.825 18.650;
0.7 2.302 0.87 18.310;
0.8 2.284 0.915 17.980;
0.9 2.266 0.958 17.680;
1. 2.250 1. 17.390];
x=[0.93;0.41;0.07];
q=RS2q(data,x,2.1,1.7)
Compute the feed quality of a distillation column for oxygen and nitrogen given a matrix that relates the liquid and the vapor fractions and their enthalpies at equilibrium, the composition of the distillate is 88 %, the composition of the feed is 44 %, the composition of the bottoms is 8 %, the reflux ratio at the top of the column is 2 and the reflux ratio at the bottom of the column is 1.3:
data=[0. 0.420 0. 1.840; # enthalpy in kcal/mmol
0.075 0.418 0.193 1.755;
0.17 0.415 0.359 1.685;
0.275 0.410 0.50 1.625;
0.39 0.398 0.63 1.570;
0.525 0.378 0.75 1.515;
0.685 0.349 0.86 1.465;
0.88 0.300 0.955 1.425;
1. 0.263 1. 1.405];
x=[0.88;0.44;0.08];
q=RS2q(data,x,2,1.3)
McCabe-Thiele-for-GNU-Octave, Psychrometrics-for-GNU-Octave, Internal-Fluid-Flow-for-GNU-Octave.
Copyright © 2022 2023 2024 Alexandre Umpierre
email: aumpierre@gmail.com