Optimization of an Alkylation Process

Optimization of an Alkylation Process#

This process corresponds to the simplified mathematical model of the Alkylation process production. This problem was initially studied and published in the 60s and after embedded in the famous Hock and Schittkowski collection of tests for nonlinear programs, labeled as problem number 114. The schematic below depicts the Alkylation process. The description of the process depicted below is based on the original source, available in:

  • J. Bracken and G. P. McCormick, “Selected applications of nonlinear programming”

alkylation.png

Schematic of the Alkylation Process

In this simplified process, the reactor receives olefin feed, isobutane makeup and fresh acid, as well as a recycle of isobutane from the fractionator. The hydrocarbon produced in the reactor is sent to the fractionator, generating the alkylate product. As stated before, the fractionator recycles isobutane back to the reactor. The final product is the desired alkylate and spent acid is a by-product undesired that leaves the reactor. The main assumptions of this simplified process are:

  • Isobutane makeup and recycle are 100% pure.

  • The olefin feed is composed of 100% of butylene.

  • Fresh acid strength is 98%.

The relationships among process variables is derived from mass/energy balances and correlations among these same variables are a result of linear/nonlinear regression. More precisely, the equality constraints are a result of conservation of mass and the inequalities are a result of nonlinear regression among the problem variables. The table below defines the optimization variables of this constrained optimization problem. The units for mass flow rates are \([barrels/day]\), the acid addition rate is measured in \([thousands \, of \, pounds/day]\). In addition \(x_7-x_{10}\) are dimensionless quantities.

alkylation table.png

Description of all process variables for the evaporation process.

The process equations are derived from the literature and the rationale for each expression for equalities and inequalities constraints are described as follows:

From a nonlinear regression holding the reactor temperatures between 80-90°F and the acid strength from 85 to 93, a relationship between the alkylate yield, olefin feed and isobutane-to-olefin ratio is developed:

\[ x_4=x_1\left(1.12+0.13167 x_8-0.00667 x_8^2\right) \]

Carrying out a volumetric reactor balance, the isobutane makeup can be expressed as being equal to the olefine feed plus the isobutane makeup and deducting shrinkage effect. The latter is represented as 0.22 (vol/vol) of alkylate yield:

\[ x_5=1.22 x_4-x_1 \]

For the acid strength, it is correlated as a function of acid addition rate, acid dilution factor and alkylate yield:

\[ x_6=\frac{98,000 x_3}{x_4 x_9+1000 x_3} \]

For the MON, its relationship to the acid strength and external isobutane-to-olefin ration is developed via nonlinear regression as follows:

\[ x_7=86.35+1.098 x_8-0.038 x_8^2+0.325\left(x_8-89\right) \]

The external isobutane-to-olefin ration is simply the sum of the isobutane makeup and the isobutane recycled, divided by the feed:

\[ x_8=\frac{x_2+x_5}{x_1} \]

The acid dilution factor is expressed as a linear function of the F-4 performance number as follows:

\[ x_9=35.82-0.222 x_{10} \]

Lastly, the F-4 performance number is expressed as a function of the MON via linear regression:

\[ x_{10}=-133+x_7 \]

Since regression analysis was used to formulate relationships for \(x_4,x_7,x_9,x_{10}\), for these variables inequalities constraints are posed in order to specify a range in which the actual (true) value can be inferred from the regressed (estimated) value. Following the literature, such inequalities are written as:

\[\begin{split} \begin{gathered} g_1(x)=35.82-0.222 x_{10}-b x_9 \geq 0 \\ g_2(x)=-133+3 x_7-a x_{10} \geq 0 \\ g_3(x)=-g_1(x)+x_9(1 / b-b) \geq 0 \\ g_4(x)=-g_2(x)+(1 / a-a) x_{10} \geq 0 \\ g_5(x)=1.12 x_1+0.13167 x_1 x_8-0.00667 x_1 x_8^2-a x_4 \geq 0 \\ g_6(x)=57.425+1.098 x_8-0.038 x_8^2+0.325 x_6-a x_7 \geq 0 \\ g_7(x)=-g_5(x)+(1 / a-a) x_4 \geq 0 \\ g_8(x)=-g_6(x)+(1 / a-a) x_7 \geq 0 \end{gathered} \end{split}\]

In which \(a=0.99\) and \(b=0.9\) are parameters used to determine the amplitude of acceptance in which each nonlinear regression represents the true value of the estimation.

For the objective function, it is formulated as an economic optimization (Profit) problem:

\[ \mathrm{P}=c_1 x_4 x_7-c_2 x_1-c_3 x_2-c_4 x_3-c_5 x_5 \]

In which,

  • \(c_1=\) alkylate product value (dollars per octane-barrel)

  • \(c_2=\) olefin feed cost (dollars per barrel)

  • \(c_3=\) isobutane recycle costs (dollars per barrel),

  • \(c_4=\) acid addition cost (dollars per thousand pounds)

  • \(c_5=\) isobutane makeup cost (dollars per barrel).

Lastly, lower and upper bounds are imposed to the decision variables (formalized below) by the physical capabilities of the Alkylation plant and on the economics.

\[P= 5.04x_1+0.035x_2+10x_3+3.36x_5-0.063x_4 x_7\]
\[\begin{split} \begin{aligned} &\text { Bounds }\\ &\begin{aligned} 0.00001 & \leq x_1 \leq 2000 \\ 0.00001 & \leq x_2 \leq 16000 \\ 0.00001 & \leq x_3 \leq 120 \\ 0.00001 & \leq x_4 \leq 5000 \\ 0.00001 & \leq x_5 \leq 2000 \\ 85 & \leq x_6 \leq 93 \\ 90 & \leq x_7 \leq 95 \\ 3 & \leq x_8 \leq 12 \\ 1.2 & \leq x_9 \leq 4 \\ 145 & \leq x_{10} \leq 162 \end{aligned} \end{aligned} \end{split}\]
\[\begin{split} \begin{aligned} &\text { Constraints }\\ &\begin{gathered} g_1(x)=35.82-0.222 x_{10}-b x_9 \geq 0 \\ g_2(x)=-133+3 x_7-a x_{10} \geq 0 \\ g_3(x)=-g_1(x)+x_9(1 / b-b) \geq 0 \\ g_4(x)=-g_2(x)+(1 / a-a) x_{10} \geq 0 \end{gathered}\\ &\begin{gathered} g_5(x)=1.12 x_1+0.13167 x_1 x_8-0.00667 x_1 x_8^2-a x_4 \geq 0 \\ g_6(x)=57.425+1.098 x_8-0.038 x_8^2+0.325 x_6-a x_7 \geq 0 \end{gathered}\\ &\begin{aligned} & g_7(x)=-g_5(x)+(1 / a-a) x_4 \geq 0 \\ & g_8(x)=-g_6(x)+(1 / a-a) x_7 \geq 0 \end{aligned}\\ &g_9(x)=1.22 x_4-x_1-x_5=0\\ &g_{10}(x)=98000 x_3 /\left(x_4 x_9+1000 x_3\right)-x_6=0\\ &g_{11}(x)=\left(x_2+x_5\right) / x_1-x_8=0\\ &a=0.99 \text { and } b=0.9 \end{aligned} \end{split}\]

Find the optimal operating point of this process flowsheet using constrained optimization techniques covered in Lecture 3. You should:

  1. Formalize (write-down) the optimization problem, making the necessary assumptions/simplifications

  2. Use scipy.optimize.minimize appropriately for the constrained optimization problem

  3. Compare your results against the optimum found in the reported literature.

  4. Discuss your code implementation and results during the presentation.