You are on page 1of 63

Pe t ro m i d i a re fi n e r y

Refinery
Engineers
Training
Ni g hti m e i n Pe t ro m i d i a

AspenTech

Process
Industry
Modeling
System
Process Industry Modeling System

Contents:

- Refinery Units and Mass Balance overview


- General description of PIMS
- Linear Programming Concepts
- PIMS Row/Column Types
- PIMS Computer Configuration/ Set up
- PIMS Data Tables and Reports
- Distributive Recursion
- Input Data and PIMS Results
- PIMS Training Problems

3
PRODUCTION –Refinery overview

4
PRODUCTION REPORTING- Material Balance

14 Units in Refinery which are interconnected

5
PRODUCTION REPORTING- Material Balance

Basic Principle
Must come out
6 What goes in
General description of PIMS - What is PIMS

 Complete Linear Programming modeling system  tells you what to do


 Runs on personal computers
Process  What crude & other feedstock to buy
 Uses spreadsheets and/or database tables for data  Average refinery operations
input and customisable reporting Industry
 Includes process submodel library for Refinary
…in order to meet market demand and maximize refinery
Modelin margin
Primary Objective: Economic Optimization g
for a future time period (weeks to years)
System

7
General description of PIMS - What does PIMS do

Refineries are very complex

Many variables (1000’s) Many constraints (1000’s)


 Amounts of different feedstock to purchase  Availability of individual feedstock
 Amounts of different products to sell (local,  Market demand for individual products
export)  Unit capacities
 Process unit Feed rate  Product quality specifications
 Reactor severity
 Routing of intermediate streams
 Blending flexibility

Impossible to evaluate all alternatives


PIMS creates 1000’s of simultaneous equations representing all variables and constraints.
Solves the whole problem at once.

The purpose:
Maximize the economic margin
8
General description of PIMS - PIMS is use in

OPERATIONAL AREA
•Monthly Operational Plan - 3 months rolling plan
•Latest Estimation
•Budget - 5Years Business Plan
•Backcasting reports STRATEGICAL AREA

•Analysis Budget vs. Plan vs. Actual


•Strategical plan for– 5YBP
•“what if” Scenarios
•Feedstock selection/ Crude Selection
•Test Crude – Crude breakeven evaluation
•“what if” Scenarios
Operational : Production Planning and •New units integration/Business evaluation
Optimization

Strategical : short and long term Business


evaluations

9
General description of PIMS - Info flow

What does each department bring to the process?


KMG INTERNATIONAL

Feedstock Market
PPO
PIMS • Products sales : quantity and prices
• Commercial constrains
• Acquisition of crude and other
feedstock Refinery
• Crude and other feedstock prices
• Availability of crude and other
feedstock
• Units capacity / yields
• Technological constrains
• Blanding constrains
• Stocks strategy

Each department contributes with critical information to the planning process


10
General description of PIMS - Info flow

Minimum 3-Month Rolling Plan

Month 0 Month 1 Month 2 Month 3


S M T W T F S S M T W T F S S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

7 8 9 10 11 12 13 7 8 9 10 11 12 13 7 8 9 10 11 12 13 7 8 9 10 11 12 13
14 15 16 17 18 19 20 14 15 16 17 18 19 20 14 15 16 17 18 19 20 14 15 16 17 18 19 20
21 22 23 24 25 26 27 21 22 23 24 25 26 27 21 22 23 24 25 26 27 21 22 23 24 25 26 27
28 29 30 31 28 29 30 31 28 29 30 31 28 29 30 31

• Complete plan • Focus on • Focus on • Focus on


in 5-7 working operations plan crude early warning
days • 2-4 blocks selection of major
• Validate Plan with to match crude changes
Management or product
• Finish by
schedule
last day of
month

PIMS look far enough ahead to identify problems

11
General description of PIMS - Info flow

Horizon - Minimum 3 Month Rolling

Total Time to Prepare Plan 5-7 Working Days

Refinery Plan
Plan
Input Final
Final
Feedstock Input Model
Model Objectives
Objectives
YES
Supply (MOP Met Plan
Plan
(MOP Runs
Runs Met (MOP)
(MOP)
Marketing Basis)
Basis)
NO
GAP

Feedback
Feedback Actual
totoPlanning Actual
Planning Results
Results
Process
Process

12
Linear Programming Concepts

Definition
A linear program (LP) is a mathematical model of a process. The process can be a refinery, chemical plant, distribution network, or any
situation with variables and constraints.

An LP is a set of simultaneous linear equations:

+ aX1 – bX2 + cX3   + dX5 = K


– eX1 – fX2   + gX4 – hX5  L
+ iX1   – jX3 + kX4    0

Notice there are more unknowns (variables) than equations (constraints). This means there are an infinite number of solutions to the
problem. To determine the best or optimum solution an objective function row (OBJFN) is created. This row will include feedstock
costs, operating costs, and sales prices of products to arrive at the most profitable or optimum solution to the problem. The algorithm
attempts to maximize the value of the objective function row. This value is calculated as the algebraic sum of each variable’s solution
value multiplied by its coefficient in the objective function row. Each variable’s solution value is also known as its “activity” in the
solution.
In an LP the variables and constraints must have unique names. In our example the variables are named X 1, X2, X3, X4, and X5, while
the constraints are named Eq1, Eq2, and Eq3.
  X1 X2 X3 X4 X5 RHS
