Friday, May 11, 2018

Refinery Planning and Optimization


The Planning and Scheduling departments of refineries are responsible for putting together weekly, monthly, quarterly, and/or annual production plans. They do this with input from other department in the plant-operations, process engineering, maintenance, long term capital projects and turnarounds, trading (typically not at site), finance, etc. The goal is to create a plan that captures maximum profit given market prices, unit and logistics constraints, planned and unplanned maintenance outages, etc.

Courtesy Pexels.com

LP Models

The production plan is put together by the refiner planner using the site LP model which is a linear equation based model that determines the optimal mode of operating by simultaneously solving thousands of equations.

As we saw in previous posts, at refinery consists of multiple process units. Imagine trying to model a complex chemical process using a series of equations. Consider a simple naphtha hydrotreater. Naphtha hydrotreaters remove sulfur, nitrogen, metals and other contaminants from naphtha (think gasoline) boiling range material in order to send it to a downstream reformer or isomerization unit for octane improvement or directly to the gasoline blending pool. There are certain specifications that are important to these downstream units and blend pool so we’d definitely want to have equations to carry these properties across the unit in the simulation. Reformers will require details like % aromatics, naphthenes, and paraffins. The gasoline pool will require octane, sulfur, density, etc. We’ll need to represent how these properties change across our naphtha hydrotreating unit. And of course we’ll want to know the resulting yields of the unit-how much fuel gas, LPG, Light Naphtha, and/or Heavy Naphtha will be generated in this unit.

For the simple case of determining NHT yields our equation might be constructed something like this:

Feed:

100% Untreated Naphtha + 5% Hydrogen (hydrogen is used in the conversion of sulfur and nitrogen to H2S and ammonia)

Product:

3% Hydrogen + 1% Fuel Gas + 3% LPG + 48% Light Naphtha + 50% Heavy Naphtha

So if X = the volume of Untreated Naphtha fed to the unit our equation would be:

1 X + .05X = .03X + .01X + .03X + .48X + .5X

We might also have another equation representing the sulfur removal across the unit. If the unit can removed 95% sulfur and we wanted to calculate the sulfur of the final product, where the sulfur content of the feed = Y we’d could create another equation to do this:

Y = % sulfur in the feed
X= Volume Untreated Naphtha

Sulfur in the feed = XY
Sulfur in the product = .95XY

If the planner told the LP that Sulfur product spec had to equal 5ppm as a constraint-the LP would manipulate other upstream units and/or crude slate through other equations in the model to achieve this product quality. Imagine the LP doing this for the thousands of equations required to simulate the refinery all in a matter of seconds and deriving the optimal combination of crudes, products, unit capacities, etc to maximize margin. As you can see the LP is a powerful tool.

Putting together a Plan

Turnarounds are refinery maintenance outages planned years in advance typically 5-10 years. All refineries have long term turnaround plans. These include catalyst changes, new and revamp unit projects, maintenance work that requires oil out of the unit. These are incredibly capital intensive projects (in the millions) and require years of planning to execute in a timely, cost competitive manner. Keep in mind every day the refinery or a unit is down is a day the refiner isn’t making money while still incurring base operating costs like staffing.

As a result, turnaround and routine maintenance downtimes are the first input to the annual business planning processes of publicly traded companies that must provide profit forecasts to share holders as well as being input to monthly and weekly plans. These downtimes determine the unit capacity constraints input to the refinery LP.

Once the maintenance plan is landed, the planning department will work with trading to determine the potential crude slate based on market price, availability, and the processing capability of the refinery. Some refineries have long term contracts on crudes and so their slates will not vary but for “merchant” refiners that regularly process different crudes, trading will provide an available crude slate for the refinery to evaluate for purchase.

Recall from previous posts all refineries have different configurations, crude processing, and product production capabilities. These constraints in addition to market price and availability will determine the crude slate. A refiner without residual bottoms processing capability (and not in the asphalt business) will not be able to profitably upgrade heavier crudes e.g. in the 10-20 API range with a large residue/bottoms yield. The result would be a significant amount of marine fuel oil production which in recent years has been selling far below crude price and will become particularly unprofitable with the upcoming IMO specs (2020 environmental regulations imposed on ships that burn fuel oil). However, refiners with Coking and Residual FCC’s or Hydrocrackers can often profitably process this material. Other constraints are limited light ends processing capability for heavy sour refiners not configured to process the dilbit added to oil sands Canadian crudes, light West Texas and North Dakota Tight Oils, and high TAN crudes which are highly acidic and corrode the overhead systems of crude units.

In addition to crude slate, refinery configuration and constraints, and maintenance outages, the final input to the production plan is the product slate. Typically refiners generally make the same products but the product planners will work with trading to understand product demand for specialty higher value gasoline blends and exports to other countries.

Once unit constraints and the crude and product slate are determined the planner will input these to the LP and create a first pass plan. Planning is an iterative process so the plan is then reviewed internally in the planning department as well as with other site and above site stakeholders for both plan acceptance and credibility. Refining is an around the clock business and the oil and oil products markets are constantly changes. The planning department must continually respond to both market movements and unplanned refinery outages to ensure margin is continually optimized.

No comments:

Post a Comment