Simulating Refinery Processes
Simulating Refinery Processes
Rajender Mangalarapu
[email protected]
14-Feb 2022
% Distilled
Petroleum Assay Background
• Why we use them:
• API Project 6: Isolated over 16,000 distinct hydrocarbon compounds from a single sample of
Oklahoma crude
• C40 has 62,491,178,805,831 isomers
• Petroleum assays were utilized to reduce the dimensionality of the calculations
Petroleum Assay Background
• Complex mixture of hydrocarbons
• Over 16,000 compounds have been identified in one sample
• Composition varies widely depending on:
• Geographical location
• Mix of individual wells
• Variance of wells with time
• Typical Boiling Point Range
• Methane to 1600 °F
• Typical Gravity Range
• 10 – 45 API
• Historically, crude price was based on gravity
Petroleum Assay Background
• There is a large amount of crude assay data available for the crude oils of the world
• Some is proprietary; some is available in open literature
• Typically, the data contained in a crude assay includes:
• Yields generate from the physical or simulated distillation
• Specific gravity
• Gas chromatographic components
• Sulfur
• Nitrogen
• Viscosity
• Cold flow (pour point, cloud point, freeze point)
• Heavy Metals
Petroleum Assay Background
• Developing Petroleum Pseudocomponents
• Pseudo-components are developed to represent the unknown components in the stream
• Petroleum assays are divided into predetermined cut-point ranges
• Each pseudo-component corresponds to several unknown actual components
• Doing this introduces a degree of uncertainty
Petroleum Assay Background
Terminology
Laboratory Methods: TBP
• True Boiling Point (TBP)
• Best representation of the true composition of the petroleum stream
• Unfortunately, time (minimum of 8 hours) and expense usually limit
its use to crude samples
• There is no standard (ASTM-2892 15:5)
• Fractionating still with reflux
• Separates component by component (sharp cuts)
• Upper limit is approximately 650 °F or 900 – 950 °F NBP
• Cracking above 650 °F
• Typically, the pressure is reduced to 40 mmHg – 950 °F
• Mention that the software has infinitely sharp cuts
Laboratory Methods: TBP Equipment
Laboratory Methods: ASTM D86
• D86 is a non-fractionating test run at room
temperature and pressure
• Condenser is cooled with ice water specified to be
between 32 and 40 °F
• Most common laboratory distillation
• Most widely used for finished product specifications
• Reproducibility is reported to be +/- 6 degrees
• Care should be taken to ensure data is corrected for
lab pressure
Laboratory Methods: ASTM D86
Thermometer
100 CC
Burner
Laboratory Methods: ASTM D1160
• Designed for high boiling point samples (heavy heating
oil, gas oils, residual oils)
• Commonly conducted at 10 mmHg
• Upper limit is approximately 1000 °F
• Most labs apply pressure corrections and report at
760 mmHg
• Initial point is higher than TBP; from 50% to end point,
test is nearly identical to TBP distillation
• The pressure conversion back to 1 ATM is prescribed
by the ASTM method
Laboratory Methods: ASTM D1160
Thermometer
To Vacuum
Burner
Laboratory Methods: ASTM D2887
REFERENCE RUN 1 RUN 2
• G.C. simulated distillation approximates TBP distillation 0.5% (IBP) 115 112 112
5% 151 148 147
• Upper limit is approximately 1100 °F 10% 176 173 175
15% 201 197 198
• Used for “Gasoline” material down to “Resid” 20%
25%
224
243
221
241
220
240
30% 259 255 256
• Highly reproducible 35% 275 271 272
40% 289 287 288
• Time and cost are much less than TBP 45% 302 298 299
50% 312 309 308
55% 321 318 318
60% 332 329 330
65% 343 339 340
70% 354 350 352
75% 365 362 363
80% 378 374 376
85% 391 388 387
90% 407 404 404
95% 428 426 425
99.5% 475 474 475
Common Terms: API Gravity
• API Gravity is a specific gravity scale developed by the American Petroleum Institute (API)
for measuring the relative density of various petroleum liquids
• API Gravity is graduated in degrees on a hydrometer instrument and was designed so that
most values would fall between 10 and 70 API gravity degrees
• Where:
• NBP = average boiling point, degrees R
• SPGR = specific gravity at 60 °F
Common Terms: UOP K or Watson K
• Examples:
• Paraffins = 13+
• Kansas Crude Oil = 11.8
• Cracked Gasoline = 10.9
• Condensed Aromatics = 10.0
950
600
Viscosity at 210ºF
200
10.0 12.5
"K" Factor
Ref: Watson, et.al, IEC, 27,1460,(1935).
API Gravity
Common Terms: Gravity Data
1700 100
Heavy Naphtha
Light Naphtha
Light Ends
Kerosene
Bottoms
80
Diesel
1300
70
1100
Temperature (ºF)
60
API Gravity
900
12.7% 10% 15.3% 24% 50
700
8% 9.3% 7.2% 13.5% 40
500
30
300
Enter Gravity at Midpoint 20
-100 0
0 10 20 30 40 50 60 70 80 90 100
Percent Distilled
Exercise 1
Gravity Data, pg. 2
Assay Data Entry
Assay Streams
• Entire assay definition entered in stream
Assay Streams
• Entire assay definition entered in stream
• Flowrate required
• Optional
• Using a different cutpoint set
• Excluding an assay stream from blending
Assay Streams: Data Entry
• Required:
• Percent Distilled vs Temperature
• Gravity Data
• Average value
• Curve data
• Optional:
• Molecular Weight
• Lightends
• Refinery Inspection Properties
• User-defined parameters
Assay Streams: Data Entry, Light Ends
• Light ends refer to those components
lighter than your petroleum assay
• When supplying laboratory data on a
light ends free basis, omit the light
ends section
• Instead, enter the light ends data as
an additional input stream to be
blended with the assay, to produce
the total stream
Assay Streams: Matching Light Ends
Assay Processing
Assay Processing Steps
Assay Processing Steps
Assay Characterization Options
• Change methods used to define pseudocomponent properties
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to calculate pseudocomponent critical properties and ideal gas enthalpy
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to calculate pseudocomponent molecular weight
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to fit a curve through the entered distillation data
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to convert entered distillation data from entered basis to TBP (for internal
calculations) and back again
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to calculate a set of gravity curve data for an assay when an average gravity is
entered
Assay Characterization Options
• Change methods used to define pseudocomponent properties
• Method used to calculate the normal boiling point for each pseudocomponent cut
#1: Interconversion Methods
• API 63 (old) Methods
• ASTM D86 to TBP: W.C. Edmister, et. al.
• ASTM D1160 to TBP: W.C. Edmister, et. al.
• Convert to D1160 at 10 mmHg
• Convert to TBP at 10 mmHg
• Convert to TBP at 760 mmHg
100 IBP-10
TBP 50% - ASTM 50%
TBP DT
90-EP
TBP = a(D86) b
Where a, b are supplied for IP, 10, 30, 50, 70, 90, 95
• Uncertainty of fits:
• IP = +/- 16 °F
• 95 = +/- 12 °F
D86 = b
a(SD) Fc
Where: F = f(SD10, SD50) and a, b, c are supplied for IP, 10, 30, 50, 70, 90, 95
450
350
Temperature (F)
300
250
NBP-288
NBP-262 NBP-311
200
150
100
0 10 20 30 40 50 60 70 80 90 100
Percent Distilled
#2: Distribute Into Cuts
• Add more cuts to the cutpoint set
500
450
350
Temperature (F)
300
250
200
150
100
0 10 20 30 40 50 60 70 80 90 100
Percent Distilled
Example: Effect of # Cuts on Column Results
150
Uniform Spacing
140
Variable Spacing
Reboiler Duty (MM BTU/hr)
130 25°F cuts (Default)
120
60
"Correct" Solution
50
10 30 50 70 90 110 130 150 170
Number of Petrocomponents
Assay Characterization Options
• Edit or create new cutpoint sets
Assay Characterization Options
• Edit or create new cutpoint sets
Using Different Cut Point Sets
• To use a different cut point set, go into the Stream data entry window
#3 – 5: Basic Property Calculations
• #3: Determination of mass, moles, and volumes for
each cut
• #4: Processing of light ends
• #5: Calculation of NBP, MW, and gravity data
#6: Finalizing Pseudocomponents
• After determining the NBP, MW, and gravity data for each component, the rest of the
component properties are calculated and the list of pseudocomponents is generated
Assay Blending
• A “blend” is a set of cutpoints (petrocomponents)
• The properties of a given cut are “averaged” from every assay containing that cut:
• The blend properties are used everywhere in the simulation for that pseudocomponent
Assay Blending: How It Works
TBP Feed 1, Rate=150 Feed 2, Rate=400 Feed 3, Rate=100
215º
205º
% Distilled
Blending
NBP = 211.5º
SPGR = 0.838
Sulfur wt% = 0.0107
Assay Blending: Why It’s Done
• Used to simplify modeling and calculations
• What if you wanted to preserve stream differences?
Overhead
• Property Differentiation Light Oil
High Sulfur
Low Sulfur Assay
Assay
LSFO HSFO
• Economic Analysis
Assay 1 Product A (X$/BBL)
Processing
Assay 2 Product B (Y$/BBL)
Assay Blending
• All blending options are set in the Stream data entry window
Click to Switch
Demo: Assay Blending
• “Assay Blending.prz” example
• 2 streams with same assay data
• Only difference: Different API gravity and
sulfur content
• Values don’t equal what’s entered
• Why?
• Answer = Blending
• What if we use different cutpoint sets?
• What if we exclude from blending?
Assay Blending
• Multiple Blends:
• Use to preserve stream differences (i.e. – Virgin and Cracked stocks)
• Any number of assays can be combined into a blend
• Any number of blends can be defined
• Default: Combine all streams that use the same cutpoint set
Heavy Product
Light Product
Temperature
Overlapping
Components
Needed
ºF
900
800
700
20 50 80 99.9
Percent Distilled
Distillation
Column Simulated as Linked Flash Drums
Tray Numbering
• Normally use Theoretical Trays (Stages)
• Each stage is another flash calculation
• Numbered from Top to Bottom
• Condenser is always Stage 1 if used
• Even for subcooled condenser
• Reboiler is always the last stage if used
• Certain types add more than 1 effective stages
• Model the reboiler based on how the return stream mixes back
into the column, not by what the actual type of reboiler it is
• When converting packing to stages:
• Rule of Thumb: 2 – 3 feet of packing per stage
• Modern structured packing could be inches, so check with the manufacturer
Exercise 2
Translating an Existing Column into AVEVA™ PRO/II™ Simulation , pg 1
Distillation
Data Entry
Distillation Data Entry
Pressure Profile
Feeds and Products
Convergence Data
All Column Algorithms are Iterative
• Want to solve f(x) = 0
• Generate a sequence of estimates of solution:
x0, x1, x2, … xN
• Converged when all equations are satisfied, i.e.:
| f(xN) | < 0.001
• xN is regards as the solution
Column Convergence Issues
• Newton-Raphson Method
• One Dimension
• We are trying to solve for x given the equation F(x) = 0
• Taylor Series:
• F(x+h) = F(x) + h * F’(x) + (h2/2) * F’’(x) + …
• If F(x+h) = 0 then:
• F’(x) * h = -F(x)
• h = -F(x)/F’(x)
• h is the full Newton step
• The next iteration estimate then becomes:
• xk+1 = xk + h
• When using Damping
• xk+1 = xk + Q * h
• where Q is the damping factor
Column Convergence Issues
• Newton-Raphson Method
• Multiple Dimensions
• We are trying to solve for x given the equation F(x) = 0
• Taylor Series:
• F(x+h) = F(x) + [J(x)] * h + …
• If F(x+h) = 0 then:
• [J(x)] * h = -F(x) This is a Matrix equation
• h = -[J(x)]-1 * F(x)
• h is the full Newton step
• The next iteration estimate then becomes:
• xk+1 = xk + h
• When using Damping
• xk+1 = xk + Q * h
• where Q is the damping factor
Convergence of Newton’s Method
f(x)
0
X x*
Convergence is Not Guaranteed!
f(x) Periodic
0
X x*
Convergence is Not Guaranteed!
But better
Bad guess
guess fails!
f(x) converges
0
X x*
Damping
• Damping reduces the iteration step and suppresses oscillation
• Typical damping values:
• Conventional columns: 1.0 (default)
• Columns with steam: 0.6 – 0.8
• Crude, Vacuum, FCC Main Fractionator
F(x)
xk+1 xk xk+2
X
Column Convergence Issues – Damping
• Damping
• One Dimension (converging sequence)
xk+1 = xk + Q * h where Q < 1.0 is the damping factor
F(x)
X
xk+2 xk+1 xk
Demo – Newton Solver Excel Sheet
• “Newtons Method.xls”
• Shows how your initial estimates will affect convergence
• Shows how damping can assist convergence
Thermodynamic Systems
Reboiler
Reboiler Models
• Most reboilers can be simulated as:
• Kettle
• Thermosiphon with Baffles
• Thermosiphon without Baffles
Reboilers – Kettle
• Adds 1 effective stage
Reboilers – Single Pass (Once Through) TS
• Equivalent to a Kettle Reboiler because bottom sump is in equilibrium with VN
Reboilers – Circulating TS w/out Baffles
• Adds 2 effective stages because RL not in equilibrium with sump
Reboilers – Circulating TS with Baffles
• Adds 2 effective stages because RL is not in equilibrium with the reboiler sump
LN-2 N-2
Bottom Tray
RV
VN-1 VN-1 LN-2
RL
BTMS N-1 RV
Reboiler Sump
Bottom
Sump Reboiler
Sump RL RF
N
BTMS RF
Reboiler Q
Reboilers – Preferential TS
• Adds 2 effective stages because RL goes to bottom sump, which overflows as LO into the
reboiler sump, thus changing the equilibrium
Exercise 3
Reboilers, pg. 5
Condenser
Heaters and Coolers
Flash Zone Modeling
• Furnace transfer line is large in diameter and allows separation of the phases
• Heater on feed tray is not totally accurate, especially for vacuum columns
• More accurate to simulate furnace separately, with controller + column specification
• Very slow to converge
Flash Zone Modeling
• Flash zone model gives accurate results without a controller loop
Crude Crude
TF P F TF P F
P1 P2
PN LN x0 y0 T0 x* y* T*
IEG P V0 L0 Solver P V* L*
Column Q*R Q*C
Q0R Q0C
Spec’s
Specify Tray
Liquid rate
Declare Duty
as a Variable
Performance Specifications
Specifications and Variables
• Specifications are constraints to be met by the column
• Variables are calculated to meet specifications
• Column always balances equations with unknowns (i.e. – # of specifications = # of variables)
• To impose a specification, you must add a variable, other equations and unknowns don’t
balance
• Example: Impose 2 product specifications by declaring reboiler and condenser duties as
variables
Column Status at Initialization
• Fixed quantities remain at their current values unless you declare them as variables
• If no specs/variables provided, the default status used:
QUANTITY STATUS
Overhead and Bottoms Rates Calculated
Side Draw Rates Fixed
Duties Fixed
Feed Rates Fixed
Tray Temperatures Calculated
Tray Pressures Fixed
Vapor and Liquid Rates Calculated
Product Properties (e.g. Viscosity) Calculated
Tray Vapor or Liquid Properties Calculated
Improper Specifications
• 0% methane in crude column bottoms
• Infinitely many solutions
• 300 lbmol/hr propylene in overhead
• No solutions if column feed only has 250 lbmol/hr propylene
• 98% ethanol product
• No solutions if water-ethanol azeotrope present
Tray Hydraulics/Packing
Tray Efficiencies
Murphree Tray Efficiency
yi,n = yi,n+1 + EiM (yi,n*-yi,n+1)
yA
100% efficient:
step to 75% efficient:
equilibrium step 3/4 to
l curve equilibrium curve
xA xA
Other Tray Efficiency Methods
• Vaporization
• Equilibrium
Pumparounds
N-1 Kettle and
Thermosiphon
N Reboilers
I/O Algorithm Approach
• Uses Nested Loops
• Inner Loop
• Simple thermo model (Fast)
• Approximate matrix inversion (Fast)
• Converge enthalpy balance and performance specs
• Outer Loop
• Updates and checks thermo using rigorous model (Slow)
• Checks bubble point criteria
• If thermo is changing or it’s not at the bubble point, go to Inner Loop
I/O Algorithm Approach
Prepare approximate thermo models for Approx. Thermo.
K*(K) and H*L(HL), and H*V(HV). Model
x, T, L, V, Q ...
n n
n+1
n+1 n+2
• Actual • Approximate
• Liquid and vapor fed to adjacent stages
• Controller Loop determines duty
Exercise 5
Crude Column, pg. 9
Crude Column (pg 9)
• Typos:
1 Water
• p. 10: Table 9 is Feed Characterization 2 Naphtha
7
• p. 11: Table 14, flowrate should be bbl/hr 8 1
and density is lb/bbl 2 Steam
Kerosene
11
12 1
2 Steam
Diesel
15
16 1
Crude From 2 Steam
Preheat 18 AGO
Train 20
Steam Resid
Crude Column, Part A
• What thermodynamic method?
• Which column algorithm?
• Which IEG model?
• How to calculate furnace duty without recycle?
Crude Column, Part B – Simple Column
• No Pumparounds
1 DECANT
• No Sidestrippers 2 NAPHTHA
3
• Specify: 7 KEROSTM
8 KERODRAW
• Naphtha D86 95%
• Overflash 11 DIESLSTM
12 DIESLDRAW
• Vary:
• Condenser Duty 15 AGOSTM
• Flash Zone Duty 16 AGODRAW
CRUDE 18 QFZ
MAINSTM 20
RESID
Crude Column, Part C – Add Side Strippers
• No Pumparounds
1 DECANT
• Specify: 2 NAPHTHA
3 KERORTN
• Naphtha D86 95% 7
8 KERODRAW 1
• Overflash 2 KEROSTM
KERO
• Stripped product 95% points 11 DIESLRTN
12 DIESLDRAW 21
• Vary: DIESLSTM
• Condenser Duty DIESL
AGORTN
15
• Flash Zone Duty 16 AGODRAW 1
2 AGOSTM
• Draw Rates CRUDE 18 QFZ AGO
MAINSTM 20
RESID
Crude Column, Part D – Add Tray Coolers
• Add Tray Coolers to Simulate PAs
1
DECANT
• Start with “measured” duties QOVHD 2 NAPHTHA
3
KERORTN
• Calculate maximum AGO cooling duty 7
8 1
KERODRAW
• Vary AGO duty 2 KEROSTM
DIESLRTN
KERO
• Specify tray flow QDIESL 11
12 1
DIESLDRAW 2 DIESLSTM
DIESL
QAGO 15
AGORTN
16 1
AGODRAW 2 AGOSTM
CRUDE 18 QFZ AGO
20
MAINSTM
RESID
Crude Column, Part E – Correct PA Duties
• Rerun with the new PA measurements
1
DECANT
QOVHD 2 NAPHTHA
3
7
KERORTN
8 1
KERODRAW 2 KEROSTM
DIESLRTN
KERO
QDIESL 11
12 1
DIESLDRAW 2 DIESLSTM
DIESL
QAGO 15
AGORTN
16 1
AGODRAW 2 AGOSTM
CRUDE 18 QFZ AGO
20
MAINSTM
RESID
Crude Columns, Part F – Add PAs
• Which 2 PA data should you enter?
1
• Circulation rate DECANT
2 NAPHTHA
• Duty 3
KERORTN
7
• DT 8 1
KERODRAW 2
• Return Temperature KERO
11 DIESLRTN
12 1
DIESLDRAW 2
DIESL
15 AGORTN
16 1
AGODRAW 2
Crude
Preheat
HVGO Total Draw
Wash Zone
Wash Oil
Slop Wax
Flash Zone: 700 - 770 ºF
60-100 mm Hg
Topped Crude Furnace
+ Steam
Steam Resid
Vacuum Column Purpose
• Recover gas oil remaining in topped crude
• Vacuum gas oils fed to FCC
• Must keep gas oil metals content low
• Lubricants
• Asphalt
Vacuum Column Simulation Issues
• Condenser does not reflux column so simulate it separately
• Do not ignore cracking
• Most of the vacuum naphtha and gas are produced by cracking and are not contained in the feed
• Feed is usually poorly characterized
• Extrapolate
• Blend products
Exercise 6
Vacuum Column, pg. 23
Vacuum Column
Non-condensables + Steam:
to Condenser and Vac System
T1=221ºF
1
2 LVGO
HVGO
4 268 bbl/hr
Slop wax
Wash
22 bbl/hr Oil
5
Topped crude + 6
Furnace Vacuum Resid
Non-condensables + 7 313 bbl/hr
Steam Steam
Vacuum Column, Part A
• Which thermo, IEG, and column algorithm?
• How to estimate non-condensables?
• How to simulate LVGO total draw?
• LVGO product flowrate estimate?
• How to simulate furnace without recycle?
• How to calculate furnace outlet temperature?
Help
Where to find help?
• Manuals / Documentation
• Start | AVEVA PROII Simulation 2021 | AVEVA PROII Simulation Documentation 2021
• Help Menus
• Searchable
• Context Sensitive
Support
• Contact details (in on-line help)
• E-mail: [email protected]
• Phone: +65 68298599
• https://sw.aveva.com/support/simsci
• Please include:
• Name & company
• Contact details
• Model (.prz) file
• Version of the software and operating system
Support Website
• https://sw.aveva.com/support/simsci
• Support available…
• Full documentation
• Examples
• Need to register
Questions & Discussion
Thank you!
linkedin.com/company/aveva
@avevagroup
ABOUT AVEVA
AVEVA is a global leader in engineering and industrial software driving digital transformation across
the entire asset and operational life cycle of capital-intensive industries.
The company’s engineering, planning and operations, asset performance, and monitoring and
control solutions deliver proven results to over 16,000 customers across the globe. Its customers are
supported by the largest industrial software ecosystem, including 4,200 partners and 5,700 certified
developers. AVEVA is headquartered in Cambridge, UK, with over 4,400 employees at 80 locations in
over 40 countries.
aveva.com