Eq1 +a –b +c   +d = K
Eq2 –e –f   +g –h  L
Eq3 +i   –j +k    0
13 OBJFN     + yy – zz    
Linear Programming Concepts

Definition
A linear program (LP) is a mathematical model of a process. The process can be a refinery, chemical plant, distribution network, or any
situation with variables and constraints.

An LP is a set of simultaneous linear equations:

+ aX1 – bX2 + cX3   + dX5 = K


– eX1 – fX2   + gX4 – hX5  L
+ iX1   – jX3 + kX4    0

Notice there are more unknowns (variables) than equations (constraints). This means there are an infinite number of solutions to the
problem. To determine the best or optimum solution an objective function row (OBJFN) is created. This row will include feedstock
costs, operating costs, and sales prices of products to arrive at the most profitable or optimum solution to the problem. The algorithm
attempts to maximize the value of the objective function row. This value is calculated as the algebraic sum of each variable’s solution
value multiplied by its coefficient in the objective function row. Each variable’s solution value is also known as its “activity” in the
solution.
In an LP the variables and constraints must have unique names. In our example the variables are named X 1, X2, X3, X4, and X5, while
the constraints are named Eq1, Eq2, and Eq3.
  X1 X2 X3 X4 X5 RHS
Eq1 +a –b +c   +d = K
Eq2 –e –f   +g –h  L
Eq3 +i   –j +k    0
14 OBJFN     + yy – zz    
Linear Programming Concepts

An example of a very simple refinery LP model:


If we look at an LP matrix typical of many refinery models, it might look something like this:
  PURCURL SCR1URL BLSRE5S SELLE5S RHS Bear in mind this matrix is somewhat incomplete since we
OBJFN – 70.00     +120 ≤ 0.0 have not allowed for the disposition other products then E5S nor
WBALUR the production or purchase of the utilities FUL and STM.
–1 1     ≤ 0.0
L The variables at the top of the matrix represent:
WBALCD PURCURL = The purchase of Ural Crude Oil (URL) at
  – .005 1   ≤ 0.0
G $70.00/BBL.
WBALLN SCR1URL = The feed of URL to crude unit 1 (SCR1)
  – .065     ≤ 0.0
1 BLSRE5S = The blending of Lt. St. Run Gasoline (LN1) and
WBALHN Heavy St. Run Gasoline (HN1) to Euro5 Gasoline(E5S)
  – .070     ≤ 0.0
1 SELLE5S = The sale of E5S at $120.00/BBL.
WBALKL Note the purchase cost of URL and the sales price of E5S
  – .09     ≤ 0.0
1 are entered into the objective function row (OBJFN) with their
WBALDS1   – .23     ≤ 0.0 respective values and having opposite signs. This allows the
WBALAG optimizer algorithm to find the “optimum” amount of E5S to sell
  – .038     ≤ 0.0 with the least amount of URL purchased.
1
WBALLV1   – .028     ≤ 0.0 Once the URL is purchased it is “pumped” to the crude unit
WBALHV (SCR1) through the “pipe” WBALURL (a material balance row).
  – .23     ≤ 0.0 The crude unit fractionates the URL into all the crude unit
1
WBALVR1   – .24     ≤ 0.0 products, while consuming atmospheric tower capacity
WBALE5S     –1 1 ≤ 0.0 (CCAPAT1), fuel (UBALFUL) and steam (UBALSTM). The LN1
CCAPAT1   1     ≤ 94.0 is then blended to Euro5 Gasoline (WBALE5S) through the
UBALFUL   0.04     ≤ 0.0 BLSRE5S vector. E5S is sold at $120.00/BBL through the sell
vector SELLE5S
UBALST
  0.16     ≤ 0.0
M 15
Linear Programming Concepts

Although this model is very similar to a PIMS model it is not complete and not completely accurate in the model structure. There must
obviously be other blend components for E5S in order to blend the Straight Run Gasoline in order to meet specifications. It is only a very
simple example of how a refinery model might look. An actual PIMS model can be very, very complex and much more detailed.

16
Linear Programming Concepts

Constraints (Rows, Equations)

The constraints of a process can be inequalities as well as equalities. These represent the limits of operation and are only
needed for the optimization step if the constraint will actually be limiting at some point.

The types of rows found in a process model are material balances, blending specifications, ratios, unit capacities, utility
balances, stream property balances, distributive recursion rows, and other process unit limitations.

Variables (Columns, Vectors)


These represent the unknowns in the matrix. In an LP there are more unknowns than constraining rows.

The only thing unknown about a column is its “activity,” or value, in the optimum solution. As far as the optimizer is
concerned all other properties about the variable are known. However, this may not be true for the user of the LP. For
instance, in a petroleum refinery model the yield and properties of each fractionated stream coming from each crude oil,
component blending properties, process unit yields, process unit limits, etc. must all be determined ahead of time and made
available to the optimizer.

Columns generally represent flow in a process model. This flow can be in terms of mass, such as pounds or tons, or volume,
such as barrels or cubic feet.

