You are on page 1of 22

# Crude Column Optimization

1

## Crude Column Optimization

Workshop
A crude column with pump arounds and side-strippers can converge in a few seconds using a wide variety of product quality specifications. However, the complexity of the model and intrinsic interaction between variables can make it very difficult to use the model alone as a decisionmaking tool. For example, in a typical oil refinery, the operation must be adjusted so that different feed stocks can be processed to yield products with tight quality specifications, while meeting a desired economic performance. How does one use the model to choose the best operating conditions? HYSYS includes additional modelling and decision support tools that can be used to enhance the usability of your models. In this module, you will use the HYSYS optimization tool available in HYSYS.RTO to investigate the debottlenecking and optimization of a crude column.

Learning Objectives
After completing this module, you will be able to use the Derivative Utility to: Define Process Constraints and Variables. Define the Objective Function. Run the Optimizer and check the results.

Prerequisites
Before beginning this module you will need to know how to: Create and modify active specifications in the column. Create utilities and select variables through the HYSYS Object browser.

Process Overview

## Description of the Problem

In the Atmospheric Crude Column module we defined and converged the tower based on a predetermined set of performance criteria. The profit of this column operation is dependent on the price of its various products and on its operation costs (e.g., energy and steam). It should be possible to operate the column with better performance: maximizing the profit from the column while keeping the product quality constraints within specified limits. However, the number of variables to manipulate and the number of constraints to be met makes the optimization problem impossible to do manually. Consequently, the help of an optimization algorithm is needed. Let us examine the variables involved:
Price Revenues Naphtha Kerosene Diesel AGO Residue Costs Condenser Flash zone duty Profits (approximately) (\$/m ) 14.00 12.00 10.00 6.00 2.00 (\$/MM kJ) 0.12 3.00 15 287 4600
3

## Revenue (\$/h) 2100 743 1300 180 580

From the cost and revenues table above, we can determine that it would be most desirable to get the maximum quantity of Naphtha possible, since it is the highest value product, and of course, concurrently minimise the energy consumption. This is not a simple task because the market requires that product quality standards be taken into account. The following table shows these standards:
Product Naphtha Naphtha Kerosene Kerosene Diesel Specification type D86 / 5% D86 / 95% D86 / 5% D86 / 95% Pour point Minimum (C) 40.00 160.00 170.00 240.00 -15.00 Maximum (C) 50.00 180.00 190.00 260.00 5.00

## 110.00 20.00 150.00

What will happen to the Naphtha product's distillation curve if we extract a very high quantity of this product?

More components from the heavier Kerosene range will go to the Naphtha extraction and consequently the distillation curve (i.e., D86 95% will be higher and thus will overpass the maximum value needed to meet quality requirements).

## Expanding the Flowsheet

1. Load the simulation case from the Atmospheric Crude Column module. You can use the case you created, or load pre-made case Crude6.hsc from your Solution Cases folder. In this module, we will optimize the performance of the atmospheric crude column based on the product quality specifications.

## Changing the Units

As you know, HYSYS allows you to create your own set of units. If a desired unit can not be selected from the database, we can define our own unit by specifying an appropriate conversion factor. In this case, the prices for the Energy values are given in MMKJ/h and, since this unit is not available in the HYSYS unit library, we will need to define it. 1. 2.
If the Refinery unit set is missing, use a clone of the SI unit set.

From the Tools menu, select Preferences. Go to the Variables tab and select the Units page. Select the Refinery package that we defined in the Oil Characterization module. Move the cursor to the Energy cell and click on the Add button.

3. 4.

5.

Figure 1

## Building the Simulation

Column Product Specs
In this case, we will converge the column using simple specifications (e.g., flowrates and duties) since the optimizer will need to run the column many times (and simple specifications enhance convergence). We will make sure Cut Point quality specifications are selected as estimates but are not active. 1. 2. 3. Open the Column Property View. Change the Temperature of the feed to 320C. Click the Design tab and click the Monitor page.

## Crude Column Optimization

4.

Enter the Kerosene flowrate as 62 m3/h. The specifications on your Monitor page should appear as shown:
Figure 2

## Crude Column Optimization

Derivative Utility
The Derivative Utility is used to hold all the data used for defining the HYSYS Optimizer variables, constraints, and the Objective Function. The first step in setting up an optimization problem is creating a Derivative Utility. The Derivative Utility is responsible for gathering all necessary information for the optimizer. Notice that several different Derivative Utilities can be added to the same simulation, that is, the same simulation model can be used in the analysis of several different scenarios. To install a Derivative Utility: 1. 2. 3. From the Tools menu, select Utilities. Click Derivative Utility in the list box on the right. Click on the Add Utility button. The Derivative Utility property view appears as shown:
Figure 3

## Selection of Unit Operation(s)

The first step in the implementation of the Derivative Utility is the selection of the unit operations to be considered. 4. Click the Operation button.

