The Inside-Out Approach to Refinery-Wide Optimization - Industrial

Department of Chemical Engineering, Texas Tech University, Lubbock, Texas 79409-3121 ... Publication Date (Web): May 27, 2007 ... to the same solution...
0 downloads 0 Views 147KB Size
Ind. Eng. Chem. Res. 2007, 46, 4645-4653

4645

The Inside-Out Approach to Refinery-Wide Optimization Dale D. Slaback† and James B. Riggs* Department of Chemical Engineering, Texas Tech UniVersity, Lubbock, Texas 79409-3121

This paper presents a computational comparison between the inside-out approach to refinery-wide optimization, which optimizes the model equations with fixed physical properties and updates the approximate physical property models after each time the model equations are optimized, and the full-scale optimization approach, which solves the optimization problem using the simultaneous solution of the model equations and physical property models. For the refinery model in this study, the inside-out approach decreases the computational time (when compared to full-scale optimization) by nearly 1order of magnitude while converging to the same solution obtained using the full-scale optimization approach with a high degree of reliability. By varying the number of units in the optimization case study, the dependence of CPU time with the number of model equations was assessed for the full-scale and inside-out methods. Extrapolation of these results to a large integrated refinery (i.e., 1 million model equations) indicates that the full-scale approach would require approximately 80 times as much CPU to reach a converged solution as the inside-out optimization approach. Introduction Process optimization entails a wide range of problem types and corresponding solutions procedures. Certain simple processes can be optimized by simply using process knowledge. Other processes can be optimized by operating against a known set of process constraints. For this case, model predictive control coupled with an economic-based linear program, which is used to determine the optimal set of operative constraints, is an effective approach. Other cases require a full nonlinear analysis, i.e., a full set of nonlinear model equations is necessary to attain a meaningful optimization solution. An example of this type of problem is the optimization of an ethylene plant. The entire ethylene plant must be considered because of the economic coupling between the furnace, separation and refrigeration sections. Moreover, due to the nonlinearity of the process and the presence of unconstrained optimization solutions, an LP solution is inadequate. Similarly, nonlinear optimization solutions are necessary for refinery optimization. In earlier times, refiners were able to boost their profits by developing new processing technologies, e.g., fluidized catalytic cracker processes, naphtha catalytic reformer processes, and hydrodesulfurization processes. Over the last 20-30 years there have been little in the way of development of significant new processing technologies for refiners. To maintain profit in the face of declining margins,1 refineries have turned to process automation (process control and optimization) to improve the economic operation of the refinery. The proper use of these technologies allows a refinery to meet all operational, environmental, and safety constraints while maximizing the steadystate rate of profit generation. As a result, the profit margin for the refinery can usually be increased significantly. Ongoing advancements in process instrumentation and computing technology continue to provide for cheaper and more reliable process automation. Currently, most refiners use nonlinear optimization of key units (e.g, crude, FCC, hydrocraker, and reformer units) and use a linear program (LP) to determine the optimum operating conditions for the entire refinery and coordinate the nonlinear * Correspondent author. Tel: 806 742 1765. Fax: 806 742 1765. E-mail: [email protected]. † Current address: ExxonMobil Chemicals, Baytown, TX 77520.

unit optimizers. The LP is developed by linearizing the nonlinear process models of the refining units and nonlinear process constraints at a particular set of operating conditions. Usually LPs are augmented to consider the nonlinear blending relationships (e.g., octane and RVP), requiring an iterative solution of the resulting nonlinear programming problem to determine the optimum solution. Unfortunately, LP models for refineries rarely accurately represent the process and constraints. Continuous changes in feed quality, market prices, and consumer demand force the process operating conditions to be continually changed to meet production specifications. Moreover, the linear models used in the LP are usually infrequently updated to account for process changes. Because many of the processes used in the chemical process industries, especially those involving chemical reaction, are inherently nonlinear, a linear model cannot accurately represent the process when its operating conditions change. In addition, in certain cases the solution does not lie on a constraint, further undermining the effectiveness of the LP optimizer because an LP solution assumes that the optimum lies at the intersection of constraints.2 In conjunction with a refinery-wide LP, many refineries use single-unit optimization for key process units, e.g., crude units, FCC units, reformers, and hydrocrackers. In this approach, a full set of first-principle nonlinear models of each unit within the process is individually optimized. The single-unit optimum conditions are then coordinated using an LP. Because this approach only considers a subset of the entire problem for each nonlinear optimization, maintaining consistency between the individual unit optimization and the overall process objectives can be difficult.3 The most significant drawback to single-unit optimization is the need for transfer prices. Transfer prices represent the value of intermediate streams in the process and are usually estimated using the results of the plant-wide LP. Transfer prices can have a dominate affect on the optimization solution. Because these intermediate streams are simply fed from one unit in the process to another, they are not actually purchased or sold. For this reason, accurate values for the worth of these streams cannot be obtained based upon market value. Additionally, the value of these streams is dependent upon several other conditions, including quality, rate, tankage considerations, lifting schedule, current inventories, and future plans.3