In some cases it may take several columns to adequately model the stream in a process model. An example of this is a
gasoline catalytic reformer where several different severity options are available to the problem.

17
Linear Programming Concepts

Each column usually will have entries in more than one equation or row. One problem the user has is to adequately relate LP
vector properties to actual process properties. Examples of these problems are: yield decline as a result of catalyst aging,
process unit yield as a function of feed quality, physical properties of pools whose composition is determined by the optimizer
and is therefore unknown to the user when the case is submitted for solution.

The types of columns found in a PIMS model are purchases, sales, specification blending vectors, formula blending vectors,
process submodel vectors, distributive recursion property error vectors, and user specified control vectors.

Right Hand Sides (RHS)


The RHS of an equality row will force the activity of the row to be equal to the RHS. The RHS of a less than or equal to row
will set the upper limit of the activity of the row. The RHS of a greater than or equal to row will set the lower limit of the
activity of the row.

The activity of a row is the algebraic sum of each column activity multiplied by its coefficient in the row.

The units of the RHS constraint must be consistent with the units of its corresponding row.

In a PIMS model the RHS of most rows is zero; with the exception of capacity rows, whose RHS will be greater than zero.

18
Linear Programming Concepts

Ranges
A range represents an upper or lower limit on a row activity. For instance, if a process unit has a maximum capacity of 120
t/day and a minimum capacity of 80 t/day the range is –40 t/day. The capacity can range from 120 t/day down to 80 t/day.
Bounds
The bounds section of an LP is used to set upper and lower limits on the activity of a column in the optimum solution. When
the upper and lower limits are equal the activity of the column is fixed at that level of activity.

All columns, by definition, will have an upper bound of plus infinity and a lower bound of zero unless the user changes them.

Matrix Coefficients
Matrix coefficients are the row entries of a column that define all relevant properties of the column including price, cost,, yield,
disposition, physical properties, utility consumption, and capacity consumption.

As an example, a crude unit charge vector will have coefficients relating how a specific crude oil will be fractionated in a
specific crude unit. A gasoline reformer severity vector will have coefficients showing a specific yield pattern for that severity
along with specific utility and capacity consumption as they relate to that severity.

The coefficients are also the column entries of a row that relate to a particular constraint for various columns.

As an example, a normal butane material balance row will have coefficients showing the yield of normal butane from various
process units in a refinery model and make the total amount of normal butane available to other processing or sales.

19
Linear Programming Concepts

Problems With LP
There are several problems using linear relationships to model non-linear process operations. In a petroleum refinery some of these
problems can be illustrated as follows:

 Yield Loss Over Time  Additive Concentration vs. Response

Many process units are reactions which take place over a catalyst. As This is typically seen when blending TEL into
the catalyst is spent, the yield from the process unit deteriorates. The gasoline to improve octane. The response curve
LP can only look at one set of yields at a time. If the yield changes lends itself to a good approximation by utilizing
with time, the user must relate that to the LP by updating appropriate tangents to the response curve, the slopes of which
yield coefficients. An example of this behavior is reformer yield loss approximates the response of the blend to the
with catalyst aging. additive.

Catalyst Aging

C5+
Yield

Time

20
Linear Programming Concepts

Problems With LP

 Synergism or Antagonism

In the real world when two or more streams are blended together, the resulting blend may not exhibit the properties of the same
blend when the properties are rationed mathematically in the same proportion as the blend. When the actual blend properties are
less than the calculated properties, this is known as antagonism. When the actual blend properties are greater than the calculated
properties, this is known as synergism. This is a problem for the LP because the optimizer can only recognize one set of blending
values per solution.

100 100

Synergism
Octane Average Octane

Antagonism

70 70

Component A 0 50 100
Component B 100 50 0
% In Blend

21
Linear Programming Concepts

LP Accuracy

Accuracy of data is a problem, which all users must be concerned with. This problem must also be of concern to tech service
and operations people who must help in the collection of good data. An effort must be made to collect and analyze
representative samples, as well as provide accurate utility and capacity consumption data. Efforts must be made to separate the
effects of one variable from the effects of other variables. The matrix coefficients must accurately reflect real operating data.

As an example, in the operation of a fluid catalytic cracker (FCC) the yield of each gaseous and liquid product is a function of
many variables. For instance, the amount of Cat gasoline yielded can be altered by changes in feed quality, riser temperature,
cat-to-oil ratio, heat balance, etc. Therefore, when gathering FCC yield data it is important to only allow one variable to change
at a time in order to separate out the yield effects of changes in the other variables.

The LP matrix structure must also accurately reflect the process options available. While it is not necessary to model every
pipe and valve in a plant, care must be taken that necessary variables and constraints are modeled. If an option is not
represented in the matrix it cannot be evaluated by the optimizer as a viable solution.

22
PIMS Row/Column Types

PIMS Model Row Types PIMS Model Column Types


