You are on page 1of 4

This model illustrates some of the features in ABML.

It is derived from our volume


sample model. Distributed recursion solver (DR) will work with this model also. You
will need an ABML license. To run this model please place the attached dynamically link
library, PUBML.DLL, into the folder where pimswin.exe is installed. Re-launch PIMS
after placing the PUBML.DLL into the pimswin.exe folder so that PIMS can pick up this
dll.
PUBML.DLL is a dynamically link library that the user can choose to build to add a
custom set of correlations. The PUBML.DLL source code is attached to give the user a
feel for what is needed to construct this dll. There is supplemental documentation (not
attached) to explain in detail how to build this dll.
In this model, a refiner is producing 4 grades of gasoline, URG, UPR, CRG and CR2.
The first 2 grades are EPA RFGs and the last 2 are CARB RFGs. All 4 are splash
blended with ethanol at the terminal.
List of ABML Correlations
1. D86FromPercentOff / D86ToPercentOff to calculate the blended D86
temperature using Hydrocarbon Processing 1994.
2. UBML_RVPF, UBML_RVPR- user defined RVP forward and reverse transforms
defined in the PUBML.dll. PUBML.dll is a dynamically link library that the user
can create to add custom correlations to ABMLs list of correlations. PIMS does
offer a simpler way to add custom correlations through the property calculator or
table INDEX (GPRPCALC, GBLNVAL and GNDXR) described in item 5 below.
The user however may choose to use PUBML instead when the correlations are
too complex for the property calculator, or the correlations need to be protected
by a license. The user may also choose to do this because it is a convenient way
to package and distribute a standard set of company wide correlations. Note that
ABML has a built in RVP/RVP index correlations. The use of PUBML here is for
demonstration purpose only.
3. CARBOB2 - calculates the ethanol blended properties needed by the CARB3
correlation. The ethanol value entered in the optional section for CARBOB2 is
the default value. The amount of ethanol by blend is specified in table
ABMLOPT. Please note that it is in units of volume percent and not volume
fraction. Note that ethanol is not a stream nor is the amount of ethanol a decision
variable in this model. If this isnt the case, use CARBOB and its set of helper
correlations instead. In this model CARBOB2 takes its input from
D86FromPercentOff (D86) and UBML_RVPR (RVP). Note that CARBOB2
automatically maps its output into the CARB3 or CARB equation. Mapping in
table RFG is not required and in fact ignored. The user however needs to declare
a blend to be a CARBOB2 blend in table BLNSPEC. See PIMS documentation
on table BLNSPEC.
4. RBOB calculates the ethanol blended properties needed by the EPA RFG
emission correlation. This correlation is analogous to CARBOB2 but also
calculates the E200 and E300 needed in the EPA RFG emission correlation. In
fact RBOB is a combination of CARBOB2 and the E200E300EPA correlations.

5.

6.

7.
8.

The latter correlation is from the EPA RFG emission prediction spreadsheet that
converts T50 and T90 to E200 and E300. The ethanol value entered in the
optional section for RBOB is the default value. The amount of ethanol by blend
is specified in table ABMLOPT. Please note that it is in units of volume percent
and not volume fraction. Note that ethanol is not a stream nor is the amount of
ethanol a decision variable in this model. In this model RBOB takes its input
from D86FromPercentOff (D86) and UBML_RVPR (RVP). Note that RBOB
automatically maps its output into the EPA RFG correlation. Mapping in table
RFG is not required and in fact ignored. Note that RBOB is valid for EPA RFG
and not conventional. It is only valid for the complex equation. The user needs to
declare a blend to be a RBOB in table BLNSPEC. See PIMS manual on table
BLNSPEC for additional information
UBML_DRIVABILITY calculates the drivability index and is defined in
PUBML.DLL. The T50 and T90 for EPA RFG come from RBOB. For CARB
RFG blends they come from CARBOB2. The mapping of properties by blend is
done using table ABMLMAP. In this model we assume that ethanol doesnt affect
T10, and T10 comes from D86FromPercentOff. This is not correct. We commit
this error here so that we can illustrate the use of table ABMLMAP. ABML has a
built in drivability index correlations. The use of PUBML here is for
demonstration purpose only.
GPRPCALC a user defined 2nd order property entered through the property
calculator. 2nd order properties are blend properties calculated from other
properties of the blend. GPRPCALC essentially allows the user to declare which
of the correlations defined through the property calculator are to be added to
ABMLs list of 2nd order correlations. In this model it is used to define a linear
version of TV/L. RVP and D86 temperatures for EPA RFG come from RBOB
and from CARBOB2 for CARB RFG. Again table ABMLMAP is used to map
properties. Note that like the DRIVABILITY INDEX, we assume that ethanol
doesnt affect T10 and T10 comes from D86FromPercentOff. ABML has two
versions of TVL built in and the use of GPRPCALC is for demonstration purpose
only. There is a corresponding version of GPRPCALC for indexes called
GNDXR and a corresponding version for blend value called GBLNVAL. Blend
value type correlations are like indexes except that the blended index values are
the desired blended property. There is no need to perform a reverse transform.
This approach to adding custom correlations is simpler than PUBML, but the
correlations that can be added this way is limited as to how complex they can be.
The user is also limited to 20 correlations for each type. See the PIMS help
system for additional limitations.
DON Road octane. This is just the average of research and road octane.
MTMR/MTMF Mobil transform for predicting research and road octane. It is
used to illustrate how to invoke ABML from within a submodel. Note that ABML
does not have a build in correlations for the effect of ethanol on octane. The
octane spec should therefore be value for the gasoline before ethanol is added.