10.1021/ie0608814 CCC: $37.00 © 2007 American Chemical Society Published on Web 05/27/2007

4646

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007

Alternatively, shadow prices, which come from the economic LP and indicate the change in the optimum value of the economic objective function per unit change in an active constraint, can be used to represent the values of the intermediate streams in the process. Unfortunately, shadow prices become invalid when the process changes to a different operating condition, e.g., when the process operates against a different set of constraints. Because the prices used in determining the single-unit optima are based upon imprecise intermediate stream values, the results obtained by single-unit optimization may be inconsistent with the overall objectives of the refinery. Refinery-wide optimization, i.e., optimization of the entire refinery in one operation, overcomes these limitations because its feed and product costs are usually accurately known. Refinery-wide optimization can be used for two economically important purposes: (1) to determine the economic-based optimum operating point for a refinery based on the current product pricing structure and the characteristics of the current crude feed and (2) to choose the most profitable crude feeds for processing. Refinery-wide optimization is useful for the selection of crude feed stocks because potential feed stocks can be directly compared on the basis of the optimal operation of the refinery. For both of these purposes, relatively small improvements translate into large economic value due to the large scale of these systems. Li4 considered refinery-wide optimization of a 50 000 barrel/ day refinery. In his approach, nonlinear models of each refinery unit in the process were combined together to form a nonlinear model of the process as a whole. This approach was found to provide a profit increase of 1.6% over single-unit optimization for the test case considered. Note that this approach does not require the prices of intermediate streams; only market prices of the final products are used in the objective function. By eliminating the need for intermediate stream prices, this method ensures consistency of the optimum solution with the overall objectives of the refinery. On the other hand, due to the complexity of the model and the fact that a sequential modeling approach was used, a feasible solution was found in only 60% of the trials. Because the low convergence reliability required multiple starting points, the computation time requirements to determine the optimum operating conditions for the small-scale refinery considered was excessive (typically 8-10 h CPU). The primary goal in large-scale optimization is to reliably produce an accurate solution to the optimization problem in a reasonable period of time. Each of the current techniques suffers in one of these two areas. The linear program uses model approximations to reduce the size of the model. As a result, the accuracy of the solution is degraded. By considering the crude unit, FCC unit, reformer, etc., separately the solution time is reduced. However, the results of single-unit optimization have been shown to be inconsistent at times with the overall refinery objectives.4 On the other hand, refinery-wide optimization overcomes these limitations, but it is not computationally practical because it remains too computationally expensive. The study described in this paper is focused on the evaluating the computational efficiency and solution accuracy of the insideout optimization algorithm. II. Inside-Out Approach The main purpose of the inside-out approach to large-scale optimization is to reduce the solution time while maintaining the solution accuracy. For the inside-out approach, the approximate physical property model of each component (i.e.,

Figure 1. Surrogate model approach for large-scale optimization.

vapor/equilibrium constants of the approximate model and molar enthalpies) are assumed fixed during the refinery-wide optimization calculations. After an optimization solution is obtained for a fixed approximate physical property model, the detailed physical property models are used to update the constants of the approximate physical property models at the new operating conditions until the overall optimization problem converges. The surrogate model approach has been used for large-scale optimization applications. For the surrogate model approach (Figure 1), a combination of detailed and approximate models are used so that the optimization algorithm uses the computationally simpler approximate models and the detailed models are periodically used to update the approximate models. Because the approximate models employed by the surrogate model approach are used in the optimization routine, the approximate model type must be chosen to reduce the dimensions of the model while maintaining the model fidelity. As the number of model equations is reduced, so too is the time requirement for each optimization solution. However, if the reduction in equations causes excessive degradation in modeling accuracy, significant errors in the optimization solution will result. Because the overall optimization solution is based on the surrogate models and the detailed models are only used to update the model parameters for the surrogate model, it is essential that the gains of the surrogate model accurately represents the gains of the detailed model at the converged optimum operating conditions. On the basis of these criteria, we considered several forms for the approximate models for refinery-wide optimization. An artificial neural network5 provides a nonlinear correlation between the inputs and outputs of a system. The total number of equations required by a neural network approximate model is relatively small, making this model form attractive for use in the surrogate model approach. A complete analysis of the neural network as an approximate model must also include a determination of the accuracy of the neural network. To assess the prediction accuracy of the neural network, a neural network was constructed to represent the crude unit in the refinery. To represent the crude unit, a neural network was designed with seven inputs and 36 outputs. The inputs correspond to the product flow rates and the outputs to the properties of the product streams from the crude unit. The network contained 40 hidden nodes arranged in a single layer. The training data was developed for the neural network using an AspenPlus crude

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007 4647