Material Balance Type Process Submodel Reporting Purchase and Sales
(Rows beginning with a "P" are not generated into the matrix.)
PURCxxx
SELLxxx
WBALxxx  0 PrrrRnn (REMARK)
VBALxxx  0 PprpTnn (or) PrrrTnn (TOTAL)
Specification Blending
DBALxxx (Table ASSAYS   PprpAnn (or) PrrrTnn (AVERAGE) BVBLxxx
only)
BWBLxxx
Specification   PprpNnn (or) PrrrNnn (NUMERATOR)
Bcmpxxx
Blending
Xprpxxx  0 PprpDnn (or) PrrrDnn (DENOMINATOR) Formula Blending
Nprpxxx  0 Objective Function FBLNxxx

Capacity Utilization   OBJFN =  Products Sold*Price -  Purchases*Cost -  Process Submodels


Utilities*Cost
CCAPccc Suntxxx
 RHS Assay Property Inspection Information
(Only found in Table Assays - not generated as a matrix row.)
Distributive Recursion
Utility Balance   Iprpxxx Rprpxxx
UBALxxx  0  
Control
Distributive    
uuuuuuu
Recursion Where:
RBALxxx = 0   xxx = any three character stream name
Rprpxxx = 0   prp = any physical property name
cmp = any blend component name
Control    
ccc = any capacity constraint name
Eprpzzz (or) Euuuuuu = 0   unt = any process submodel unit name
Lprpzzz (or) Luuuuuu  0   zzz = any alpha-numerics to complete the row name
Gprpzzz (or) Guuuuuu rrr = any descriptive three characters
 0  
nn = any alpha-numerics making this row name unique to a specific
submodel
uuuuuu = any user defined descriptive row name
uuuuuuu= any user defined descriptive column name
bld = blender tag
23
PIMS Computer Configuration/ Set up

Overview- Model Tree -


Options and Settings

When PIMS is installed on a personal computer


(PC), it will normally reside on the C: drive.
After PIMS is installed model sub-directories
can be created and models copied onto the hard
disk.

Within the each model sub-directory will be all


the spreadsheet and/or workbook files needed to
represent the process being modeled. In
addition, if PIMS options have been executed
other files will be created by the PIMS system
and placed into the current model directory.

Many different models can exist on the same


computer. The number of models is only limited
by the size of the hard disk.

24
PIMS Computer Configuration/ Set up

Pims Screen Setup

Action Bar

25
PIMS Computer Configuration/ Set up

File Options

Edit Options

View Options

26
PIMS Computer Configuration/ Set up

Model Options

Run Options

27
PIMS Computer Configuration/ Set up

Tools Options

Windows Options

Help Options

28
PIMS Computer Configuration/ Set up

Model Tree - Options and Settings

29
PIMS Computer Configuration/ Set up

General Model Settings

30
PIMS Computer Configuration/ Set up

Report Settings

31
PIMS Computer Configuration/ Set up

Recursion Settings

32
PIMS Computer Configuration/ Set up

Model Tables

33
PIMS Computer Configuration/ Set up

Model Tables - Example Tree Entries

Crude Unit Model


Location
Table BUY
34 Location
PIMS Computer Configuration/ Set up

Making a Run

35
PIMS Computer Configuration/ Set up

Model Tree - Reports Solution Files

Full Solution
Location

Summary
Solution
Location

36
PIMS Computer Configuration/ Set up

Model Tree – Reports -Down _frame.html

It is the most complex


report from PIMS solutions
that can be read by all non
PIMS users

37
PIMS Computer Configuration/ Set up

Model Tree - Flowsheets

38
PIMS Computer Configuration/ Set up

Model Tree - Flowsheets

39
PIMS Computer Configuration/ Set up

Model Tree
Flowsheets
Unit detail

40
PIMS Data Tables and Reports

Required Tables
BUY Defines materials that will be purchased into the plant model
SELL Material that will be sold from the plant model
Other Supply/Demand Tables
UTILBUY Defines utilities that will be purchased or produced by the plant model
UTILSELL Defines utilities that will be produced and sold from the plant model
GROUPS Aggregates materials for purchases, sales, blending, and reporting
ALTTAGS Allows tiered pricing for purchases and sales

41
PIMS Data Tables and Reports

Crude Distillation Tables


CRDDISTL Defines estimated crude slates and crude/vacuum capacities and utilities
CRDCUTS Defines crude/vacuum unit cut segregation and type
ASSAYS Defines cut yields and properties for each crude available to the model
UNITS Provides crude oil gravity’s and changes units of measure for other materials
ASSAYLIB Defines multiple Table ASSAYS and maps them to Logical Crude Units
SWING Defines different cutting schemes for multiple crude/vacuum units

Blending Tables
BLENDS Defines materials that are specification or formula blends
BLNMIX Defines formula blend composition and maps components to spec blends
BLNSPEC Defines specifications for spec blends
BLNxxxxx Provides properties of materials used in LP
INDEX Provides relationship between properties and their linear indices
SCALE Provides matrix scaling factors for selected properties
WSPECS Defines which specification blend properties are blended gravimetrically

BLNxxxxx data tables used in the training model


BLNNAPH Properties of naphtha and lighter materials used in LP
BLNREST Properties of kerosene and heavier materials used in LP

42
PIMS Data Tables and Reports

Crude Distillation Tables

CRDDISTL - Defines estimated crude slates and crude/vacuum


capacities and utilities

