Events

 
MUGI 2023
Seville, Spain
16-21 April, 2023    
 
MUG 2022
Chicago, Illinois
25-30 Sept, 2022    
More
 

If you have multiple towers at your refinery, you may find that the model allocates different crude slates to each. I added a second tower to the HCAMSim/CPO demo model, splitting the original capacity between them (so that the rest of the model could still cope) and found that Tower 1 was run with a mix, just short of maximum capacity.

79 Tower1UnconstrainedSlate

while Tower 2 was filled with only one grade.

There is no particular reason to have allocated the crudes like this, as I did not differentiate the towers in any way and all the rundowns are still routed into the same pools. This element of the solution is, therefore, probably arbitrary rather than an essential contribution to the profit. However, in a real model the crude feed mix is much more likely to have been driven by the possibility of squeezing out the best quantities and qualities from each tower and taking advantage of any differences in routing to optimize feeds and components downstream. 

If the single crude can be kept separate and routed this way, fine, but if operating options are more constrained and such specificity cannot be achieved, the model is over-optimizing. If you are at a point in your planning cycle where you already know the crude mixture that will be received, you should consider making a blended crude that appears to the model as a single stream. This is very easy to do with Cut Point Optimization models as HCAMS can make you a CRU file to use. If the crude slate is still to be optimized or generating new crude files is inconvenient, then you can improve its view of what can actually be achieved, by adding constraints the model to control the blends.   

You can’t formulate a linear equation that says the proportion of a crude in the feed to Tower 1 is the same as its proportion feed to Tower 2.   (An equality of two ratios [Xto1/Total1 = Xto2/Total2]  does not re-arrange into something that Simplex can solve unless you know the feed rates of the two units in advance.)   But you can make use of the relative sizes of the towers to make a linear approximation. Instead of thinking about it as a constraint on the percent of each crude in the feed to a tower, look at it as requirement to control the allocation of each crude between the towers. If Tower 1 typically processes 50-70% of your crude, and the mix is the same, then for each crude that is processed, 50-70% goes to Tower 1.

To formulate this rule, define an operating parameter with "?" in the name – such as T1?.  The “?” will be expanded for each active crude so that you have a whole set of controls (In g5 the “?”  can be in any position, but H/Planet is going to expect them at the end – and anyway it makes it easier to read the resulting codes).



As we are controlling over multiple units we need to set “Reported Across” to “All Process Units”, so we get the overall average (rather than the value on just Tower1).


This parameter appears in both towers on the crude specific mode. On Tower 1 the co-efficient is 100. On Tower 2 it is in the same relative place, but 0. 

When the data is exported and expanded for all the active crudes there will be an intersection only where the row and column refer to the same crude.  When marked as a ratio control, since the crude specific modes are type Primary,  these entries will generate equations:  (Crude ? to T1) / (Crude ? to T1 + Crude ? to T2).

  

The min/max for the entry without the Crude Link will be applied to all crudes that don't have a specific entry. The method works best in aligning the mixtures if all the crudes have the same split, so I made WTX different only to show that this is possible.

When the model is re-run, Tower 2 operates on a mix 

that is very similar to the one run on Tower 1

The percentages of each in the feed are similar, although not identical. We can also see that the crudes have split along the minimum required, with the two main grades divided evenly. The operating parameter report shows the exact splits.

If you are using Table based input, the you need to remember that "?" is only substituted by the crude codes when found in the crude library files.   So you need to add the loading factor to your template (TABLE R07.1 with row T1?X, where the X is setting the Over All Units averaging), and the loading on the towers in their 2xx.1 tables.) and generate a new set of files.    TABLE 111.0 for the ratio control does not have a means of indicating that something should be expanded for all crudes. So you either put it in the crude library file and assume that you won’t need to adjust them very often, or you write them out for each crude in a case data file: 11**T1ARL$, 11**T1AZR$, etc. As they are ratio controls the minimum won’t cause an infeasibility if the crude is not active, so you only need to worry about adding new crudes.

This linear approximation for controlling the mix to multiple towers works best if you can be sure that the towers will usually run the same split of total crude – if they are both usually near maximum throughput. The controls do force a minimum flow on each tower, so it is possible that they will lead to under-optimization if margins are poor and capacity is not worth utilizing.   Also, if you would reduce processing on just one of the towers rather than turn them down equally, then the percentage range would need to be adapted to fit.   At least you can easily turn off the requirement just by commenting the controls.

This method will scale up to additional towers. You can either control the percent feed to 1 and 2 and then 2 and 3 --- or control 1 to all and 2 to all  – adjusting your ranges for which relationship you have represented. If all the crude that you buy is processed, then remember to respect the degrees of freedom by leaving the last unit to the implications of the balance. If the crude can also go to storage then you would need to control the mix to the last tower as well

It’s a good thing to have a reminder now and again that you can actually do some quite useful stuff with linear equations.   Just because we can optimize non-linear formulations that doesn’t mean we always have to use them!  Leaving the model some flexibility also acknowledges the uncertainties in our assumptions.    But if you want exactly the same crude mix to multiple towers then you will need to use pools or PUPs, as explained in the next note.

 Kathy's Hotel Room Alexandria, Egypt
25th October 2021.
 
 
Comments and suggestions gratefully received via the usual e-mail addresses or here.
You may also use this form to ask to be added to the distribution list so that you are notified via e-mail when new articles are posted.