unit simulation. The process gains predicted by the ANN models had an average error of 250% for the test case studies. Based upon the large errors in the predicted gains, neural networks cannot represent the process with the accuracy required for the approximate models used in the surrogate model approach to optimization. In addition, the training time for the ANN models for the crude unit was quite large, approaching 27 h on an AMD Athlon 1100 processor. Reduced-order phenomenological models involve making simplifications to the first-principles models. These approximations can be made in several different ways. A common example of a reduced-order model is the use of a McCabe-Thiele diagram for distillation. Based on our experience with approximate distillation column models, it was clear that reduced order models for refining columns would not provide the necessary accuracy due to the structural mismatch between the reduced-order model and the full-order model. One way to simplify a process model is to use approximate models for the physical properties. By making this assumption, the iterative detailed equations used to calculate the physical properties can be removed from the optimization loop. For example, replacing the vapor-liquid equilibrium equations (e.g., SRK EOS) from the process models for a distillation column significantly reduces the number and complexity of the model equations. This is the basis of the inside-out approach to optimization. During the 1960s, when refining companies first began experimenting with process optimization, crude unit optimization was implemented using tray-to-tray fractionator models with fixed physical properties because the computers of the day were unable to solve the model equations with physical property models included.6 In 1980, Boston and co-workers7 presented an extension of his earlier work on the inside-out method for VLE calculations8 to the optimization of process flow sheets, thus the inside-out optimization algorithm was introduced. Biegler et al.9 evaluated the fidelity of the approximate physical property models on the accuracy of the solution of the insideout optimization algorithm. They found that as the approximate model errors increased the convergence of the inside-out algorithm to the same optimum solution obtained using the rigorous process model cannot be guaranteed. Ganesh and Biegler10 developed a theoretical framework for the inside-out approach to large-scale optimization and presented several case studies. They stated that the application of the inside-out optimization approach “has the potential to reduce the computational effort of process simulation by up to an order of magnitude or more.” The inside-out algorithm is based on an iterative solution procedure in which the optimization problem is solved using approximate physical properties models (e.g., VLE and enthalpies) as shown in Figure 2. In this approach, the refinery-wide optimization calculations are performed using approximate models for the physical properties (i.e., for VLE, ln Ki,j ) Ai,j + Bi,j/Tj, where Ki,j is the K-value of component i on the jth tray, and Ai,j and Bi,j are model constants and Tj is the tray temperature and fixed enthalpy values) along with the model equations. This approach to physical property modeling was chosen because the K-values are strong functions of temperature, but weak functions of composition and enthalpies are not strong functions of temperature or composition. Note that the approximate models for the physical properties are considerably more computationally efficient than the detailed physical property models. Once the optimum operating conditions have been determined based on fixed physical property models, these

Figure 2. Inside-out structure for large-scale optimization.

intermediate optimum operating conditions are used to update the physical property models. This sequence is repeated until the procedure converges. In this manner, the structural form of the detailed model equations is maintained ensuring that the gains of the model equations at the overall converged solution will exactly match the gains of the full detailed model. For the inside-out algorithm, convergence is defined as two successive physical property model solutions yielding the same parameter set for the process model to within a preset relative error (i.e., maximum relative change less than 0.1%). Because finding the optimum operating conditions for a fixed physical property case results in a much smaller set of model equations, the computational requirements for converging a fixed-physical property problem is much faster than including the physical property equations. For very large optimization problems, such as refinery-wide optimization, the inside-out approach may provide substantial computational benefits over the simultaneous solution approach even though the reducedorder optimization problem must be solved several times. IV. Modeling Platform Several platforms were considered for the models in this study. The modeling platforms were evaluated using several criteria. First, the chosen modeling platform must be able to be used for both the physical property and process models. Second, use of the modeling platform should be relatively straightforward. Because a refinery, the plant considered in this study, includes various nontraditional calculations, such as feedstock characterization, the chosen modeling platform must be capable of including these nonstandard operations. Because the overall inside-out optimization approach requires data to be transferred between the physical property calculations and process models, the chosen platform must also accommodate this data transfer. The first modeling platform investigated in this study was AspenPlus 10.2 from Aspen Technologies. This modeling platform provides the user with drag-and-drop models and a graphical user interface, making its use straightforward and fairly simple. This software also includes several different packages with which the thermodynamics can be modeled. This platform also allows the user to create user-defined process models. The models are constructed by writing Fortran code, which is then incorporated into the overall model. For application to the refinery-wide optimization, these user-defined models can be used to represent the non-traditional process calculations.

4648

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007