We will use only the distillation column as the desired unit operation. Using this mode will optimize variables pertaining to the Atmospheric Crude Tower unit operation. 5. Add the Atmos Tower to the Scope Objects list as shown:
Figure 4

6.

## Installing Optimization Variables from the Utility

The next step is to define the variables that we would like to optimize in our case. The Optimization variables will be product flowrates, steam flowrates, and energy values. The needed optimization objects for the utility (in the case of the Derivative Utility: Optimization Variables, Constraints, and Objective Function variables) can be added directly from this view. In the Derivative Utility Configuration group, there is a drop-down list on the right side of the group.

10

## The drop-down list contains three options:

Figure 5

State Variables are on/off variables which are not being used in this case.

Process Constraints: ProcCons Optimization Variables: OptVars Objective Function: ObjFunc State Variables: StateVars

7.

Select OptVars and click the Add button to the left of the drop-down list. The selection view is displayed:
Figure 6

8.

By making the selection as shown, an Optimization Variable is created (Bttm Steam Mass Flow) and is added into the utility. By default, the new object is given the next available name. However, you can edit the name of the object directly from the utility view by highlighting the name in the Object Name column and typing a new string.

10

## Crude Column Optimization

11

Figure 7

The Object Name column lets you modify the name of the created variables. In addition, the Attached Object and attached Property columns are also displayed in the view, as well as the variable's current value. The Master and Runtime radio buttons toggle the display between all objects and those being considered for the current evaluation. The properties can be filtered into the following: All. All properties. Input. Properties requiring user input. Output Calculated and outputted values. Results. Solution results.

## Required Input for Variables

The input for optimization variables are: Optimize flag Minimum Maximum Range (optional) Global Minimum Global Maximum

From the list of variables, if you uncheck the Optimize flag check box for certain variables, the Master list will still show you all the variables (selected and nonselected) whereas the Runtime list shows only the selected ones.

The Global inputs are appropriate only for real time applications and can be set at the same values as the minimum and maximum. The Optimize flag works in conjunction with Runtime and Master lists. When the optimization problem is being set up, this flag is evaluated for

11

12

## Crude Column Optimization

each variable. If the flag is false, then the variable is not exposed to the Optimizer and the value remains at its starting value for the length of the solution. With this, you can easily switch between optimization problems by turning variables and constraints on and off. The value for the variable Range is used in the calculation of a perturbation (= range x perturbation factor). If none is provided, the span (maximum minimum) is used for the calculations.

We need to add all of the optimization variables in the same way. Notice that only those variables shown as blue in the simulation (input values) can be selected since they must be available for updating during the optimization. In this example, those variables that are specified as Active specs in the column will need to be accessed through this derivative utility. 9. Click the Add button with the OptVars option selected in the dropdown list.

10. Add the steam flowrates. Since the specified value (blue) in this case is in the stream itself, you will be able to access it through this object directly as you did with the Bttm Stream Flowrate.
Figure 8

This displays how to access a column Active specification through the Object ANavigator.

12

## Crude Column Optimization

13

11. Repeat the steps in order to complete the list of Optimization variables as follows:
Figure 9

Make sure that all values from the Current Value column are in blue, since theyll be changed later by the optimizer. 12. Select the Input view from the Variables tree on the left. 13. Complete the minimum and maximum values for each of the variables.
Minimum and maximum values are the boundaries for the variables in the optimization; this is the valid range for the optimization. Minimum Flowrates Steam (kg/h) 700 2000 800 0 110 46 104 20 AGO Steam Flow Bttm Steam Flowrate Diesel Steam Flow Flowrates Products Off Gas Flowrate (kgmole/h) Naphtha Flowrate (m3/h) Kero Flowrate (m3/h) Diesel Flowrate (m3/h) AGO Flowrate (m3/h) 10 190 80 156 40 1600 4800 1900 Maximum

13

14

## Crude Column Optimization

Minimum Energy (MMKJ/h) -33 -25 -25 240 150 150 6 17 Kero PA Duty Diesel PA Duty AGO PA Duty Pump Around Draw Rates (m3/h) Kero PA Flowrate Diesel PA Flowrate AGO PA Flowrate Additional Specs Kero Reb Duty (MMKJ/h) Liq Flow Stg 27 (m3/h)

Maximum

## -60 -50 -50 400 250 250 10 30

HYSYS SQP Optimizer is able to solve constrained optimization problems. In the presented case, we want the product quality to remain inside certain values. We can set this need as constraints in an optimization problem.

## Required Input for Constraints

The required inputs for constraints are as follows: Use flag Minimum Maximum Scale

All constraints are treated by the Optimizer as ranged constraints (i.e., the value of the constraint should lie between the minimum and maximum at solution, within the prescribed Scale tolerance). The scale can be considered as an approach, or as the boundary around the minimum and maximum values that defines whether the constraint is active, or violated. This information is reported during and after the solution as the status of the constraint.