Blends of interest:
1. URG, UPR are EPA RFG blends

2. CRG and CR2 are CARB RFG blends.


Tables of interest:
1. ABML defines the ABML correlations desired, maps the PIMS property tags to
ABML properties and set options. The daisy chaining is done by setting the
output properties of one correlation as the input properties of another.
2. ABMLOPT defines the CARBOB2 options by blend.
3. ABMLMAP map ABML property tag by blend. The primary purpose of this
table is to allow an ABML correlation to take input from several ABML
correlations.
4. ABMLSUBF defines the submodels that ABML is required to perform a
forward transform. In this model, aromatic, olefin, research and motor octane is
used to calculate the indexes, transformed research and motor octane.
5. SCNP, SSFA and SRFT are submodel where ABML will do the forward
transformation mentioned in item 4.
6. BLNSPEC - ABML correlations are only activated if you put specs on them. It
will automatically activate other ABML correlations that are needed based on the
setup in table ABML.
7. PGUESS Specify initial guesses for the ABML correlations. For ABML
indexes, supply the properties. For 2nd order correlation provide the guesses of the
inputs to the correlation on the lowest rung of the daisy chain.
Couple of additional notes:
1. Daisy chaining refers to PIMS ability to use the output of one ABML correlation
as the input of another correlation. This daisy chain is set up in table ABML by
using the output property tags as the input tags of another ABML correlation.
User can set up the ABML correlations in table ABML in any order. PIMS will
automatically determine the ordering of the calculation.
2. Admittedly table ABML looks quite intimidating. In the sample model folder
there is a subfolder called completeabml. In it you will find a spreadsheet
macrocompleteabml.xls. It contains a wizard that will help you construct the
skeleton of table ABML. Just fill in the corresponding PIMS tag in the red cells.
The optional data are in the yellow cells. You can either fill them in or delete the
unused ones.
3. User needs to supply initial guesses for D86 and RVP for the relevant blends.
ABML will automatically determine the other properties that need to be recursed
and pad table PGUESS with initial guesses for them. The guiding principle as to
what needs to be in PGUESS is as follows. If the correlation is an index type,
provide the PGUESS of the blended property. This is because the user generally
does not know the index transform and thus have no way to guess what the index
values are. For 2nd order correlations, just provide the guesses for the inputs to the
correlation of the starting rung of the daisy chain. For example, CARBOB2 uses
the output of the D86 and RVP correlations so there is no need to provide initial
temperature and RVP guesses for CARBOB2. PIMS will invoke D86 and RVP to
calculate the T50, T90 and RVP needed by CARBOB2. However, the user should

examine the recursion range to ensure that they are wide enough. This range can
become too small if the initial PGUESS are the same for all the blends and there
isnt enough variability in the property entered in other tables to broaden this
range.
4. Currently using ABML within submodels is some what limited. You can use
ABML index correlations to translate properties into index in the ASSAY and
BLNPROP tables and feed them to the submodels. The submodel can operate on
these indexes and ABML can then pick up these manipulated values and operate
on them when calculating the properties of the blend. Take a look at the crude cut
LN1 and its RVP and D86 properties to see how this is done.
5. You can also invoke ABML to perform the forward transform (i.e., index and
blend value type correlations) within a submodel through table ABMLSUBF.
This is useful in the case where a material is being produced in a submodel and its
properties needed by the forward transform are recursed. For example, the Mobil
transform for octane needs the research and motor octane, aromatic and olefin of
the gasolines components. In the alkylation submodel, SSFA, alkylate (ALK) is
being produced. Its octane indexes, TRN and TMN are functions of its aromatic
(ARO), olefin (OLF), research and motor octane (RON and MON) values. These
values are recursed from the c3= and c4= and therefore can not be calculate at the
start of recursion like in item 3. It is therefore necessary to build additional
recursion structures to perform the calculation for TRN and TMN during the
iterations. See PIMS help for more information on using table ABMLSUBF.
6. The percent off in the D86FromPercentOff and D86ToPercentOff are percent off
at TBP and not D86 temperatures. Dont confuse them with the likes of E200 and
E300. There is another ABML correlation, EVAPORATIVE which does a simple
linear interpolation of the blended D86 curve. However, it is just a simple linear
interpolation at this time. There is also the E200E300EPA correlation that
calculates E200 and E300 from D86 T50 AND T90 for typical RFG gasoline.
This correlation can be tuned by blend.
7. Typically sulfur is declared a weight spec in table WSPEC. In this model
CARBOB2 also calculates the effective amount of sulfur after the addition of
ethanol. This sulfur property should also be declared a WPSEC. Take a look at
SUL and SUl in table WSPEC.
8. It is recommended that for models that deal with RFGs, sulfur should be units of
ppms rather than in weight percent. This is because the derivative of the emission
level can be quite large when using units of weight percent and it is difficult to
tighten the tolerance on sulfur sufficiently so that the net error in the emission due
to sulfur recursion error is small.
9. The IBP and FBP of the blended D86 depend strongly on the set of temperatures
with which we do the D86 to percent off conversion. They may not be reliable.
10. Unlike CARB, EPA does not mandate the use of the WSPA correlation
(CARBOB) to predict the effect of ethanol on the finished gasoline. RBOB is a
combination of CARBOB along with the E200 and E300 correlation found in the
EPA RFG emission prediction spreadsheet. The users should test the prediction of
RBOB. The RVP, E200 and E300 values can be tuned by blend. See the PIMS
manual for additional info.

You might also like