Because of the wide range of typical process models, the inclusion of user-defined models, and the detailed thermodynamic packages, AspenPlus can be readily applied for creating the detailed models of the processing units in the refinery. To verify the accuracy of detailed models created in this platform, the crude unit of the refinery was modeled using AspenPlus 10.2. Because the separation achieved in the crude unit is largely dependent upon temperature, the accuracy of the crude unit model was determined by comparing the predicted temperature profile to the profile available from the industrial data. Figure 3 shows the predicted and industrial databased temperature profiles for the atmospheric tower in the crude unit. The predicted temperature profile very closely matches the industrial data with an average error of 1.0 °F, indicating that the AspenPlus modeling platform produces an accurate detailed model of the process. The modeling platforms available from Aspen Technologies also exhibit some drawbacks for this study. First, the processing models included in the drag-and-drop interface can only be used in creating the detailed model of the system. By using userdefined models, this platform could also be used to create the process models. However, by taking this approach, the benefits of the graphical user interface and drag-and-drop models are greatly reduced. Furthermore, even if the process models are created with this platform, the transfer of information between the two sets of models would be problematic. The platform does not readily lend itself to reading and writing data files, retarding the data transfer requirements. These drawbacks prevented the Aspen Technologies software from being chosen as the modeling platform for the inside-out approach to large-scale optimization. Because many of the other modeling platforms require the user to write the process models, accuracy in the modeling equations is essential to the fidelity of the model. Despite not being the chosen modeling platform, detailed models of each of the processing units have been created using the Aspen Technologies modeling platform. Using these models, the accuracy of the equations used in a user-written model was evaluated. Because the models include the same equation set, assuming that the same thermodynamic model is employed, the model results should be identical. Any discrepancies in the results from a user-written model and an AspenPlus model would indicate a possible error in the modeling equations used in the user-written model. Process models could also be created using a standard computer programming language, such as Fortran. In these programming languages, the user must write the entire set of equations used in modeling the process. Therefore, this platform can be used to create both the physical property and process models of the system. Because the user writes all the equations, this platform also allows for the inclusion of non-traditional process calculations, such as feedstock characterization. Additionally, data files can be easily written and read using this modeling platform, making data transfer between the models fairly simple. Overall, the use of this modeling platform is fairly straightforward, though some difficulties do arise. First, because the process models for each of the process units can be quite large, the models produced in this platform can become quite complex, requiring a large number of equations. Second, coordinating the process models with an optimization routine can be difficult. Several optimization routines are available, each requiring a somewhat different form to be used in the process models. The ASCEND IV modeling language11 was developed by researchers at Carnegie Mellon University. The advantages of

Figure 3. Predicted temperature profilesAspenPlus.

the ASCEND modeling platform are similar to the advantages of a standard programming language. First, because the user writes the model equations used to represent a process, the platform can be used to build both the physical property and process models. ASCEND also supports the use of values files, in which values of the model variables can be stored. These values files can be written to or read by process models. Because the user creates the process models, ASCEND can also model non-traditional units. However, this modeling platform also differs from standard programming languages in two key areas. First, the ASCEND modeling platform uses an object-oriented approach to process modeling. In object-oriented modeling, the overall model is developed by creating instances of small, less complex models. For instance, a distillation column is modeled by creating the model of a single tray. One instance of this tray model is then created for each tray in the column. By using the object-oriented approach to process modeling, the equations can be more easily broken down into smaller groups, reducing the time required for solving or optimizing the overall model. The second key distinction of the ASCEND modeling platform is the presence of a graphical user interface. Although the user must write the equations used in modeling the process, incorporation into the solver or optimizer is much more straightforward than for a traditional programming language. With the user interface, the user must simply load a model, create an instance of the model, and send the instance to the solver/optimizer. The graphical interface also includes a model browser, making perusal of the solution/optimization results much easier as well. These key features of the ASCEND modeling platform make it desirable for creating the process models used in the insideout approach to the refinery-wide optimization test case considered in this study. The ASCEND IV modeling language was used to build both the physical property and process models for the refinery. As previously discussed, the accuracy of the process models is verified by comparison with both detailed models created using the AspenPlus modeling platform and the industrial data. Figure 4 shows the predicted temperature profile of the atmospheric tower in the crude unit for both the AspenPlus and ASCEND process models. Because the AspenPlus and ASCEND models use the same thermodynamics packages, the predicted temperature profiles are nearly identical. For the atmospheric tower, the maximum error in the ASCEND temperature profile compared to the AspenPlus results is 0.2 °F.

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007 4649

Figure 4. Predicted temperature profilesASCEND.

V. Refinery Modeling The refinery considered in this study (Figure 5) is a 50 000 barrel per day fuel-oriented refinery. This refinery was modeled by Li4, whose work provided the basis for the models constructed in this study. In modeling the refinery, the refinery was separated into five major sections: crude unit, fluidized catalytic cracking (FCC) unit, reformer, gas treatment, and gasoline blending. Steady-state process models of each refinery section were constructed and connected to form the refinerywide model. The bulk of the crude unit model consists of two distillation columns: the atmospheric tower (38 trays) and the vacuum tower (6 trays). In addition to the main tray stack, each of these columns also includes pumparounds and side strippers. To account for the liquid and vapor feed and draw streams, a feeddraw tray has been defined. A schematic of this feed-draw tray is shown in Figure 6. Each distillation column is modeled by connecting the appropriate number of trays together. Side strippers on the distillation columns are also modeled using the feed-draw tray. To complete the distillation column models, the

Figure 5. Refinery schematic.