CRDCUTS - Defines crude/vacuum unit cut segregation and type

ASSAYS - Defines cut yields and properties for each crude available to
the model

UNITS - Provides crude oil gravity’s and changes units of measure for
other materials

ASSAYLIB - Defines multiple Table ASSAYS and maps them to Logical


Crude Units

SWING - Defines different cutting schemes for multiple crude/vacuum


units

43
PIMS Data Tables and Reports

Submodel Tables
SUBMODS: List of submodel tables to include in LP and Validation Report
CAPS: Capacity limits of process units
Sxxx Process unit submodel for process xxx
 
Sxxx submodel tables used in the training model listed in same order as Table SUBMODS
CR1 Logical Crude Unit 1 (not a spreadsheet but appears in Validation.lst)
CR2 Logical Crude Unit 2 (not a spreadsheet but appears in Validation.lst)
UNHT - Naphtha Hydrotreater
UR94/UR98 - Catalytic Reformer
USGP- Sat Gas Plant
UKMP - Kerosene Mix Pool
UDMP – Diesel Mix Pool
UKH1/ UKH3 – Kerosene Hydrotreater ( 1 –diesel mode and 3 – kero mode)
UDH1 - Diesel Hydrotreater
UFH1/ UFH3 - Distillate Hydrotreater ( 1- cat feed mode from FCC; 3 – diesel mode)
UHKR - Mild Hydrocracker
UFCL/ UFCH - Catalytic Cracking Unit low/ high severity
UUGP – Unsat Gas Plant
UMTB- MTBE Unit
UDCK - Delayed Coker Unit
UPFS- Plant Fuel System
UFLR - Flare recovery system
UAMN - Amine Treating
USRU Sulfur Recovery Unit
UHYH / UHYN - Hydrogen Header/ Hydrogen Plant

44
PIMS Data Tables and Reports

Also in the model can be a lot of submodels used for strategical simulations. Units which are not in use but are included in business plan
or are in conservation like:

UALK - Alkylation Unit


UISO - C5 Isomerisation Unit
UBIM- Bitumen Unit
UBRQ - Briquetting Unit

Recursion Tables

PGUESS Initial guess at recursed properties of recursed streams


PDIST Initial guess at error distribution
PCALC Transfers properties from one stream to another
PCALCB Provides Pcalc intercept for mx+b property transfer relationships
NONLIN Defines matrix coefficients that utilize generalized nonlinear recursion
CURVE Defines nonlinear relationship of coefficients specified in Table Nonlin

Miscellaneous Tables
CASE Defines cases that modify existing matrix
ROWS Changes sense of rows and adds additional structure to LP
BOUNDS Controls activity of non-purchase and non-sales vectors
PRNTABS List of miscellaneous tables included in Validation.lst
REPORT Provides fixed costs, report suppression, and report spreadsheet creation
VPOOL Defines Virtual Pools for automatic generation of compositional recursion pool structure

45
Distributive Recursion

Recursion
Before we address the issue of Distributive Recursion, or DR as it is referred to, let us first address the issue of Recursion.

What is Recursion?
In the early days of linear programming, when a model was built to represent a process such as a refinery, there was, of necessity,
data in the model that had to be estimated. These data were usually physical property data of materials used in the refinery to
produce refined products. For example, gasoline is blended in a refinery to meet certain specifications for octane, vapor pressure,
sulfur content, distillation, etc. Therefore, when blending data was provided for each of the blend components to be used by the
optimizer to blend gasoline, the user estimated most of these data. Unfortunately, much of these data were dependent on other
factors such as feedstock qualities and operating conditions. In other words, they were dependent on the composition of the crude
slate feeding the refinery or the way the refinery process units were operated. The cut point for each material coming from the crude
unit was a factor, as well as the severity at which the reformer was run and the ratio of C3 olefin to C4 olefin in the feed to the alky
unit.
Because much of these data were estimated or guessed at by the user, the data in the model was inaccurate or wrong. To compensate
for this, a technique was developed to try to improve the data as the model was being solved. This technique, which came to be
known as Recursion, was very ingenious. The optimizer first solved the model with the estimated data in it. After solving the model,
an external computer program written in a computer language such as, Fortran, PL/1, or Assembly Language, calculated the physical
property data being used in the model from the optimum solution. In other words, the external program examined the optimum
solution just produced by the optimizer and calculated the physical property data of the crude fractions by using the composition of
the crude slate in the solution. This data was then inserted into the model (LP matrix) thereby updating the estimated data with more
accurate data. The model was resubmitted to the optimizer and solved again. The same external program then examined this second
solution, the same data recalculated, the recalculated data inserted into the matrix and the model solved again. This process was
repeated until the changes taking place in the calculated data were small enough to be within certain tolerances specified in the
external program.

46
Distributive Recursion

What is Distributive Recursion?

Distributive Recursion is the next logical extension of the simple recursion described above. In simple recursion, the difference
between the user’s guess and the optimum solved value is calculated in an external computer program, updated, and re-optimized.
Distributive Recursion model structure moves that error calculation from outside the LP solution to inside the LP matrix itself. The
whole idea is to provide “visibility.” In other words, to allow the upstream producer of a material to see the requirements of the
downstream user, and to allow the downstream user of a material to see the production constraints of the upstream producer in the
current LP matrix being solved. This allows the optimizer to economically balance the cost of producing certain material physical
properties against the value of those properties at the downstream location. With this arrangement, the optimum solution that is
reached has physical property data for all of the recursed streams that exactly match the composition of the pools used to create
those properties.