14

## Crude Column Optimization

15

14. Click on the Add button with the ProcCons option activated in the drop-down list as shown:
Figure 10

We could add the distillation points from the Boiling point Curves utility, but that would take more time than if we took the values from the Columns Monitor page (they will save calculation time).
Use a descriptive name as this will make it easier to find with the Object Navigator.

15. Add the required Distillation Points on the Monitor page of the Column Property view if they are not already there.
Figure 11

## The products must meet the following quality specifications:

Product Naphtha Naphtha Kerosene Kerosene Diesel Diesel AGO AGO Specification type D86 / 5% D86 / 95% D86 / 5% D86 / 95% Pour point Flash point Pour point Flash point Minimum (C) 40.00 160.00 170.00 240.00 -15.00 90.00 0.00 130.00 Maximum (C) 50.00 180.00 190.00 260.00 5.00 110.00 20.00 150.00

15

16

## Crude Column Optimization

16. Repeat the steps in order to complete the whole list of Constraint variables as displayed in the previous table. 17. For the heavy streams, we will include Flash Point and Pour Point specifications by selecting them from the column. 18. Go to the Monitor page. 19. Click the Add Spec button.
We can also view these properties with the corresponding utility but it will be better to gather all the information within the Monitor page.

20. Click the Add Spec button again and select Cold Properties.
Figure 12

## 21. Remember to take into account the equipment limitation constraints.

Equipment Condenser Flash Zone Min Duty (MM kJ/h) 105.00 70.00 Max Duty (MM kJ/h) 125.00 90.00

16

## Crude Column Optimization

17

22. Add two new process constraints for the Energy streams (you can select these directly from the stream).
Figure 13

If any current value exceeds the boundaries, the optimizer will put it within the limits.

Figure 14

17

18

## Crude Column Optimization

Is there any constraint variable currently beyond the specified Minimum and Maximum boundaries? _________________________________________

## Objective Function Variables

Objective Function variables are installed individually which facilitates the calculation of the gradient during the course of Jacobian evaluations. Alternatively, an Objective Function can be built in a spreadsheet operation, with a single cell representing the results, and having a single Objective Function object attached to this result cell. All the variables with a cost associated may be listed into the Constraints/Objective Function tab. The HYSYS SQP optimizer will only minimize the Objective Function. For this reason the revenues have to be expressed as negative, and the cost values positive. Thus, every single variable will have, as a result, its current value multiplied by the associated cost/revenue. The Jacobian will minimize the individual values that will end in a total minimum (the sum of all the values from the list).
Price Revenues (\$/m ) Naphtha Kerosene Diesel AGO Residue Costs (\$/MM kJ) Condenser Flash zone duty Profits 0.12 3.00 14.00 12.00 10.00 6.00 2.00
3

18

## Crude Column Optimization

19

23. To add Objective Function variables, click on the Add button with the ObjFunc option selected.
Figure 15

24. For this problem, individual objective function objects are installed as shown below. Select the Naphtha product Volume Flowrate (because the price is in \$/m3).
Figure 16

19

20

Figure 17

## Which would be the formula of the global Objective Function?

Naphtha flowrate * price Naphtha + Kero flowrate * price Kero + Diesel flowrate * price Diesel + AGO flowrate * price AGO + Residue flowrate * price Residue - Condenser Heat Flow * cost Energy Condenser - Flash Zone Heat Flow * cost Energy
And its value? ________________________________

20

## Crude Column Optimization

21

Optimizer
The Optimizer interface is used to collect all of the derivative utilities within the current simulation case and provide them to the optimization algorithm. The Optimizer is invoked by pressing F5 or by opening the Simulation menu and selecting Optimizer. Remember that we can use several utilities in the same case. 1. 2. On the Configuration tab, select Hyprotech SQP as the optimization algorithm. After all the information is configured (leave the defaults), the model can be run. Click the Hyprotech SQP tab and click the Start button to run the Optimizer.
Figure 18

To examine the results on the variables and constraints, open the appropriate Derivative Utility and view the Results page.

21

22

## Examining the Results

Go to the Optimizer Property View (press F5).
Did the model find a solution? ________________________________________ What is the Objective Function value? __________________________________ Have we improved it? ________________________________________________

Go to the Derivative Utility and select the Results option, in the Constraints/Objective Function tab.
Was any constraint violated? _________________________________________ And active? _________________________________________________________

## Exploring the Simulation

Since Naphtha is the more valuable product, increasing the flowrate should also increase the profit. We can do so by relaxing the constraints, however, we are constrained to the quality specifications. Change the D86 95% Temperature value to 185C.
What is the new Objective Function? ___________________________________ What are the active specifications? _____________________________________ Did the profit increase after these changes were made? ___________________

22