pumparounds are modeled as simple heat exchangers. The distillation models constructed in the crude unit provide the standard for distillation modeling throughout the refinery-wide model. For the crude unit model, the crude composition is represented using boiling point pseudocomponents. Based upon the distillation curve, the crude oil feed is divided into 40 boiling point pseudocomponents. Separating the crude oil by boiling point allows for a sufficiently accurate distillation model. Within the distillation model, the total number of equations is proportional to the product of the number of components and number of trays. For this reason, using a large number of components in a column with many trays leads to a large number of equations necessary for modeling a distillation column. In fact, the distillation columns in the crude unit account for approximately half of the total equations present in the refinery-wide model. The FCC unit contains three major processing units: the riser/ reactor, the regenerator, and the main fractionator. The riser/ reactor is modeled as a plug-flow reactor. The cracking reactions occurring in the FCC unit occur in the riser/reactor. This chemical reaction network is modeled using the ten-lump model.12 The ten-lump model characterizes the FCC components by boiling point and molecule type. The regenerator is modeled as a continuous stirred-tank reactor. In this reactor, the coke deposited on the catalyst in the riser/reactor is burned with air, restoring the activity to the catalyst. The catalyst is then sent back to the riser/reactor. The main fractionator (17 trays) serves to separate the products of the FCC unit. The main fractionator is a distillation column and is modeled using the same approach as in the crude unit assuming 40 pseudo-components. The FCC unit includes two reactors and one distillation column. Because only ten lumps are considered in the riser/reactor, the reactor models do not require a large number of equations. The main fractionator model does require a relatively large number of equations, making the overall FCC model fairly large as a result. The reformer is modeled as a series of three plug-flow reactors. A heater model is also included between each pair of reactors. The reaction network for the reformer is modeled using a 35-lump model.13 This model characterizes the reformer

4650

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007 Table 1. Refinery-Wide Model Equations

Figure 6. Feed-draw tray.

components using molecule type and carbon number. Because the majority of the reactions occurring in the reformer involve rearranging molecules, the reformer can be modeled quite well using the carbon number as a characterizing property. Because the reformer uses a much larger reaction network than the FCC, the reformer reactor models require more equations than the FCC reactor model. However, the reformer model does not include any detailed distillation column models, keeping the total number of equations in the reformer model relatively small. Two operating modes are set for the reformer: a high severity mode and a low severity mode. The high severity operation is based on an inlet feed temperature equal to 925 °F while a feed temperature of 900 °F is used for the low severity case. Highseverity operation results in greater conversion, but less catalyst life compared to the low severity case. The models for the reformer are arranged so that the fraction of the time that the reformer operates in the high and low severity operation is fixed. That is, it was assumed that both the high and low severity operations are used, but the amount of time each is used is determined by the process optimizer taking into account an upper limit on the rate of catalyst deactivation. The upper limit on the rate of catalyst deactivation was taken from Taskar and Riggs,13 who solved a time-optimal problem to determine the best operating policy for the reformer considering both the value of the products and the life of the catalyst. The gas treatment section of the refinery includes the gas plant and alkylation unit and is not modeled in great detail in this study. The separation occurring in the gas treatment section of the refinery is modeled using component separation, in which a specified fraction of each component entering the unit exits in each product stream. The alkylation reactor is modeled as a stoichiometric reactor. For this reactor model, only the reaction extents or outlet composition must be specified. The reaction kinetics are not included in the model. Because only the lightest components in the refinery are sent to the gas treatment section, this section of the refinery can be modeled using the actual components present. In the gasoline blending section of the refinery, the blending stocks are mixed together in appropriate amounts to produce several grades of gasoline, each having different preset properties. Each gasoline grade is characterized using a number of specifications. For the refinery considered in this study, each grade of gasoline is characterized by 11 specifications, including octane number, volatility, vapor pressure, specific gravity, and chemical content. The main objective of gasoline blending is to produce a sufficient amount of each gasoline grade to meet the production requirements. Additional amounts of each gasoline grade can also be produced. Once the requirement demands are met, the additional gasoline production is based upon maximizing profit.

refinery section

number of eqs

global crude unit FCC unit reformer gas treatment gasoline blending total

379 40026 17253 18967 820 624 78069