What Is the Actual DR Mechanism?


After the current matrix is solved using initial physical property estimates or guesses, new values are computed from the solution
and inserted into the matrix for another LP solution. The major distinction between DR and simple recursion is the handling of the
difference between the guess and the calculated physical property data from the solution. This difference is referred to as the “error.”
When the user guesses at the physical properties of recursed pools in an LP model, error is created because the user always guesses
incorrectly.

47
Distributive Recursion

Let’s look at a very simple DR model. If we have a cat cracker unit (SCCU) in our model and we want to dynamically adjust the cat
yields based on feed quality using a delta based model structure (see section on Delta Based Modeling), we need to pool the feeds to
the cat and recurse on whatever feed qualities we want to use to drive the delta based model. The flow diagram would look like this:

LV1

HV1 CFP SCCU

DCG
And the recursion structure would look like this:

This structure creates a pool CFP from LV1, HV1, and DCG. The material balance row VBALCFP collects the pool barrels and
makes them available for processing downstream (i.e. the cat cracker unit SCCU). The RBALCFP row is a recursion balance row
which sums the pool barrels into the pool collector column SCFPCFP. The activity of column SCFPCFP in the solution will be
equal to the total amount of CFP yielded into the VBALCFP material balance row. It is very important that in all distributive
recursion structure the negative entries in a recursion balance row exactly match the negative entries in the pool material
balance row (VBAL or WBAL) if one exists.
  SCFPLV1 SCFPHV1 SCFPDCG SCFPCFP RAFCCFP   RHS
VBALLV1 1           0
VBALHV1   1         0
VBALDCG     1       0
VBALCFP –1 –1 –1       0
RBALCFP –1 –1 –1 1     =0
RAFCCFP –24 –20 –31 26 1   =0

48
Distributive Recursion

In this example, we have a cat cracker feed quality AFC (aromaticity factor), which we are using to adjust the yields in the cat cracker
using delta-based modeling structure. The coefficients in this row represent the property AFC for each of the feeds in the pool. In
other words, LV1 has an AFC of 24, HV1 has an AFC of 20, and DCG has an AFC of 31. We have guessed the AFC of the CFP pool
to be 26. This guess must be added to table Pguess.

In a PIMS model, material balance rows are normally inequalities. However, recursion balance rows and recursion property rows are
equalities and must equal to zero. Therefore, the activity of column SCFPCFP must equal the sum of the activities of columns
SCFPLV1, SCFPHV1, and SCFPDCG. Let’s look more closely at the RAFCCFP property recursion row. If we guess wrong on the
AFC of recursed pool CFP, there will be a difference in the pool AFC property of 26 and the actual pool AFC.

The actual pool AFC is calculated by multiplying the LV1, HV1, and DCG column activities by their respective AFC properties in
row RAFCCFP and dividing by the sum of their activities. This difference is the “error” created by guessing at the property and
guessing the wrong value. The error is summed into the activity of the “error distribution vector (column)” RAFCCFP and has units of
property-units of volume/unit of time or property-units of weight/unit of time. In our example, the units are AFC-Barrels/Day

The entire structure shown above is part of a process submodel called SCFP.xls in a PIMS model, except for the column RAFCCFP,
which is the error distribution vector. PIMS automatically generates error distribution vectors and puts the appropriate error
distribution coefficients in the proper rows for the user.

49
PIMS data
Crude data
Set on max. quantity
Quantity chosen by PIMS model –
Crude input data in PIMS PIMS results economical criteria

Fix quantity for min


and max

Crude availability info are provided by Group - Supply Chain Management Department
50 Price is the main criteria in Crude diet recipe selection.
PIMS data
Crude info
Rezultate analize/Aegean Freedom 16 aprilie 2018
Cloruri Cloruri Cloruri Vascozitate
Densitate Sediment Asfaltene CCR Acid.
Titei Apa [%v/v] anorganice organice (Petrolite) PP [°C] Sulf [%] la 37.8°C
[g/cm³] [%m/m] [%]m/m] [%m/m] [mgKOH/g]
[mg/kg] [mg/Kg] [mg/Kg] [cSt]
0.8754 0.15 0.01 53.7 6.2 29.8 -1 1.48 1.6 12.82 4.06 0.23

REZULTATE ANALIZE

Congelare CCR[%]m/ Asfaltene