For many of the specified gasoline properties, blending does not exhibit linear behavior. One property that exhibits nonlinear blending is octane rating. The octane rating of a gasoline blend cannot be calculated as simply the weighted average of the octane ratings of the blending stocks. Instead, a method that accounts for interaction of the various blending stocks must be used. In this study, the interaction method proposed by Twu and Coon14 is used to calculate the octane rating of a gasoline blend. Table 1 lists the number of equations used for the overall refinery-wide model and each unit in the refinery. A fuel-oriented refinery contains many constraints, each of which addresses operational limits, product specifications, or throughput limitations. For the crude unit, the major constraints are the cutpoints of the side-draw products. Although the crude unit products are not sold directly, the cutpoints of these products greatly affect the operation of downstream units and must be considered in the refinery-wide model. The temperature and pressure of the riser/reactor and regenerator are key constraints for the FCC unit. Several additional constraints in the FCC unit are related to operation of the air blower and wet gas compressor. Because the main objective of the reformer is to obtain an increase in octane number, the octane number of the reformate product must be included as a constraint in the refinery-wide model. The gasoline specifications considered in the gasoline blending model serve as product specification constraints for the refinery-wide model. In addition to these constraints, throughput constraints are also included for the crude unit, FCC unit, reformer, and alkylation unit. VI. Refinery-Wide Optimization Table 1 summarizes the equations present in the refinerywide model. The refinery-wide optimum was determined using the CONOPT15 optimization package available with the ASCEND modeling language. The convergence criterion for CONOPT was set at 10-6 for both the full-scale and the insideout optimization approaches. Typical optimization results for this case study provide economic benefit in two ways. First, by maximizing the throughput of the process, more products are produced. Usually, the increased production rates leads to much larger profits for the refinery. Second, by adjusting the process variables, the units can be operated to produce more of the highvalue products, increasing the profit per barrel of crude feed for the refinery. Because the crude feed to the crude unit is at is maximum value in the base case operation of the refinery, no profit increase can be obtained by increasing the throughput of the overall process. Any profit increases from the refinery-wide optimization must come from changes in the operating conditions of the processing units. By changing the operating conditions, the refinery can make more high-value products, increasing the total profit. The primary differences between the base case operation and refinery-wide optimum are in the yields of the diesel, light naphtha, and gasoline products. Operating at the optimum

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007 4651 Table 2. Refinery Optimization Timing optimization step

solution time

total time

full-scale optimization inside-out approach process model optimization physical property model update process model optimization physical property model update process model optimization physical property model update

5:25:02

5:25:02

3:27 16:18 2:13 9:47 1:19 5:04

3:27 19:45 21:58 30:45 32:04 37:08

conditions, the refinery produces more unleaded gasoline at the expense of diesel fuel and light naphtha.4 Because the gasoline can be sold at a higher price than either the diesel or light naphtha, producing more gasoline increases the profitability of the refinery. Additionally, the optimum operating conditions indicate that the reformer should be operated in low-severity mode for the 70% of time and 30% of the time in the high severity mode. The optimum operating conditions were calculated using both the inside-out approach and the full-scale approach for optimization of the refinery-wide model. The two solutions to the optimization problem gave identical optimum operating conditions. Therefore, using the inside-out approach for refinery-wide optimization accomplishes the goal of obtaining an accurate solution for the optimum operating conditions. The second goal of the inside-out approach to refinery-wide optimization, reducing the computational time requirement for obtaining the optimum, must be evaluated by comparing the computational requirements for the full-scale optimization and the inside-out approach. Because the full-scale optimization includes only a single step, the computational time is determined by simply recording the amount of CPU time required to reach the optimum solution for each method. For the inside-out approach, several fixed physical parameter optimization cases were solved before the overall optimum solution was obtained. The total time requirement for the inside-out approach is equal to the sum of the times for each fixed parameter model optimization step and any additional time required for data transfer between the process models and the physical parameter models. This additional transfer time was found to be negligible compared to the solution time for each fixed parameter optimization step. The computational time requirement for either approach to refinery-wide optimization is dependent upon the processing speed of the computer used in solving the optimization problem. In this study, an AMD Athlon 1100 processor was used. Using this processor, a single iteration of the full-scale optimization requires over 5 h to determine the optimum operating conditions for the refinery. To find the optimum operating conditions, the inside-out approach requires three iterations of the optimization/ solution procedure. Overall, the inside-out approach requires a total computational time of about 37 min. Table 2 summarizes the computational time requirements for the two approaches to refinery-wide optimization for the refining case study considered here. By today’s standards, these computational times are quite large due to two factors: (1) the slow clock speed for the PC processor used in this study and (2) these results were generated with MS Windows operating in the background. Therefore, substantially smaller computational time requirements would result if a totally dedicated processor using a currently available clock speed were used. Nevertheless, these results are valid from a basis of comparative speedup. Using the inside-out approach, the optimum operating conditions of the refinery can be determined in a significantly shorter

time than for the full-scale optimization. Defining speedup as the ratio of the solution times for the full-scale optimization and the inside-out approach, the inside-out approach provides a speedup of 8.75 for the refinery-wide optimization. This indicates that the inside-out approach to refinery-wide optimization achieves its second goal, reducing the total computational time requirement for determining the optimum operating conditions. One of the factors that affects the time requirement for optimization is the degree of coupling in the model equations. For the refinery configuration considered here, feed streams enter the process, flow through the process, and exit as products. Although some recycle and heat integration is used within each processing unit, no recycle streams are sent from one refinery units to another (e.g., from the FCC unit to the crude unit or from the gas plant to the reformer) for the base case refinery considered here. Because of this configuration, solution of the refinery-wide model can be performed sequentially. The crude unit can be solved first, followed by the FCC unit and reformer in either order. Next, the gas treatment section of the refinery is solved. Finally, the results of all of the other sections are used in the solution to the gasoline blending section of the refinery. Many large-scale refineries and chemical plants include several recycle streams. When a recycle stream is included in the model, the equations representing the upstream processing units become dependent upon the results of the downstream processing units. By introducing this dependence, the equations representing the upstream and downstream units are coupled and must be solved simultaneously. This coupling can have a significant effect on the computational time requirement for the optimization routine. To determine the effectiveness of the inside-out approach for a more complicated case, a “recycle refinery” was modeled. In this model, the fuel gas product from the gas treatment section of the refinery is recycled back to the crude unit. Because the fuel gas contains only light gases, the entire recycle stream exits with the overhead vapor from the atmospheric tower. This overhead vapor stream becomes a feed to the gas treatment section of the refinery, where the fuel gas is once again removed. By using the fuel gas stream, which is not included in the objective function, as the recycle stream, the “recycle refinery” exhibits the same optimal behavior as the standard refinery model. Because the fuel gas stream is not directly included in the objective function, removing it from the product slate does not affect the profitability of the refinery. Although not having a fuel gas product would increase the fuel gas requirements of the refinery, this effect is not considered in the “recycle refinery” model. The only purpose of including the recycle stream is to couple the material balance equations in the crude unit, FCC unit, reformer, and gas treatment sections of the refinery. Because the objective function is unaffected by the inclusion of the recycle stream, the optimum conditions for the “recycle refinery” are the same as for the standard refinery case. The additional coupling of equations in the “recycle refinery” case does affect the computational time requirements for the two approaches to refinery-wide optimization. In the optimization, the refinery-wide model is separated into blocks. These blocks represent groups of model equations that must be solved simultaneously. The additional coupling forces the model to be broken down into fewer, larger blocks. Because the model equations must be solved in much larger blocks, the total time requirements for both the full-scale optimization and inside-

4652

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007

Table 3. “Recycle Refinery” Optimization Timing optimization step

solution time

total time

full-scale optimization inside-out approach process model optimization physical property model update process model optimization physical property model update process model optimization physical property model update process model optimization physical property model update

8:08:00

8:08:00

4:16 25:12 3:02 14:51 1:59 6:41 0:48 2:22

4:16 29:28 32:30 47:21 49:20 56:01 56:49 59:11

Table 4. Additional Case Optimization Timing optimization case reformer FCC unit crude unit crude and FCC units entire refinery

number degrees of percentage full-scale inside-out of eqs freedom nonzeros timing timing 9483 17253 40026 57279 78069

2 3 7 10 32

1.0 0.5 0.3 0.4 0.7

3:23 21:14 1:09:47 2:12:31 5:25:02

2:33 6:21 15:46 22:07 59:11

out approach are increased by approximately 50% in both cases. Table 3 summarizes the time requirements for optimization of the “recycle refinery” case. For the “recycle refinery” case, the inside-out approach requires a total of four iterations to obtain the optimum solution, as compared to three iterations for the standard refinery. Although the total number of iterations increases, the insideout approach still provides substantial speedup compared to the full-scale optimization. For the “recycle refinery” case, the inside-out approach gives a speedup of 8.25 for this optimization case. The inside-out approach was also applied to several subsets of the entire refinery model. Table 4 shows computational time requirements for full-scale and inside-out optimization as well as the number of model equations and the percentage of nonzero elements of the Jacobian of the model equations. For most of the cases, a significant speedup is obtained by using the insideout approach. For the reformer, the speedup is fairly small. Because the total number of equations in the process model is small, a smaller speedup is observed for this case. VII. Projected Benefits The models created in this study are much smaller than the process models used industrially. An industrial scale model could contain up to one million equations. The number of decision variables and constraints for an industrial model would also be larger than for the model used in this study. In total, an industrial model could contain approximately 150 decision variables and 300 constraints. To estimate the benefit of the inside-out approach to refinerywide optimization for industrial applications, the computational time requirements for both optimization approaches must be predicted. Estimates for these time requirements can be obtained from the optimization cases performed in this study. The computational time requirement for optimization of the industrial-scale model was determined by extrapolation of the results of these cases. Figure 7 shows how the computational requirement for both full-scale optimization and optimization using the inside-out approach vary with the total number of equations by considering subsets of the full refinery problem. The smallest optimization problem considered was for the optimization of the crude unit by itself, i.e., 40 000 model equations. Next, the crude unit and the FCC unit (57 679 equations) and the crude unit, FCC unit and the reformer (76 246

Figure 7. Computational requirement.

equations) were optimized together. Finally, the results of the refinery wide problem (78 069 equation) was also used. By plotting this data on a log-log plot, the order of the relationship between the computational requirement and the number of equations can be obtained. For both full-scale optimization and optimization using the inside-out approach, the logarithm of the computational time varies linearly with the logarithm of the number of equations. For full-scale optimization, this linear relationship has a slope of 2, indicating that the computational time varies with the square of the number of equations. For optimization using the inside-out approach, the computational requirement increases more slowly, having a slope of 1.21. The time requirement for each optimization method can be determined by extrapolating these results out to an industrialscale model, containing 1 million model equations. Based on the extrapolation of the results obtained in this study, the insideout optimization algorithm is expected to provide a factor of 80 speed-up compared to the simultaneous optimization approach. Moreover, the simultaneous optimization approach is expected to require several days CPU to obtain a refinery-wide optimization solution. Over the course of several days, an industrial process can undergo significant changes in the operating conditions. For this reason, the model used in the full-scale optimization may not represent the actual operation of the plant when the optimum operating conditions are found. Because the plant operation has changed, the optimum values calculated by the optimizer may be invalid. Due to these changes in the process, full-scale nonlinear optimization cannot accurately predict the optimum operating conditions for an industrial refinery-wide application. By reducing the computational time requirement to less than an hour, the inside-out approach makes industrial refinery-wide optimization more computationally feasible. Although these estimates were made based on the base case refinery without recycle between the units, the comparative results should be valid for the case with recycles although the computational requirements for the inside-out algorithm would higher. VIII. Conclusions In this study, the inside-out approach to large-scale optimization was used to determine the optimum operating conditions for a small fuel-oriented refinery test case. To verify the accuracy of the inside-out approach, the refinery-wide optimum was also determined using a full-scale nonlinear optimization.