Nr. acid [°C] m] [%]m/m
Densitate Aromate Naftene (i+n)parafine TDC [°C] [mgKOH/g]
` Taieri [°C] %greutate 3 Sulf
g/cm
[%v/v] [%v/v] [%v/v] All crudes/alternative
Gaze 0-15 0.73 feedstock processed in
Fractie usoara 15-35 0.79
Benzina usoara 35-100 4.39 0.6957 302.6ppm 3.5 24.5 72.0 Crude
. unit are
Benzina grea 100-165 7.95 0.7559 645.1ppm 10.5 32.3 57.2
mono=13.5
analyzed in Rompetrol
Petrol 165-240 10.18 0.8039
0.8597
0.30% di=1.1 -53.1 0.04 laboratory
Motorina 240-375 24.72 1.06% 0.17 -9
DV1 375-450 10.28 +36
1.69% 67ppm
DV2 450-565 18.07 0.31
Rezidiu vid 565+ 22.56 2.79% 17.70 6.8
*crude / alternative feedstock yields assumptions LAB

Yields cuts and quality BONNY SIBERIAN


REBCO KIRKUK AZERI
LIGHT (Vaporul CPC
(Vaporul (Vaporul (Vaporul
ASSAY din PANAGIA (Vaporul
CRUDE UNIT AEGEAN NISSOS AGIOS
13/03/2017 ARMATA NISSOS,
FREEDOM DELOS, GERASIMOS,
adaptat la 25 martie 04.04.2018)
16.04.2018) 28.06.2017) 01.03.2018)
taieri de vara 2018)
Gases 1.52 1.28 1.34 1.73 5.01 1.36
Naphtha 12.34 18.73 16.66 17.95 30.94 15.97
Kerosene 10.18 14.83 11.52 11.86 16.92 13.40
Yields from different
Gasoil 24.72 34.89 27.21 22.97 25.7 25.12
crude vessels, %wt
Vacuum Distillate 28.35 23.32 21.06 23.59 17.1 30.90
Vacuum Residue 22.56 6.95 20.6 21.31 4.24 12.97
Loss 0.34 1.61 0.59 0.09 0.28
51
TOTAL 100.0 100.0 100.0 100.0 100.0 100.0
PIMS data
Crude info
Full Crude Assay from Chevron library generated
by Petro Sim and adjusted with received crude PIMS results
quality

52 Crude info represent the first step in planning process


PIMS data
Other feedstock

Input PIMS Output PIMS

Quantities chosen by PIMS model


- used in processes or blending
Limits Min and max area
quantity

% imposed by government
environmental legislation Consumption of other feedstock are used in Commercial department for
53
acquisition contracts
PIMS data
Stock management – finish/unfinished consumption and accumulation

Input PIMS Min /Max stock of


finish/unfinished
Reported on
monthly

Output PIMS

Straight run gasoil consumption – stock from


previous month
In PIMS quantity
Total consumed quantity= 5,840-900 = 4,940 are daily
tone reported
159 represent the quantity
assumed to be consumed at
beginning of the month:
4,940/31 =159 tone/day

Stock strategy is decided by the PIMS users


54
PIMS data
Products Output PIMS Vega transfer –
optimal economic
Input PIMS
Free for model to chose
Products delivered to VEGA , optimal quantity
quantity min and max free to
optimize transfers to VEGA

Fix quantity on min and max - After contracts and quantity for intern are made, PIMS chose
set contracts optimal economical quantity for export

55 Prices are a decision-making criterion in determining optimal quantities


PIMS data
Units Capacity Optimal
Output PIMS Crude Unit
Min /Max on Units run rate
Input PIMS Capacity

*Table CAPS Process Unit Capacities


* Multi-Period Model Period Specific Constraints -------------------------------------------------------------->
TEXT MIN1 MAX1
*
CAT1 Crude Unit #1 T/day 11.000 14.300
CVT1 Vac Unit #1 T/day 0.000 7.600
CNHT NHT Capacity T/day 0.000 2.600 Units Units
CPRB PRB Capacity T/day 0.000 2.300 operational operational
CLPR LPR Capacity T/day 0.888 1.579 mode mode
CKHT KHT Capacity T/day 0.902 1.403
CKH1 KHT Dsl 10 tpd 0.000 1.403
CKH3 KHT Jet tpd 0.000 1.427
CDHT DHT Capacity T/day 2.004 2.605
CFHT FHT Capacity T/day 1.955 3.060
CFH1 FHT Vgo 10 tpd 0.000 0.000
CFH3 FHT Dsl 10 tpd 0.000 3.060
CHKR HKR Capacity T/day 2.830 5.050
CFCC FCC Capacity T/day 2.563 3.418
CFC1 FCC from MHC tpd 0.000 3.418
CFC2 FCC from FHT tpd 0.000 3.418
CFC3 FCC for 92Ron tpd 0.000 0.000
CDCK Delayed Coker T/day 1.700 3.420
CHYN H2 Prod Nm3/hr 0.000 39.000
CAMN Amine Capacity T/day 0.000 1.040
CSRU SULF Prod T/day 0.000 0.500
CSGP Sat Gas Plant T/day 0.000 0.695
CUGP Unsat Gas Plnt T/day 0.000 1.265
CFLR Flare Capacity T/day 0.000 0.280
CPFS PFS Capacity T/day 0.000 1.190
CBRQ BRQ Capacity T/day 0.000 0.000

56 Crude Unit run rate is limited by optimal economic and other units capacity
PIMS data
Units Yields
Input PIMS Output PIMS

Yields provided by
Process and Engineering
Department with some
degrees of freedom Shift vectors – coefficients set in
PIMS to catch the impact of feed
Flow proprieties in PIMS quality and unit parameters in
yields unit parameters set
in PIMS

57 Yields assumption impact the Refinery operation


PIMS data
Components qualities
Input PIMS
Output PIMS

Gasoline quality
P&E
PIMS results
RON 94.8
Process and MON 83.6
Engineering Arotamatics % (v/v)
Department info Benzene % (v/v) 0.98
RvP,kPa 72-76
FBP Benzina ~ 200 deg.C

 in PIMS model qualities for all products ( gases, gasoline, diesel…) can be assumed or calculated

* Table BLNNAPH Naphtha Blend Stock Properties


* <--- Evap in Deg F -------------->

RV P Deg F Naph- Arom-


* Sulphur RON MON Index 10% Evap 158 212 302 Benzene thenes atics
TEXT SPG SUL RON MON RVI 10P 070 100 150 BEN NAP ARO
IBT Iso-Butane 0 93.0 91.0 175.26 0 100 100 100 0 0
NBT N-Butane 0 91.9 87.0 186.64 0 100 100 100 0 0
IPT Iso-Pentane 0 91.0 87.0 50.77 0 100 100 100 0 0
NPT N-Pentane 0 68.0 66.0 15.86 0 100 100 100 0 0
SRM Stabilised Reformate 0 3.46 60 11
IMB Imported MTBE 0.7440 0.0003 113.0 103.0 15.73 100 100 100 0.0 0.0
ALP MTBE Raffinate 0.0003 95.6 88.6 190.68 0 100 100 100 0.0 0.0
ALU ETBE Raffinate 0.0003 95.6 88.6 190.7 0 100.0 100.0 100.0 0.0 0.0
IME Imported ETBE 0.7485 0.0001 116.0 102.0 17.48 95 100 100 0.0 0.0
ETB Plant ETBE 0.7485 0.0007 116.0 102.0 3.95 95 100 100 0.0 0.0
ETH Ethanol 0.8000 0.0001 120.0 96.0 35.44 20 95 100 0.0 0.0
MHN MHC Gasoline to NHT 0.7600 0.0015 67.0 62.0 1.3 45 90 100 0 35.00 10.00
LN2 Light naphta tip II 0.680 0.0005 75.0 72.0 19.5 30.0 80.0 93.0 100.0 0.90 1.0

Components qualities have a big influence in blending area and


58 influence the quality of finished products
PIMS data
Blending constraints Output PIMS PIMS optimize the gasoline recipe based on
specification
Input PIMS Example Gasoline for internal market

Bio content
Spec limitation

Components excluded by PIMS Qualities for final blend


from final blend

Product qualities and quantities produced by the model are based on specifications and commercial
59 assumptions.
Some logistics constraints are not in the model but can be set be the users.
PIMS data
Utilities
- PIMS model contains also info regarding utilities consumption
- Input data: utilities prices and utilities specific consumption

Input PIMS Output PIMS


* Table UTILBUY Utility Purchases
*
TEXT COST ***
*
* Purchases:
LED LED KGMS 15.38 Price based upon TEL containing 39% Pb
KWH Power KWH 0.0670 Power KWH
S36 Steam 36 T 64.000 Steam 36 T
S16 Steam 16 T 60.000 Steam 16 T
S06 Steam 6 T 50.000 Steam 6 T
H2D Water Demin M3 1.800 Water Demin M3
H2C Water Cooling M3 0.055 Water Cooling M3
CAT Cat $ 1.000 Cat $
CHM Chem $ 1.000 Chem $

*Table SFC1
*
* UTILITIES
UBALFUL Fuel MMKCAL 0.015
UBALKWH
UBALS36
Power KWH
Steam 36 T
9.399
0.1838
- Based on utilities consumption PIMS optimize Units run rate
UBALS16
UBALS06
Steam 16 T
Steam 6 T
0.1197
-0.5278
- PIMS can be used to see an estimated utility consumption but utility
UBALH2D Water Demin M3 0.0000 planning and optimization is done with Aspen Utilities
UBALH2C Water Cooling M3 19.7869
UBALCAT Cat $ 2.5759
UBALCHM Chem $ 1.4510

60 Optimal solution depending also by utilities consumptions.


PIMS Reports
PIMS results Refinery Reports

SAP

Daily Refinery balance on daily bases are compared with actual

Orion scheduler report – yields and crude recipe/quality

PIMS
reports are
Daily Refinery Reports – Daily and MTD production overview
used for

Daily Activity Reports - Daily and MTD economical report

P&E and Blending area – guideline for monthly view

MOP Business strategy decision


Latest estimations
5YBP

61
PIMS data

Tests:

1. Adding a new crude in Refinery recipe


2. Adding a new feedstock in Refinery
3. Produce a new grade of gasoline
4. Change internal Gasoline RVP specification by increasing with 10Kpa
5. Simulation with accumulation/consumption of unfinished products
6. Decrease Export Diesel price with 50$/t
7. Change operating condition in FCC Unit – Riser Temperature
8. Constrain UFH3 run rate at max150cm/h
9. Route LCO in Mild Hydrocracker
10. Start up Alkylation Unit
11. Shut down Delayed Coker Unit

62
Благодарю за внимание!

You might also like