Ind. Eng. Chem. Res., Vol. 46, No. 13, 2007 4653

For a wide variety of starting points, the optimum operating conditions calculated using these two approaches were the same, indicating that the inside-out approach predicts accurate values for the optimum operating conditions in the refinery. The computational requirement for the inside-out approach was also compared to the requirement for the full-scale optimization. For the refinery model used in this study, the inside-out approach decreased the computational time requirement by a factor of 8.75. The inside-out approach was also applied to several subsets of the entire refinery model. In each case, the inside-out approach provided a significant degree of speedup when compared to a full-scale optimization. In these tests, the speedup obtained using the inside-out approach was found to increase with the size of the model. An industrial-scale model is much larger than the model used in this study. The computational time requirements for optimization of an industrial-scale modeled were estimated to require a factor of 80 time more CPU for the full-scale optimization approach than the inside-out algorithm. Even though Biegler et al.9 showed that the inside-out optimization was susceptible to error in the optimization solution that it obtained, this work demonstrates that this is not a problem for refinery-wide optimization using the physical property modeling approaches used here. Acknowledgment The authors would like to thank the member companies of the Process Control and Optimization Consortium at Texas Tech University for their support throughout this work. Additionally, Steve Hendon and Charlie Cutler provided continuous advice and ideas, making this work possible. The authors gratefully acknowledge Larry Biegler for providing references for previous work in this field. Literature Cited (1) Beck, R. J. Earnings Plunge Along with Oil Prices in 1998. Oil Gas J. 1999, 97, 56-58.

(2) Edgar, T. F. Himmelblau, D. M. Optimization of Chemical Processes, 2nd ed.; McGraw-Hill: New York, 2001. (3) Friedman, Y. Z. What’s Wrong with Unit Closed Loop Optimization? Hydrocarbon Process. 1995, 74, 107-116. (4) Li, X. Refinery-Wide Optimization. Ph.D. Dissertation, Texas Tech University, Lubbock, TX, 2000. (5) Haykin, S. Neural Networks; Macmillan Publishing Company: Englewoods Cliffs, NJ, 1994. (6) Cutler, C. R. Personal communication, 2000. (7) Jirapongphan, S.; Boston, J. F.; Britt, H. I.; Evans, L. B. A Nonlinear Simultaneous Modular Algorithm for Process Flowsheet Optimization. 1980, 80th AIChE Meeting, Chicago, Illinois. (8) Boston, J. R. Inside-out Algorithms for Multicomponent Separation Process Calculations. In Computer Applications to Chemical Engineering; Squires, R. G., Reklaitis, G. V., Eds.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980; Vol. 124, pp 135-150. (9) Biegler, L. T.; Grossmann, I. E.; Westerberg, A. W. A Note on Approximation Techniques Used for Process Optimization. Comput. Chem Eng. 1985, 9, 201-206. (10) Ganesh, N.; Biegler, L. T. A Robust Technique for Process Flowsheet Optimization Using Simplified Model Approximations. Comput. Chem. Eng. 1987, 11, 553-565. (11) Piela, P. C.; T. G.; Epperly, K. M. Westerberg, and A. W. Westerberg. ASCEND: An Object-Oriented Computer Environment for Modeling and Analysis: The Modeling Language. Comput. Chem. Eng. 1991, 15 (1), 53-72. (12) Jacob, S. M.; B. Gross, S. E.; Voltz, and V. W. Weekman. A Lumping and Reaction Scheme for Catalytic Cracking. AIChE J. 1976, 22 (4), 701-713. (13) Taskar, U. M. Modeling and Optimization of a Catalytic Naphtha Reformer. Ph.D. Disseration, Texas Tech University, Lubbock, TX, 1996. (14) Twu, C. H. and J. E. Coon. Predict Octane Numbers Using a Generalized Interaction Method. Hydrocarbon Process. 1996, 75 (2), 5156. (15) Drud, A. S. CONOPTsLarge-Scale GRG Code, ORSA J. Comput. 1992, 6, 207-216.

ReceiVed for reView July 8, 2006 ReVised manuscript receiVed March 5, 2007 Accepted March 23, 2007 IE0608814