Sunteți pe pagina 1din 180

GETTINGSTARTEDWITH ASPENPIMS

ABeginnersguidetoAspenTechOptimizationtool

AHSANJALAL

DEDICATED TO THOSE WHO WORKS TO SHARE KNOWLEDGE TO OTHERS WITHOUT DISCRIMINATION AND PROFIT

I will be thankful if you provide your expertise in this regard. If you are willing write your expert opinion to engnr.dragon@gmail.com

PREFACE
The first step towards knowledge is to know that we are ignorant.
Aspen PIMS, a registered Trade mark of Aspen Technology, Inc for planning software for refineries, petrochemicals and related industries, gave me a difficult time at my job place. I have learned to work with simulation software during graduate study but planning software was totally missing from the curriculum. First day on this software was like a nightmare to me and was unable to understand how to use it. After excessive search on internet I was able to know about it but I believe a lot more was needed to learn. All hopes to master this software died when I didnt find any tutorial for it and from different forums I learned that no tutorial is available for PIMS. As a matter of fact I have learned all softwares via free resources either in the form of videos or tutorials uploaded by those who believe in sharing of knowledge for better work. Motivated by those, I decided to compile data for making a guide to PIMS for beginners. This data in the form of e-book will lead a newbie to the road, which goes to level of ultimate master of this software. This book is compiled in such a way that it will not only give idea of PIMS but the background concepts also. I would not say its a complete guide for learning but at least you wont have to worry about beginning and believe me it will put you on the track for advance use. This collection is divided in two parts. First Part consists of basic concepts of Optimization, linear programming and its applications especially in refineries. Second part is based on learning Aspen PIMS which is exclusively based on case sensitive help and seniors guidance. Starting chapters will familiarize you with interface of PIMS and then how to use it. In the end follows some examples form simple models to complex refinery model. This is what I can do for beginners. Since I am also beginner of this software and I have not used this software for more than three months at the time of compiling. Moreover as I learn Aspen PIMS I will upload same tips time by time. It is worthy to quote Winston Churchill quote in the end of Preface.

This is not the end. It is not even the beginning of the end. But it is, perhaps, the end of the beginning.(But I believe it is just commencing of the beginning)
Ahsan Jalal

Chapter # 1

Chapter # 1: INTODUCTION TO CRUDE OIL


AND PROCESSING
The wheel, without doubt, was mans greatest invention. However until the late 18th century and early 19th century the motivation and use of the wheel was limited either by muscle power, man or animal, or by energy naturally occurring from water flow and wind. The invention of the steam engine provided, for the first time, a motive power independent of muscle or the natural elements. This ignited the industrial revolution of the 19th century, with its feverish hunt for fossil fuels to generate the steam. It also initiated the development of the mass production of steel and other commodities. Late in the 19th century came the invention of the internal combustion engine with its requirement for energy derived from crude oil. This, one can say, sparked the second industrial revolution, with the establishment of the industrial scene of today and its continuing development. The petroleum products from the crude oil used initially for the energy required by the internal combustion engine have mushroomed to become the basis and source of some of our chemical and pharmaceutical products. The development of the crude oil refining industry and the internal combustion engine has influenced each other during the 20th century. Other factors have also contributed to accelerate the development of both. The major ones of these are the increasing awareness of environmental contamination, and the increasing demand for faster travel, which led to the development of the aircraft industry with its need for higher quality petroleum fuels. The purpose of this introductory chapter is to describe and define some of the basic measures and parameters used in the petroleum refining industry.

The composition and characteristics of crude oil


Crude oil is a mixture of literally hundreds of hydrocarbon compounds ranging in size from the smallest, methane, with only one carbon atom, to large compounds containing 300 and more carbon atoms. A major portion of these compounds is paraffins or isomers of paraffins. A typical example is butane shown below (Left):

Getting Started with Aspen PIMS

Page

Chapter # 1

Most of the remaining hydrocarbon compounds are either cyclic paraffins called naphthenes or deeply dehydrogenated cyclic compounds as in the aromatic family of hydrocarbons. Examples of these are shown above (Right). Only the simplest of these homologues can be isolated to some degree of purity on a commercial scale. Generally, in refining processes, isolation of relatively pure products is restricted to those compounds lighter than C7s. The majority of hydrocarbon compounds present in crude oil have been isolated however, but under delicate laboratory conditions. In refining processes the products are identified by groups of these hydrocarbons boiling between selective temperature ranges. Thus, for example a naphtha product would be labeled as a 90C to 140C cut. Not all compounds contained in crude oil are hydrocarbons. There are present also as impurities, small quantities of sulfur, nitrogen and metals. By far the most important and the most common of these impurities is sulfur. This is present in the form of hydrogen sulfide and organic compounds of sulfur. These organic compounds are present through the whole boiling range of the hydrocarbons in the crude. They are similar in structure to the hydrocarbon families themselves, but with the addition of one or more sulfur atoms. The higher carbon number ranges of these sulfur compounds are thiophenes, which are found mostly in the heavy residuum range, and disulfides found in the middle distillate range of the crude. The sulfur from these heavier sulfur products can only be removed by converting the sulfur to H2S in a hydrotreating process operating under severe conditions of temperature and pressure and over a suitable catalyst. The lighter sulfur compounds are usually removed as mercaptans by extraction with caustic soda or other suitable proprietary solvents. Organic chloride compounds are also present in crude oil. These are not removed as such but HCl applies metallic protection against corrosion in the primary distillation processes. This protection is in the form of monel lining in the sections of the process most vulnerable to chloride attack. Injection of ammonia is also applied to neutralize the HCl in these sections of the equipment. The most common metal impurities found in crude oils are nickel, vanadium, and sodium. These are not very volatile and are found in the residuum or fuel oil products of the crude oil. These are not removed as metals from the crude and normally they are only a nuisance if they affect further processing of the oil or if they are a deterrent to the saleability of the fuel product. For example, the metals cause severe deterioration in catalyst life of most catalytic processes. In the quality of saleable fuel oil products high concentrations of nickel and vanadium are unacceptable in fuel oils used in the production of certain steels. The metals can be removed with the glutinous portion of the fuel oil product called asphaltenes. The most common process used to accomplish this is the extraction of the asphaltenes from the residue oils using propane as solvent. Page Nitrogen, the remaining impurity is usually found as dissolved gas in the crude or as amines or other nitrogen compounds in the heavier fractions. It is a problem only with

Getting Started with Aspen PIMS

Chapter # 1 certain processes in naphtha product range (such as catalytic reforming). It is removed with the sulfur compounds in this range by hydrotreating the feed to these processes. Although the major families or homologues of hydrocarbons found in all crude oils as described earlier are the paraffins, cyclic paraffins and aromatics, there is a fourth group. These are the unsaturated or olefinic hydrocarbons. They are not naturally present in any great quantity in most crude oils, but are often produced in significant quantities during the processing of the crude oil to refined products. This occurs in those processes, which subject the oil to high temperature for a relatively long period of time. Under these conditions the saturated hydrocarbon molecules break down permanently losing one or more of the four atoms attached to the quadrivalent carbon. The resulting hydrocarbon molecule is unstable and readily combines with it (forming double bond links) or with similar molecules to form polymers. Although all crude oils contain the composition described above, rarely are there two crude oils with the same characteristics. This is so because every crude oil from whatever geographical source contains different quantities of the various compounds that makes up its composition. Crude oils produced in Nigeria for example would be high in cyclic paraffin content and have a relatively low specific gravity. Crude drilled in some of the fields in Venezuela on the other hand would have a very high gravity and a low content of material boiling below 350C. The following table summarizes some of the crude oils from various locations

Getting Started with Aspen PIMS

Page

Chapter # 1

Getting Started with Aspen PIMS

Page

Chapter # 1

Worthy of note in the above table is the difference in the character of the various crudes that enables refiners to improve their operation by selecting the best crude or crudes that meet their product marketing requirements. For example, where a refining product slate demands a high quantity of no lead gasoline and a modest outlet for fuel oils then a crude oil feed such as Hassi Messaoud would be a prime choice. Its selection provides a high naphtha yield with a high naphthene content as catalytic reforming feedstock. Fuel oil in this case also is less than 50% of the barrel. The Iranian light crude would also be a contender but for the undesirably high metal content of the fuel oil (Residuum). In the case of a good middle of the road crude, Kuwait or the Arabian crude oils offer a reasonably balanced product slate with good middle distillate quality and yields. For bitumen manufacture and lube oil manufacture the South American crude oils are formidable competitors. Both major crudes from this area, Bachequero, the heavier crude and Tia Juana, the lighter, are highly acidic (Naphthenic acids) which enhance bitumen and lube oil qualities. There is a problem with these crude oils however as naphthenic acid is very corrosive in atmospheric distillation columns, particularly in the middle distillate sections. Normal distillation units may require relining of sections of the tower with 410 stainless steel if extended processing of these crude oils is envisaged. Refiners often mix selective crude oils to optimize a product slate that has been programmed for the refinery. This exercise requires careful examination of the various crude assays (data compilation) and modeling the refinery operation to set the crude oil mix and its operating parameters.

The crude oil assay:


The crude oil assay is a compilation of laboratory and pilot plant data that define the properties of the specific crude oil. At a minimum the assay should contain a distillation curve for the crude and a specific gravity curve. Most assays however contain data on pour point (flowing criteria), sulfur content, viscosity, and many other properties. The company selling the crude oil usually prepares the assay; refiners in their plant operation, development of product schedules, and examination of future processing ventures use it extensively. Engineering companies use the assay data in preparing the process design of petroleum plants they are bidding on or, having been awarded the project, they are now building. In order to utilize the crude oil assay it is necessary to understand the data it provides and the significance of some of the laboratory tests that are used in its compilation. Some of these are summarized below The true boiling point curve This is a plot of the boiling points of almost pure components, contained in the crude oil or fractions of the crude oil. In earlier times this curve was produced in the laboratory using complex batch distillation apparatus of a hundred or more equilibrium stages and a very high reflux ratio. Nowadays this curve is produced by mass spectrometry techniques

Getting Started with Aspen PIMS

Page

Chapter # 1 much quicker and more accurately than by batch distillation. A typical true boiling point curve (TBP) is shown in Figure The ASTM distillation curve While the TBP curve is not produced on a routine basis the ASTM distillation curves are. Rarely however is an ASTM curve conducted on the whole crude. This type of distillation curve is used however on a routine basis for plant and product quality control. This test is carried out on crude oil fractions using a simple apparatus designed to boil the test liquid and to condense the vapors as they are produced. Vapor temperatures are noted as the distillation proceeds and are plotted against the distillate recovered. Because only one equilibrium stage is used and no reflux is returned, the separation of components is poor. Thus, the initial boiling point (IBP) for ASTM is higher than the corresponding TBP point and the final boiling point (FBP) of the ASTM is lower than that for the TBP curve. API gravity This is an expression of the density of an oil. Unless stated otherwise the API gravity refers to density at 60F (15.6C). Its relationship with specific gravity is given by the expression

Flash points The flash point of oil is the temperature at which the vapor above the oil will momentarily flash or explode. This temperature is determined by laboratory testing using an apparatus consisting of a closed cup containing the oil, heating and stirring equipment, and a special adjustable flame. The type of apparatus used for middle distillate and fuel oils is called the Pensky Marten (PM), while the apparatus used in the case of Kerosene and lighter distillates is called the Abel. Reference to these tests are given later in this Handbook, and full details of the tests methods and procedures are given in ASTM Standards Part 7, Petroleum products and Lubricants. There are many empirical methods for determining flash points from the ASTM distillation curve. One such correlation is given by the expression Flash point F = 0.77 (ASTM 5% F 150F) Octane numbers Octane numbers are a measure of a gasolines resistance to knock or detonation in a cylinder of a gasoline engine. The higher this resistance is the higher will be the efficiency of the fuel to produce work. A relationship exists between the antiknock characteristic of the gasoline (octane number) and the compression ratio of the engine in

Getting Started with Aspen PIMS

Page

Chapter # 1 which it is to be used. The higher the octane rating of the fuel then the higher the compression ratio of engine in which it can be used. By definition, an octane number is that percentage of isooctane in a blend of isooctane and normal heptane that exactly matches the knock behavior of the gasoline. Thus, a 90octane gasoline matches the knock characteristic of a blend containing 90% isooctane and 10% n-heptane. The knock characteristics are determined in the laboratory using a standard single cylinder test engine equipped with a super sensitive knock meter.Details of this method are given in the ASTM standards, Part 7 Petroleum products and Lubricants. Viscosity The viscosity of oil is a measure of its resistance to internal flow and is an indication of its lubricating qualities. In the oil industry it is usual to quote viscosities either in centistokes (which is the unit for kinematic viscosity), seconds Saybolt universal, seconds Saybolt furol, or seconds Redwood. These units have been correlated and such correlations can be found in most data books. In the laboratory, test data on viscosities is usually determined at temperatures of 100F, 130F, or 210F. In the case of fuel oils temperatures of 122F and 210F are used. Cloud and pour points Cloud and Pour Points are tests that indicate the relative coagulation of wax in the oil. They do not measure the actual wax content of the oil. In these tests, the oil is reduced in temperature under strict control using an ice bath initially and then a frozen brine bath, and finally a bath of dry ice (solid CO2). The temperature at which the oil becomes hazy or cloudy is taken as its cloud point. The temperature at which the oil ceases to flow altogether is its pour point. Sulfur content This is self-explanatory and is usually quoted as %wt for the total sulfur in the oil. Assays change in the data they provide as the oils from the various fields change with age. Some of these changes may be quite significant and users usually request updated data for definitive work, such as process design or evaluation. The larger producers of the crude oil provide laboratory test services on an on going basis for these users. Other basic definitions and correlations As described earlier the composition of crude oil and its fractions are not expressed in terms of pure components, but as cuts expressed between a range of boiling points. These cuts are further defined by splitting them into smaller sections and treating those sections as they were pure components. As such, each of these components will have precise properties such as specific gravity, viscosity, mole weight, pour point, etc. These components are referred to as pseudo components and are defined in terms of their mid boiling point.

Getting Started with Aspen PIMS

Page

Chapter # 1

Before describing in detail the determination of pseudo components and their application in the prediction of the properties of crude oil fractions it is necessary to define some of the terms used in the crude oil analysis. These are as follows: Cut point A cut point is defined as that temperature on the whole crude TBP curve that represents the limits (upper and lower) of a fraction to be produced. Consider the curve shown in Figure

A fraction with an upper cut point of 100F produces a yield of 20% volume of the whole crude as that fraction. The next adjacent fraction has a lower cut point of 100F and an upper one of 200F this represents a yield of 3020%=10% volume on crude End points While the cut point is an ideal temperature used to define the yield of a fraction, the end points are the actual terminal temperatures of a fraction produced commercially. No process has the capability to separate perfectly the components of one fraction from adjacent ones. When two fractions are separated in a commercial process some of the lighter components remain in the adjacent lighter fraction. Likewise some of the heavier components in the fraction find their way into the adjacent heavier fraction. Thus, the actual IBP of the fraction will be lower than the initial cut point, and its FBP will be higher than the corresponding final cut point. This is also shown in Figure 1.

Getting Started with Aspen PIMS

Page

Mid boiling point components

Chapter # 1 In compiling the assay narrow boiling fractions are distilled from the crude, and are analyzed to determine their properties. These are then plotted against the mid boiling point of these fractions to produce a smooth correlation curve. To apply these curves for a particular calculation it is necessary to divide the TBP curve of the crude, or fractions of the crude, into mid boiling point components. To do this, consider Figure 2. For the first component take an arbitrary temperature point A. Draw a horizontal line through this from the 0% volume. Extend the line until the area between the line and the curve on both sides of the temperature point A are equal. The length of the horizontal line measures the yield of component A having a mid boiling point A F. Repeat for the next adjacent component and continue until the whole curve is divided into these mid boiling point components. Mid volume percentage point components Sometimes the assay has been so constructed as to correlate the crude oil properties against components on a mid volume percentage basis. In using such data as this the TBP curve is divided into mid volume point components. This is easier than the mid boiling point concept and requires only that the curve be divided into a number of volumetric sections. The mid volume figure for each of these sections is merely the arithmetic mean of the volume range of each component. Using these definitions the determination of the product properties can proceed using the distillation curves for the products, the pseudo component concept, and the assay data. This is given in the following items: Basic processes This chapter provides an introduction to some of the most common of the processes included in fuel oriented and nonenergy oriented refineries. These processes are only discussed here in summary form. The processes common to most energy refineries The atmospheric crude distillation unit In refining the crude oil it is first broken up into those raw stocks that are the basis of the finished products. This break up of the crude is achieved by separating the oil into a series of boiling point fractions, which meet the distillation requirements, and some of the properties of the finished products. This is accomplished in the crude distillation units. Normally there are two units that accomplish this splitting up function: an atmospheric unit and a vacuum unit. The crude oil first enters the Atmospheric unit where it is desalted (dissolved brine is removed by washing) and heated to a predetermined temperature. This is accomplished by heat exchange with hot products and finally by a direct fired heater. The hot and partially vaporized crude is Flashed in a trayed distillation tower. Here, the vaporized portion of the crude oil feed moves up the tower and is selectively condensed by cooled reflux streams moving down the tower. These condensates are taken off at various parts

Getting Started with Aspen PIMS

Page

Chapter # 1 of the tower according to their condensing temperature as distillate side streams. The light oils not condensed in the tower are taken off at the top of the tower to be condensed externally as the overhead product. The unvaporized portion of the crude oil feed leaves the bottom of the tower as the atmospheric residue. The unit operates at a small positive pressure around 510 psig in the overhead drum, thus, its title of Atmospheric crude unit. Typical product streams leaving the distillation tower are as follows: Overhead distillate 1st side stream 2nd side stream 3rd side stream Residue Full range naphtha Kerosene Light gas oil Heavy gas oil Fuel oil Gas to 380F cut point 380 to 480F cut range 480 to 610F cut range 610 to 690F cut range + 690F cut point

The crude vacuum distillation unit Further break up of the crude is often required to meet the refinerys product slate. This is usually required to produce low cost feed to cracking units or to produce the basic stocks for lubricating oil production. To achieve this the residue from the atmospheric unit is distilled under sub atmospheric conditions in the crude vacuum distillation unit. This unit operates similar to the atmospheric unit in so much as the feed is heated by heat exchange with hot products and then in a fired heater before entering the distillation tower. In this case, however, the tower operates under reduced pressure (vacuum) conditions. These units operate at overhead pressures as low as 10 mmHg. Under these conditions the hot residue feed is partially vaporized on entering the tower. The hot vapors rise up the tower to be successively condensed by cooled internal reflux stream moving down the tower, as was the case in the atmospheric distillation unit. The condensed distillate streams are taken off as side stream distillates. There is no overhead distillate stream in this case. The high vacuum condition met with in these units is produced by a series of steam ejectors attached to the units overhead system. Typical product streams from this unit are as follows: Topside stream 2nd side stream Residue The light end units The full range naphtha distillate as the overhead product from the atmospheric crude unit is further split into the basic components of the refinerys volatile and light oil products. This is accomplished in the light end plant which usually contains four separate distillation units. These are: _ The de-butanizer Light vacuum gas oil Heavy vacuum gas oil Bitumen 690 to 750F 750 to 985F +985F

Getting Started with Aspen PIMS

Page

10

Chapter # 1 _ The de-propanizer _ The de-ethanizer _ The naphtha splitter. The most common routing of the full range naphtha from the atmospheric crude overhead is first to the de-butanizer unit. This feed stream is heated by heat exchange with hot products before entering the feed tray of the de-butanizer column. This is a distillation column containing between 30 and 40 trays. Separation of butanes and lighter gas from the naphtha occurs in this tower by fractionation. The butanes and lighter are taken off as an overhead distillate while the naphtha is removed as the columns bottom product. The overhead distillate is then heated again by heat exchange with hot streams and fed into a de-propanizer column. This column also has about 3040 distillation trays and separates a butanes stream from the propane and lighter material stream by fractionation. The butanes leave as the columns bottom product to become the Butane LPG product after further sweetening treatment (sulfur removal). The columns overhead distillate is fed to a de-ethanizer column after preheating. Here the propane is separated from the lighter materials and leaves the column as the bottom product. This stream becomes part of the refinerys propane LPG product after some further sweetening treatment. There will be no overhead distillate product from this unit. The material lighter than propane leaves the overhead drum as a vapor containing mostly ethane, and is normally routed to the refinerys fuel gas system. The de-butanized naphtha leaving the bottom of the de-butanizer is subsequently fractionated in the naphtha splitter to give a light naphtha stream as the overhead distillate and heavy naphtha as the columns bottom product. The light naphtha is essentially C5s and nC6s, this stream is normally sent to the refinerys gasoline pool as blending stock. The heavy naphtha stream contains the cycloparaffin components and the higher paraffin isomers necessary in making good catalytic reformer feed. This stream therefore is sent to the catalytic reformer after it has been hydrotreated for sulfur and nitrogen removal The catalytic reformer unit The purpose of the catalytic reformer plant is to upgrade low octane naphtha to the highoctane material suitable for blending into motor gasoline fuel. It achieves this by reforming some of the hydrocarbons in the feed to hydrocarbons of high-octane value. Notably among those reactions is the conversion of cycloparaffin content of the feed to aromatics. This reaction also gives up hydrogen molecules that are subsequently used in the refinerys hydrotreating processes. The feed from the bottom of the naphtha splitter is hydrotreated in the naphtha hydrotreater for the removal of sulfur and nitrogen. It leaves this unit to be preheated to the reforming reaction temperature by heat exchange with products and by a fired heater. The feed is mixed with a recycle hydrogen stream before entering the first of three reactors. The reforming reactions take place in these reactors and the reactor temperatures are sustained and controlled by intermediate fired heaters. The effluent leaves the last reactor to be cooled and partially condensed by heat exchange

Getting Started with Aspen PIMS

Page

11

Chapter # 1 with cold feed and a condenser. This cooled effluent is routed to a flash drum from which hydrogen rich stream is removed as a gas while reformate is removed as a liquid stream and sent to a stabilizer column. The bottoms from this column is de botanized reformate and is routed to the gasoline pool for blending to meet motor gasoline specifications. Part of the gas leaving the flash drum is recycled to the reactors as the units recycle stream. The remaining gas is normally sent to the naphtha hydrotreater for use in that process. The hydrotreating units (de-sulfurization) Most streams from the crude distillation units contain sulfur and other impurities such as nitrogen, and metals in some form or other. By far the most common of these impurities is sulfur, and this is also the least tolerable of these impurities. Its presence certainly lowers the quality of the finished products and in the processing of the crude oil its presence invariably affects the performance of the refining processes. Hydrotreating the raw distillate streams removes a significant amount of the sulfur impurity by reacting the sulfur molecule with hydrogen to form hydrogen sulfide (H2S) this is then removed as a gas. Two types of de-sulfurizing hydrotreaters. These are: _ Naphtha hydrotreatingOnce through hydrogen _ Diesel hydrotreatingRecycle hydrogen In naphtha hydro treating the naphtha from the naphtha splitter is mixed with the hydrogen rich gas from the catalytic reformer unit and preheated to about 700F by heat exchange and a fired heater. On leaving the fired heater the stream enters a reactor containing a de-sulfurizing catalyst (usually a Co Mo on alumina base). The sulfur components of the feed combine with the hydrogen to formH2S. The effluent from the reactors are cooled and partially condensed before being flashed in a separator drum. The gas phase from this drum is still high in hydrogen content and is usually routed to other down stream hydrogen user processes. This stream contains most of the H2S produced in the reactors; the remainder leaves the flash drum with the de-sulfurized naphtha liquid to be removed in the hydrotreaters stabilizer column as a H2S rich gas. Diesel hydrotreating has very much the same process configuration as the naphtha unit. The main difference is that this unit will almost invariably have a rich hydrogen stream recycle. The flashed gas stream from the flash drum provides the recycle. This is returned to mix with the feed and a fresh hydrogen make up stream before entering the preheater system. The recycle gas stream in these units is often treated for the removal of H2S before returning to the reactors. The fluid catalytic cracking unit This cracking process is among the oldest in the oil industry. Although developed in the mid 1920s it first came into prominence during the Second World War as a source of high octane fuel for aircraft. In the early fifties its prominence as the major source of

Getting Started with Aspen PIMS

Page

12

Chapter # 1 octane was somewhat overshadowed by the development of the catalytic reforming process with its production of hydrogen as well as high octane material. The prominence of the fluid catalytic cracking unit (FCCU) was reestablished in the 1960s by two developments in the process. These were: _ The use of highly active and selective catalysts (Zeolites) _ The establishment of riser cracking techniques These two developments enabled the process to produce higher yields of better quality distillates from lower quality feed stocks. At the same time catalyst inventory and consumption costs were significantly reduced. The process consists of a reactor vessel and a regenerator vessel interconnected by transfer lines to enable the flow of finely divided catalyst powder between them. The oil feed (typically HVGO from the crude vacuum unit) is introduced to the very hot regenerated catalyst stream leaving the regenerator on route to the reactor. Cracking occurs in the riser inlet to the reactor due to the contact of the oil with the hot catalyst. The catalyst and oil are very dispersed in the riser so that contact between them is very high exposing a large portion of the oil to the hot catalyst. The cracking is completed in the catalyst fluid bed in the reactor vessel. The catalyst fluidity is maintained by steam injection at the bottom of the vessel. The cracked effluent leaves the top of the reactor vessel as a vapor to enter the recovery section of the plant. Here the distillate products of cracking are separated by fractionation and forwarded to storage or further treating. An oil slurry stream from this recovery plant is returned to the reactor as recycle. The catalyst from the reactor is transferred to the regenerator on a continuous basis. In the regenerator the catalyst is contacted with an air stream, which maintains the catalyst in a fluidized state. The hot carbon on the catalyst is burned off by contact with the air and converted into CO and CO2. The reactions are highly exothermic rising the temperature of the catalyst stream to well over 1,000F and thus providing the heat source for the oil cracking mechanism. Products from this process are: _ Unsaturated and saturated LPG _ Light cracked naphtha _ Heavy cracked naphtha _ Cycle oil (mid distillate) _ slurry. The hydrocracking process

Getting Started with Aspen PIMS

Page

13

Chapter # 1 This process is fairly new to the industry becoming prominent in its use during the late 1960s. As the title suggests the process cracks the oil feed in the presence of hydrogen. It is a high pressure process operating normally around 2,000 psig. This makes the unit rather costly and because of this has diminished its prominence in the industry compared with the FCCU and thermal cracking. However, the process is very flexible. It can handle a wide spectrum of feeds including straight run gas oils, vacuum gas oils, thermal cracker gas oils,FCCUcycle oils and the like. The products it produces need very little down stream treating to meet finished product specifications. The naphtha stream it produces is particularly high in naphthenes making it a good catalytic reformer stock for gasoline or aromatic production. The process consists of one or two reactors, a preheat system, recycle gas section, and a recovery section. The oil feed (typically a vacuum gas oil) is preheated by heat exchange with reactor effluent streams and by a fired heater. Make up and recycle hydrogen streams are introduced into the oil stream before entering the reactor(s). (Note in some configurations the gas streams are also preheated prior to joining the oil). The first section of the reactor is often packed with a de-sulfurizing catalyst to protect the more sensitive cracking catalyst further down in the reactor from injurious sulfur, nitrogen, and metal poisoning. Cracking occurs in the reactor(s) and the effluent leaves the reactor to be cooled and partially condensed by heat exchange. The stream enters the first of two flash drums. Here, the drum pressure is almost that of the reactor. A gas stream rich in hydrogen is flashed off and is recycled back to the reactors as recycle gas. The liquid phase from the flash drum is routed to a second separator that is maintained at a much lower pressure (around 150100 psig). Because of this reduction in pressure a second gas stream is flashed off. This will have much lower hydrogen content but will contain C3s and C4s. For this reason the stream is often routed to an absorber column for maximizing LPG recovery. The liquid phase leaves the bottom of the lowpressure absorber to enter the recovery side where products are separated by fractionation and sent to storage. Thermal cracking units Thermal cracking processes are the true workhorses of the oil refining industry. The processes are relatively cheap when compared with the fluid cracker and the hydrocracker but go a long way to achieving the heavy oil cracking objective of converting low quality material into more valuable oil products. The process family of Thermal Crackers has three members, which are: _ Thermal crackers

Getting Started with Aspen PIMS

Page

_ Cokers.

14

_ Visbreakers

Chapter # 1 The term Thermal Cracking is given to those processes that convert heavy oil (usually fuel oil or residues) into lighter product stock such as LPG, naphtha, and middle distillates by applying only heat to the feed over a prescribed element of time. The term Thermal Cracker when applied to a specific process usually refers to the processing of atmospheric residues (long residue) to give the lighter products. The term visbreaking refers to the processing of vacuum residues (short residues) to reduce the viscosity of the oil only and thus to meet the requirements of a more valuable fuel oil stock. Coking refers to the most severe process in the Thermal Cracking family. Either long or short residues can be feed to this process whos objective is to produce the lighter distillate products and oil coke only. The coker process is extinctive that is it converts ALL the feed. In the other two processes there is usually some unconverted feed although the Thermal Cracker can be designed to be extinctive by recycling the unconverted oil. The three Thermal cracking processes have the same basic process configuration. This consists of a cracking furnace, a soaking vessel or coil, and a product recovery fractionator(s). The feed is first preheated by heat exchange with hot product streams before entering the cracking furnace or heater. The cracking furnace raises the temperature of the oil to its predetermined cracking temperature. This is always in excess of 920F and by careful design of the heater coils the oil is retained in the furnace at a prescribed cracking temperature for a predetermined period of time (the residence time). In some cases an additional coil section is added to the heater to allow the oil to soak at the fixed temperature for a longer period of time. In other cases the oil leaves the furnace to enter a drum that retains the oil at its cracking temperature for a little time. In the Coker process the oil leaves the furnace to enter one of a series of Coker drums in which the oil is retained for a longer period of time at its coking temperature for the production of coke. The cracked oil is quenched by a cold heavy oil product stream on leaving the soaking section to a temperature below its cracking temperature. It then enters a fractionator where the distillate products are separated and taken off in a manner similar to the crude distillation unit. In the case of the cokers the coke is removed from the drums by high velocity water jets on a regular batch basis. The coking process summarized here refers to the more simple Delayed Coking process. There are other coking processes, which are more complicated such as the fluid coker and the proprietary Flexi coker. The non-energy refineries In addition to the energy related refineries, there are two major non energy-producing refineries. These are, the lube oil refinery, and the petrochemical refineries. These are summarized below: The lube oil refinery The schematic flow diagram (Figure) shows typical lube oil producing refinery configuration. Only about 8 or 9 base lube oil stocks are produced from refinery streams. The many hundreds of commercial grades of lubricating oils used in industry and transportation are blends of these base stocks with some small amounts of proprietary

Getting Started with Aspen PIMS

Page

15

Chapter # 1 additives (mostly organic acid derivatives) included to meet their required specifications. There are also two quite important bye products to lube oil. These are bitumen and waxes. Most refineries include bitumen blending in their configuration, but only a few of the older refineries process the waxes. These are exported to manufacturers specializing in wax and grease production. Lube oil production starts with the vacuum distillation of atmospheric residue. This feedstock is usually cut into three distillate streams each meeting a boiling range which gives streams with viscosity meeting the finished blending product specifications. The lighter stream is taken off as the topside stream and is further distilled again under vacuum to three light lube oil blending cuts. These are called spindle oils and when finished will form the basis of light lubes used for domestic purposes such as sewing machine, bicycle, and other home lubricant requirements. Some of the heavier spindle oils are also used as blend stocks for light motor oils. These spindle oils require very little treatment for finishing. Usually, a mild hydrotreating suffices to meet color requirement. The second distillate side stream is dewaxed and sent to the engine lube oil pool. It may also be blended with the heavier bottom side stream as heavy engine oil stock.

Getting Started with Aspen PIMS

Page

16

Chapter # 1

Getting Started with Aspen PIMS

Page

17

Chapter # 1 The bottom side stream is one of the base blending stock for heavy engine oils and the turbine oil stocks. To meet color and other specifications these heavier oils must be treated for the removal of undesirable components (such as heavy aromatics and olefins) by solvent extraction. This is accomplished prior to the stream being dewaxed and routed to storage. The heavy vacuum residue from the vacuum tower is routed to a propane deasphalting unit. Here, the very thick bituminous asphaltenes are removed by extraction with liquid propane. The raffinate from this extraction process is the heaviest lube oilblending stream commonly called Bright stock. This stream is also routed to the solvent extraction unit and the de waxing process before storage. Solvent extraction is accomplished in a trayed column by contacting the oil feed and solvent counter currently in the tower. The lighter raffinate stream leaves the top of the tower to be stripped free of the solvent in an associated stripper column, before entering the de waxing unit. The extracted components leave the bottom of the tower also to be stripped free of the solvent in an associated stripper column. The extract in this case may be routed to the propane de asphalting unit or simply sent to the refinery fuel supply. The solvent in modern refineries is Fufural, Phenol, or a proprietary solvent based on either of these chemicals. In earlier plants Oleum or liquid SO2 was used for this purpose. The oil streams routed to the de waxing plant are contacted and mixed with a crystallizing agent such as Methyl Ethyl Ketone (MEK) before entering a series of chiller tubes. Here the oil/MEK mix is reduced in temperature to a degree that the wax contained in the oil crystallizes out. The stream with the wax now in suspension enters a series of drum filters where the wax and oil are separated. Both streams are stripped free of the MEK in separate columns. The MEK is recycled while the de-waxed oil is sent to storage and blending. The wax may be retained as a solid in a suitably furnished warehouse or re melted and stored in special tanks with inert gas cover. The asphalt from the propane de-asphalting unit is stripped free of propane and any other light ends using inert gas as the stripping agent. It leaves the unit to proceed either directly to the bitumen pool or to be further treated by air blowing. The air blowing process increases the hardness of the bitumen where this is required to meet certain specifications. It is accomplished either as a batch process or on a continuous basis. The hot-stripped asphalt from the de-asphalting unit enters the air blower reactor under level control (if the process is continuous). Air is introduced via a small compressor to the bottom of the reactor vessel, and allowed to bubble up through the hot oil phase. The air removes some of the heavy entrained oils in the asphalt and reacts mildly to partially oxidize the asphaltenes. The hot oil vapors and the unused air leaves the top of the reactor to be burned in a suitably designed incinerator. The blown asphalt leaves the reactor as a side stream to bitumen storage or blending. The production of lube oils usually takes place in a section of an energy refinery. The various grades of the oils are also produced in a blocked operation using storage facilities between the units. This is feasible as the amount of lube oils required to be produced are relatively small and normally do not justify separate treating facilities for each grade.

Getting Started with Aspen PIMS

Page

18

Chapter # 2

CHAPTER # 2: INTRODUCTION TO LINEAR


PROGRAMMING
INTRODUCTION:
Linear programming (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships. Linear programming is a specific case of mathematical programming (mathematical optimization). Linear programming is the process of taking various linear inequalities relating to some situation, and finding the "best" value obtainable under those conditions. A typical example would be taking the limitations of materials and labor, and then determining the "best" production levels for maximal profits under those conditions. In "real life", linear programming is part of a very important area of mathematics called "optimization techniques". This field of study (or at least the applied results of it) are used every day in the organization and allocation of resources. These "real life" systems can have dozens or hundreds of variables, or more. In algebra, though, you'll only work with the simple (and graphable) two-variable linear case. The general process for solving linear-programming exercises is to graph the inequalities (called the "constraints") to form a walled-off area on the x,y-plane (called the "feasibility region"). Then you figure out the coordinates of the corners of this feasibility region (that is, you find the intersection points of the various pairs of lines), and test these corner points in the formula (called the "optimization equation") for which you're trying to find the highest or lowest value.

Find the maximal and minimal value of z = 3x + 4y subject to the following constraints:

The three inequalities in the curly braces are the constraints. The area of the plane that they mark off will be the feasibility region. The formula "z = 3x + 4y" is the optimization equation. I need to find the (x, y) corner points of the feasibility region that return the largest and smallest values of z. My first step is to solve each inequality for the more-easily graphed equivalent forms:

Getting Started with Aspen PIMS

Page

Chapter # 2

It's easy to graph the system: C

To find the corner points -- which aren't always clear from the graph -- I'll pair the lines (thus forming a system of linear equations) and solve: y = ( 1/2 )x + 7 y = 3x ( 1/2 )x + 7 = 3x x + 14 = 6x 14 = 7x 2=x y = 3(2) = 6 corner point at (2, 6) y = ( 1/2 )x + 7 y=x2 ( 1/2 )x + 7 = x 2 x + 14 = 2x 4 18 = 3x 6=x y = (6) 2 = 4 corner point at (6, 4) y = 3x y=x2 3x = x 2 2x = 2 x = 1 y = 3(1) = 3 corner pt. at (1, 3)

So the corner points are (2, 6), (6, 4), and (1, 3). Page Somebody really smart proved that, for linear systems like this, the maximum and minimum values of the optimization equation will always be on the corners of the

Getting Started with Aspen PIMS

Chapter # 2 feasibility region. So, to find the solution to this exercise, I only need to plug these three points into "z = 3x + 4y". (2, 6): z = 3(2) + 4(6) = 6 + 24 = 30 (6, 4): z = 3(6) + 4(4) = 18 + 16 = 34 (1, 3): z = 3(1) + 4(3) = 3 12 = 15 Then the maximum of z = 34 occurs at (6, 4), and the minimum of z = 15 occurs at (1, 3).

Assumptions and the Main Components of Linear Programming Problems


Mathematical programming problems are mathematical models that attempt to model a real-life situation. They do so by using variables and parameters. Both represent numbers, but while parameters are numbers that are known to the decision maker and have to be taken as a fixed datum, variables are numbers whose values will be determined in the process. In general, parameters are not within the jurisdiction of the decision maker, while variables are. This concept may be best explained by a small example. Suppose that an individual wants to plan his diet in a way, so that the nutritional content of the diet satisfies generally accepted standards, while the costs are minimized. Here, the content of nutrients in the foodstuffs under consideration are parameters, and so are the prices of the foodstuffs and the quantities of nutrients that should be included in the diet. On the other hand, the quantities of foodstuffs that are included in the diet are within the jurisdiction of the decision maker and hence they are decision variables, while the quantities of nutrients in the diet, while determined by the decision maker through the food intake, are not directly controlled by him. These are endogenous variables, but not decision variables in the narrow sense. Some decision makers prefer to further subdivide the variables into two classes based on causality. Consider a simple example: in a model of a national economy, the supply of money and the unemployment rate are both unknown, i.e., they are not parameters. However, while the supply of money can be determined directly by the federal government (or, more specifically, by the Federal Reserve), the rate of unemployment will be a result of the governments policy. By changing the variables under its jurisdiction, the national planners can influence the unemployment rate, but only indirectly by setting the variables under their jurisdiction to the desired values. This distinction is not relevant in the models under consideration here: all variables are included in the model, and the solver will determine their optimal values, regardless if they can be influenced directly by the decision maker or not. Actually, in order to distinguish the variables included in the model by the decision maker from those added by the solver in the solution process, we will call all these variables decision variables, regardless if the decision maker can directly choose their value or not. Page All mathematical programming problems consist of two components, viz., constraints and objectives. Constraints are imposed by the system, meaning they are not within

Getting Started with Aspen PIMS

Chapter # 2 the jurisdiction of the decision maker and all he can do is realize their existence and respect them. Typical examples are constraints that limit resources (e.g., budget constraints), existing contractual agreements that require that certain quantities of products are delivered, certain manpower assignments are not made (due to collective agreements), physical and/or chemical limits, etc. It should be noted that constraints in mathematical programming couldnt be violated. For instance, if only ten units of a resource such as machine time are available, then no schedule will be considered that uses more than ten units, regardless how many more units. This may very well be in conflict with reality: for instance, a budget constraint that limits weekly expenditures to, say, $1,000, may very well be violated in practice by taking out a loan. Most beginners will be only too eager to formulate constraints, even if the restrictions are not at all hard. Some examples are provided by Eiselt and Laporte (1987). Among them are problems that schedule students final exams. The softness of constraints can nicely be shown in such a context: having a student write two exams at the same time: impossible, i.e., a hard constraint; having a student write two exams in a row on the same day: highly undesirable, so a high penalty is added to such a case; having a student write two exams on the same day, one early in the morning and the other late in the afternoon: quite undesirable, so there is some penalty; having a student write his first exams very early in the exam period and his last exam very late in the exam period: somewhat undesirable, so that a small penalty is added to such a case. As can be seen from the above example, only in the case of impossibility should a constraint be formulated that prohibits that particular instance; in all other cases of undesirability, penalties should be defined which are subsequently incorporated in the objective function rather than the constraints. For some pertinent comments, see also Moore and Weatherford (2001). Some authors have approached the modeling of soft constraints by using fuzzy programming. On the other hand, there are objectives that express the wishes of the decision maker. Most optimization models employ a single objective function. But there are models that have more than a single objective. As a matter of fact, whenever more than one objective is present, the concept of optimalitya key concept in optimizationloses its meaning and has to be replaced by other, conceptually weaker, concepts. One can think of an optimization as a pasture, whose boundaries are the fences (our constraints), while the objective function points into a direction, in which the grass is greener and we would like to go as far as possible, and that is exactly the function of the solver that is applied to the optimization problem. We will now investigate the two problem components, constraints and objectives, in more detail. First consider the objective function. There are two ways an objective function can be written, viz., Max zf = f(x) or Min zg = g(x). To the solver it is completely irrelevant if the objective measures profit, revenue, sales, or some other utility. All such measures have in common that they maximize the objective. Similarly, it is irrelevant if our objective expresses costs, distances, or any other disutility, as all such measures are going to be minimized. As a matter of fact, since each maximization objective Max zf =

Getting Started with Aspen PIMS

Page

Chapter # 2 f(x) can be written as an equivalent minimization objective Min zg = g(x) with zg = zf and g(x) = f(x), there is no need to devise methods for both types of problems, since each minimization problem can easily be transformed into an equivalent maximization problem and vice versa. Also, fixed costs may or may not be included in the objective function, as they do not influence the optimization. What is by no means obvious or easy to state is the actual expression of the objective. Typically, the true objective of the decision maker will remain elusive. It is often a very general statement such as improve the firms efficiency, satisfy our customers as best as possible to generate repeat business, distribute our products as quickly as possible, or a similar statement that will have to be quantified. Typically, the analyst will determine a proxy or surrogate criterion that, at least hopefully, will measure roughly what the decision maker has in mind. The proxy objective, while it may not be exactly what the decision maker wants, will have the advantage of being quantifiable. This process does sound easier than it normally is. Distributing products quickly, for instance, can mean many different things. If there were just two customers and two solutions were possible: one that distributes the products to our two customers in three days each, and another that delivers the goods to customer one in a single day and to customer two in four days, which of the two solutions would the decision maker prefer? In other words, is the average or the longest delivery time the appropriate yardstick? Problems such as these occur even in business situations, where normally most measures finally are reducible to the common denominator of dollars. This is true even in cases in which the decision maker wants to apply objectives that appear very difficult to quantify, e.g., the damage of an oil spill or the risk of a fatality in the airline industry. After all, it is always possible to take out insurance for such cases, which will reduce these risks and environmental damages to costs. However, customer satisfaction and high levels of employee satisfaction, both long-term objectives that ensure repeat business and good labor relations, even though ultimately they will result in higher profits, remain elusive as far as their quantification is concerned. Similarly, the simple objective maximize profits may be achieved by different means. In the short run, this objective may be achieved by increasing prices of some goods. The long term implications may, however, be stagnating growth, shrinking market shares and finally decreasing profits; the maximization of profits in the long run may be achieved by a completely different strategy. In the public sector things are still more complicated. Maximize the quality of services could be substituted by maximizing the number of civil servants; a highly questionable proxy expression, as pointed out by Parkinson (1957). For a hospital administration, the objective may be to maximize the quality of hospital service. An analyst attempting to quantify the real criterion hospital service may apply the proxy z = the average number of days a patient stays in a hospital. Minimizing z could imply discharging patients not completely cured, while maximizing z may have the effect of the hospital not admitting new patients with serious diseases and in need of a hospital bed. Page Next, consider the constraints of a model. The structure of all constraints, regardless what model they belong to, is the same. A constraint can be written as

Getting Started with Aspen PIMS

Chapter # 2 LHS R RHS, Where LHS denotes left-hand side, R denotes a (mathematical) relationship, and RHS symbolizes the right-hand side of the relation. In particular, the left-hand side always measures the value associated with a real situation, the relation R {, =,}, and the right-hand side is a single number that provides the yardstick with which the value on the left-hand side is compared. In that sense, a constraint is not unlike a typical statistical hypothesis test, in which a test statistic is compared with a benchmark value. Based on the relationship between these two values, the hypothesis test is either accepted or rejected. As an example, consider a typical resource constraint, such as a budget constraint. On the left-hand side LHS we will formulate an expression for the amount of money that is actually spent, the right-hand side RHS will express how much money we are allowed to spend, and the relation R in this case will be . Note that from a technical point of view, it is always possible to convert a constraint to a constraint and vice versa by multiplying the constraint by any negative number, so that it is not limiting when we consider only constraints here. When formulating constraints, it is always beneficial to first formulate the requirement as a sentence of the language, which then can be translated into a mathematical structure. It should be ensured that the analyst is able to interpret each single term of the expression. As an example, consider again a budget constraint. Let there be two products, whose unit prices are $5 and $8, respectively, and whose quantities we denote by x1 and x2, respectively. Assuming that $60 are available to us during the planning period, we can then require that our actual expenditures should not exceed the amount of money that we have. The actual expenditure can be decomposed into two components, one that expresses the amount of money we spend on the first product and another that measure the amount that we spend on product two. Given that each unit of product one costs $5 and we purchase a total of x1 units of it, we will spend 5x1 on product one. Similarly, we will spend 8x2 on product two. This will then lead to the budget constraint 5x1 + 8x2 60. Before we further discuss model formulations, it is mandatory that we familiarize ourselves with the basic assumptions of linear programming. In particular, there are three assumptions: (1) deterministic property, (2) divisibility, and (3) proportionality (resulting in linearity). First consider the deterministic property. Deterministic means that we assume that the structure of the problem as well as all parameters of the problem are assumed to be known with certainty. (The antonym of deterministic is probabilistic or stochastic). Clearly, it is not very realistic to assume that a model is deterministic when it, almost by definition and without very few exceptions, deals with future events and hence includes parameters that also relate to future events. However, while the original problem may be stochastic, our model could still be deterministicjust one of the many examples where a model is indeed a simplification of reality. We may get away with this simplification by

Getting Started with Aspen PIMS

Page

Chapter # 2 using the trick of sensitivity analyses. As an example, if we can reasonably well estimate the future demand for a product to be between, say, 12 and 17, we mayat least for nowassume the demand to be known with certainty at the level of, say, 14 and solve the problem. Once that is accomplished, we employ sensitivity analysis to examine what happens to the solution if the demand were to decrease by one or two units. We would then continue to examine how the solutions were to behave if the demand were to increase to 15, 16, or even 17. That way, we stay within the confines of deterministic models that are much easier to solve and still obtain information in case the demand is not at the level we first assumed. The second assumption of linear programming deals with divisibility. It simply states that each variable, typically a quantity of some sort, can be expressed as any real number rather than an integer. Often, this is not satisfied. For instance, if we are in the business of making cans of beans, then the number of cans of beans, typically a variable in our planning model, will have to be an integer, as there is not much use in partial cans of beans that can obviously not be sold. However, it is very well known that dropping the assumption of divisibility creates major problems. In particular, if a linear program requires that variables can only assume integer values, we obtain an integer linear programming problem, which can be shown to be many times more difficult to solve as compared to a standard linear programming problem. Hence, the general rule is to assume divisibility as long as that can be justified. In the case of the cans of beans, we may assume divisibility and then simply round the solution, even though such procedure is well known to not necessarily result in an optimal solution. However, the potential loss of a part of a can of beans is so minuscule that it is not worth the effort to spend any time to find exact solutions. On the other hand, if we are planning the sale of houses, then it may very well make a significant difference if we construct one house more or one house less. In summary, if the products we are dealing with are given in small numbers and are very valuable, we may have to drop the assumption of divisibility and solve a more difficult integer problem, while for low-value products in large numbers such an effort will not be required. Finally, linear programming requires that all functions, objective function as well as lefthand sides of constraints, are linear. The question here is whether or not the assumption of linearity is realistic in any given instance. Again, that will depend on the practical situation at hand. If, for instance, there are no quantity discounts for a product, i.e., the cost of a product is proportional to the quantity that we purchase, then the assumption of linearity is justified. If there are no economies of scale, it is. But clearly, many functions in real life are not linear. However, oftenalbeit not alwayslinearity is a reasonable approximation of reality. If it is not, then there is an old adage that applies to all of modeling: if the model is not sufficiently close to reality to make sense, then dont use it.

The Modeling Process


This section will guide readers through some of the intricacies of the modeling process, i.e., the process that starts at the present situation and ends with a fully implemented optimized solution. The main steps in the modeling process are as follows:

Getting Started with Aspen PIMS

Page

Chapter # 2

Step 1: Problem recognition As straightforward as this step may sound, it is essential in the process. It requires that somebody in the organization realize that it is not business as usual, weve always done it like that, and weve never done it like that, but that it may be possible to improve the present situation. In addition to realizing that there is always room for improvement, it is necessary for the individual responsible for the firm or department under consideration to not only understand the workings of the department, but also the potential for improvement by the appropriate techniques. In other words, even if the manager of the department does not know exactly how to improve or optimize the system relating to his department, it is mandatory for the manager to be able to gauge as to whether or not there is some potential for improvement and what the possibilities of implementing any kinds of improvements really are. Step 2: Convince the administration to model As much as any one individual or group is convinced that improvements in the workings of a department are necessary, it is mandatory to obtain not just departmental approval or sanction, but also active support by superiors as well as departmental employees. In both cases, it will be necessary to sell the idea of optimization and the change that will result from the implementation of the new solution. Selling modeling to superiors will require some reasonably clear ideas about the resources required in the process, as this will have a direct bearing on the costs of the undertaking. On the other hand, without active support of the people in the department that will be directly affected by the change, results will be boycotted and nothing will be accomplished. Step 3: Collect information: stakeholders, structure, and data Once the modeling process has been approved, the modeler can go to work. Among the first steps will be to determine who will be the major stakeholders in the process are and what their objectives are. These do not have to be well-defined quantitative measures, but general statements of utility functions. It will be one of the modelers many tasks to quantify these utilities, determine surrogate or proxy criteria and obtain some agreement among the major stakeholders regarding the overall objective. In case the main decision makers cannot agree on a single objective, the modeler will have to resort to multi objective optimization. Once the objective has been determined at least in its general form, we need to define the structure of the model. By this we refer to the determination of the scope of the model, i.e., all of the sub departments and issues to be included or excluded in the model. For instance, when optimizing a transportation system, one of the questions would be in how far the related inventory system will have to be included. Clearly, while it is desirable to include as many departments as possible in the model so as to avoid obtaining sub optima that may be good for one department but poor for another, such comprehensive models will make the system more expensive to model and more difficult to solve. What is appropriate in the specific case will depend on the judgment of the modeler.

Getting Started with Aspen PIMS

Page

Chapter # 2 The last step in this process is the collection of the data. This frequently underestimated task will, according to practitioners, always take longer than expected. Often, necessary data are hard to come by, due to the protective nature of subordinate managers or other employees who would like to guard their local fiefdoms or avoid having to change their habits. As an example, suppose that a modeler wants to determine the throughput of products at a workstation. He will ask the employee who operates the workstation for the appropriate figure and the reply may very well include the employees fear to be forced to work harder, so that he may provide a number that is believable, but lower than it is in reality. Similarly, department managers asked about the performance of their department in terms of output or other measures may provide exaggerated numbers in order to look good. It is the modelers duty to double-check and separate the fluff from reality. Other problems related to the task of data collection may relate to the unavailability of the type of data needed. For instance, census data may not cover the same region that a school district does, and customer surveys may not indicate the reasons for customer purchases or why they did not purchase a product. Step 4: Build the model In particular, this step includes the definition of the variables, formulation of the objective(s) and the constraints. Chapter 2 of this volume will provide a number of typical scenarios that, by them, may be overly simplistic in their structure and size, but are indicative of some of the models encountered in practice. While there are usually multiple ways to formulate a model and as many ways to approach a problem as there are modelers, it is usually a good idea to start the formulation with the definition of the variables, i.e., those quantitative measures which can be influenced by the decision maker(s). Typical examples for variables are the number of items of a product manufactured, the amount of money allocated to a certain activity, the quantity shipped to a destination, and so forth. Sometimes, there are also so-called logical variables, i.e., variables that indicate whether or not an activity is carried out or not. Such variables can assume only a value of zero or one; one, if we do engage in an activity, and zero if we do not. Such variables are not quantitative in the narrow sense, and we have dealt with them at length in Eiselt and Sandblom (2000). Whenever formulating an objective or a constraint, it is always useful to express the meaning of the expression first in terms of a regular sentence, which is subsequently (literally) translated into a mathematical function. Step 5: Solve the model This step appears straightforward. There are different techniques, which can be used to solve the model like simplex method. Other choice includes use of the appropriate software, the inputting of the model, and its solution. Step 6: Model validation This important step will entail the examination of the solution obtained in the previous step. Are there outright errors to the model? Does the solution make sense? Could such a solution actually be implemented regarding potential internal and external resistance from

Getting Started with Aspen PIMS

Page

Chapter # 2 individuals or organizations affected by the solution? In case the modeler is satisfied that the model is actually usable in the situation under consideration, we may move on to the next step. Otherwise, it is back to Step 4, in which the model can be revised. Note that this may include the collection of additional data or changes in the structure as shown in Step 3. The loop that consists of Steps 3 (or 4) to 6 may have to (and usually will) be repeated many times. Step 7: Model implementation This is the final step in the process. It involves the modeler presenting his findings to the decision makers and those who have the power to approve the use of the solution. In order to ensure that the solution is actually used in practice, it is important that the modeler properly presents his findings. On the operational level it may be sufficient to simply write up a report with the findings, state the anticipated benefits of the new solution coupled with some thoughts regarding the implementation of the solution, i.e., the changeover from the existing to the optimized solution, and that is it. However, this is definitely not sufficient in case of decisions to be made on the tactical or even strategic level. Here, it is again required that the modeler sell his solution to the stakeholders. The importance of this job is highlighted by the findings that even among those studies that were commissioned by the decision makers, i.e., for which they did put money and other resources up front, only a small fraction was ever implemented. One of the ways to make the selling of these findings more palatable is to present the optimal solution as one of the many possibilities to improve the situation, coupled with a thorough discussion of the assumptions that led to the solution, the changes that will result from changes in the data, and the robustness of the solution. After all, it is mandatory that the modelers do not take the position of the decision maker (if he is not the decision maker himself). Having outlined some of the major steps of the process typically used in operations research, it becomes apparent that while there are many different foci in operations research (applications, theory, algorithms, and structures of models), it is modeling that sets operations research apart from other disciplines. As we have seen in the 7-step procedure above, modeling in this context refers to the translation of a real problem (referred to as messes by Ackoff (1974), one of the pioneers of the profession) into a well structured mathematical formulation. For a number of entertaining and instructive cases, see also Ackoff (1978). As shown above, modeling is an interactive process. Of particular interest here is the loop that includes Steps 4-6. In order to explain the process, we refer again to the diet problem introduced at the beginning of the previous section. Suppose that the problem has been formulated and solved, and that we are now in the process of validating the solution. For the sake of argument, assume that the solution suggests that the optimal daily food intake include three stalks of celery, four bunches of broccoli, two pounds of yogurt, and five hamburgers (the latter as they provide cheap bulk). Two pounds of yogurt are probably more than most people are willing to eat in a day, so the planner will have to include upper bounds on the quantity of that particular foodstuff. Once the model has been revised, the new model will be solved again.

Getting Started with Aspen PIMS

Page

10

Chapter # 2

What happens in the new solution is fairly easy to imagine: as the quantity of one type of food is reduced, the quantities of other types of food will have to increase in order to guarantee that sufficient amounts of nutrients are included in the diet. The new solution may include more celery, more broccolis, and possibly even more hamburgers. Such a solution is still not acceptable, so new constraints will have to be included, e.g., on the number of hamburgers in the diet. The process will circle until a diet has been created that is acceptable to both, the planners budget and palate. It is clear that each time that additional constraints are introduced, the resulting optimal diet will not be cheaper (but typically more expensive) than the previous diet. The planner will have to weigh the tastiness of his diet as it evolves, against its increasing price. Also note that it is very much in the planners interest to enlarge his decision space by including additional foods that were not included previously. Flowchart for Process is as follows
S T E P 1 : P ro b le m re c o g n itio n

S te p 2 : C o n v in c e th e a d m in is tra to rs

S te p 3 : C o lle c tio n o f D a ta

S te p 4 : M o d e l F o rm u la tio n

S te p 5 : S o lv e th e M o d e l

No S te p 6 : M o d e l V a lid a tio n W h e th e r M o d e l o p tim a l a n d P ra c tic a l

Yes

S te p 7 : M o d e l Im p le m e n ta tio n

Getting Started with Aspen PIMS

Page

11

Chapter # 2

The Three Phases in Optimization


There are three major issues as far as any mathematical programming problem are concerned. They are usually arranged into three phases. They are feasibility, optimality, and sensitivity. In simple words, feasibility deals with the question whether or not the requirements, i.e., the constraints can be satisfied. If not, the modeler has to go back to the drawing board and rewrite the model, as no further processing is meaningful. Once a feasible solution has been found, we enter the second phase, which attempts to find an optimal solution. Since at least one feasible solution exists by assumption (otherwise we would not be in the second phase), there also exists at least one optimal solution. The second phase terminates with one such solution. Finally, the third phase examines what happens, if some of the parameters of the model change their values. Sensitivity analyses are also referred to as post optimality analyses and they can be recognized by their wording: they always include the terms what if. Whenever a new model is formulated, it is usually a good idea to first determine roughly what the solution is going to be. In other words, we typically like to know what ballpark we are in. One way to do so is to perform a break-even analysis first. In terms of a profit-maximizing model, the break-even point is the point that separates a positive from a negative profit. Since profit P is defined as Profit = Revenue Costs, Where the revenue R is defined as unit price p times quantity q, and costs C are usually expressed as the sum of fixed costs Cf and variable costs Cv, and the latter of which are defined as unit costs c times quantity q, we can write P = R C = R Cf Cv = pq cq Cf = (pc) q Cf. Assuming that the prices are parameters (i.e., fixed and known numbers) while the quantities are the variables, the break-even point can then formally be expressed as the quantity at which the profit equals zero or, equivalently, revenue equals cost. This results in the break-even quantity

Getting Started with Aspen PIMS

Page

As an example, if it costs $500 to set up the production and $3 to make one unit (assuming there are no economies of scale), and units of the product that we make sells for $5 (the demand is sufficiently high), then the break-even point is achieved where q = 500/(5 3) = 250 units. In other words, if we make and sell less than 250 units, we will lose money, while in case more than 250 units of the product are made and sold, we

12

Chapter # 2 make a positive profit. This enables the decision maker to have a rough idea what his production figures have to be in order to make a profit. In order to illustrate break-even analyses on a somewhat more elaborate example, consider the following Example: The task at hand is to organize a scientific conference, which is assumed to be an annual event. In order to participate, conference registrants will have to pay a registration fee that is to be determined by the organizer. As customary, there will be different categories: regular attendees who register late (i.e., after a cutoff date or onsite), student and retired attendees who register late, regular attendees who register early, and student and retired attendees who register early. The charges for these four groups are to be determined and they are denoted by as prl, pre, psl, and pse, respectively. The number of attendees is, of course, also 1 unknown and the respective numbers are xrl, xre, xsl, and xse, respectively. At past conferences of this type, the registration fees for the four categories were $350, $80, $250, and $50, respectively. The average attendance throughout the last few years has also been observed (we are taking an average so as to eliminate annual fluctuations, e.g., due to particularly attractive or unattractive conference venues). As we cannot assume that past attendance is a good guide to attendance figures at the planned conference, we use only the ratios of the past attendances between the four groups. Suppose that in the past, there were seven times as many regular attendees who registered late in relation to student and retired attendees who registered late, i.e., xsl = xrl/7. Similarly, we have observed that xre = xrl/2, and xse = xrl/6. Given that we want to keep the registration fees between the groups also at the same ratio, we have psl/prl = 80/350, pre/prl = 250/350, and pse/prl = 50/350. As far as costs are concerned, we have to pay $15,000 for the rental of the rooms, audiovisual equipment, and entertainment at the banquet. All of these costs will be incurred regardless of the number of conference participants. In addition, we will need $25 for the conference kit (e.g., bag or binder, tag, CD with Proceedings, etc.) and $60 for the reception, luncheon, and banquet. At this point, we have eight unknowns (with the registration fees as variables and the attendance figures as unknown parameters) and a total of seven equations, viz., six ratios as outlined above and the break-even equation that requires that the revenue equals the cost, i.e., prlxrl + prexre + pslxsl + psexse = 15,000 + 85(xrl + xre + xsl + xse). Expressing all fees and attendance figures in terms of prl and xrl and solving for xrl results in the equation

Getting Started with Aspen PIMS

Page

13

Chapter # 2 This makes it possible to construct a two-dimensional graph shown in Figure, in which we plot prl against xrl. For instance, we can see that in order to break even, charging $200 will require the attendance of 116.36 regular participants who register late (and, calculating the attendance figures of the other groups by using the above relations, requires a total of 211 participants). Such a requirement may be too optimistic, so that we examine the total number of required participants for a registration fee of $250 for regular attendees who pay late. Similar calculations reveal that the total number of attendees now drops to 136, which may be more realistic. Similar figures for $300 are 100 participants, for $400 there must be at least 66 participants, etc. If conservative estimates indicate that about 80 participants can be expected, we could therefore decide to charge between $350 and $400 with a reasonable expectation to (at least) break even.

Getting Started with Aspen PIMS

Page

14

Chapter # 3

CHAPTER 3: APPLICATION
This chapter will provide two applications of linear programming problems, which will be interesting to people in refinery. One is inventory planning and other blending Model. We should note that these are mere sample problems that are designed to give readers a flavor of the application, rather than a model that includes all of the bells and whistles usually found in real applications. We have already discussed an example of the first large class of applications in the Introduction, viz., and production problems. Readers may recall that the simple model formulated in the introduction has its decision variables defined in terms of the number of quantity units of a product that are made and sold. Much more frequently, such variables will have to be decomposed into variables that measure the number of units that are made, while other variables express the number of units that are sold, with the unsold units being left in inventory.

INVENTORY PLANNING
This example introduces a simple model that illustrates how inventories can be incorporated in a production problem similar to that introduced in Chapter 2. The basic reasons for inventories are manifold. The main reason is to avoid high costs of overtime, contracting out, and other stopgap measures in order to satisfy unexpected peaks in demand. The obvious drawback are the costs related to keeping inventories, such as warehouse operating costs, e.g., rent, heating/cooling, lighting, security, etc., but, most importantly, costs related to capital that is tied up in inventory. Hence, interest on capital tied up in inventories will make up most of the inventory costs. By their very nature, problems involving inventories are dynamic. Each period, often a month can be planned individually, and the inventory balancing constraints will serve as connecting links between the individual planning periods. Inventories can be visualized as holding tanks with the production serving as the inflow of goods and the demand as the outflow. To formalize matters, first define dt as the known demand in period t, where, for simplicity, we assume that the demand occurs at the end of the month. Next define the production variables xt that denote the production of the good some time in period t, and define inventory variables It that denote the level of inventory at the beginning of period t. (Alternatively, we can define the inventory variables at the end of the period). We also have production capacities t that may differ between the periods, production costs c that indicate the per-unit production costs in period t, and inventory holding costs c that express the cost of holding one unit in stock from the beginning of period t to the beginning of period t+1. The problem can then be formulated as

Getting Started with Aspen PIMS

Page

Chapter # 3

The objective function minimizes the sum of production and inventory costs, while the constraints are the capacity constraints, the demand constraints (that require that the inventory available at the beginning of month t plus whatever is manufactured within month t is sufficient to satisfy the demand), and the typical inventory balancing constraints that specify that the inventory available at the beginning of month t+1 equals the inventory available at the beginning of the previous month t, plus whatever is produced in month t minus what is consumed (i.e., the demand) in month t. Clearly, all variables have to satisfy the usual Non negativity constraints. The problem can be simplified, though. Due to the non-negativity constraints of the inventory constraints, we know that the inventory balancing constraints are It+1 = It + xt dt 0 t or, simply, xt + It dt t as required by the demand constraints (1), making them redundant and therefore they can be deleted. As an illustration, consider the following Example: A company wants to plan its production for one of its products for the next four months. Table shows the anticipated demand, the production capacities, and the unit production costs for the individual months, as well as the inventory holding costs that are incurred carrying over one unit from one month to the next.

At present, no units are in stock and after the four months, it is not desired to have any stock left. The problem can then be written as

Getting Started with Aspen PIMS

Page

Chapter # 3

The optimal solution to this problem is x = [70, 100, 160, 150] and I = [0, 20, 0, 10] with associated costs of z = 560.

Blending Problems
Blending problems have a long history in the applications of linear programming. One of the first descriptions of blending problems deals with the blending of gasolines, see Charnes et al. (1952). Their paper describes a linear programming problem that blends airline fuels and adds chemicals, so as to ensure that prespecified performance levels are attained, e.g., vapor pressure, lead and sulfur content and other specifications. The objective function is to maximize the profit. Other popular examples of blending problems comprise tees, coffees, tobacco, or similar products. The general structure can be described as follows. One set of subscripts includes all of the m available raw materials, while another includes all of the n desired final products. As usual, only limited quantities of the raw materials are available, and certain amounts of the final products have to be blended. Here, we assume that raw materials blend linearly, meaning that taking, say, units of raw material A and units of raw material B, then the resulting blend C has features that are proportional to the quantities of A and B that C is made of. As an example, take 3 gallons of 80 water and 2 gallons of 100 water, then the result would be 5 gallons of water, whose temperature is [3(80) + 2(100)]/5 = 88. Assume now that we have a supply of si units of the i-the raw material while dj units of the j-the product are in demand. The unit costs of the i-th raw material are ci, whereas the unit price of the j-th final product is pj. In order to ensure a consistent quality of the blend, some restrictions apply. The parameters ij a and ij a indicate the smallest and largest proportion of raw material i that is allowed in the final product j. For instance, if the two values are 0.3 and 0.5, respectively, then the content of raw material i in product j must be at least 30% 90 2 Applications and cannot exceed 50%. It is apparent that for cheaper products, the range between ij a and ij a will typically be allowed to be quite large, while high-quality products will have to be manufactured within very tight tolerances. In order to formulate the problem, define variables xij that denote the quantity of raw material i in product j. Then we obtain the problem

Getting Started with Aspen PIMS

Page

Chapter # 3

As an illustration, consider the following Example: A firm faces the problem of blending three raw materials into two final products. The required numerical information is provided in Table

Getting Started with Aspen PIMS

Page

Chapter # 3 and the profit is $9,650. It will be interestingalbeit predictableto see what happens if the blending requirements are tightened. In particular, reduce the upper bounds of the ranges relating to product 1 from .6, .2, and .5 to .5, .1, and .4. The new optimal solution then includes the quantities

with a total profit of $9,440. In other words, the more tightly controlled product 1 causes rather significant changes in the blending schedule and reduces the profit by $210 or 2.2%, i.e., by 35 for each unit of product 1 that is sold. If the buyers are prepared to pay that much more for an improved product 1 with tighter quality controls, this is certainly an option to consider.

Getting Started with Aspen PIMS

Page

Chapter # 4

CHAPTER # 4: Integration of Refinery Planning


and crude-oil Scheduling using Lagrangian decomposition
Introduction
The oil refining industry is a prolific field for the application of mathematical programming techniques (see Bodington and Baker, 1990). Refinery operators have to make decisions on the logistics operation taking into account a large number of crude-oils, finished products such as liquefied petroleum gas, gasoline, diesel fuel, and a wide variety of high exibility production units involving many diffierent chemical processes. Furthermore, the economic impact of optimizing operations can be very significant. The refinery planning problem often involves the pooling problem), which has been addressed since the early 80s and usually consists of optimizing feedstocks, unit settings, as well as final product blending and shipping. Some examples of nonlinear refinery planning problems including pooling constraints and nonlinear process models can be found in Pinto and Moro (2000), Li et al. (2005), and Alhajri et al. (2008). Although commercial solvers such as GRTMPS (Haverly Systems), PIMS (Aspen Tech), and RPMS (Honeywell HiSpec Solutions) implement successive linear programming algorithms to solve this problem (see Zhang et al., 1985), any standard NLP solvers can also be used although they may not guarantee global optimality of the solution. A major issue with refinery planning is that most models are single-period models where the refinery is assumed to operate in the same state over the whole planning period (typically 1 month). Therefore, the planning solution is used as a tactical goal for refinery operators rather than as an operational tool. In particular, CDU (Crude Distillation Unit) feedstock decisions returned by the refinery planning problem are usually not applicable in the field due to crude logistics constraints. These are described in the crude-oil operations scheduling problem, which includes unloading from crude-oil tankers, preparation of crude-blends, and CDU feed charging. Although, integration of planning and scheduling has recently been addressed in the context of multi product continuous and batch production plants, very little work has been done towards the integration of planning and crude-oil scheduling problems in the context of refineries. This is due to the fact that in this case, the planning model is not an aggregate scheduling model. Therefore, the decomposition methods developed for batch and continuous plants are not directly applicable to refineries. In particular, planning and scheduling correspond to two different problems solely linked through CDU feedstocks. Therefore, instead of using a hierarchical decomposition, a spatial Lagrangian decomposition is preferred. The reader may refer to Fisher (1985) and Guignard (2003) for extensive reviews on Lagrangian relaxation and decomposition techniques. These approches have been applied to many industrial problems such as production planning and scheduling integration (see Li and Ierapetritou, 2009) or multiperiod refinery planning . Thus, it seems natural to apply Lagrangian decomposition to solve the integrated refinery planning and crude-oil scheduling problem. The content of this paper is organized as follows. The planning and scheduling problems are stated in Section 2 as well as the full-

Getting Started with Aspen PIMS

Page

Chapter # 4 space integrated problem. In Section 3, a Lagrangian decomposition scheme based on the dualization of CDU feedstock linking constraints is presented.

Problem Statement
Refinery Planning Problem The refinery planning problem can be regarded as a flowsheet optimization problem with multiple periods during which the refinery system is assumed to operate in steady-state. Due to extensive stream mixing, the model for each period is based on a pooling problem that is extended in order to include process models for each refining unit. The different periods in the model are connected through many material inventories. In this work, we consider a single-period planning model based on a pooling problem inspired from the literature. A basic refinery planning system is represented in Figure 1. A set of crudes i I are to be mixed in different types of crude-oil blends j J (e.g. low-sulfur and highsulfur blends), each associated to a specific CDU operating mode. For each mode and each crude, several distillation cuts are obtained with difierent yields. These crude cuts are then blended into intermediate pools, which are used to prepare several final products. Therefore, the refinery planning system is composed of the following elements: -One input stream for each selected crude i I and each type of crude blend j J - One CDU with fixed yields for each distillation cut - Set of distillation cuts k K - One pool for each type of crude blend j J and each cut k K -One intermediate stream between each pool (j; k) 2 J _ K and each final product l L _-Set of final products l L - One sales stream for each final product l L \-Set of qualities p P

Getting Started with Aspen PIMS

Page

The yield of crude i I in distillation cut k K when processed in crude blend j J is assumed to be fixed and is denoted by ijk. In terms of stream qualities, it is assumed that distillation cuts have _xed qualities while pool qualities are calculated by bilinear quality balance constraints. A pure flow-based model is used to formulate the pooling problem as shown below. CDU flowrate limitations are considered independent of the operating mode and are enforced globally for all crudes processed during the period.

Chapter # 4

The nomenclature used is as follows: Variables:

Getting Started with Aspen PIMS

Page

Chapter # 4

Parameters:

Figure 2 displays the pooling structure of a case-study with corresponding data for crudes (A;B), blends (X; Y ), distillation cuts (M;N), and final products (P; Q;R; S). Two different qualities are considered in this case. In the remainder of the paper, we consider the following NLP, which is a simplified version of the planning model (PP.)

Getting Started with Aspen PIMS

Page

Chapter # 4 The nomenclature used is as follows: VP is the market value of final products xF is a set of continuous variables representing CDU feedstock quantities over the single planning period xS is a set of continuous variables representing final products sales xI is a set of intermediate continuous variables (e.g. pool quantity and quality variables)

fP (xF , xI , xS) 0 is the set of linear constraints (e.g. material balance constraints) gP (xI ) 0 is the set of nonlinear constraints (e.g. quality balance constraints) Crude Oil Scheduling Problem The crude-oil scheduling problem deals with the unloading, transfer and blending operations executed on crude-oil tankers and crude-oil inventories. The goal is to sequentially prepare multiple crude blends, which are defined by specific property requirements. Each type of crude blend corresponds to a specific CDU operating mode. Diferent objectives have been studied, namely minimization of logistics costs (see Lee et al., 1996) or maximization of profit (see Mouret et al., 2009, 2010). In this work, the objective is to minimize the total replacement cost of the crudes that are selected for distillation. The replacement cost is the cost of replacing the crude once it has been processed. The crude-oil schedule must satisfy inventory capacity limitations, crude tankers arrival dates as well as the following logistics constraints: (i) Only one berth is available at the docking station for crude tanker unloadings, (ii) inlet and outlet transfers on tanks must not overlap, (iii) a tank may charge only one CDU at a time, (iv) a CDU can be charged by only one tank at a time, (v) CDUs must be operated continuously throughout the scheduling horizon. Figure 3 shows the refinery system corresponding to problem 1 . Table 1 displays the dimensionless data for this example. Besides a different objective function, introducing a minimum duration of one day for distillation operations modifies the example. Therefore, due to crude blend alternative sequencing, at most 4 batches of each crude mix can be processed in 8 days.
Getting Started with Aspen PIMS

Page

Chapter # 4

In the remainder of the paper, we consider the following MINLP, which is a simplified version of the scheduling model PS.

The nomenclature used is as follows: VC is the replacement cost of crude-oils (usually based on market value) yF is a set of continuous variables representing total CDU feedstock quantities over the scheduling horizon yC is a set of continuous variables representing other continuous decisions (e.g. timing decisions)

yB is a set of binary variables representing sequencing decisions fS(yB, yC, yF ) 0 is the set of linear constraints (e.g. scheduling constraints) gS(yC) 0 is the set of nonlinear stream composition constraints

Getting Started with Aspen PIMS

Page

Chapter # 4

Given the importance of crude selection for refinery optimization, the refinery planning problem and the crude-oil scheduling problem should ideally be optimized simultaneously. This can only be done by solving an integrated full-space MINLP problem, denoted (P ), which aims at optimizing all refinery decisions subject to planning, scheduling, and linking constraints.

The integrated objective is to maximize profit defined by final product sales revenues minus crude-oil replacement costs. The linking constraint yFxF = 0 ensures consistency of planning and scheduling decisions in terms of CDU feedstock quantities. More precisely, it ensures that the amounts of crudes selected for distillation are identical in the planning and scheduling solutions. Also, to be consistent in time, it is considered that the planning and scheduling horizons have identical lengths.

Getting Started with Aspen PIMS

Page

Chapter # 1

CHAPTER # 2: INRODCUTION TO ASPEN


PIMS
Aspen PIMS (Process Industry Modeling System) the foundation of AspenTech's powerful, easy-to-use family of petroleum downstream value chain solutions is a decision support solution that enables refiners and petrochemical producers to achieve dramatic productivity increases while improving overall supply chain agility and profitability. The industry standard for petroleum industry planning, Aspen PIMS is used by more than 75% of the refineries, and more than 60% of all petrochemical plants, in the world. PIMS (Process Industry Modeling System) is an economic planning tool used to model industry processes.

The Challenge
Refiners and petrochemical producers face a climate of industry consolidation, increased competition, growing safety and environmental mandates, and a booming internet culture. Their fundamental challenge is to respond to these variables while still developing the most profitable operating plans, meeting regulatory demands, and making key decisions about capital expenditures for both compliance and profit improvements. PIMS employs linear-programming techniques to optimize the operation and design of refineries, petrochemical plants, or other industry facilities. It can be used for a wide variety of short-term and strategic-planning purposes. To do so, they must also consider the following: Alternative feedstocks and prices Alternative products and prices Product blending specifications Process plant configurations Capital improvements Purchases, sales, and trades Inventories, imports, and exports Optimization of product mix for a given feed state Optimization of product blending and other operating decisions Evaluation of grass root opportunities or expansions, and many others.

The Solution:
Aspen PIMS allows refining and petrochemical companies to develop optimal planning models that balance the complexities of today's environment with maximum fidelity. It provides these benefits: Increased profits through model accuracy and flexibility. Aspen PIMS enables true modeling of key planning work processes, including model analysis, crude and feedstock selection, production planning, operations planning, and blending. Aspen

Getting Started with Aspen PIMS

Page

Chapter # 1 PIMS models include feedstock and intermediate options with price tiers, crude fractionation, and property representation. Reduced operating costs through a streamlined planning process that enables improved asset utilization, utility right sizing, utilities reduction, and loss reduction Sustained value through common process models, consistent model validation and calibration methods, and custom reporting. Aspen PIMS optimizes the operation and design of refineries, petrochemical plants, and other industry facilities; and can be used for a wide variety of short-term and strategic planning purposes, such as: Evaluation of alternative feedstocks Optimization of product slates Evaluation of grassroot opportunities and/or expansions

Features
Linear and non-linear modeling capabilities. Successive linear programming (SLP) is the primary non-linear feature. Aspen PIMS also offers generalized non-linear recursion, interaction blending, additive blending, and mixed integer modeling, including special ordered sets capability. Integration with spreadsheet workbooks. Input and maintenance of model data is easy and efficient through the spreadsheet interface. Integration with databases. Aspen PIMS integrates easily with Microsoft Access, SQL-Server, and Oracle. Sophisticated Microsoft Windows graphical user interface. Model management, data management, matrix generation, solution, and reporting are all accessible through the user interface.

Why AspenTech?
Aspen Technology, Inc., provides industry-leading software and implementation services that enable process companies to increase efficiency and profitability. AspenTech's manufacturing/supply chain product line allows companies to increase margins in their plants and supply chains, by managing customer demand, optimizing production, and streamlining the delivery of finished products. Its engineering product line is used to design and improve plants and processes, maximizing returns throughout an asset's operating life. These two offerings are combined to create solutions for enterprise operations management (EOM), integrated enterprise-wide systems that provide process manufacturers with the capability to dramatically improve their operating performance.

Getting Started with Aspen PIMS

Page

Chapter # 1 Over 1,500 leading companies already rely on AspenTech's software, including 46 of the world's leading chemical companies and 23 of the world's largest refiners.

COMPONENTS OF PIMS
The PIMS system consists of the following high-level components: PIMS User Interface The PIMS user interface is used to view, modify, and create PIMS models. In addition, it provides access to the other basic components of the PIMS system. Validation Reporter Data validation is used to check the integrity of the data used in the model and to summarize the data found therein. Model Documenter The Model Documenter is used to view and print the input data tables used in the model. Matrix Generator The Matrix Generator is the cornerstone of the PIMS system. It retrieves the data in the model and automatically constructs an L.P. model that represents the process economics, process technology, and material balance of the process. The matrix is then written out in standard MPS format. It is also possible to produce a Matrix Listing report, which displays a listing of the L.P. matrix rows, sorted alphabetically by row name, or in row input order. Coefficients within each row are shown in column input order. Optimizer The L.P. Optimizer employed in PIMS incorporates CPLEX or Xpress. PIMS reads the matrix from the file created by the Matrix Generator, optimizes the matrix, and writes out the optimal solution. The progress of the solution is tracked in the Iteration log. PIMS also allows you to save the current solution to a file and input that solution as an advanced estimate to the solution for some future case. There are also postoptimal analysis reports available such as, TRANCOL and RANGE. Solution Reporter The Solution Reporter retrieves the optimized solution from the solution file and generates both summary and/or comprehensive management reports. The reports may be directed by the user to the screen, to the printer, or to a harddrive for subsequent review and/or printing. A summary report and a primal/dual solution report are also created. The Solution Reporter also produces a set of spreadsheet solution files that can be used to develop custom reports. Those worksheets contain the Summary and Primal/Dual reports and an optional set of solution spreadsheet files contain essentially all of the solution report information.

Getting Started with Aspen PIMS

Page

Chapter # 1

Basic Process
The following diagram depicts the basic process flow for creating, running, and evaluating the results of a PIMS model.

Getting Started with Aspen PIMS

Page

Chapter 2

Chapter 2 # Getting Started with User Interface


This section introduce you to user interface of the software which include toolbar, menu bar.

Menu Bar:
1) File : Open and close spreadsheet files, report files, and flowsheet files.

Open (Ctrl+O) Displays the Open dialog box, which allows you to select a file from the current model subdirectory to open. Close: Closes the current file. Open Spreadsheet: Displays all the spreadsheet files contained in the current model subdirectory or folder. Open Report (Ctrl+R): Displays all the report files contained in the current model subdirectory or folder. Open Flow Sheet: Displays all the flowsheet files contained in the current model subdirectory or folder. Open PIMS Log Mbd Database Opens the PIMS Log database. Save Model File: Saves the current model file (.pimx). Save (Ctrl+S) Saves the current file. Save As: Saves the current file with a different name. Print (Ctrl+P): Prints the active window or report. Print Preview: Displays the screen as it would appear printed. Print Setup: Allows you to change the default printer or orientation of the printed page. Send: Invokes your e-mail software for sending a report or flowsheet. <file list>: Displays the names of the last six files previously opened in PIMS. Exit (Alt+F4): Closes your current session of PIMS.

2) Edit : Manipulate reports when reports are being viewed.


Getting Started With Aspen PIMS

Page

Undo (Ctrl+Z): Allows you to undo the last action. Cut (Ctrl+X): Allows you to cut information from the active document or data assistant. Copy (Ctrl+C): Copies selected text to the Clipboard. Paste (Ctrl+V): Allows you to paste information from the active document or data assistant. Find(Ctrl+F): Opens a dialog box in which you can enter a textual search string. Up to 200 previous search strings are kept for future use.

Chapter 2

Find Next (F3): Finds the next occurrence of the search text. Searches forward. Find Previous (Shift+F3): Finds the previous occurrence of the search text. Searches backwards. Go To (Ctrl+G): Opens a dialog box listing the table of contents of the report (if there is one). You can go directly to a specific line number, page number, or report section displayed in the table of contents listing.

3)

View: In normal mode, provides selection modes for viewing the toolbar and
status bar. Contains all the PIMS FlowSheeter options when a flowsheet is being viewed and PIMS-SX options when a PIMS-SX model is active.

Toolbar: Select this option to display the toolbar under the menu bar. Status Bar: Select this option to display the status bar at bottom of the application workspace. Refresh Model Tree: Select this option to refresh or reload the data on the model tree. The model tree, allows you to display the files associated with your model in a branching-tree format. Show Unused Tables: Select this option if you want to display unused table categories in the model tree. Unused table categories have no client specific data associated with them. In other words, they are not being utilized by the modeler. Show Case Progress Chart: Select this option to display the Case Progress chart during the LP run. Show Solution Progress Chart: Select this option to display the Solution Progess chart during the LP run. Expand Tree (Ctrl+Right Arrow): Select this option to fully expands the model tree from the currently selected node to display all table categories and client table names. Collapse Tree (Ctrl+Left Arrow): Select this option to collapses the model tree below the currently selected node to only display the major categories.

The View menu contains the following additional options when a flowsheet is displayed:

Getting Started With Aspen PIMS

Page

Goto Nodes: Goes to a specific node on the flowsheet. Goto Nodes Via Streams: Displays the Goto Visible Node Via Streams dialog box. Grouping: Grouping of nodes and/or streams on the flowsheet. Node Visibility: Hides or shows individual nodes on the flowsheet. Stream Visibility: Hides or shows individual streams on the flowsheet. Node Display: Displays a dialog box in which you can control the display properties of the nodes on the flow sheet. Stream Views: Controls the display of materials or utilities on the flowsheet. Zoom: Controls the size of the display of the flowsheet. Show Node Grid: Displays a grid on the flowsheet in which nodes are contained. Used to move and group nodes interactively.

Chapter 2

Tables: Invokes the spreadsheet program to edit the highlighted node table on the flowsheet. Table Assistants: Invokes the PIMS Data Assistants that pertain to the highlighted node on the flowsheet. Toolbar: Displays the toolbar icons under the menu. Status Bar: Displays the computer status at bottom of the application workspace

4) Model : It include operations on model.

From here you can delete the files without damaging the model. a) Purge Database: It basically deletes the database stored in PIMS dir other than excel files. b) Delete Model: Del the model c) Archive Model: It saves model in compressed mode so as to reduce size of the model. When you select to archive model a window appear which shows all files, which are present in PIMS dir including input and output files, which were used in model execution. PIMS archive all files present in dir. In order to reduce size of archive uncheck

Getting Started With Aspen PIMS

Page

Chapter 2

Include Files Normally Deleted During Cleanup. It will delete all files, which are not required for model execution next time. Close Model & Delete Archived Files when Done Option basically let you to clear the dir so that next model dont get contaminated with files of previous model. If you Uncheck it it will keep increasing the size of dir and archived model. You can select Output dir for archive files and make it password protected to restrict intrusion. a) Archive All home directory: it archives all model present in diffrernt dir in one archived file. Cleanup option is also presnt in archive options b) Unachieve Model: It let you open archived models. c) Compare Models: It compare two different models so as to give you better understanding of diffrence in result of two models. d) DataTable assitant & Grid Table Assistant: They help you to construct model by helping you in compiling data. 5)

RUN: Model execution selection. Select model validation and model


Getting Started With Aspen PIMS

Page

documentation. Select case-stack program and matrix comparison program. Option to select non-loading of previous case basis in a case-stack run. Start Model Execution (F5): Displays the Model Execution dialog box, which allows you to select the files and cases you want to execute. Stop Model Execution (Ctrl+Break): Terminates the current model execution. Multiple Model Execution: Displays Multiple Model Execution dialog box Recursion Mode Automatic (Alt+I): Toggles recursion passes from automatic to manual invocation. Data Validation: Displays the Data Validation dialog box, which allows you to perform model validation. Case Comparison Spreadsheet: Invokes the Case Comparison program. Use this feature to combine the summary solution spreadsheets that are created for each case in a case stacking run into a single spreadsheet. When you invoke the program a dialog boxes is displayed in which you select the specific solution to be compared. Error Assistant: Invokes the Error and Warning Message Assistance, which allows you to directly access the Help system to resolve any warning or error messages. Invert PDIST Distributions: Invokes the INVPDIST option, which makes large distribution coefficients small and small distribution coefficients large. Used this option when a local optimum is encountered to move the solution away from the local optimum. Matrix Comparison: Invokes the Matrix Comparison program. Solution Comparison: Provides a detailed examination of two or more PRIMAL database files from a case stack run. Output is available either in spreadsheet or textual report form. Reports: Displays the Model Execution dialog box, which allows you to select the reports you want to generate.

Chapter 2

Save Model to Database: Saves the current input spreadsheet tables as input database tables. The input database tables are saved in a database with the same name as the current model (e.g., Sample.mdb). Note: To use this option, you must have a valid PIMSEE (PIMS Enterprise Edition) license. Save Model To Extended Tag Format Spreadsheet: Saves the current model as a PIMS Extended Tag format model. To use this option, you must have a valid PIMSEE (PIMS Enterprise Edition) license. Shortcut Distillation: Calibration Performs the SITOP, SIBTM, and ECPINT parameter estimations based on data present in table TESTRUN. Solution Evaluation: Display the Solution Evaluation interface, which allows you to displays the results of the solution evaluation. Scenario Evaluation Tool: Displays the Solution Evaluation Tool (SET) interface, which allows you to display and perform solution evaluations.

6)

Integration: Publish plan data.

Publish Plan: Displays the Publish Plan dialog box, which allows you to select the solution you want to publish. Published plan data is used by other consuming system (i.e., Aspen Performance Scorecarding).

7)

Tools: Selection of PIMS options, including fonts and display colors. Selection of
client-defined tools.

Program Options: Displays the Program Options dialog box, which allows you to set general program-level options. Edit User Tools Menu: Displays the Tools dialog box, which allows you to add items to the user-defined Tools menu. <user tools>: List the names of the user-defined functions. PIMS Periodic Charts from Database Tables Explore Model Folder: Invokes Windows Explorer positioned at the currently active model folder. Command Prompt: Invokes the operating system command prompt (DOS) starting in the currently active model folder. Flowsheet Options: Displays the Flowsheet Program Options dialog box, which allows you to set options for the flowsheeter. Use *.FLX File: Select this option to use the .FLX file (as opposed to the system default) to configure the flowsheet drawing. The system automatically creates

Getting Started With Aspen PIMS

Page

Chapter 2

the .FLX file when you open a flowsheet. The .FLX file defines the layout, colors, etc., of the flowsheet.

Save *.FLX File: Select this option to save changes made to the .FLX file.

8)

Window: Change layout of current window. Close all windows


New Window: Opens another window as a copy of the previously active window. Split: Displays vertical and horizontal crosshairs on the report for client selection of location to split the report into sections. Close All: Closes all windows at once. Tile Horizontally: Displays windows in over/under layout. Tile Vertically: Displays windows in side-by-side layout. Cascade: Controls the display of multiple open, non-minimized windows. Arrange Icons: Arranges minimized window icons. <window list>: List of the currently open windows by number.

Tool Bar: The PIMS toolbar contains the following shortcut buttons:

Getting Started With Aspen PIMS

Page

Chapter 2

MODEL TREE The model tree provides a graphical representation of the model components. In addition, the model tree provides a means by which the user can navigate to data located in the PIMS model. The model tree consists of expandable tabs located on the left side of the main interface. These tabs contain information related to a specific PIMS model.

Getting Started With Aspen PIMS

Page

Chapter 2

Each individual model, can contain the following information as represented as tabs located on the left side of the main interface: Model Settings Tables Reports Solution Files FlowSheets Property Calculation Formulas

MODEL SETTINGS Use the Model Settings branch on the Model Settings tab to maintain settings that pertain to the execution of a specific model. Model settings control the way PIMS looks and feels and control the actions of the chosen optimizer.

Getting Started With Aspen PIMS

Page

Chapter 2

1- Use the General Model Settings dialog box to maintain settings for an individual model. Each model attached to the model tree may have its own set of general model settings. 2- Use the L.P. Model Settings dialog box to set linear-programming model options 3- Use the Reporting dialog box to maintain reporting options specific to the current model 4- Use the Recursion Model Settings dialog box to maintain recursion model settings. Recursion is a nonlinear technique used in linear programming to model nonlinearities by approximating them with linear segments and updating the linear-programming matrix during the recursion pass. A recursion pass involves the calculation of new properties and, in DR (Distributive Recursion), new distribution coefficients. With nonlinearities, there is the possibility that there may be more than one solution to the problem. These multiple solutions are referred to as local optima if the value of the objective function is less than that of the largest objective function. The solution with the largest objective function is generally called the global optimum. There is, unfortunately, no mechanism to determine if an observed global optimum is indeed the true global optimum or just another local optima for which the global optimum has yet to be discovered. TABLES: Use Tables to supply model input data to PIMS. The major source of data input to PIMS is a set of tables that describe the economics and process technology of the plant under consideration. The precise format of the tables is discussed later in this Help, but it may be noted that a PIMS table contains a set of named rows and columns with numeric or text entries in the body of the table. PIMS input tables can be in one of the following formats, depending on the type of model you are working with: Spreadsheet

Getting Started With Aspen PIMS

Page

Database

Chapter 2

In this book we will be considering Only Spreadsheets input. The standard table format obeys the following conventions: The spreadsheet can be constructed with any convenient arrangement of column widths, cell format, text alignment, cell protection, windows, titles etc. PIMS is only concerned with the cell contents and not the nature of the screen display. Hidden cells are not read if OLE automation is used. Any row that contains an asterisk (*) in the first position is regarded as a comment row and is ignored by PIMS. Comment rows can be used for client annotations, table spacing (for easy readability) or for including client-required computations. As can be seen above, the very first non-comment row is treated as a row of column names for the PIMS table. In this row, the entry in column A may be absent or may be the text entry ROWNAMES. Spreadsheet columns B onwards then contain the PIMS column names. These column names must be text entries with up to 8 (9 for multi-plant/multi-period models) alphanumeric characters (A-Z, 0-9) in each name. The column name(s) must be unique - numeric or date entries are not permitted. Note also that column names cannot include leading blank characters. One column may be named TEXT (all caps) and is used for descriptive entries. A column name that is an asterisk (*) may be used to terminate the table columns. Any entries in or to the right of this column will be ignored by PIMS. PIMS will also ignore any entry in the body of the table that is to the right of a blank or empty column heading. Any column tag that begins with an exclamation point character (!) is designated as a comment column. All the contents of that column are ignored on input to PIMS. Each row below the row of column names, except for a comment row, is a PIMS table row. It must contain a row name in the spreadsheet column A. This row name must be a unique text entry of up to 8 (9 for X-PIMS) alphanumeric characters with no leading blank characters. Note that numeric entries that display as text entries must be entered by preceding the entry with a valid text identifier character (',",^). Row names cannot be numeric or date values and blank or empty rows or columns are not permitted. Usually no specific ordering of rows and columns is required by PIMS. The client will probably find it convenient to make column TEXT the first table column (that is column B) but this is not required. The row ordering will usually determine the order in which items are reported in the Data Validation report. The body of the table is entered in the rows of the table. Entries in column TEXT must be text (not numeric). Note that the column width for column TEXT may be set to client convenience, but in most cases, unless otherwise indicated below, PIMS will retrieve only the first 20 characters in each TEXT entry. Entries in all other row/column intersections must be one of the following: A numeric value or valid numeric formula

Getting Started With Aspen PIMS

Page

10

Chapter 2

Empty (no entry) or a cell comment. A cell comment is any entry that begins with an asterisk (*). Cell comments are ignored by PIMS. Note that where spreadsheet formulas are used, PIMS cannot retrieve the current value for the cell as displayed on the screen because a spreadsheet recalculation to other linked values may have changed. Formulas can be very useful for computing table values in terms of other entries, for adding the elements in a column to ensure material balance closure, etc. An example of the use of this technique is follows:

Text entries in column TEXT, as well as the row and column names of the table, can be constructed using string formulas if desired. Character formatting is ignored by PIMS. Small System PIMS tables are restricted to (at most) 800 rows, 200 columns (excluding column TEXT) and 30,000 row/column intersections. Note that in Large System PIMS, larger table dimensions are permitted and user-definable. Although this is not a requirement, it is recommended that clients construct tables that contain several comment rows at the top. These comments should include the table name, description, and date of last update. Many PIMS tables use pre-defined column names. For example, it will be seen later in this section that PIMS recognizes the following column name(s) in table BUY: TEXT, MIN, MAX, FIX, COST, VOL, SPG, API, WGT, and GROUP. In tables where PIMS recognizes a set of pre-defined column names, the client can include additional columns with arbitrary names if desired. (All pre-defined column names must be spelled using all capital letters.) For example, it may be convenient in table BUY to include a column named CPG that contains component costs in cents per

Getting Started With Aspen PIMS

Page

11

Chapter 2

gallon and then define the entries in column COST using formulas that refer to the entries in column CPG. Column and row names in PIMS are case sensitive. PIMS supports comment columns in tables. The designation for a comment column is an exclamation point as the first character of the column tag (e.g., !MAX3). The following table contains an alphabetical list of input spreadsheet tables with condensed description. Table ABML ABMLMAP ABMLOPT ABMLSUBF ACCUQUAL ADDITIVE ALTTAGS ASSAYLIB ASSAYS ATMDISTL BLENDS BLNCAP BLNMIP BLNMIX BLNPROP BLNSPEC BLNTARG BLNxxxx BOUNDS BUY CAPS CASE CRDALLOC CRDBLEND CRDCUTS CRDDISTL CRDMIX CRDPCALC CRDPOOLS CRDQUAL CRDTANKS CURVE DEMALLOC DEMAND Description Aspen Blend Model Library ABML Blend property tag aliases ABML CARBOB2 options ABML conversion correlations Accumulated material qualities Additive levels Alternate tags Multi assay tables Crude assay data Amospheric Tower Distillation Blends Blender capacities Blend limits Blend components and formulas See BLNxxxx Product specifications Blend target recipes Blend property tables Miscellaneous bounds Purchased materials Unit capacities Case stacking option Crude allocation to tanks Crude blending Crude cut scheme Crude distillation Crude mix receipts Crude stream quality relationship Crude pools Crude stream default qualities Crude tanks Generalized recursion curves Market demand Sales to market

Getting Started With Aspen PIMS

Page

12

Chapter 2

DEPOTS DINV DISABLE DISPLAY EDITBNDS EXPERT GASES GASPLANT GBLNMIX GBLNPER GBLNSPEC GOBOUNDS GROUPS GSUPPLY HOLIDAYS INDEX INTERACT LOCTAGS MARKETS MARKTGRP MICROCUT MIP MODELS MODES MSGSUP NCRDCUTS NCRDROWS NCUTPOOL NEWCUT NLPROP NONLIN NOTDAILY PARAOBJ PBLNMIX PBLNPER PBLNSPEC PBONUS PCALCB PCALC PDIST PERCASE PERIODS

Trans-shipment models Inventories carried in DEPOTS Disabled material tags Items Displayed inParametric Analysis Scheduling bounds Alternate method for CASE changes Gasious materials Build gas plant drivers in submodel Global-blend mixes Periods and plants in which the global-spanning-blend specifications apply Global-spanning-blend specifications Bounds on global optimization variables Purchases, sales, inventory, utility, and specification grouping Global supply Scheduled holidays Blending indices Interactive blending Global/Local alt tags Markets for products Market groups Shortcut Distillation Cuts Mixed integer definition Local models Transport modes Suppressed messages Distillation Cutting Scheme Crude to Logical Crude Unit Map New crude cuts from existing cuts Nonlinear blend quality specifications Generalized recursion items Products not sold on holidays Objective function parametrics Period-spanning-blend mixes Periods in which the period-spanning-blend specifications apply Period-spanning-blend specifications Property bonuses Property calculations Property calculations Initial distribution coefficient estimates Case stacking where the client wishes to assign the equivalent of a period length to individual cases Period definitions

Getting Started With Aspen PIMS

Page

13

Chapter 2

PGUESS PINV PLANTGRP PRNTABS PROCLIM PROPRNG PSPAN RATIO RECEIVE REPORT RFG ROWS RWGRPBLN RWGRPSTR RWGRPUNT SCALE SELL SEQUENCE SHIP SHUTDOWN SKDSLICE SKEDLINK SLICEMAP SOLNKPIS STATTANK SUBMODS SUPPLY SWING SXSKDLNK SXSKDSRE TESTRUN TNK2TNK TRANSFER TRNSTIME UNITS UPOOL UTILBUY UTILSEL VACDISTL VPOOL WSPECS XBOUNDS

Getting Started With Aspen PIMS

Page

Initial property estimates for Distributive Recursion (DR) Stream inventory Plant groups Tables to print (include) in Data Validation report Process capacity limits Validate stream property ranges Span recipe periods Control ratios of LP columns Timed purchases Fixed costs and report suppression Reformulated gasoline Miscellaneous rows Aspen Report Writer group blends Aspen Report Writer group streams Aspen Report Writer units Scale factors and specific recursion tolerances Sell products Timeslices Timed sales Scheduled process unit shutdowns Simulate time-slicing Link to Ref-Sked directory Supports the PvA BPT Key process indicators used during solution evaluation Relationship between timeslice and variables and tanks Unit submodel list Materials purchased Swing cut disposition PIMS to Ref-Sked mapping Ref-Sked input tables Store distillation data from previous run to be used by Shortcut Distillation to produce operating parameter estimates in table NCRDCUTS Tank-to-Tank transfers Inter-plant transfers Transition times Units of measure Automated recursed pool construction Purchase utilities Sell utilities Vaccum Tower Distillation Virtual pooling Weight blend specs Impose bounds on XNLP created variables

14

Chapter 2

The complete description and use is illustrated in examples and Help provided with PIMS. But for ease of understanding some basic tables will is described in next section. Reports Use Reports, located on the the model tree Reports tab, to review the results produced from the execution of a PIMS model.

Use Solutions Files, located on the model tree Solution Files tab, to access output data produced by the PIMS Solution Reporter for a specific model Flow sheet Use Flowsheets, located on the model tree Flowsheets tab, to display your current model as a block-flow diagram and/or to display linear-programming results in a block-flow diagram. The flowsheets produced by PIMS are based on the information from the Validation reports or the Solution reports. Two separate flowsheet files are produced: The flowsheet file generated from the Validation reports is titled Model.flo. The flowsheet file generated from the Solution reports is titled Result.flo or Result###.flo for case-stacked results. When viewing the Model.flo file, keep in mind that PIMS must make certain assumptions as to whether streams are feeds or products. When there are both positive and negative stream yields in a submodel, PIMS assumes a positive yield. In reality, the stream may be a feed to the submodel, but PIMS has no way of determining this. With this assumption, PIMS may draw lines that appear to be products when they are actually feeds. This phenomenon does not exist when you display the Results.flo file.

Property Calculator
Use the Property Calculator to augment table INDEX. This feature allows you to define new qualities as a function of other qualities in the model. For example, use property calculation formulas to represent blending indices. The dependent qualities are only calculated one time during matrix generation. That is, the dependent qualities are NOT recalculated at every recursion pass when the underlying

Getting Started With Aspen PIMS

Page

15

Chapter 2

non-linear qualities change. This functionality can be added through the non-linear equation feature of PIMS-AO. When a calculated index specification is used to replace a quality specification, the property calculator automatically determines if the relationship between the property and the index needs to be inverted. This situation occurs when an index decreases when the quality increases, thus a minimum quality specification becomes a maximum index specification.

BLENDING TABLES
ABML TABLE Use table ABML to identify the ABML correlation you want to include in your PIMS model. Tables of interest: 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. ABMLOPT defines the CARBOB2 options by blend. The ABML table consists of block of rows that define a correlation. Each correlation begins with the keyword CORR as the row name and then the ABML correlation name in the TEXT column. Within each correlation block, there are three possible sub blocks. Correlation Input This sub block begins with the keyword INPROP and ends with the keyword ENDIN. This section maps the PIMS tag names to the appropriate ABML tag names for the blend quality inputs to the correlation.

Correlation Output This sub block begins with the keyword OUTPRP and ends with the keyword ENDOUT. This section marks the mapping between PIMS and ABML for the calculated properties.

Getting Started With Aspen PIMS

Page

The column names are the PIMS keyword TEXT and the ABML keywords OPTION, SCALE, OFFSET, GAIN, and BIAS. In addition, except for PIMS quality tag names,

16

Correlation Options This sub block, which is optional, begins with the keyword OPTION and ends with the keyword ENDOPT. Within this section, you can select certain correlation parameters such as the correlation coefficients and/or the temperature units. The options identified only affect the associated correlation block. Since ABML allows the user to daisy chain ABML correlations, ensure that the options selected for the different correlations are consistent.

Chapter 2

none of the row names or entries in the TEXT column are case sensitive. The column names, however, are case sensitive. The following correlations are defined in this example:

CORR1 - DriveabilityIndex CORR2 - D86one10Index (converts T10 to corresponding T10 index) CORR4 - D86one10Blend (converts T10 index back to T10) CORR19 - CARBOB CORR15 - RVP CORR52 - RVPINDEX (converts RVP to corresponding RVP index) CORR23 - CRVP (calculates the RVP of the blend without the effect of ethanol) CORR3 - D86ONE90BLEND (converts T90 index back to T90) CORR41 - D86ONE90INDEX (converts T90 to corresponding T90 index)

CORR21 - CD86ONE90BLEND (calculates the T90 of the blend without the effect of ethanol)
CORR20 - CT50BLEND (calculates the T50 of the blend without the effect of ethanol)

The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Names ROWNAMES Tag Required Purpose Required Contains the following: Correlation Identifier (CORRX): Where: CORR - is the keyword that identifies a correlation. X - is a user-defined character. Within each correlation block, there are three possible

Getting Started With Aspen PIMS

Page

17

Chapter 2

sub blocks. Correlation Input: This sub block begins with the keyword INPROP and ends with the keyword ENDIN. This section maps the PIMS tag names to the appropriate ABML tag names. Correlation Output: This sub block begins with the keyword OUTPRP and ends with the keyword ENDOUT. This section identifies the mapping between PIMS and ABML for the calculated properties. Correlation Options: This sub block, which is optional, begins with the keyword OPTION and ends with the keyword ENDOPT. This section is where certain correlation parameters such as the correlation coefficients and the temperature units can be selected. The choice of options only affects the associated correlation block. Required Contains the ABML correlation name and quality tags, depending on the row in which they appear. Optional This column allows you to enter changes to the options you identified in the Correlation Options sub block.

TEXT OPTION

Getting Started With Aspen PIMS

Page

The entries in this column are the numeric parameter values for the options you identified in the Correlation Options sub block. Numeric Optional Contains the numeric value by which the corresponding SCALE input properties are multiplied by before they are passed to the correlation. Numeric Optional Contains the numeric value added to the corresponding OFFSET input properties before they are passed to the correlation. Numeric Optional Contains the numerical value by which the GAIN corresponding output properties are multiplied by after the correlation calculation. The ABML Correlation can be copied from the File MacroEnabledABML.xls List of ABML Correlations D86FromPercentOff / D86ToPercentOff to calculate the blended D86 temperature using Hydrocarbon Processing 1994. GNDXR a user defined blending index entered through the property calculator. This correlation essentially allows the user to define there own

18

Chapter 2

custom ABML index/property correlations. In this model, it is used to define the RVP/RVP index relationship. Note that unlike the usual usage of blending index, you can put specs on RVP and not just the RVP index. RVP can also cascade into other correlations. Note also that ABML has a built in RVP/RVP index correlations. This is for demonstration purpose only. CARBOB2 to calculate the ethanol blended properties needed by the CARB3 correlation. The amount of ethanol in the blend is specified in table ABMLOPT. 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 helper correlations instead. In this model CARBOB2 takes its input from D86FromPercentOff (D86) and GNDXR (RVP). The properties of the ethanol can be set either in table ABML or ABMLOPT. The latter table allows specification by blend. Note that CARBOB2 automatically maps its output into the CARB3 or CARB equation. Mapping in table RFG is ignored. DrivabilityIndex calculates the drivability index. The T50 and T90 for non ethanol blends come from D86FromPercentOff. For ethanol 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. GPRPCALC a user defined 2nd order property entered through the property calculator. This correlation essentially allows the user to define there own 2nd order ABML correlations. 2nd order properties are blend properties calculated from other properties of the blend. In this model it is used to define linear version of TV/L. Non ethanol blends get RVP from GNDXR and D86FromPercentOff. Ethanol blends get these properties form CARBOB2. Again table ABMLMAP is used to map properties. ABML has two versions of TVL built in.

Aspen PIMS identifies two types of Blends which are either spec based or formula based. A general overview of usually encountered blendinf tables is described here. They will more illustrate in examples Use the BLENDS table to identify all the blends in the model and to indicate whether the blend is created on a formula or specification basis. You can use a blend as a blend component in other blends. Any blend that does not appear in the BLENDS table is not created, regardless of its presence in any of the other blending tables. Yes Enter the three-character material ROWNAMES Tag tag for each blend.

TEXT SPEC

Text

No

Numeric No

FORM

Numeric No

Enter a description of each blend, not to exceed 20 characters. Enter a non-blank entry (e.g., 1) in this column for each blend produced through specification blending. Enter a non-blank entry (e.g., 1)
Getting Started With Aspen PIMS

Page

19

Chapter 2

in this column for each blend produced through formula blending. Use the BLNMIX table to identify the components used to create specification blends and to provide the formulation for formula blends. Column Type Heading ROWNAMES Tag Required Purpose Yes Enter a three-character material tag for each component used to create a blend. Note: A tag can appear as both a blend (column name) and a blend component (row name) for another blend. Enter a description of each component, not to exceed 20 characters. Any additional column headings identify three-character material tags that identify the blended product produced. For specification blends, enter a non-blank entry (e.g., 1) for each component used to produce a specific blend. For formula blends, enter the fraction of each component used to produce a specific blend. The fractions must reflect the mode of sell i.e. (weight, volume) Use the BLNSPEC table for the following purposes:

TEXT

Text

No

Blend Product Numeric No Tag (e.g., URG)

Define the property specifications for a blend Define the property specifications for a blend pool or group. Define the EPA emission specifications.

Getting Started With Aspen PIMS

Page

20

Chapter 2

Modeling Tips: Single Blend Use the row name Ncmp or Xcmp (where cmp is a blend component as defined in table BLNMIX) to construct component volume or weight limitations for specific blends. Specification must lie in a range of 0 to 100.

Blend Group Use table GROUPS to identify the members of a blend group. In addition, each member of the group must have a specification defined in table BLNSPEC. Octane specifications of leaded pools of gasoline are excluded from this capability, although pool lead limits are permitted.

Blend Pool If a blend is to be used to create a pool to other blends or submodels, the required qualities must be recursed in the blend. Such structure requires that there be specifications for those qualities and that they be present in table BLNSPEC. If the user designates that certain blend qualities are to be recursed (by presence in table PGUESS) and the user does not enter blend specifications, then the system will automatically create MINIMUM specification rows for the qualities of those blends. The value for the specification will be -1000. We recommend that you use realistic specification values for these qualities.

Row Name Nsss

Type Tag

Required Purpose No N denotes the minimum specification of the blend that is to be reported. Where: sss is a quality tag. X denotes the maximum specification of the blend that is to be reported. Where: sss is a quality tag.

Xsss

Tag

No

Psss

Tag

No

P denotes the quality of the blend that is to be reported. sss is a quality tag. To get a blend quality reported via the Psss row, a non-blank entry (e.g., 1) must appear under the blend tag. The components of the blend must possess the sss quality. The report-only quality will also be present in the blending data table spreadsheet, BLMAP

Getting Started With Aspen PIMS

Page

21

Chapter 2

TYPE

Numeric No

wks. The Psss quality report mechanism will not report qualities for which specifications already exist. That is, if there is already an active specification for a quality such as SPG, the presence of PSPG will not produce an additional report for that quality. Enter one of the following values: 1 indicates that the blending is for reformulated gasoline 2 indicates that the blending is for conventional gasoline 3 indicates that the blending is for CARB gasolines 4 indicates that calculations for blending are to be performed using the CARB 3 equation set with the evaporative HC emission model. 5 Indicates that the calculations for blending are to be performed using the CARB 3 equation set without the evaporative HC emission model. 6 indicates that the blending is for CARBOB with the evaporated HC CARB 3 model. 7 indicates that the blending is for CARBOB without the evaporated HC CARB 3 model. 8 indicates that the blending is for CARBOB2 with the evaporated HC CARB 3 model. 9 indicates that the blending is for CARBOB2 without the evaporated HC CARB 3 model. 10 indicates that the blending is for CARBOB2 with CARB 2 model.

Getting Started With Aspen PIMS

Page

22

Chapter 2

11 indicates that the blending is for RBOB for EPA RFG using the complex equation. 12 indicates that the blend is for CARBOB2 with amended CARB 3 model for RVP controlled months (summer) with the evaporative HC emission model. 13 indicates that the blend is for CARBOB2 with amended CARB3 model for non RVP controlled months (winter). 14 indicates that the blend is for CARBOB2 with amended CARB 3 model for RVP controlled months (summer) without the evaporative HC emission model. Enter one of the following values: 0 indicates that the specs are absolute numbers. 1 indicates that the specs on the EPA RFG are percent reduction relative to the reference fuel. The specs are no longer absolute numbers in units such as mg/mile. The value 1 or 11 is only compatible if the EQUATION type is 1. You will trigger a error is you select EQUATION type 2 and CTYPE 1. Enter one of the following values: 1 indicates summer blends 2 indicates winter blends Type Tag Required Purpose Yes See the previous table for descriptions of the numerous row names that may exist in this table. Enter a description of the row name, not to exceed 20-charaters. Any additional column headings identify three-character material tags

CTYPE

Numeric No

SEASON Numeric No or SEASONn Column Heading ROWNAMES

Getting Started With Aspen PIMS

Page

Specification Blend Tag

Numeric No

23

TEXT

Text

No

Chapter 2

(e.g., URG)

that identify each specification blend A group tag from table GROUPS. Blank entries in the table imply that no specification is active for the material or group. Blends with a maximum TEL specification of zero (0) are treated as if they are unleaded blends.

Use the ADDITIVE table to identify the additives and to define their response characteristics. Additives are usually dyes, detergents, etc., that are added in a fixed percentage. If an additive is variable in nature, then you may wish to treat it as a component. Each specification blend that contains an additive should have a maximum additive specification value defined in table BLNSPEC. Row Name Type Required Purpose Enter the volume conversion VCONVERT Numeric No factor for the specific additive. The VCONVERT value is used in the conversion of the additive dimension into the volume dimension of the blend. Enter the conversion factor used for passing additive concentrations to Aspen RefSked.

DILUTION Numeric No

Column Type Heading ROWNAMES Tag Text

Required Purpose Yes Enter a three-character row name for each additive level and quality combination. Enter a description of the row name, not to exceed 20characters. PIMS can support multiple additives in a blend. Therefore, enter a three-character tag for each additive, but there can be

TEXT

No

Getting Started With Aspen PIMS

Page

Additive Tag Numeric Yes (e.g., TEL and LET)

24

Chapter 2

SUS

Numeric Yes

only one additive effect per quality. lity than the first additive. Identifies the susceptibility. Numeric entries in this column define the additive response at the various levels of inclusion. Any additional column headings identify three-character quality tags.

Quality Tag (e.g., DON)

Numeric No

Wspec PIMS assumes that all blend properties blend volumetrically except for the properties SUL and BTU, which are assumed to blend gravimetrically. If this arrangement is not appropriate for the model, use the WSPECS table to identify the necessary weight-based blend specifications. Maintenance of this table is also possible through the Blending Data Assistant. Modeling Tips In process submodels of volume-based models, all recursed properties are pooled volumetrically, regardless of table WSPECS, which is used specifically for product blending. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag Required Purpose Yes Enter the three-character quality tag for each weight-basis quality. Note: If this table is present, the properties SUL and BTU must be included. If a table WSPECS is provided with no rows, PIMS behaves as if the table is absent and the default value for SUL and BTU are applied.

Getting Started With Aspen PIMS

Page

25

Chapter 2

TEXT

Text

No

FACTOR

Numeric No

Enter a description of each row name, not to exceed 20 characters. For volume-basis models, this column identifies the relationship between a weight-basisspecification quality and a volume-basis equivalent. In addition, this column allows recursed volume-basis properties to be entered directly into weight-basis specification blending. If the entry in column TEXT identifies a volume-basis equivalent to the weight-basis row name, then enter a non-blank entry (e.g., 1). or If the entry is used as a multiplier, then enter the appropriate unit conversion value. For example, if a particular quality such as sulfur (SUL) is expressed in terms of pounds per barrel, the coefficient under column FACTOR will be 0.0454 that is 100/2204.6, is used to convert pounds per barrel into weight percent for inclusion into the blend-specification rows of the model.

BLNREST Use blend property tables (BLNxxxx) to support specification blending. You must provide the qualities or inspections of the components entering the blend in a blend property table. It is recommended that the blend property table names begin with the letters BLN followed by the last four characters of the table name. Keep in mind that table names must be unique.

Getting Started With Aspen PIMS

Page

26

Chapter 2

The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag Text Required Purpose Yes Enter a three-character material tag for each component to be used in a blend. Enter a description of each component, not to exceed 20 characters. Enter the SPG value for each component. Note: If the table does not include an SPG column, then the API column is required since PIMS formulates all specification blends on a volume basis, therefore weight-basis components must be converted to volume units. Enter the API gravity value for each component. Note: If the table does not include an API column, then the SPG column is required since PIMS formulates all specification blends on a volume basis, therefore weight-basis components must be converted to volume units. Any additional column headings identify three-character quality tags associated with the component. Note: All properties are assumed to blend volumetrically except as discussed in table WSPECS. Numeric entries in this column

TEXT

No

SPG

Numeric No

API

Numeric No

Quality Tag (e.g., SUL)

Numeric No

Getting Started With Aspen PIMS

Page

27

Chapter 2

are the property values.

DISTILLATION TABLES
Use Distillation tables in a PIMS model to automatically construct submodels of the crude oil distillation operations from original assay data on the crude oils, and to transmit the properties of the straight run products to the PIMS blending and other submodel sections. This procedure provides a simple way to change the crude slate without having to re-work the distillation submodels. Use the ASSAYLIB table to identify the assay tables you want to include in the model. PIMS automatically creates a global table category titled ASSAYS. To add placeholders on the model tree for user-defined assay table categories, add a row name in table ASSAYLIB. Creation of the global ASSAYS table is quite robust. There are no row and column consistency requirements between the tables. Crudes present in tables loaded later will overwrite entries from tables loaded earlier. Blank entries in later tables will not overwrite any existing data input from earlier tables. Column Heading ROWNAMES Type Text Required Purpose Yes Enter the names of the assay tables to be included in the model. Enter a description of each assay table, not to exceed 20 characters. Any additional column headings identify threecharacter logical crude unit tags. .

TEXT

Text

No

Logical Crude Unit Tag (e.g., CD1)

Numeric No

Use the ASSAYS table to provide crude assay data to the model in the form of cut yields and cut properties. PIMS automatically creates the appropriate logical-crude-unit structure from the following tables:

Getting Started With Aspen PIMS

Page

CRDDISTL

28

CRDCUTS

Chapter 2

Row Name VBALxxx

Type Required Purpose Tag No Volume yield rows. These row names begin with the charaters VBAL. Where: xxx is the tag for each distillation cut. Weight yield rows. These row names begin with the charaters WBAL. xxx is the tag for each distillation cut. Deferred cut yield rows. These row names begin with the characters DBAL. Where: xxx is the tag for each distillation cut. Atmospheric unit utility consumptions rows. These row names begin with the charaters UATM Where: xxx is the tag of the utility being consumed. Note: Each utility identified must also appear in table CRDDISTL. Capacity rows. These row names begin with the characters CCAP. Where: xx if AT or VT, the coefficient overrides values in table CRDDISTL. n is the logical crude unit number. Entries in this column may identify the following::

WBALxxx

Tag No

DBALxxx

Tag No

UATMxxx

Tag No

CCAPxxn (e.g., CCAPAT1)

Tag No

Column

Type Required Purpose

Getting Started With Aspen PIMS

Page

29

The capacity consumed per unit of charge to the tower.

Chapter 2

Heading ROWNAMES Tag Yes Text No

TEXT

Crude Tag (e.g., ANS)

Tag No

See the previous table for descriptions of the numerous row names that can exist in this table. Enter a description of each row name, not to exceed 20 characters. Any additional column headings identify three-character crude tags. Numeric entries in this column are the yields expressed as weight or volume fractions of whole crude. Cuts that have no yield in a particular crude may be left blank or may have an explicit zero in the table.

Use the CRDCUTS table to define the crude-distillation cutting scheme used in a logical crude unit, which includes the following tasks:

Identifying the cuts Defining the cut temperatures Defining the cut limitations Required Purpose Yes Enter a three-character material tag for each straight run distillation cut. Note: The first two characters of the tag name must be unique. Enter a description of each cut, not to exceed 20 characters. Enter a numeric value that identifies the default cut type for the material: 0 cut yield is identified in the assay

Column Type Heading ROWNAMES Tag

TEXT TYPE

Text

No

Getting Started With Aspen PIMS

Page

30

Numeric No

Chapter 2

data, but the cut is produced by downstream separation in a saturate gas plant and not in the crude unit. 1 straight run atmospheric cut. 2 cut is an atmospheric residuum that can be used elsewhere in the plant or fractionated further in a vacuum unit. 3 cut is a straight run vacuum cut. 4 cut is a swing cut. PIMS will automatically generate structure that will allow the model to swing all or part of this cut up to the preceding cut or down to the following cut. -5 cut is forcibly combined with either the type 1 or type 4 cut immediately below it. It cannot be combined with another type 5 cut. Type 5 cuts cannot be adjacent to type 3 cuts in the vacuum area. +5 cut is forcibly combined with either the type 1 or type 4 cut immediately above it. It cannot be combined into another type 5 cut. Type 5 cuts cannot be adjacent to type 3 cuts in the vacuum area. 9 cut is a "deferred" cut that is not produced in crude distillation, but in some downstream unit. However, its yield and properties depend upon the crude mix and are identified in table ASSAYS. Note: Steams of all crude types (except type 5) require entries in table PGUESS. Any additional three-character column headings identify the logical crude units.

Getting Started With Aspen PIMS

Page

Logical Crude Unit Tag (e.g., CD1)

31

Numeric Yes

Chapter 2

TYPExxx (e.g., TYPECR1)

Numeric No

The numeric entries in this column identify the pool number (1-36) to which the cut from each logical crude unit is directed. Use any additional seven-character column headings to identify the cut type for a material in a specific logical crude unit. The first four characters of the column heading must be entered as TYPE, and the last three characters are the logical crude unit tag (e.g., TYPECR1). The numeric entries in this column identify the cut type.

Use the CRDDISTL table to define the structure of theoretical or logical crude units. Each of the logical crude units can be thought of as an alternative mode of operation of a physical unit. This technique may be conveniently used to segregate individual crudes or pre-defined crude mixes or to define block operations. In addition, table CRDDISTL provides the mapping between the assay data and the logical crude units. Row Name Type Required Purpose Enter the integer value that controls ATMTWR Numeric No which physical crude-distillation atmospheric tower is to be used by the logical operation. Numeric No Enter the integer value that controls VACTWR which physical crude-distillation vacuum tower is to be used by the logical operation. Numeric No EST indicates estimated charges ESTxxx Where: xxx is a crude oil tag. The entries in this row define the estimated charge of each crude to each logical crude unit. These charge estimates should be in weight or volume units, according to whether the crude assays are provided on a weight or volume basis. ATM indicates atmospheric tower

Getting Started With Aspen PIMS

Page

ATMxxx

Tag

No

32

Chapter 2

consumption. Where: xxx is the utility. VAC indicates vacuum tower consumption. Where: xxx is the utility. Enter the atmospheric tower, vacuum tower, or combined atmospheric/vacuum units to include in the PIMS solution reports. Enter one of the following values in this field. 0 specifies that no report be generated for the specified logical crude unit. 1 specifies that a report be generated for the specified crude unit for crude cuts down through the atmospheric bottom (i.e., atmospheric tower only). That is, the atmospheric bottom is the last cut shown. 2 specifies that a report be generated for the vacuum tower of the crude unit. This allows multiple atmospheric bottom cuts to be reported into a single vacuum unit. 3 specifies that there is no atmospheric/vacuum report separation and that the combined atmospheric/vacuum units are to be reported on a single page. Column Type Required Purpose Heading See the previous table for descriptions of ROWNAMES Tag Yes the numerous row names that can exist in this table.

VACxxx

Tag

No

REPORTnn Tag

No

Getting Started With Aspen PIMS

Page

33

Chapter 2

TEXT

Text No

Logical Crude Tag No Unit Tag (e.g., CD1)

Enter a description of each row name, not to exceed 20 characters. Any additional column headings identify three-character logical crude unit tags. Numeric entries in this column are normalized to calculate initial qualities for crude stream properties.

Use the CRDBLEND table to create a new crude from a blend of one or more crudes. The blended crude is added to the internal assay table for construction of the crude architecture. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag TEXT Text Required Purpose Yes No Enter a three-character material tag for each crude. Enter a description for each crude, not to exceed 20 characters. Any additional column headings identify three-character crude mix tags. Note: The column names in this table must be added to table CRDDISTL if they are to be processed. Numeric entries in this column are the volume fraction. Note: Volume fractions are normalized among members of a blend.

Crude Mix Tag (e.g., MX1)

Numeric No

Getting Started With Aspen PIMS

Page

34

Chapter 2

Table CRDBLEND is available in both standard and periodic models, Table CRDMIX is available in periodic model only. Regarding the LP structural difference, if CRDBLEND is defined, PIMS automatically generates mixed assay data. An ESTxxx row for the mix must be defined in table CRDDIST so the crude mix which is defined by CRDBLEND can go to the appropriate Crude Units. Table CRDMIX is related with other PPIMS tables (RECEIVE, CRDTANKS, CRDALLOC). The crude mix which is defined by CRDMIX does not go to a Crude Unit but instead goes to Crude Tanks. The destination tank is defined by table RECEIVE. PIMS automatically generates de-pooling structure for the calculation of crude tank compositions. If Column CrudeMix and %XXX (XXX; crude tag) are defined in table RECEIVE, PIMS automatically generates RECEIVE_CRDMIX.xls and adds it to CRDMIX model tree branch.

MISCELLANEOUS TABLES
Use Miscellaneous tables to model activities outside of blending, distilling, recursing, scheduling, purchasing, and selling. Use the CASE table to produce a multiple-case solution (case stacking). Each case represents a different scenario. Each scenario (case) is produced by modifying values in a PIMS input table or by modifying a specific model setting. There are two main uses for table CASE: Case Stacking Case stacking is performed by including specific keywords and input data in table CASE. See Case Stacking Keywords and Working with Table CASE for additional information about modifying input table data and model settings.

Case Comparisons Once you have executed a model, you can then perform a case comparison to determine the effect of case-specific modifications on the model. For example, if you want to determine what effect changing the MIN value of ARL in table BUY from 3 to 10 has on your model, then you could define two cases in table CASE. CASE 1 would represent the base case, where the MIN is equal to 3, and then CASE 2 would represent the modified version of the base case, where the MIN value is equal to 10. See Case Comparison Overview for additional information about comparing cases.

Limitations

You can stack a maximum of 999 cases.

Getting Started With Aspen PIMS

Page

35

Chapter 2

The constructions of table CASE varies depending on how it is being used; therefore, it is difficult to provide a row-by-column description of the table. There are some basic construction rules you can keep in mind when modifying or reviewing table CASE:

Enter the case identifier in column A. Number cases sequentially beginning with CASE 1.

Enter the case description in column B. The description must not exceed 72 characters (e.g., Base Case).

Enter the appropriate case stacking keyword in the row below the case identifier.

You can construct a case with no tables by following a case identifier row with another case identifier row and no intervening tables. Such an empty case effectively causes solution of the base case. Comment rows, rows that begin with an asterisk (*), may be freely interspersed throughout table CASE. Use the PCALC table if distributive recursion is used, to calculate properties in terms of recursed cuts. The target cuts will typically be the blend components or process submodel feed cuts. PCALC values DO NOT overlay existing property values in the blend property tables (BLNxxxx) or the process submodel tables (Sxxx), but the values DO overlay empty intersections in the blend property tables and +999 or -999 placeholders in the submodel tables. PIMS processes the data in table PCALC in sequential order from the top of the table to the bottom of the table. Therefore, the cuts should be added to table PCALC in the order in which they are produced in the plant, that is, straight run cuts, followed by downstream process cuts, etc. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description:

Column Type Heading ROWNAMES Tag

Required Purpose Yes Enter a six-character tag. The first three characters identify the destination tag. The last three characters identify the source tag. Enter a description of the row name, not to exceed 20-charaters. Any additional column headings
Getting Started With Aspen PIMS

TEXT Quality Tag

Text

No

Numeric No

Page

36

Chapter 2

(e.g., SUL)

identify three-character quality tags. Numeric entries in this column are the factors by which to multiply the quality values of the source material to obtain the quality values for the target material.

Use table GASES to indicate which materials in the model are gases. PIMS treats the SPG for these streams as their density relative to air and not water so that their values are of reasonable size. During reporting time, PIMS segregate the gases from the liquids when performing the volume balance around a process unit. The volume of these gases is not included in the volumetric balance. However, their masses are included in the mass balance. Model Considerations In the past, BFOE (Barrels of Fuel Oil Equivilant) entries may have been used in table UNITS to convert gas volumes to liquid volumes. These entries must be removed from table UNITS when using table GASES. The density of air used to calculate the SPG for the gases should be entered in the GVTW field on the General tab of the General Model Settings dialog box. The density of air is a function of temperature, pressure, moisture content and gas composition. There is no single standard currently in use throughout so it is up to the you to make sure the data used in PIMS for SPG for streams, entered in the GASES table, are consistent with the entered GVTW factor so that conversions between weight and volume are handled correctly Note: Below is a table of GVTW factors: Gas Unit of Measure KSCF at 60 deg F, 1 atm. KSCF at 60 deg F, 1 atm. KSCF at 60 deg F, 1 atm. KSCF at 32 deg F, 1 atm. M3 at 0 deg C, 1 atm. Weight Unit of Measure GVTW Factor K# 0.07636 Metric Ton (2204.6 #) 0.03464 Short Ton (2000 #) K# Metric Ton 0.03818 0.08066 0.001292

PIMS default

Getting Started With Aspen PIMS

Page

37

Chapter 2

Example equation for GVTW in kg / cubic meter: Kg / M3 = 1000 * (0.001293 / ( 1 + 0.00367 * T)) * ( P / 760) T = temperature in degrees C, P = pressure in mm Hg Source: Handbook of Chemistry and Physics (47th Edition), The Chemical Rubber Company (CRC) Reporting Considerations Solution reporting has been enhanced so that the presence of gas streams in a process submodel report will no longer prevent the calculation of volume and weight yields. Global and Local Model Considerations It is important that materials common to global and local models be declared consistently. In other words, if a material is identified as a gas in the local model, it must also be identified as a gas in the global model. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag TEXT Text Required Purpose Yes Yes Enter the material tag you want to identify as a gas. Enter a description of the material tag. Note: The description you enter here is for model documentation purposes only and will not appear in the solution reports. Use the INDEX table to provide correlations for blend indices in the form of smooth curves defined by sets of coordinates. If table INDEX is present, it is used during the printing of the Specification Blend section of the PIMS Solution reports, so that blend qualities may be reported both in blend index and laboratory units. All client supplied blend data in tables such as BLNXXX, and BLNSPEC must still be supplied in index form because table INDEX is used only at report time. For table ASSAYS, properties may be supplied in non-index form. PIMS uses local cubic equations in order to interpolate between points supplied.

Getting Started With Aspen PIMS

Page

38

Chapter 2

There are three functions that table INDEX and the Property Calculator serve: The first is to add a new quality that is a function of an existing quality to tables ASSAYS and BLNPROP. Table ASSAYS is enhanced by the addition of I-quality rows for each cut that contains the original quality. Table BLNPROP will have new columns added for the new quality. The modeler must add blending specification rows to table BLNSPEC for the newly-defined quality. At report time, the system will back-calculate the original quality. In this usage, the new quality tag is put into the Property field and the quality that already exists in the model is used in the function defined in the Monotonic Function field of the Property Calculation Formulas dialog box. In table INDEX, the existing quality is the upper row of the pair of related properties.
The second usage is to calculate, only at report time, a previously undefined quality, i.e., a quality that does not exist in the model. In this usage, the quality tag for the preexisting quality is put in the Property field and the new quality tag is used in the function defined in the Monotonic Function field of the Property Calculation Formulas dialog box. In table INDEX, the new quality is the upper row of the pair of related properties. Also in this usage, blending specifications cannot be imposed on the new quality. The third usage is similar to the first, but the new quality is a function of two or more existing qualities. At report time, however, there is no back-calculation of the original qualities.

The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Heading ROWNAMES Tag Required Purpose Yes Row names must be in pairs. The first member of each pair is the three-character quality tag, and the second member of each pair is its respective three-character blending index. Enter a description of the quantity or blend index, not to exceed 20 characters. Enter the user-defined ordinal integer. Numeric entries in this column are the values of the index at the ordinal integer.

TEXT

Text

No

Numeric No Ordinal Integer (e.g., 1, 2, 3, 4, etc)

Getting Started With Aspen PIMS

Page

39

Chapter 2

Use the ROWS table to perform the following: Add new structure (linear equtions) into the model matrix through the definition of new rows and columns. (See the Non-Linear Equation Editor for information about adding non-linear equations.)

Augment and modify existing model structure.

PIMS supports multiple table ROWS that are assembled internally during matrix generation through the use of the model tree. Normal system limitations are applicable to the internally generated table. Table ROWS can contain entries that already exist in submodel tables (other than 999 entries in those tables). In this case, the entries in table ROWS overlay the submodel table entries. This provides users with a convenient method for updating estimates of generalized nonlinear recursed coefficients through table ROWS. Occasionally, the user may find that some PIMS constructs cannot be modified through table ROWS. This is designed behavior. One such example is access to the EVBL and EWBL matrix rows. Changes to these rows are not allowed. There are no error or warning messages when such modifications are attempted The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Heading ROWNAMES Tag Required Purpose Yes If you want to augment or change the model matrix (e.g., change the default LP row equation and inequality conventions of a row), enter the row name you are attempting to modify. If you are adding new structure to the model matrix, enter a row name you want to add, not to exceed seven characters. Warning: Do not use the underscore character (_) in row names. Enter a description of each row,

TEXT

Text

No

Getting Started With Aspen PIMS

Page

40

Chapter 2

MIN

Numeric No

not to exceed 20 characters. A non-blank entry (e.g., 1) causes the default LP row type to be overridden and such rows are then declared as GE (greater than or equal). Note: Use this feature to fix the material balance row for selected materials as the default PIMS formulation sets up all material balance rows as LE (Less than or equal) inequalities. A non-blank entry (e.g., 1) causes the default LP row type to be overridden and such rows are then declared as LE (less than or equal). A non-blank entry (e.g., 1) causes the default LP row type to be overridden and such rows are then declared as EQ (equality). Note: Table entries in column FIX override entries in columns MIN and MAX. A non-blank entry (e.g., 1) causes the default LP row type to be overridden and such rows are then declared as FR (free or unconstrained). Use this column when you need to access the slack in a blended product specification. This is useful in models employing interaction gasoline blending because interaction errors are not distributed outside specification blending rows. Use this column with a blended product specification row name. Enter a non-blank entry (e.g., 1) in this column to add a matrix

MAX

Numeric No

FIX

Numeric No

FREE

Numeric No

SLACK

Numeric No

Getting Started With Aspen PIMS

Page

41

Chapter 2

column with the same name as the row and to change the specification row to equality (EQ). Example:

USER

Numeric No

A zero (e.g., 0) in the column indicates there is no entry made to the matrix. You should always enter a zero if you add the USER column to a single period, single plant PIMS model. A non-zero entry (e.g., 1) in the column indicates that the row is user-defined and is being used to add additional structure to the matrix. Note: The column User is ONLY used in global models. If you have a MPIMS or XPIMS model, the column is mandatory at the GLOBAL table ROWS level, but an entry is not made in the matrix for the USER column. Right-hand-side value for the row. Entries in the column represent the right-hand-side value of the row in the generated matrix. Any additional column headings are names of purchase, sale, blending, and unit-operation column as generated by PIMS, or new columns to be directly incorporated into the matrix.

RHS

Numeric No

Column Names

Text

No

Getting Started With Aspen PIMS

Page

Use the SCALE table in situations where widely differing values of blend qualities and specifications are present, as this might cause numeric precision problems in the LP optimization. In this situation, PIMS uses the entries in table SCALE to scale down (or up) the blend properties to values in the range from 0.1 to 1.0. The current version of the

42

Chapter 2

optimizer automatically scales the rows so this option is not needed unless the quality coefficients are so small that they are smaller than SMALL as defined in the Tolerance tab of the General Model Settings dialog box. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Heading ROWNAMES Tag TEXT Text Required Purpose Yes No Enter a three-character tag for each quality to be scaled. Enter a description of each quality, not to exceed 20 characters. Enter the scale factors by which to multiply the quality values and specifications. Enter the model specific absolute convergence tolerances for recursed properties that are property specific. Note: This value overrides the default tolerances set in the ATOL option on the Tolerance tab of the Recursion Model Settings dialog box. Enter the model specific relative convergence tolerances for recursed properties that are property specific. Note: This value overrides the default tolerances set in the RTOL option on the Tolerance tab of the Recursion Model Settings dialog box. Defines the minimum acceptable quality value to be used in recursion. If this value is not supplied in table SCALE, PIMS will determine values by examining all the blend property

SCALE

Numeric No

ATOL

Numeric No

RTOL

Numeric No

MIN

Numeric No

Getting Started With Aspen PIMS

Page

43

Chapter 2

tables and process submodel tables. Values provided in table SCALE will supersede PIMS estimates. Note: The resultant quality ranges are reported for the client in the Recursion section of the Data Validation report. Defines the maximum acceptable quality value to be used in recursion. If this value is not supplied in table SCALE, PIMS will determine values by examining all the blend property tables and process submodel tables. Values provided in table SCALE will supersede PIMS estimates. Note: Resultant property ranges are reported for the client in the Recursion section of the Validation Summary report. Defines the cost imposed on the objective function when a specification constraint is violated. Numeric entries in this column provide infeasibility breakers for specification blends. Note: This structure may be useful in difficult to solve models that experience small infeasibilities in blend specification rows. The form of using this option is to add column PENALTY to table SCALE and, at the intersection with a specification-quality tag row name, enter the penalty cost to be incurred. The client should check the Primal report for any active specification penalty

MAX

Numeric No

PENALTY

Numeric No

Getting Started With Aspen PIMS

Page

44

Chapter 2

FORCEUPD Numeric No

vectors and determine why such activity was necessary. Forces the update of that quality alone for the designated number of recursion passes. Note: The entry must be an integer greater than 0. Designates recursed qualities that represent material compositions. Note: PIMS normalizes and updates all such designated qualities in a recursed pool if one of those qualities is out of tolerance. In addition, PIMS checks table PGUESS to ensure that all the compositional qualities of a recursed pool add to 100 or 1. Row entries should include all component properties that represent stream compositions. A non-blank entry (e.g., 1) in this column activates the component property in the normalization process.

COMP

Numeric No

SUPPLY AND DEMAND TABLES


Use Supply and Demand tables to specify materials and utilities that can be purchased and sold by your model, the selling price and costs of these materials, any constraints on the quantities bought and sold, and an indication of whether materials are bought and/or sold on a volumetric or gravimetric basis. Unique three character alphanumeric codes or tags identify all materials and utilities in the model. The tags cannot include any special characters or imbedded blanks.

The PIMS Library and Sample Problem utilize a particular set of stream tags for common refinery process and utility streams that are consistent with industry practice and easily
Getting Started With Aspen PIMS

Page

45

We recommend that the first character in the tag be a letter as this expedites creation of a text entry in the spreadsheet program, but this is not a requirement.

Chapter 2

understood. For example, the tags KWH, STM, IC4, and SUL are used for power, steam, isobutene, and sulfur respectively. However, these tags are not "hard coded" or required by PIMS and the client can invent his own codes if desired. Only SPG is hard coded. Use the BUY table to do the following:

Identify the materials that are can be purchased. Define purchase constraints on individual materials or materials groups. Required Purpose Yes No Enter a three-character material tag or material group tag (as defined in table GROUPS). Enter a description of the purchased material, not to exceed 20 characters. Enter the minimum constraint on purchases in thousands of weight or volume units. If this field is left blank or if the column is absent, then no constraints are imposed. Enter the maximum constraint on purchases in thousands of weight or volume units. If this field is left blank or if the column is absent, then no constraints are imposed. Enter the fixed constraint on purchases in thousands of weight or volume units. Use this field to prioritize the purchase of alternative materials. This feature is useful when tiered pricing exists in your model. Unit purchase cost of each material in the appropriate unit, usually $/BBL or $/MTON. A non-blank entry (e.g., 1) in this column indicates that the material is purchased in a weight-based model on a volume basis. Use this column to group purchased materials together for subtotaling in the PIMS solution reports. Use this column to identify the API value for the purchased material. Use this column to identify the SPECIFC GRAVITY value for the purchased material. Use this column to identify the factor (usually 1.0)

Column Type Heading ROWNAMES Tag TEXT MIN Text

Numeric No

MAX

Numeric No

FIX PRIORITY

Numeric No Numeric No

COST VOL

Numeric No Numeric No

GROUP

Tag

No

API SPG LIQ

Numeric No Numeric No Numeric No

Getting Started With Aspen PIMS

Page

46

Chapter 2

WGT

Numeric No

by which to multiply the purchases value in order to obtain the volume used in the recovery calculation. A non-blank entry (e.g., 1) in a volume-based model indicates that the material is priced and constrained on a weight basis. Note: To use this column, the gravity of the material must be supplied. Use this column to disable a material. A non-blank entry (e.g., 1) in this column indicates that the three-character tag and its respective structure are to be removed from the model. The system will remove entries from the following tables: BLENDS, BLNMIX, BLNSPEC, BUY, CRDDISTL, PGUESS, PINV, RATIO, SELL

DISABLE

Numeric No

Use the SELL table to do the following:


Identify the materials that can be sold. Define sales constraints on individual materials or material groups. Required Purpose Yes No Enter a three-character material tag or material group tag (as defined in table GROUPS). Enter a description of each material, not to exceed 20 characters. Enter the minimum-sale constraint in thousands of weight or volume units. Enter the maximum-sale constraint in thousands of weight or volume units. If this field is left blank or if the column is absent, then no constraints are impose. A non-blank entry (e.g., 1) in this column indicates that the material is sold in a weight-based model on a volume basis and that the material balance is

Column Type Heading ROWNAMES Tag TEXT MIN MAX Text

Numeric No Numeric No

VOL

Numeric No

Getting Started With Aspen PIMS

Page

47

Chapter 2

PRICE GROUP

Numeric No Numeric No

LIQ

Numeric No

WGT

Numeric No

DISABLE

Numeric No

conducted on a volume basis. Enter the unit selling price of each material in appropriate units, usually $/BBL or $/MTON. Use this column to group materials (products) together for sub-totaling in the PIMS solution reports. Use this column to identify liquid materials so the total liquid volume recovery percentage for the plant is reported in the PIMS solution reports. A non-blank entry (e.g., 1) in a volume-based model indicates that the material is priced and constrained on a weight basis. Use this column to disable a material.

Use the ALTTAGS table to identify alternative sources or dispositions for a primary material or utility. Alternate Materials Tags Once defined, you can use alternate material tags in table BUY and SELL to do the following:

Define alternate (tiered) pricing Define alternate constraints and/or descriptions

For example, you may want to sell a material to different customers under different pricing tiers or you may have a contractual agreement with a provider to purchase a specific quantity of materials at an agreed upon price.

Alternate Utility Tags Once defined, you can use alternate material tags in table UTILBUY and UTILSEL to do the following:

Define alternate (tiered) pricing

Getting Started With Aspen PIMS

Page

The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table.

48

Define alternate constraints and/or descriptions

Chapter 2

Description: Column Type Required Purpose Heading Enter a three-character material or utility tag for each ROWNAMES Tag Yes alternative material or utility (alias). Text Yes Enter the three-character material or utility tag that TEXT identifies the corresponding primary material or utility. Note: PIMS maintains the material and utility balance on the primary material or utility with the purchase or sale of the alternate material or utility by adding to or subtracting from the primary material or utility balance.

Use the UTILBUY table to identify the utilities that are sold and to impose constraints on sales of individual utilities or groups of utilities. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag Required Purpose Yes Enter a three-character utility tag or utility group tag. Group tags are defined in table GROUPS. Note: The same utility can be bought and/or sold through entries in tables UTILBUY and UTILSEL. Enter a description of the utility, not to exceed 20-charaters. Enter the minimum-purchase constraint in thousands of weight or volume units. For multi-period models, add a period identifier to the column name (e.g., MIN1), if necessary.

TEXT MIN or MINn (e.g., MIN1)

Text

No

Numeric No

Getting Started With Aspen PIMS

Page

49

Chapter 2

MAX or MAXn (e.g., MAX1)

Numeric No

Note: If this field is left blank or if the column is absent, then no constraints are imposed. Enter the maximum-purchase constraint in thousands of weight or volume units. If this field is left blank or if the column is absent, then no constraints are imposed. Note: For multi-period models, add a period identifier to the column name (e.g., MAX1), if necessary. Enter the fixed-purchase constraint in thousands of weight or volume units. Utilities that are internally generated by the model MUST be included in this table with their purchase fixed at zero (not blank or empty). Table entries in column FIX override entries in columns MIN and MAX. Note: For multi-period models, add a period identifier to the column name (e.g., FIX1), if necessary. Use this field to prioritize the purchase of alternative utilities. This feature is useful when tiered pricing exists in your model. Note: See Using Table UTILBUY to Implement Non-Convex Tiered Pricing for additional information. Enter the unit purchase costs of each utility in the appropriate units, for example, $/KWH, and $/MMBTU. Note: For multi-period models, add a period identifier to the column name (e.g., COSTn), if necessary. Use this column to group utilities together for subtotaling in the PIMS solution reports. Use this column to disable a utility. A non-blank entry (e.g., 1) in this column indicates that the three-character tag and its respective structure are to be removed from the

FIX or FIXn (e.g., FIX1)

Numeric No

PRIORITY or

Numeric No

PRIORITYn (e.g., PRIORITY1) Numeric No COST or COSTn (e.g., COST1) GROUP DISABLE Tag No

Numeric No

Getting Started With Aspen PIMS

Page

50

Chapter 2

model. The system will remove entries from the following tables: UTILBUY CRDDISTL UTILSEL and the following rows from submodels: UBAL Note: See table DISABLE for additional information about disabled utilities.

Use the UTILSEL table to identify the utilities that are sold and to impose constraints on sales of individual utilities or groups of utilities. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Note: Use column headings with period identifiers in multi-period and local multiplant/multi-period models only. Description: Column Type Heading ROWNAMES Tag Required Purpose Yes Enter a three-character utility or utility group tag. Group tags are defined in table GROUPS. Note: The same utility can be bought and/or sold, through entries in tables UTILBUY and UTILSEL. Enter a description of each utility, not to exceed 20 characters. Enter the minimum-sale constraint in thousands of weight or volume units.

TEXT MIN or MINn (e.g., MIN1)

Text

No

Numeric No

Note: If this field is left blank or if the column is

Getting Started With Aspen PIMS

Page

51

For multi-period models, add a period identifier to the column name (e.g., MIN1), if necessary.

Chapter 2

MAX or MAXn (e.g., MAX1)

Numeric No

absent, then no constraints are imposed. Enter the maximum-sale constraint in thousands of weight or volume units. If this field is left blank or if the column is absent, then no constraints are imposed. Note: For multi-period models, add a period identifier to the column name (e.g., MAX1), if necessary. Enter the fixed-sale constraint in thousands of weight or volume units. Table entries in column FIX override entries in columns MIN and MAX. Note: For multi-period models, add a period identifier to the column name (e.g., FIX1), if necessary. Use this field to prioritize the sale of alternative utilities. This feature is useful when tiered pricing exists in your model. Note: See Using Table UTILSEL to Implement Non-Convex Tiered Pricing for additional information. Unit selling price of each utility in the appropriate units. Note: For multi-period models, add a period identifier to the column name (e.g., PRICEn), if necessary.

FIX or FIXn (e.g., FIX1)

Numeric No

PRIORITY or

Numeric No

PRIORITYn (e.g., PRIORITY1) Numeric No PRICE or PRICEn (e.g., PRICE1) GROUP DISABLE

Tag

No

Numeric No

Use this column to group utilities together for subtotaling in the PIMS solution reports. Use this column to disable a utility. A non-blank entry (e.g., 1) in this column indicates that the three-character tag and its respective structure are to be removed from the model. The system will remove entries from the following tables: UTILBUY

Getting Started With Aspen PIMS

Page

52

Chapter 2

CRDDISTL UTILSEL and the following rows from submodels: UBAL Note: See table DISABLE for additional information about disabled utilities.

RECUSION TABLES
Use Recursion tables to support the five types of recursion used to address model nonlinearities in PIMS. These are:

Distributive Property Recursion for Pools and Blends Distributive Octane Susceptibility Recursion Interaction Blending Generalized Nonlinear Recursion Reformulated Gasoline Blending

Recursion capabilities are controlled by the client through tables: ADDITIVE Used to implement the PIMS octane-susceptibility-recursion feature. Table ADDITIVE can contain a full definition (contains typical Table ADDLEVS information) of additive response for various qualities, in which only a single table is needed. If it does not contain a full definition, then both tables must be present if this feature is used. ADDLEVS Used to implement the PIMS octane-susceptibility-recursion feature. CURVE Used to implement the PIMS generalized nonlinear recursion feature. Table NONLIN must be present if this feature is used.

Getting Started With Aspen PIMS

Page

53

INTERACT Used to implement the PIMS interaction blending technology.

Chapter 2

NONLIN Used to implement the PIMS generalized nonlinear recursion feature. Table CURVE must be present if this feature is used. PDIST Used to implement the PIMS distributive property recursion feature. PGUESS Used to implement the PIMS distributive property recursion feature. Table PGUESS must be present if this feature is used. RFG Used in conjunction with proper entries in table BLNSPEC triggers the blending of gasoline according to EPA and/or California Air Resources regulations. PDIST For each stream with recursed properties, that is, each stream listed as a row in table PGUESS, you may specify an estimated downstream distribution in table PDIST. The distribution indicates how property estimate errors are to be distributed to downstream process units or blending in the first pass of the recursion. During validation and matrix generation, PIMS verifies that all potential distributions are included in table PDIST. Any missing distributions are automatically added by PIMS. Erroneous or invalid distributions are ignored. If you choose to leave table PDIST empty, PIMS automatically constructs the required entries. In building the required distributions for a recursed property, if the user-supplied values in a column of table PDIST sum to 1.0 or greater, additional distributions determined by PIMS are given an initial value of 0.01. If the column sum is less than 1.0, the additional distributions are given equal values to cause the column to sum to 1.0. In most cases, the columns of PDIST sum to 1.0, but this is not always the case. For example, if a stream is a component of a formula blend or is directly sold, or when PCALC values not equal to 1.0 are used, table PDIST coefficients do not sum to 1.0. The distributions do not need to be included since they are not affected by the stream properties. PIMS also examines tables SELL and CAPS to locate specification blend sales or process unit capacities that have a MAX or FIX value equal to zero. Distributions to such products or process submodel rows are then set to zero and a warning message is generated to advise the user that this has occurred. During the recursion process, PIMS recalculates and updates distribution coefficients. The updated values are calculated from the property (volume or weight) of the pool blended into a specification blend, or feed to a process submodel, divided by the property of the pool produced. If the "revised" pool quantity is less than the value of FSMALL as defined on the Tolerance tab of the General Model Settings dialog box, the distributions from (and properties of) the pool are not updated. In addition, if the updated distribution is calculated to be less than RSMALL, the distribution value is held at RSMALL. At the termination of the recursion process, PIMS creates the solution spreadsheet files !PDIST and !PGUESS, which contain the final converged values of the distributions and

Getting Started With Aspen PIMS

Page

54

Chapter 2

recursed property values. These files can be retrieved and then saved to replace prior copies of table PGUESS and PDIST if desired. In complex models with multiple levels of cascading of pooled streams, you are urged to carefully review the recursion reports generated by PIMS during the optimization step to ensure that the recursion logic has been set up correctly and that the distributions are being meaningfully recalculated. In such models, it is also good practice to update table PDIST (possibly using !PDIST as explained above) to provide the model with the best possible starting values for distributions. Some spreadsheet programs limit spreadsheets to 256 columns. PIMS will allow for multiple PDIST tables if this limit must be exceeded. Additional tables are named PDISTXn, where n is 0 to 9. PIMS will return multiple !PDISTn tables when the number of columns exceed 250. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Note: The descriptions provided relate specifically to short tag models, not extended or Description: Column Type Required Purpose Heading Yes Enter a three-character tag (e.g., ROWNAMES Tag (e.g., LRG or LRG) in a local model or a fourLRG1) character tag (e.g., LRG1) in a multi-period model for each material into which the property errors are distributed. Note: The fourth character, if present, is the period identifier. The three-character material tags represent blends or components to processes where the process performance depends on component qualities. The property errors are automatically added to property balances of the target cuts. Property balances are either specification rows of the form Nspcprd or Xspcprd, or client supplied property balances of the form Espcprd or Rspcprd. Enter a description of each material, not to exceed 20 characters. Any additional column headings identify three-character material

TEXT

Text

No

Getting Started With Aspen PIMS

Page

Recursed Pool

Numeric No

55

Chapter 2

(e.g., LN1)

tags that identify the recursed cuts. Numeric entries in this column are the estimated fractions of the recursed material distributed to the target material. These estimates are updated during the recursion process. However, table intersections with the value zero are not be updated. If the client wishes to specify a possible but unlikely distribution, a small value (e.g., 0.001) should be used as the estimate. It should be clearly understood that the distributions referred to above, are in fact distributions of property errors and not distributions of physical cuts, although these two will usually be synonymous.

Use the PGUESS table to identify which material properties are to be recursed and to provide initial estimates for the property values. For models in which the pooling problems arise largely because of unknown crude charges, table PGUESS can contain 999 placeholders. The initial estimates provided by the user are essentially determined by the EST rows of table CRDDISTL. During matrix generation, PIMS scans submodel tables (Sxxx), property tables (BLNxxxx), and table PGUESS to determine the range of recursed properties. If the system does not find a range over which the property can be recursed, the error message (E245) is issued. To resolve the error, provide the appropriate range in the blending data tables. During the recursion process, the recursed property values are recalculated if the quantity of the pool produced exceeds the value of FSMALL as defined on the Tolerance tab of the General Model Settings dialog box. In calculating the property value, PIMS ensures that changes are constrained by the damping factor (DAMP) as defined in the Recursion Model Settings dialog box, and that the new value does not lie outside the range of the input data. All required LP matrix coefficients are then updated. In the case of process submodels, coefficients are deemed to be recursed material properties and are updated if:

Getting Started With Aspen PIMS

Page

56

Chapter 2

The process submodel column name sss is the steam tag of a recursed property, or is the name of a material whose properties are calculated in table PCALC from a recursed property.

The submodel row name is of the form xpppzzz, where x is one of the characters E, R, L, G, X or N, ppp is the recursed property tag, and the last three characters of the row name (zzz) are not quite arbitrary. For example, if an E row has different last three characters vs. CCAP row, turning off cap does not necessarily turn off error distribution to E row. It is good practice to use the submodel name for last three characters of E, R, L, G, X or N rows.

At the termination of the recursion process, PIMS creates the solution spreadsheet files !PDIST and !PGUESS (or !PGESS_XNLP), which contain the final converged values of the distributions and recursed property values. These files can be retrieved and then saved to replace prior copies of table PGUESS and PDIST if desired. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Heading ROWNAMES Tag (e.g., LN1 or LN11) Required Purpose Yes Enter a three-character tag (e.g., LN1) in a local model or a fourcharacter material tag (e.g., LN11) in a multi-period model. Note: The fourth character, if present, is the period identifier. You can define pseudo cuts that are tracked through RBAL rows in the process submodels, without appearing in VBAL or WBAL material balance rows. Such cuts do not appear in the Stream Disposition Map section of the Data Validation report. The row names of the table can also include specification blends, in which case, you can recurse on the properties of these products. However, only properties for

Getting Started With Aspen PIMS

Page

57

Chapter 2

TEXT Quality Tag (e.g. SUL)

Text

No

Numeric No

which there are specifications can be recursed. The purpose of this capability is to permit blends to be used as blend components or as feeds to quality driven submodels. Enter a description of each cut, not to exceed 20 characters. Any additional column headings identify three-character quality tags. Numeric entries in this column are used as initial estimates of the recursed quality values. You can use 999 as a placeholders in the table. For straight run crude distillation products, the placeholders are resolved from the crude mix calculations and are effectively determined from the inspection in table ASSAYS and the estimated crude mix in table CRDDISTL. For specification blends, the 999 values are set to the average between minimum and maximum specifications. Other placeholders are resolved to the average of the minimum and maximum of the quality range or by using the calculation implied in table PCALC.

Use the UPOOL table to define data for the automatic construction of recursion pools. PIMS creates a submodel containing all the necessary recursion structure and adds that submodel name to table SUBMODS The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Heading Type Required Purpose

Getting Started With Aspen PIMS

Page

58

Chapter 2

ROWNAMES Tag

Yes

The table entries in this column can be in either of the following formats: A three-character tag that identifies the components (members) of each of the recursed pools to be built. -orThe four-character tag that identifies the properties for which the recursion structure is to be built. If no Rqqq rows are present, then all the qualities that are common among the pool members will be recursed. Enter a description of each row name, not to exceed 20 characters. Any additional column headings identify tags for the recursed pools to be built. Enter 1 in the intersection of the component and the pool to indicate that the component is a member of that pool. Components can be members of more than one pool. Enter 999 in the Rqqq row and pool column to indicate that recursion is to be performed, but no initial guess is supplied. PIMS will create an initial guess. Enter a non-blank entry (e.g., 1) in the Rqqq row and pool column to indicate that recursion is to be performed and the value is to serve as the initial estimate for

TEXT

Text

No

Recursed Pools (e.g., LCN)

Numeric No

Getting Started With Aspen PIMS

Page

59

Chapter 2

that quality. Enter 0 in the Rqqq row and pool column to indicate that the quality qqq is not to be recursed.

SUMODEL TABLES Use the Submodel tables to construct and link process submodels that represent different process units in a plant. Subject only to a minimal set of restrictions, the submodels can be constructed to be as simple or complex as necessary. Submodels typically include material balances and capacity and utility consumption, but might also include energy and component balances as well as implications of a variety of component and operating characteristics. A standard set of submodels for common refinery operations is provided in the PIMS library. You may modify and incorporate these submodels into your model as necessary. The Submodel input spreadsheet tables are described in the following topics:

CAPS GASPLANT PROCLIM SUBMODS Sxxx

Use the CAPS table to impose limits on process capacities. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description: Column Type Heading ROWNAMES Tag (e.g., CAT1 or CAT1A) Required Purpose Yes Enter a four-character tag (e.g., CAT1) in a local model or a five-character tag (e.g., CAT1A) in a global model that identifies each process capacity. The first character of the tag must be the letter C. The next three

Getting Started With Aspen PIMS

Page

60

Chapter 2

characters of the tag identify a potentially limiting and consumable process capacity. Note: The fifth character, if present, is the plant identifier. Any one submodel may have no direct capacity limitations, or may include one or several capacity constraints. In addition, several submodels may draw on a common consumable capacity. The capacity tags can be defined by the client, except for models that include crude distillation. The tags AT1, VT1, AT2, VT2 etc., are automatically constructed by PIMS in the distillation submodels and need to be used in table CAPS as well. Enter a description of each process capacity, not to exceed 20 characters. Enter the minimum acceptable capacity utilization. For multi-period models, add a period identifier to the column name (e.g., MIN1), if necessary. Note: If this field is left blank or if the column is absent, then the resource will have no minimum capacity limitation. Enter the maximum capacity utilization. If this field is left blank or if the column is absent, then the resource will have no maximum capacity limitation. Note: For multi-period models, add a period identifier to the column name (e.g., MAX1), if

TEXT

Text

No

MIN or MINn (e.g., MIN1)

Numeric No

MAX or MAXn (e.g., MAX1)

Numeric No

Getting Started With Aspen PIMS

Page

61

Chapter 2

FIX or FIXn (e.g., FIX1)

Numeric No

necessary. Enter the fixed capacity utilization. Table entries in column FIX override entries in columns MIN and MAX. Note: For multi-period models, add a period identifier to the column name (e.g., FIX1), if necessary. Defines the cost imposed on the objective function when a capacity constraint is violated. Use this column to add an infeasibility breaker to the model. The Capacity Utilization section of the PIMS solution reports can contain a long string of individual capacities for each submodel. Use this column to provide breaks in the report by identifying capacity-report headings. Enter one of the following values: -1 Enter this value if you want only the value from column TEXT to appear in the solution reports (excluding the values for MIN, MAX, FIX, and PENALTY). This may be convenient if a dummy capacity has been constructed for report format purposes. For example, enter -1 in this field to identify a report subheading. 0 Enter this value to omit the capacity and its associated values

PENALTY

Numeric No

REPORT

Numeric No

Getting Started With Aspen PIMS

Page

62

Chapter 2

from the solution reports. 1 Enter this value to include the capacity and its associated values in the solution reports. Note: If this field is left blank, or if the column is absent, the value 1 is assumed. In addition, only the following solution reports are affected by this column: Summary Solution Down-the-Page Across-the-Page Use the PROCLIM table to impose limits on process conditions and recursed properties in a submodel. The following table provides column, row, and table entry information to assist you when building and modifying the table. Description: Column Type Heading ROWNAMES Tag (e.g., ZSEV or ZSEVA) Required Purpose Yes Enter a four-character tag (e.g., ZSEV) in a local model or a five-character tag in a global model (e.g., ZSEVA) The first character of the tag must be the letter Z. The next three characters of the tag identify the limit. Note: The fifth character, if present, is the plant identifier. or Enter a seven or eight character tag (e.g., Zqqqxxx or Zqqqxxxp). The first character of the tag must be the letter Z. The next six characters must

Getting Started With Aspen PIMS

Page

63

Chapter 2

identify the following: qqq is a quality tag. xxx is a pool lable. The eight character, if present, is the plant identifier. p is the plant identifier. Enter a description of each process limit, not to exceed 20 characters. Enter the minimum acceptable process limit. If this field is left blank or if the column is absent, then the resource has no minimum process limitation applied. Note: For multi-period models, add a period identifier to the column name (e.g., MIN1), if necessary. Enter the maximum acceptable process limit. If this field is left blank or if the column is absent, then the resource has no maximum process limitation applied. Note: For multi-period models, add a period identifier to the column name (e.g., MAX1), if necessary. Enter one of the following values: -1 Enter this value if you want only the value from column TEXT to appear in the PIMS solution reports (excluding the values for MIN, MAX, and PENALTY). This may be
Getting Started With Aspen PIMS

TEXT

Text

No

MIN or MINn (e.g., MIN1)

Numeric No

MAX or MAXn (e.g., MAX1)

Numeric No

REPORT

Numeric No

Page

64

Chapter 2

convenient if a dummy process limit has been constructed for report format purposes. For example, enter -1 in this field to identify a report subheading. 0 Enter this value to omit the process limit and its associated values from the PIMS solution reports. 1 Enter this value to include the process limit and its associated values in the PIMS solution reports. Note: If this field is left blank or if the column is absent, value 1 is assumed. 2 Enter this value to denote that no min or max is imposed on this process parameter. Only the activity of this process parameter is to be reported. In addition, only the following PIMS solution reports are affected: Summary Solution Down-the-Page Across-the-Page Defines the cost imposed on the objective function when a process limit is violated. Use this column to add an infeasibility breaker to the model. Use the SUBMODS table to identify the submodels to incorporate into the current model. Submodels must be defined in table SUBMODS and must be added to the model tree. Where models include crude oil distillation, PIMS will automatically construct a submodel table for each logical crude unit, where xxx is the column name(s) used in table CRDDISTL. The client may, but is not required to, supply these crude submodel table

PENALTY

Numeric No

Getting Started With Aspen PIMS

Page

65

Chapter 2

names in table SUBMODS. If the names are not present in table SUBMODS, PIMS reports the submodels as if they are entered at the beginning of the table. This is important because the order in which submodels are reported in the Stream Disposition Map and Process Submodel sections of the standard PIMS reports are controlled by the row order in table SUBMODS. Consequently, the client can control the report order of submodels. The following table provides column, row, and table entry information to assist you with building and modifying a short tag version of the input spreadsheet table. Description Column Type Heading ROWNAMES Tag Required Purpose Yes Enter the four-character tag that identifies each process submodel table. The tag must begin with the letter S (for submodel or logical crude unit). Enter a description of each process submodel, not to exceed 20 characters. Enter 0 (zero) in this column for each submodel you want to omit from the PIMS solution reports. This option is useful when your model contains dummy submodels that should not be reported. Indicate which submodels are to be consolidated for reporting purposes. A non-blank entry (e.g., 1) in this column causes all consecutive submodels with the same nonblank value to be consolidated. A non-blank entry (e.g., 1) in this column specifies that the Pi value (shadow price) is to appear in the submodel report. A non-blank entry (e.g., 1) in this column indicates that the associated submodel is disabled.

TEXT

Text

No

REPORT

Numeric No

COMBINE

Numeric No

PI

Numeric No

DISABLE

Numeric No

Getting Started With Aspen PIMS

Page

66

Chapter 2

Quality Tag (e.g., SUL)

Numeric No

Any additional column headings identify three-character quality tags associated with the submodel. Use the quality tag column to report cut qualities or quantities of material for cuts associated with the submodel. There are two valid table entries allowed in this column: A zero (0) entry reports the quality content of the cut (such as weight percent sulfur) and feed/product averages. A non-zero entry represents the value that is used to convert the quality into the quantity of material (such as tons of Sulfur in each cut) and its total for feeds and products.

Getting Started With Aspen PIMS

Page

67

Chapter # 3

CHAPTER # 3 REFINERY LINEAR


PROGRAMMING MODELING
OVERVIEW
As Discussed earlier, the basic problem of linear programming (LP) is to maximize or minimize a function of several variables subject to a number of constraints. The functions being optimized and the constraints are linear. General linear programming deals with allocation of resources, seeking their optimization. In the context of an oil refinery, an LP model is a mathematical model of the refinery, simulating all refinery unit yields, unit capacities, utility consumption, and the like as well as product blending operations of the refinery by means of linear equations, each equation subject to a number of constraints. These equations are compiled in a matrix of rows and columns, the columns representing the unknowns or variables and the rows or equations representing the relations between variables. The values in the matrix are simply the coefficients that apply to unknowns in each equation. As the numbers of unknowns are more than the number of constraints relating them, a large number of solutions might satisfy all the problem parameters. The optimal solution must be chosen from the set of only those solutions that satisfy all the problem parameters and, at the same time, maximize refinery profit or minimize operating cost. To aid the search for an optimum solution, LP is driven by a row in the matrix containing cost and revenue (the objective function row).

DEVELOPMENT OF THE REFINERY LP MODEL


In the oil industry, prior to the advent of LP techniques, all optimization studies were done by calculating several hand balances, moving toward an optimal solution by trial and error. Carrying out simplex procedure by hand was very tedious and time consuming. The typical refinery LP model used for planning has approximately 300-500 equations and 800-1500 activities to optimize. With a simplex algorithm available as a computer program, interest quickly developed in optimizing via a linear programming. In the 1950s, a standard input format to describe a matrix was agreed on, opening the market to LP software from different vendors. These softwares are generally of two types: 1. Programs in which the user enters all refinery data, such as unit yields, product properties, and unit capacities, in the form of spreadsheets that can easily be updated. These programs convert the data tables into matrix form by using special programming languages (Omni, Magan, etc.), thus saving many hours in producing matrix input correctly. These programs are called matrix generators. These programming languages can also be used to create a "report writer" program to print out the optimized results. 2. Optimizer programs1 that read the matrix description in the standardized input format, optimize the problem, and report the results in an "unscrambled report," which is simply a list of rows and columns and the associated optimized values.

Getting Started With Aspen PIMS

Page

Chapter # 3 A refinery LP model is designed to model a wide variety of activities, including, among others, the following: -Distillation of crude Oils. -Downstream processing units, such as cat reformers, hydrocrackers, desulfurizers, and visbreakers in various processing modes. -Pooling of streams. -Recursing on the assumed qualities of a rundown tank's content -finished product blending. -Refinery fuel blending. -Importing feedstocks to meet product demand. -Exporting surplus refinery streams to other refineries. The refinery LP model, in fact, is simply a set of data tables in the form of spreadsheets that are converted into a matrix using special programming languages. As many solutions to the problem are possible, the criteria for choosing an optimum solution is that which, apart from satisfying all equations, gives maximum profit to the refinery. The optimum solution of a refinery LP model yields the following: -A complete, unit wise, material balance of all refinery units. The material balance could be on a volume or weight basis. -The unit capacities available and utilized. -Feedstocks available and used for processing or blending. -Utilities (fuel, electricity, steam, cooling water), chemical, and catalyst consumption for all processing units and the overall refinery. -Blend composition of all products and the properties of blended products. An economic summary, which may include the cost of crude, other feedstocks, utilities, chemicals, and catalyst consumed and the prices of blended finished product. THE STRUCTURE OF A REFINERY LP MODEL ROW AND COLUMNS NAMES AND TYPES Row and column naming conventions are followed for easy identification and manipulation of data by different vendors of LP software. (The row and column naming and also data tables naming convention followed here for rows, columns, and data tables is from the popular Process Industries Modeling System (PIMS), a PC-based refinery LP package, Here, row and column names are seven characters long: The first four characters generally identify the type of the row or column, while the last three characters identify the stream.

Getting Started With Aspen PIMS

Page

Chapter # 3

UNITS OF A ROW The units of a column multiplied by the units of a coefficient in a row equal the units of a row. Thus, if the column activity represents thousands of tons per day and a coefficient in the utility balance row has unit of 000' Btu/ton, the units of row are = 000' Tons/Day * 000' Btu/Ton or million Btu/Day The types of restrictions encountered in a refinery LP model are as follows: feed availability; product demand; process yield; utility, catalyst, and chemical consumption; and product blending.

Feed Availability
These equations reflect the purchase of feedstock, such as crude and imported intermediate streams or blend stocks. The disposition of crudes could be to various crude units in different operation modes. The disposition of intermediate feedstock could be to a secondary processing unit or to product blending. Table 1 (BUY Table) shows a typical data entry and Table 2 shows the matrix generated by the feed availability constraints. The row names are derived from the row names of the BUY Table. For example, row ABP in Table 1 generates a row name VBALABP in the matrix.

Getting Started With Aspen PIMS

Page

Chapter # 3

In row VBALABP, column PURCABP has a negative coefficient, reflecting that the Arab crude purchased is made equal to its disposition to various crude units.

Getting Started With Aspen PIMS

Page

Chapter # 3

Getting Started With Aspen PIMS

Page

Chapter # 3 Product Demand These equations relate the product demand to its blending. The product demand is inserted in the SELL Table (Table 3). The row names in this table are product codes. These rows generate a matrix (Table 4) by adding the prefix VBAL to the table row name, denoting that each row is, in fact, a material balance row relating the demand to its blending. For example, row 150 in the SELL Table generates the row VBAL150 (the material balance row for LPG). Row VBAL150 has coefficients 1 and - 1 , respectively, for its two columns, SELL150 and BVBL150, indicating that variable SELL150 is made equal to BVBL150 or volume of LPG blended in product LPG. If the demand for a product is fixed, this is called a fixed-grade product, and the LP solution meets this demand by fixing the value of the variable SELL 150. If demand for a product to be produced is not fixed, it is called a balancing or free grade, and its production is optimized, based on the price of the product, within maximum or minimum demand constraints, if these exist. It is, therefore, necessary to insert the prices of balancing-grade products whose production is to be optimized. Column names in Table SELL are generated from the table name and row names. For example, in Table 3 (Table SELL), row 150 generates a column or variable SELL 150, whose production is optimized on the basis of its unit price, indicated in column price. Variable SELLl50 has a value within the minimum and maximum constraints shown in this table.

Getting Started With Aspen PIMS

Page

Process Yields A refinery has a large number of process units. The most important units are the crude distillation unit (CDU), consisting of atmospheric distillation of crude and vacuum distillation of atmospheric resid. Downstream of the CDU are a number of other processing units, such as the fluid cat cracker (FCCU), distillate hydrocracker, diesel desulfurizer, and cat reformer unit.

Chapter # 3 The basic structures of all process submodels are as follows. A process unit may operate in a number of modes. Each operating mode becomes a column in the process submodel. The column names may be feed names or processing modes of a unit. The rows are, in fact, material balance rows for each product produced as a result of processing. The coefficients are the yield of the product in the mode represented by column heading. Columns can be compared to pipes in a plant through which material flows and the various rows, to taps from which products are drawn off. Tables 5 and 7 show the typical data input for two process units, FCCU and VBU. Tables 6 and 9 present the matrix generated by these tables. For example, referring to Table 5, the FCCU submodel, the column headings FCl and FC2 indicate operating modes of the FCCU. Rows VB ALC4U, VBALPOR, VBALLCN, VBALMCN, VBALLCO, VBALHCO, and so forth indicate material balances for the yields of cracked LPG, light cat naphtha, medium cat naphtha, light cycle gas oil, heavy cycle gas oil, and the like, which are produced in the FCCU and disposed of somewhere else.

Getting Started With Aspen PIMS

Page

Chapter # 3

Getting Started With Aspen PIMS

Page

Chapter # 3

Getting Started With Aspen PIMS

Page

Chapter # 3 Process Unit Capacities We see that every process unit submodel has a capacity row. The various operation modes of the process have a coefficient in this row, showing capacity consumed for processing one unit of feed. Thus, referring to

Table 5 showing the FCCU submodel, row CCAPFCU (FCCU capacity), the columns named FCl and FC2 are the two operation modes of the FCCU. The sum of the column activity multiplied by the respective row coefficient of these two vectors must be equal to or less than the RHS of the CCAPFCU row. The CAP Table provides the right-hand side of this equation, which provides the maximum and minimum FCCU capacity available for processing the various feeds to the unit. Table 9 shows the format of Table "CAP." The first column is process unit name codes. Columns

Getting Started With Aspen PIMS

Page

10

Chapter # 3

"MAX" and "MIN" are maximum and minimum values of capacity of the units. These become the lower and upper bound of RHS of the matrix (Table 10) generated by capacity rows.

Product Blending
These equations ensure that the quantity of streams produced by process units are equal to the quantity of blend stock available for blending plus any loss and that going to refinery fuel. Also, the quantity of blend stock used in each product is made equal to the quantity of finished product. By convention, material or utility consumed by a process is shown as positive and material produced by a process is shown as negative. For example, if a unit consumes 100 units of a crude, that is entered in the matrix as +100, whereas if this crude unit produces 20 units of naphtha, 25 units of kerosene, 30 units of diesel, and 25 units of topped crude, all these outputs are entered in the matrix with a negative sign. Product blending data are entered in the model as a table blend mix or as the properties of blend streams. The table BLNMIX is, in fact, a blending map. The rows are the stream names and the column headings are the names of various product grades. An entry of 1 on the intersection of a

Getting Started With Aspen PIMS

Page

11

Chapter # 3

Getting Started With Aspen PIMS

Page

12

Chapter # 3

row and column indicates that the stream indicated by row name is allowed to be blended in the grade indicated by the column name. The lack of an entry at this row/column intersection implies that this blend stock is not allowed to be blended in that grade. Table BLNMIX, shows the process streams allowed into fuel oil grade 1-961. The row names are blend stocks stream code. For example, an entry of 1 under column 961, in row UKE, shows that blend stock UKE is allowed in 1-961 blending. Table 12 shows the matrix generated by this table. The matrix shows that, in row EVBL961, the following columns have an entry: BVBL961 Volume of fuel oil grade 961 blended. BUKE961 Volume of untreated kerosene blended in grade 961. BLTD961 Volume of light diesel blended in grade 961. BWGO961 Volume of wet gas oil blended in grade 961. BLVO961 Volume of LVGO blended in grade 961. BTRS961 Volume of vacuum resid blended in grade 961. BAS1961 Volume of asphalt blended in grade 961 BHCN961 Volume of heavy catalytic naphtha from FCCU blended in fuel oil. BTFC961 Volume of cutter stocks blended in fuel oil 961.

Getting Started With Aspen PIMS

Page

13

Chapter # 3

The coefficient in the column BVBL961 is +1, while the coefficients of all other columns are 1, showing that the volume of the blended 961 is equal to the sum of the volumes of the individual blend stocks, as EVBL961 is an equality row. The properties of blend streams coming from the crude and vacuum distillation units are entered in an ASSAYS table. The properties of process unit streams are entered in a number of tables called blend properties, or BLNPROP. If pooling a number of streams forms a stream, its properties are unknown. However, a first guess of its properties is required to start the optimization process. Such guessed data are also provided in a separate table.

PROPERTY PROPAGATION TO OTHER TABLES


Many LP packages have a system of property propagation from property tables to process submodels and other tables. Properties of straightrun streams are entered in either the ASSAYS or BLNPROP tables. These property data, if needed in any other table, need not be re entered, placeholders (999 or some other symbol) are put in, which are replaced with data from the relevant data table. Let us see how placeholders are resolved. Suppose the ASSAYS table contains an entry for quality QQQ in stream SSS. This can be used to resolve placeholders in column SSS with row name

Getting Started With Aspen PIMS

Page

14

Chapter # 3 xQQQabc in any submodel table. The row and column must be suitably named for placeholder resolution to occur. EXAMPLE -1 In an ASSAY table, the data SG of kerosene stream from AlN mode of CDUl is entered in row ISPGKNl as follows: AlN ISPGKNl 0.7879 These data are retrieved in a submodel table by the following entry: KNl ESPGFDP 999 KNl as entered in the ASSAYS table. By convention, a negative sign is used for streams entering a recursed pool and their properties and a positive sign for the pool produced. Placeholder resolution can occur in user-defined E-, L-, or G-type rows as well as in recursion rows. Placeholders for recursed properties are replaced by the latest value of the recursed property of a stream every time the matrix is updated.

BLENDING SPECIFICATIONS
These equations ensure that each optimal product blend meets the specifications set for it. For example, Table 13 shows a part of a product specification table, listing properties of a fuel oil grade 961. Table 14 shows the matrix generated from this table. Row XVB1961 has as columns the blend components of fuel grade 961. The column coefficients are the VBI of individual blend components (see Table 15).

SPECIALIZED RESTRICTIONS
Several equations may be included in the matrix to reflect special situations in a refinery. For example, these may be the ratio of crude processed, restricting a processing unit to a particular mode of operation, or the ratio of the two products to be produced.

STREAM POOLING (RECURSION PROCESS)


Another class of refinery operation is important and must be modeled. This is the pooling of streams. A number of streams may be pooled to

Getting Started With Aspen PIMS

Page

15

Chapter # 3

Getting Started With Aspen PIMS

Page

16

Chapter # 3

form a single stream, which may become feed to a process unit or used for blending one or more products.3 The user must supply data on the properties of the pooled stream for optimizer to reach a solution. The user, however, has a problem, because the composition of the pooled stream is not known until after the optimum solution is reached. An iterative approach (recursion) is employed. The user provides a first guess on the properties of pooled stream. The optimizer then solves the model with the estimated data in it. After solving the model, an external program recalculates the physical properties of the pooled stream, which was earlier guessed. The revised physical property data are inserted in the model, and the model is run again. The cycle continues until the delta between the input and output properties of the pooled stream are within specified tolerance limits. Recursion is, therefore, a process of solving a model, examining the optimal solution, using an external program, calculating the physical property data, updating the model using the calculated data, and solving the model again. This process is repeated until the changes in the calculated data are within the specified tolerance. Page The structure for pooling a number of LVGO streams into a LVGO pool is shown in Table 16. The first recursion row is RBALLVO, which pools all streams into a LVO pool. By convention, the

Getting Started With Aspen PIMS

17

Chapter # 3 streams entering the pool have a negative sign and the stream produced by pooling has a positive sign. The name of this row is always RBALxxx, where xxx is the pool tag. The next few rows have names starting with Rxxx; for example, RSPGxxx (specific gravity of the recursed stream), RSULxxx (the sulfur of the recursed stream), and RVBIxxx (the viscosity index of the recursed stream). The properties (specific gravity, sulfur, VBI index, etc.) of the individual streams are known and provided in the model. The properties of the pooled stream are not known; however, a guess is provided in a separate PGUESS table, whose format follows:

These PGUESS entries replace the placeholders (999) under column LVO and the first cycle of solving the matrix begins. Suppose, after the model is solved based on these properties of the LVO pool, the activities of the vectors in the pooling model are as follows: WIl = 0 W21=0 W31 = 0 L15 = 0 L25 = 0 L26 = 6.1380 MI4 = 10.9150

Getting Started With Aspen PIMS

Page

Substituting these values in row RSPGLVO gives

18

Chapter # 3

The model is next run with these pool properties and the pool properties recalculated, based on new activities of the vectors. If the recalculated pool properties are unchanged or within the tolerance a limit of the earlier values, the recursion process is stopped and the solution is said to have converged.

DISTRIBUTIVE RECURSION
In the simple recursion process, the difference between the user's guess and the optimum solved value is calculated in an external program, updated, and resolved. The distributive recursion model moves the error calculation procedure from outside the linear program to the LP matrix itself. With this arrangement, the optimum that is reached has the physical property data for all recursed streams exactly matching the composition of the pool used to create those properties. After the current matrix is solved, using the initial physical property estimates or guesses, the new values are computed and inserted into the matrix for another LP solution. The major difference between distributive recursion and normal recursion is the handling of the difference between the actual solution and the guess. This difference is referred to as an error. When a user guesses at the recursed property of a pooled stream, the "error" is created because the user guess is always incorrect. The distributive part of the distributive recursion is that this error is distributed to where the quality is being used. A pooled stream can go to a number of product grades or become feed to a process unit. The error vector is distributed wherever the pooled stream property is used. In other words, it can be said that the pooled stream properties are represented by two vectors, one is the initial guess of the property and the second is the error or correction vector that seeks to bring the property in line with property computed from the composition of the blend. EXAMPLE 13-2 Consider three catalytic reformate streams, R90, R95, and R98, from a catalytic reformer. The reformate streams are pooled into a single stream, SPL. The pooled reformate stream is used for blending three gasoline grades: 1-390,1-395, and 1-397 (see Figure 1). All three gasoline grades are blended from following blend components: BUT Butane LSR Light Naphtha LCN Light Cat Naphtha SPL Pooled reformate stream And, the pooled reformate stream is
Getting Started With Aspen PIMS

Page

19

Chapter # 3

To start with, the recurse process, an initial guess, is made as to the RON of the pooled stream. Let us assume it is 94 as shown in the matrix, in row RRONSPL. Now, an error vector, RRONSPL, is introduced in the matrix to absorb any error made in estimating the RON of the pooled octane (i.e., 94).

Let us assume that activity of columns R90, R95, and R98 are 5, 3, and 2, respectively, and calculate the activity of the error vector RRONSPL.

By column arithmetic, the activity of the error vector RRONSPL is computed at 9. This error is distributed in all the grades where the pooled stream is used. To start the distributive recursion process, a guess is made as to the distribution of the error in the three gasoline grades as follows: 1-390 50% 1-395 30% 1-397 20% We consider the blending and octane balance of all these three gasoline grades. For 1-390,

Getting Started With Aspen PIMS

Page

20

Chapter # 3

Since 1-390 gasoline happens to be one of the gasoline grades where pooled reformate stream SPL is being disposed of, we use the guessed value of its octane number for computing the RON of the 1-390 blend. Also, a part of the error vector, RRONSPL (50%), is also included in this row. This error vector is designed to correct the error in guessing the octane number of SPL, and this aids in faster convergence of the solution to the optimum solution. The matrix structures for 1-395 and 1397 blending are similar, except for proportion of error vector included, which would be equal to the assumed distribution of the error vector. For the RON of 1-395,

The matrix representation of the pooled stream, if it becomes feed to another process unit, is discussed under delta-based modeling.

OBJECTIVE FUNCTION
The matrix picture discussed so far is not a complete LP model. To drive the optimization process, an extra row, called the objective function,is needed. The optimization process either minimizes or maximizes this function, depending on whether the function represents the refinery operating cost or profit. All cost vectors must have an entry in the objective function row. The coefficients in this row are the costs per unit of product produced. The cost of crude and other feeds, such as natural gas, or utilities are entered with a negative coefficient if the objective function represents overall profit to the refinery. The unit cost data, which become the coefficients of the variables in the objective function row, are retrieved from following data tables of the model: the BUY table for crude and other feedstock prices, the SELL table for all product prices, or the UTILBUY (utility buy) table for all utilities, such as refinery fuel, electricity, cooling water, catalyst, and chemical costs.

Getting Started With Aspen PIMS

Page

21

Chapter # 3

OPTIMIZATION STEP
The simplex procedure for optimizing a set of linear equations was originally introduced in 1946 by Danzig4 of the Rand Corporation (USA). It did not become really popular until it was computerized in 1950s. In essence, the procedure is to first find a solution, any solution, that satisfies all the simultaneous equations. This may be as simple as assigning 0 to all unknowns, although this, by no means, assures a valid solution. Usually, it is best to start with a previous solution to a similar problem. Then, the activity of each matrix column or unknown is examined and the one is selected that yields the largest profit or, if no revenues are shown, the minimum cost per unit of use. Next, each row is examined to determine which equation restricts the use of this activity to the smallest value before the other activities in the equation are forced to go negative. For example, in the equation x + 2y = 10, x restricts the activity of y to equal to or less than 5. Otherwise, x has to take a negative value to satisfy the equation. The activity for the most restrictive equation is solved (y = 5 JC/2), and the solution substituted in all other equations containing this activity, including the objective function. In fact, this activity has been made part of the solution, or in the LP jargon, "brought into the basis." The matrix element or coefficients are modified, and the procedure is repeated. When selection of any activity reduces profit or increases cost, as indicated by negative coefficient in the modified objective function, the procedure is concluded.

SOLUTION CONVERGENCE
Remember that properties of all pooled streams are assumed or guessed to start the optimization process. After the first cycle, the optimum activities of all columns or variables are known, the properties of all blend streams are again computed, and the matrix reoptimized. This process is repeated until there are no changes in the input and output properties of the streams. The optimized matrix is next sent to the "report writer," which prints a report in a preset format using matrix data (see Figure 2).

INTERPRETING THE SOLUTION


The output from the optimizer is in the form of an unscrambled report, which is a listing by rows, then by columns, in the same order as the input

Getting Started With Aspen PIMS

Page

22

Chapter # 3 in the original matrix. The basis is the collection of activities in the matrix, which are a part of the solution. ROWS The output for each row gives the row number and the row name supplied by the user. The abbreviations used in the rows are: BS. "Basis" is an indication that, in the final solution, this row is not limited to its upper or lower limit. LL. "Lower limit" is an indication that the final solution is limited at a lower level by a lower bound established by this row. UL. "Upper limit" is an indication that the final solution is limited at an upper level by an upper bound established by this row. EQ. "Equal" means that the final solution is restrained to a fixed right hand side. Such rows show upper and lower bounds that are identical. Activity This is the value of the left-hand side of the equation that the row represents, with values of the equation unknown supplied from final solution. For the objective function, activity is the maximum profit or minimum cost. Slack Activity This is the difference between upper (or lower) limits and the row activity just described. Values for slack activities are given only for rows that have "BS" status. Lower Limit This is the value given to the right-hand side in the original matrix that left-hand side must be greater than or equal to. Upper Limit This is the value given to the right-hand side in the original matrix that left-hand side must be less than or equal to. Dual Activity This is also known as marginal cost, shadow price, or pi value. The pi value represents the rate of change of the objective function as the right-hand side of the row is increased. It is the total change in maximum profit or total minimum cost due to relaxing the upper or lower limit of a row by one unit. For example, if it is a crude availability row, it reflects the value of an incremental barrel of crude refined. It has nonzero value only if the limit is constraining. Runs that have the status of BS in the optimum solution show no dual activity. Marginal values are valid only over a small range around the optimal solution and should be used with caution. COLUMNS The output for each column gives Column number. The column number starting from wherever the row numbers leave off. Column name. Column names may be supplied by user or generated by matrix generation programs from input data tables.

Getting Started With Aspen PIMS

Page

23

Chapter # 3 Activity. This is the value of a variable in the final solution. Some variables in the basis may have no activity at all. Variables with zero activity may be in the basis because a certain number of variables (equal to the number of rows) are required to be in the basis by the nature of LP method. Input costs. These are the coefficients found in the objective function row selected for optimization, and they allow total cost and revenues to be accounted for in the objective function row. Lower limit. This is the lower limit (called lower bound) that value of an activity can have. Upper limit. This is the upper limit (called upper bound) that value of an activity can have. Reduced cost. This is also known as the D-J or Delta-J value. It is a reduction in net profit or increase in minimum cost, if an activity, not in the basis, is brought into the basis and given the value of 1. This is cost of using an activity that is not part of optimal solution. All reduced costs are zero or positive in an optimal solution.

REPORT WRITER PROGRAMS


The Report Writer Program retrieves data from the unscrambled solution and rearranges them in a more user-friendly format using a special programming language. A typical refinery LP solution may present the matrix solution report in the following format: 1. A summary report, showing an overall refinery material balance, starting with crude and other inputs; the overall production slate; and the refinery profit from operation or an economic summary. 2. The material balance of all refinery units. 3. A product blending report, showing the blend composition and properties of all blended product grades.

DELTA-BASED MODELING
Delta-based modeling (DBM) is a technique used to predict the yields and properties of the process units, when the yields and the properties are a function of the feed quality. In many situations, the feed is a pool of streams whose composition must be determined by the optimization process itself. Delta-based modeling is especially useful in these situations when combined with distributive recursion techniques. To implement the DBM, a feed quality parameter is defined that can be measured easily and related to the yield of the unit. For example, the yield of reformate is known to be a function of naphthene plus aromatic (N + A) content of the feed. Suppose the base case reformer yields are defined for a feed with an (N + A) content of 30. In most LP applications, the feed is a pool of streams whose composition must be determined by the optimization process. Therefore, the properties of the feed to the unit are unknown. After pooling various cat reformer feed streams, if the model computes the reformer feed at (N + A) content at 45, a yield correction vector corrects the base yields to correspond to a feed with an (N + A) content of 45. EXAMPLE 13-3 Consider the following cat cracker model (FCCU Table):

Getting Started With Aspen PIMS

Page

24

Chapter # 3

The activity of the column SFCUCFP is made equal to the total feed to the cat cracker unit by user-defined equality row ECGHFCU. The cat cracker feed pool is formed in another submodel and has only one disposition, which is the cat cracker unit. Thus, if the activity of the column SFCUCFP is lOmbpcd, the activity of the column SFCUBAS is also made equal to lOmbpcd, as they are driven by the row ECHGFCU as follows: SFCUBAS 1 SFCUCFP -1

ECHGFCU

=0

The base yield of the FCCU is determined for a sulfur content of 0.284% by weight. The FCCU feed pool is formed by combining a number of streams. Suppose, by the recursion process, the sulfur content of FCCU feed pool (SFCUCFP) is found to be 2.986%. In this case, the base case yields (FCUBAS) are corrected by a correction vector SFCUSUF. The numbers in this column are adjusted to the yield of FCCU for a 1% change in the sulfur content of the feed. The activity of this column is determined by the row EFCUSUF, as follows:

Getting Started With Aspen PIMS

Page

25

Chapter # 3

The base yields were derived for a sulfur content of 0.284 wt %. As the sulfur content of the FCCU feed was 2.986 wt %, the shift vector SFCUSUF adjusted the base yield to that for a sulfur content of 2.986%. Therefore, we see that the yields of all products from the FCCU are changed as follows:

Getting Started With Aspen PIMS

Page

26

Chapter # 3 It is possible for the model to have more than one shift vector. This model structure is similar to the one discussed earlier, as shown in the following example.

EXAMPLE 13-4 Let us consider a delta-based model segment with two shift vectors instead of one:

Here, the first shift vector corrects the base case yields for different sulfur content of the feed, while the second shift vector modifies the base case yields for inclusion of 5.0% residuum in the FCCU feed. It is implied that the feed pool resid content is computed elsewhere by recursion of pooling streams and treats resid content as a property of the feed. DATA FOR DELTA-BASED MODELS The data used in the delta-based model must be developed by the user to reflect the parameters and their effect on the process yield. In the context of the refinery streams, only streams properties that are generally measured can be considered. For example, the cat reformer yield can be related to the naphthene plus aromatic content of the feed if the refinery has reference data to correlate the cat reformer yield at a given severity vs. (naphthene plus aromatic) content of the feed. Care has to be taken that the shift vectors do not extrapolate data beyond the range for which these were developed. Also, as the shift vectors can take either positive or negative values, these should be declared free in the BOUND section of the LP model. ATMOSPHERIC CRUDE DISTILLATION AND VDU MODELING LP models for crude and vacuum distillation can be constructed exactly in the same manner as done in the case of other process unit submodels. Most refineries may have more than one crude unit and may be processing more than one crude oil. Also, a crude unit may operate in more than one mode; for example, one crude unit mode may maximize the production of naphtha and another may maximize the production of kerosene. It is, therefore, convenient to enter all data on yields and properties of the various cuts from different crude oils and crude and vacuum distillation units present and their utility consumption, pooling of various cuts from crude and vacuum units in three tables for easy updating. ASSAYS TABLE Data in the form of yields of various crude on different CDUs and properties of cut produced is entered in a single table, the Assay Table (Table 17). This table does not directly generate any Page

Getting Started With Aspen PIMS

27

Chapter # 3 matrix but only provides data for crude and vacuum units modeling. The yields in the Assay Table could be either in volume or weight units. The column names in the table are three character operation modes5 of various crude columns. There are four types of rows in this table. The first set of rows is used to provide cut yields. The row names are VBALxxx, WBALxxx, or DBAL.xxx. VBAL and WBAL indicate a volume or weight basis yield. The tag xxx is the name of the cut produced from the distillation. The DBAL row defines a cut being produced not on the crude distillation unit but from a downstream unit. Examples of such cuts in the refinery are numerous. For example, a crude distillation column may produce a broad cut containing naphtha and some kerosene. This cut is further fractionated into naphtha and kerosene in a downstream naphtha fractionation column. In this case, as naphtha is not being actually produced on the crude column but somewhere else, it will be represented in the Assay Table by the DBAL row instead of the VBAL row. The second set of rows may be used to specify atmospheric or vacuum unit utility consumption that is crude specific. The row name for this set is in the form of UATMxxx or UVACxxx, where xxx is the utility consumed. A third set of rows may be used to specify atmospheric or vacuum unit capacity consumption values that are crude specific. The row name for this set is CCAPATM or CCAPVAC, and the entries for each crude are the units of capacity consumed per unit charged to the atmospheric and vacuum towers. The fourth set of rows is used to provide cut properties. The row names for this set are Ipppxxx where ppp is the property (SPG, SUL, API, etc.) and xxx is the cut name. The first letter, I, indicates that this is property data. The second through fourth characters of the row name identify the property, while the final three characters identify the process stream to which this property applies: ISPGLNl Specific gravity of LNl. ISULW26 Sulfur content of cut W26. IVBIL26 Viscosity blend index of cut L26. The coefficients in the I rows are the values of the specific property of a specified stream. I rows do not themselves appear in the matrix. The LP model uses this data by multiplying, for example, ISPGLNl, with volumes in row VBALLNl and placing the result in recursion row RSPGLNl for computing the specific gravity of a blend of streams.

Getting Started With Aspen PIMS

Page

28

Chapter # 3

Getting Started With Aspen PIMS

Page

29

Chapter # 3

Getting Started With Aspen PIMS

Page

30

Chapter # 3

Getting Started With Aspen PIMS

Page

31

Chapter # 3

Getting Started With Aspen PIMS

Page

32

Chapter # 3

Getting Started With Aspen PIMS

Page

33

Chapter # 3 The fifth set of rows is used to represent CDUs capacities. There are some other rows in this set, starting with E, L, or G, showing that it is equal to, less than, or greater to that row. These are control rows. The row names in this set are seven characters long and span all crude unit submodels. CRDDISTL TABLE This table is used by the model to define the structure of a number of theoretical or logical crude distillation submodels. Each logical crude unit may be considered one of many modes of operation of a crude unit. This table provides mapping between the Assays Table data and these logical crude units. Table 18 is an example of this table. The column names are three character tags for various operation modes of a crude units. Where individual crudes are being segregated, it may be convenient to use crude tags as logical unit tags, but this is not a requirement. The rows of this table are divided into four sets. The first set comprises row names ATMTWR and VACTWR. The entries in these rows are integer values indicating which physical crude distillation towers are used by various logical crude units. The second set of rows are ESTxxx, where xxx is the crude tag. The entries in these rows define the estimated charge of each crude to each logical crude unit. These estimates need not be accurate. The charge estimates are either on a weight or volume basis, depending on how crude assay data are entered. Thus, if the crude assay data are on a volume basis, entries in this table should be in volume units. The LP model uses these data to calculate the properties of straight-run cuts from a predefined mix of crude. The next set of rows in this table are named ATMuuu and VACuuu and these define the consumption of utilities (fuel, steam, electricity, cooling water etc) in atmospheric and vacuum units for each of logical crude units. CRDCUTS TABLE The CRDCUTS Table defines the crude distillation cutting scheme used in the model. The row names are the three-character stream tags of the straight-run distillation cuts (see Table 19). The column TYPE is used to identify the type of cut, and each cut must be allocated one of the following numbers: Generally the vendor supplied LP packages have an in-built mechanism to generate an Atmospheric Distillation Unit sub model

Getting Started With Aspen PIMS

Page

34

Chapter # 3

using data supplied by user in tables Assay, CRDDISTL, and CRDCUTS. The type of cut naming convention used in the LP package must be used. The cut type or number used here (0, 1, 2, 3, 9) are as per PIMS LP Package.

Getting Started With Aspen PIMS

Page

35

Chapter # 3

Getting Started With Aspen PIMS

Page

36

Chapter # 3

0. This indicates that cut yield is identified in the assay data, but this cut is produced by downstream separation, in a saturated gas plant and not on a crude unit. 1. This indicates that this a straight-run atmospheric cut.

2. This indicates that it is atmospheric residuum, which may be used elsewhere or fractionated in a vacuum unit. If an atmospheric resid is always directed to a vacuum unit, it is omitted from the cutting scheme in this table. 3 . This indicates that it is a straight-run vacuum cut. 9. This indicates it is a deferred cut that is not produced on a crude distillation unit but in a downstream unit. The other column names in this table are the three-character tags for the logical crude units and must exactly match the column names of the CRDDISTL Table. The entry at each intersection is the pool number to which the cut from each logical crude unit is directed. For example, if this table contains a cut ABC, this stream yields streams ABC in pool 1, AB2 in pool 2, and AB3 in pool 3. Thus, when a stream is segregated, the model automatically constructs additional stream tags to identify the segregated stream. The third character in the stream tag is replaced with a pool number for pool 2 onward. SCRD TABLE The SCRD Table (Table 13-20) gives the disposition of crudes processed by the refinery to various crude distillation units. But only those crudes with nonblank entries in the material balance rows for crudes are available as potential feed to that logical crude unit. Therefore, if a crude is omitted from the logical crude unit, it will not be processed on that unit. Thus, Table 13-20 shows that crude ABP (Arab light) is processed on crude units 3, 4, and 5, while crude BAH (Bahrain crude)

Getting Started With Aspen PIMS

Page

37

Chapter # 3 is processed only on crude units 1 and 2. Tables 17 to 20 contain all the data on the crudes processed, their disposition, yield and properties, data on the physical atmospheric and vacuum distillation units present, their mode of operation, unit capacities, and utility consumption. The primary cuts from various crude units are pooled or segregated as per pooling map in the CRDCUTS Table. Thus, all refinery atmospheric distillation data is maintained in these tables. The CDU models are automatically generated from them by the LP package. CDU SUBMODEL STRUCTURE It may be useful to review exactly how a matrix generator program processes data in the Assay Table to produce material and property balances for CDU streams. The Assay Table differs from other tables in that it is not included in the matrix but is used by the program to build one or more CDU tables, which are included in the matrix. The name of actual CDU submodel tables built by the matrix generator program is typically concocted by adding a character S (to denote submodel) before the column names of the CRDDISTL Table. Thus, if the first column in this table is LCl, the first CDU table is named SLCl (PIMS Refinery LP Package). The column names in the crude submodel tables are the operation modes of this crude distillation unit. Thus, AlN and AlK are the two operation modes of crude distillation unit SLCl while processing light Arab crude, and B IN and BIK are the two operation modes while processing Bahrain crude. In the matrix generated from this table, the column names are SLClAlN, SLClAlK, SLClBlN, and SLClBlK. The row names would be identical to the table CRDCUTS row names; for example, in this case, VBALGAl9VBALC41, VBALLSl, and so on. The coefficients at row/column intersections are the yields of various cuts of data entered in the Assay Table. The atmospheric residuum from crude units becomes feed to VDUs. To avoid unnecessary multiplicity of streams, only one atmospheric

Getting Started With Aspen PIMS

Page

38

Chapter # 3 resid stream is produced from the operation of one crude distillation column, irrespective of number of crudes processed there or the number of operation modes of the CDUs. This is done by pooling the various resid streams from different modes of a crude column, as shown next for crude distillation column 1 (SLCl). Also the yield and properties of streams produced from the vacuum distillation of this resid are determined here, as these properties depend on the properties of the composite resid stream generated here, even though the vacuum distillation streams are not produced here. A part of Table SLCl follows, presenting pooling of resids from various operation modes of crude distillation column SLCl:

The properties of the pooled stream ARl are calculated next. For example, consider the specific gravity of the pooled resid stream ARl. This stream is generated by pooling volumes in the VBALARl row. Row RBALARl, which has the same coefficients as row VBALARl, represents how many barrels of resids from each operation mode of SLCl are used to form the pool. The specific gravity of individual cuts is given by row ISPGARl in the Assay Table. Row RSPGARl coefficients are formed by multiplying coefficients in row ISPGARl with the coefficient in row RBALARl. For example, the coefficient of row RSPGARl in column AlN is the product of 0.9463*-0.5224, or 0.4943. The activity of this row is the sum of SG*barrels for the pooled stream. The SG of the composite stream can be calculated by dividing the row activity of RSPGARl by the row activity of RBALARl, if column activities are known. Other properties of the composite streams can similarly be calculated. It may be noted that, even though the rows VBALARl and RBALARl exhibit the same coefficients in the SLCl Table, there is an important distinction between them. VBALARl is a material balance row, representing the actual physical production of atmospheric residue. RBALARl, on the other hand, is a property balance row, which provides the denominator for computation of the average specific gravity of the pooled resid.

Getting Started With Aspen PIMS

Page

39

Chapter # 3 DBAL Rows (Deferred Cuts) In the Assays Table, the yields for all atmospheric cuts, such as LPG, light naphtha, kerosene, or diesel, are represented by entries in VBAL rows; for example, VBALLSl for LSR, VBALKNl for kerosene yield, and VBALARl for atmospheric resid streams. This is because these streams are produced directly from CDUs and their volumes as well as properties are determined in the CDUs. On the other hand, the vacuum product streams (LVGO, HVGO,V. RESID) and certain other streams, which are not produced on the CDU, are represented by DBALxxx type rows; for example, DBALWl 1, DBALLIl, and DBALHIl represent WGO, LVGO, and HVGO streams from VDUl from the distillation of atmospheric resid from the CDUl. The presence of these deferred products in the Assays Table reflects the fact that their properties depend on the crude mix and CDU fractionation. That they are represented by DBAL and not VBAL rows reflects that the option of exactly what volume of each stream is to be actually produced lies with the vacuum distillation units. In the Assays Table the properties of the various atmospheric cuts and deferred cuts are represented by the suffix I: ISPGLl 1 Specific gravity of DGO. ISULLIl Sulfur of DGO. IVBILl 1 Viscosity blending index of DGO. Consider distillate gas oil stream DGO, produced from VDU 1. This stream has no VBAL rows in the Assays Table. To calculate the specific gravity of a blend of streams, the LP multiplies the RBALLIl row with ISPGLl 1 rows and again the resulting "gravity*barrels" are placed in row RSPGLIl. Row RBALLIl has the same coefficients as row DBALARl, representing how many barrels of DGO distillate from each operation mode of SLCl are used to form the pool. RBALxxx is used as the denominator to calculate the average stream property. The numerator is provided by the activity of row RSPGLIl.

VDU Yield as a Property of Vacuum Resids In the Assay Table, there is a group of rows with special significance. This group of I rows specify a special set of properties of the atmospheric resid streams. These represent the yield of various products in the VDU from distillation of the atmospheric resids, for example, the following rows:

Getting Started With Aspen PIMS

Page

ILIlARl Yield of DGO from atmospheric resid ARl on VDUl.

40

IWl IARl Yield of WGO from atmospheric resid ARl on VDUl.

Chapter # 3 IVIlARl Yield of V. RESID from atmospheric resid ARl on VDUl. Although treated as properties in the Assays Table, these are the yields of products from the vacuum distillation of atmospheric resid streams, called the pseudoproperties of atmospheric resid because they are presented as similar to the properties of the atmospheric resid in I-type rows. Consider a portion of the Assays Table data for processing of Arab and Bahrain crudes on CDUl. The following data present potential yields and properties of various vacuum distillation cuts from processing atmospheric resids produced from various operation modes of atmospheric crude distillation column CDUl, on vacuum distillation column VDU6:

In this table, W26 = wet gas oil from distillation of CDUl atmospheric resid on VDU6. L26 = LVGO from distillation of CDUl atmospheric resid on 6VDU6. H26 = HVGO from distillation of CDUl atmospheric resid on 6VDU6. V26 = vacuum resid from distillation of CDUl atmospheric resid on VDU6. The yields of vacuum cuts are presented by DBAL rows instead of VBAL rows, indicating that these cuts are not produced on the crude column and the yields indicate only the potential yield of cuts from the vacuum column. The second set of rows IW26AR1, IL26AR1, IH26AR1, and IV26AR1 are the potential yields of WGO, LVGO, HVGO, and vacuum resid on the atmospheric resid feed (not on the crude) by the distillation of CDUl atmospheric resids on VDU6. Here, VDU6 yields of various cuts from processing CDUl resid are indicated as a property of the feed resid. Rows ISPGW26, ISPGL26, and the like indicate the properties of cuts (WGO, LVGO) from VDU6. Referring to these Assays Table data, the following structure determines the yield of

Getting Started With Aspen PIMS

Page

41

Chapter # 3 various vacuum cuts from a vacuum column; for example, VDU6 from a resid coming from mix of crudes processed on CDUl:

Here, the coefficients in row RW26AR1 represent the yield of wet gas oil (WGO) from VDU6. The coefficient in column AlN in this row is obtained by multiplying the corresponding coefficients in row RBALARl and row IW26AR1 (-0.5224 x 0.0040 = -0.0020). Similarly, the coefficient in row RV26AR1, column AlN is formed as a product of corresponding coefficients in RBALARl and IV26AR1 (-0.5224 x 0.3256 = -0.1701). The overall yields of vacuum cuts W26 (WGO), L26 (LVGO), H26 (HVGO), and V26 (vacuum resid) from the distillation of composite atmospheric resid from crude unit 1 or SLCl is determined by dividing the row activity of each RW26AR1, RL26AR1, RH26AR1, and RV26AR1 by the row activity of RBALARl once the column activities are known. The 999 is a placeholder for the first guess of the yield of the vacuumproducts, required to start the recursion process. The yields of vacuum cuts determined here are transmitted to various vacuum distillation submodels for use. Properties of VDU Streams The properties of a vacuum distillation stream depends on the composition of the atmospheric resids from which the VDU stream is produced.In the LP structure that follows, the specific gravities of W26 (WGO), L26 (LVGO), H26 (HVGO), and V26 (vacuum resid) from VDU6 are determined. Here, the feed to VDU6 is atmospheric resid from crude distillation unit 1 (SLCl). Row DBALW26 gives the potential yield of WGO from different atmospheric resids from different modes of crude distillation column 1. The coefficients in row RBALW26 are identical to those in row DBALW26. The coefficient in row RSPGW26, for example, in column AlN, is formed by multiplying the coefficient in row RBALW26 with the coefficient in row ISPGW26 (-0.0020 x 0.8200 - -0.0016). The specific gravity of the WGO stream is determined by dividing the activity of row RSPGW26 by the activity of row RBALW26 once the column activities are known: Specific gravity of stream W26, wet gas oil from VDU6 processing CDUl atmospheric resid

Getting Started With Aspen PIMS

Page

42

Chapter # 3 Specific gravity of stream L26, LVGO from VDU6 processing CDUl atmospheric resid.

Specific gravity of stream H26, HVGO from VDU6 processing CDUl atmospheric resid.

Specific gravity of stream V26, vacuum resid from VDU6 processing CDUl atmospheric resid.

Other properties (sulfur, viscosity blend index, pour index) of various vacuum cuts are determined in an identical manner. We see that both the properties and potential yields of vacuum cuts are determined in an atmospheric crude distillation model, where the feed to vacuum distillation unit originates and relative ratios of various crudes or their operating modes of CDU are available. The yield and property data of vacuum cuts can be retrieved in VDU submodels to give the proper yield of the vacuum stream from each atmospheric resid charged to a given vacuum unit. The advantage of modeling vacuum yields as pseudoproperties of atmospheric resids in the Assays Table is that all vacuum unit yield data are maintained in a single table, the Assays Table. The use of pseudo properties allows the flexibility to add unlimited number of crudes to any CDU and still obtain the correct yields in VDU submodels without modifying the VDU submodels in any way. Although the use of deferred distillation rows and a number of pseudoproperty rows in the Assays Table appear to complicate the model, this additional structure in the table enormously simplifies the modeling VDUs as well as the addition of crude to the model and model maintenance in general. The advantages of deferred distillation becomes apparent in VDU submodels. VACUUM DISTILLATION UNIT MODELING In refineries in which each CDU has its own associated VDU, modeling a composite crude and vacuum unit becomes easy, and yields from the vacuum unit are treated exactly like those from CDU. However, in refineries where atmospheric residuum from a given CDU can go to a number of VDUs, one cannot treat CDUs and VDUs as a single combination, since one does not know in advance in which VDU a given atmospheric residue will be processed nor which set of vacuum streams will be produced. Consider the following VDU6 model. Here, the feed is ARl, the atmospheric resid from CDUl. The product streams are W62 Wet gas oil.

Getting Started With Aspen PIMS

Page

43

Chapter # 3 L62 LVGO. H62 HVGO. V62 Vacuum resid. In the SVD6 Table,

Getting Started With Aspen PIMS

Page

44

In rows EW26AR1, EL26AR1, EH26AR1, and EV26, the second to fourth characters match the names of pseudoproperties of ARl, which were defined in the Assays Table to represent the yields on VDU6 of WGO, LVGO, HVGO, and vacuum resid, respectively. In the SVD6 Table, these E (equality) rows all have entries of 999 in column ARl. The matrix generator program will substitute, for 999, the current yield of each vacuum product, as calculated in the Assays Table for CDUl atmospheric resid. Thus, the correct vacuum yields for a mix of crudes processed on CDUl is calculated in CDUl submodel and transmitted to VDU6 submodel in column ARl. Now, let us see how the yields transmitted into ARl are utilized. For example, consider the vacuum resid yields represented in row EV26AR1. The program will substitute for 999 in column ARl, the yield of vacuum resids from ARl. Suppose this is 0.33 or 33%. Then, -0.33 is substituted for 999. Further suppose that 1 mb (million barrels) of CDUl atmospheric resid ARl is charged to VDU6; then, the volume placed into row EV26AR1 in column ARl is as follows: 1 mb ARl x 0.33 (yield of vacuum resid) = 0.33 mb vacuum resid The negative sign denotes production. The only other entry in row EV26AR1 is a positive 1 in column V26. Since this is an equality row that must balance, column or variable V26 takes on an activity equal to the volume of vacuum resid contained in CDUl atmospheric resid charged to VDU6. The activities of the other columns W26, L26, H26 are similarly determined by these E rows. Other entries shown in column V26 are 1, representing production, in row VBALVR6 +1, representing onsumption, in row VBALV26. Therefore we are actually producing not stream V26, which is VDU6 vacuum resid derived from CDUl atmospheric resid, but VR6, the overall vacuum resid produced on VDU6 from all atmospheric resids from different CDUs. This is consistent with the physical reality of the refinery, where all atmospheric resids are processed as a mixture to produce a single set of vacuum products from a VDU.

Chapter # 3 A vacuum distillation unit may have more than atmospheric resid feed. Let us add one more resid, AR3 coming from CDU3, to the preceding structure, as shown next, this time showing only vacuum resid production:

We see that the structure in this table for AR3 is exactly parallel to that for ARl. Column V36 has activity equal to the volume of VDU6-derived vacuum resid derived from CDU3, just as the activity of column V26 represents the VDU6 vacuum resid derived from CDUl. Note that both columns V26 and V36 have entries of 1 in row VBALVR6, showing that these resids coming from different CDUs combine into a single vacuum resid stream, VR6. Columns V26 and V36 have +1 entries in material balance rows VBALV26 and VBALV36, indicating that these streams are consumed to form stream VR6. To estimate the properties of the composite vacuum resid stream, row RBALVR6 shows the components that form the stream, in the form of columns that have 1 entries in this row, that is, V26 and V36. The properties (SG, SUL, VBI, etc.) of V26 and V36 are calculated in the CDUl and CDU3 submodels and transmitted here to replace the placeholders -999. Placeholder 999, in column VR6, is the first guess of the pooled stream to start the recursion process. To summarize, the advantage of modeling vacuum distillation with deferred cuts and the stream's pseudo properties are as follows: 1. The calculation of all VDU yields and stream properties are done in the Assay Table and transmitted to the respective VDU model. The VDU models themselves contain no yield data. All data maintenance is only through the Assays Table. 2. Only one atmospheric resid stream is produced for each CDU, irrespective of the number of crudes processed in it. In the absence of deferred distillation, one atmos resid is generated for every crude. 3. For each VDU, only one set of vacuum streams is produced, rather than a separate set for each crude/CDU/VDU combination. 4. The streams produced in the model correspond much more closely to streams physically produced in the refinery. 5. All vacuum yields are specified in the Assays Table, eliminating the need to maintain vacuum yield data in VDU submodels.

SINGLE-PRODUCT LP BLENDER
Refinery blending of a cargo is done with following objectives: 1. Meet the requirement of a specific shipment with respect to volume and product specification.

Getting Started With Aspen PIMS

Page

45

Chapter # 3 2. Optimum blending; that is, there is no giveaway on product quality and minimum cost to the refinery. 3. Minimize the inventory of stocks by giving priority to reblending tank heels and other unwanted stocks. To meet these objectives, many refineries use an on-line single-product LP system. This system interfaces with the refinery's LAB system for tank test results and product specifications. The refinery on-line LAB system records, monitors, and reports on streams and product tank test results done by the refinery's laboratory, forming the database for a single-product LP blender. The on-line single-product LP blender aims to provide minimum-cost blends within user-defined volumetric and specification constraints, using a linear programming algorithm. The user does optimization of the blend on the basis of the prices of blend streams provided. The LP blender system minimizes the cost of the blend produced while meeting product specifications. For the optimization step, the prices of the blend stocks must be provided. Generally, a very low cost is assigned to stocks such as tank heels and other unwanted stocks to maximize their blending. If the objective is to minimize inventory, arbitrary prices may be used; the assumed price of a stock in this case is inversely proportional to the available inventory. The user enters only the tank numbers allowed in the blend, the target specifications, and the total blend volume required. Latest tank quality data, such as specific gravity, sulfur, or flash point, are retrieved from the LAB system, once the tank number is entered. The LP next works out the optimum blend composition that meets all given specifications. The optimum blend composition thus worked out is used for actual blending of cargoes, instead of using past experience with similar blends, manual calculations, or tedious trial and error procedures. EXAMPLE 13-5 We want to blend 100 mb of a gasoline grade with the following specifications: RON MINIMUM MON MINIMUM RVP kPa MAX RELATIVE DENSITY MIN/MAX % EVAPORATED AT 700C MINIMUM 95 83.5 62.0 0.7200/0.775 12

The blending is to be done in tank 74, which contains 8000 bbl of previously shipped gasoline cargo. Determine the most economic blend, using the available stocks. The available blending components and assumed prices are as follows:

Getting Started With Aspen PIMS

Page

46

Chapter # 3 Using a single-product blender system, the tank volume and property data are retrieved from the LAB system, which contains the latest test results done on these tanks. The user inserts only the blend component prices for optimization calculations and the total volume of the blend required. The following table is the result:

The problem is converted into an LP model as presented next. Here, T75, T77, T54, BLN, and the like are variables and their values are found subject to the following conditions. Find T75, T77, T54, T79, T72, T73, T74, BLN > 0 BLN = 100 such that T75 < 60.5 T77 < 40.0 T54 < 20.0 T79 < 15.5 T72 < 25.4 T73 < 10.3 T74 = 8.0 and the following constraints

Getting Started With Aspen PIMS

Page

and such that

47

Chapter # 3 Y = 17.5*(T75) + 17.1*(T77) + 19.0* (T54) + 26.5* (T79)+ 15.6*(T72) + 22.5*(T73) + 15.0*(T74) is minimum The blend composition and properties are found on solution of the preceding problem, as follows:

Gasoline blend properties are as follows:

Getting Started With Aspen PIMS

Page

48

Chapter # 4

Chapter # 4: Working of Simple Blending Model


Example : Build an idea what you want to do eg I want to make blend model of Furnace Oil. For excel sheet input see model tree and their deception). What I needed to do for formulating Furnace Oil Blend in Aspen PIMS. First I need to define Furnace Oil as a specification blend in Table BLEND. Then I will define constituent material in BLNMIX. Since it is a Specification Blend I need to define blend specification of Furnace Oil in table BLNSPEC. In order to meet those specification properties of constituent material will be entered in BLNREST. No optimization cant take place without the cost and price of constituent material and product respectively. Therefore BUY and SELL table are defined for this purpose. ABML is initialized to give blending formula for blending of spec. PGuess is used to guess initial value of the problem and SCALE for scaling of properties. Index table can be used instead of ABML also as shown in example 6. Following is a pictorial step of making a model (Pre requisite Excel file already created)

Getting Started with Aspen PIMS

Page

Chapter # 4

Initializing New Model

Cust omi zing the mod el for the case

Getting Started with Aspen PIMS

Page

Chapter # 4

Customizing Model Tree for the case

Getting Started with Aspen PIMS

Page

Chapter # 4

Adding the Tables required for the model Running the Case

Getting Started with Aspen PIMS

Page

Chapter # 4

Archiving the Model

Getting Started with Aspen PIMS

Page

Chapter # 5

Chapter # 5: Building a Fuel Refinery Model


Building a fuel refinery model in aspen PIMS is not a difficult task. What you need is data and good knowledge of refinery processing. In order to develop fuel refinery model make a sequence of flow of model. Before starting I must tell you this model is for example purpose to show how you develop model. This model doesnt reflect any real refinery model and all its value is imaginary and fake. Refinery Process: In our case there are two different distillation units of capacities 52000 bbls and 12500 bbl. The first unit has two mode of run. One it process Arab light and other is local crude. The run sequence is such that after few days it processes certain amount of local crude. The distillation unit is followed by naptha hydrotreater and plateforamte. The products are LPG, Motor Gasoline, JP1/8, HSD and Furnace Oil. All these are blended products. Development of Model: Distillation Table: In this model, 4 tables of distillation table are used Assaylib, assay, Cruddistil and Crdcut. In Assay Lib table: 3 assays are initialized two Arab light and one local crude. The reason for two Arab light assays is different cut points and ranges at two different nit. Moreover each CD unit requires a unique assay. Where CD with Numeric value display different Crude Distillation Modes. Value 1 represents specific assay is true for specifc crude unit.
*TABLE * ROWNAMES * ASSAY1 ASSAY2 ASSAY3 ASSAYLIB TEXT Fuel Refinery Arab Light Fuel Refinery Local Crude Mode 12500 cap Distil Unit CD1 1 1 1 CD2 CD3 ***

Alternate configuration is also possible in assay lib table as follows


*TABLE * ROWNAMES * ASSAY1 ASSAY2 ASSAY3 ASSAYLIB TEXT Fuel Refinery Arab Light Fuel Refinery Local Crude Mode 12500 cap Distil Unit
st

CD1 1 1

CD2

***

But I will use 1 table in this example.

Getting Started with Aspen PIMS

Page

Chapter # 5 Next is assays tab which are generated from Hysys PIMS utility o form assay. Crude Cut table: (Description in Chp 2 of part 2)
* TABLE * * * * NC1 NC2 NC3 IC4 NC4 LN1 HN1 *WN1 NK1 KE1 KD1 DS1 HDO ATB AR1 ****END CRDCUTS Standard Crude Cutting Schemes and Pooling CD1, FR, ALC TYPE 1 1 1 1 1 1 1 1 4 1 4 1 1 1 1 CD1 1 1 1 1 1 1 1 1 1 1 1 1 CD2, FR, LOC CD2 1 1 1 1 1 2 2 2 2 2 2 2 1 1 3 CD3, FR, AL CD3 1 1 1 1 1 1 1 1 3 3 3 3 1 ***

Operating Mode -> TEXT Methane Ethane Propane Iso-Butane N-Butane Lgt Naphtha Heavy Naphtha Whole Naphtha N/K Swing Kerosene K/D Swing Diesel HDO CDU-2 Atm Bottm Atm Resid

In Crd Distill estimate charges and its utilities are defined. Note that across ATMTWR CD1 and CD2 has value 1 which means CD2 and CD1 represent one distillation unit but two different modes
* TABLE * * * * * ATMTWR * * * ESTFAL ESTARL * ESTLOC * TEXT Atm & Vac Tower Map: Physical Atm Tower Estimated Crude Charge: Fuel Refnery Arabian Light Arabian Light Fuels Crude Local Crude Utilities: 100 100 CRDDISTL Crude Distillation Map Operating Mode -> Fuels AL CD1 1 Fuels Local Crude CD2 1 Fuel AL CD3 2

***

Getting Started with Aspen PIMS

Page

100

Chapter # 5
ATMFUL ATMKWH ATMSTM ATMLPS ATMCWW ATMSWW ATMCIB ATMCST ATMST4 ATMHT5 ATMPPD ATMPPF ATMFUG *** END Fuel Oil tons Atm Twr KWH, KWH Atm Twr STM, kLBS Atm Twr STM, kLBS Atm Twr CW, GAL Atm Twr SW, GAL Corrosion Inhibitor-Kg/bbl Caustic Soda-Kg/bbl Stadis 450, Ltr/bbl High Tech 580, Ltr/bbl PPD for HSD, Kg/bbl PPD for F.Oil, Kg/bbl Fuel Gas from Reformer KSCF/BBL 0.000268 0.977777778 0.002366111 0.004081481 0.907407407 0.12962963 0.000703125 0.057671875 1.58228E-05 0.000253165 0.00026852 0.97777778 0.00236611 0.00408148 0.90740741 0.12962963 0.000703 0.05767188 1.58E-05 0.000253 0.011 0.011 0.056419 0.00049323 0.65701866 0.00145404 0.0027915 0.11209318 0.17369485 0.0007031 0.05767188 1.582E-05 0.0002532

0.056419136

Submodel tables In cap table capacities of units are defined.


* TABLE * * CAT1 CAT2 *** CNSP CNHT CPLT CDPL CLSS CFGS CAPS Process Capacities ('000) TEXT CD1 and CD2 BPD CD3 CAp BPD Naph Splitter BPD Nap.Hydrobon BPD Platformer BPD Losses Fuel Gases From Reformer

MIN 0 0 0 0 0

MAX 52 12.5 0 3.8 3.8

REPORT

Submods include list of submodel


* TABLE * * *SNSP SNHT SPLT SRFP SSK3 SSD3 SUBMODS Unit Submodel List TEXT Naphtha Splitter Naph Hydrotreater Platformer Reformer Feed Pool

***

Getting Started with Aspen PIMS

Page

Chapter # 5
SSHD SLSS SFGS

SNSP is table for naptha splitter. Note that each submodel must befin with S. Feed of submodel is written in positive value while product is written in negative. While palce holders are placed to deduce value from assays or by other means.
* TABLE * * VBALWN1 VBALLN1 VBALHN1 VBALWN2 VBALLN2 VBALHN2 VBALWN3 VBALLN3 VBALHN3 * EPLNNS1 EPHNNS1 EPLNNS2 EPHNNS2 * CCAPNSP SNSP Naphtha Splitter TEXT Whole Naphtha1 Lgt Naphtha1 Heavy Naphtha1 Whole Naphtha2 Lgt Naphtha2 Heavy Naphtha2 Whole Naphtha3 Lgt Naphtha3 Heavy Naphtha3 Pct LN1 in WN1, LV% Pct HN1 in WN1, LV% Pct LN2 in WN2, LV% Pct HN2 in WN2, LV% NSP Feed Usage, Unit

WN1 1

LN1

HN1

WN2

LN2

HN2

-1 -1 1 -1 -1

-999 -999

100 100 -999 -999 100 100

Blending Table Blend table is used in the same way as discussed in simple blending model. Supply and Demand table Supply and Demand tables are used in same way. Recursion Table: Recursion is the process of solving a model, examining the optimum solution using an external program, calculating physical property data, updating the model using the calculated data, and solving the model again. This process is repeated until the changes in the calculated data are within specified tolerances. 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. This data was 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

Getting Started with Aspen PIMS

Page

Chapter # 5 blending data was provided for each of the blend components to be used by the optimizer to blend gasoline, the user estimated most of this data. Unfortunately, much of this 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 this 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 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. Basically it distribute estimated errors into down stream. Inorder to develop this table I used a solution table generated by PIMS it self. PGuess is estimated guess values of the diffent spec of different product or feed.

Upool is user defined recursed pool. Here value 1 defines the member of recursed pool and 999 placeholder shows that here value is to be recursed. Since Plateforamte unit is typical unit which require much recursion process.
* TABLE * * R88 R90 * RRON RR54 * 90 RONC Reformate 94 RONC Reformate RON Clear 1 1 999 999 UPOOL User Defined Pools TEXT

RFT

***

Getting Started with Aspen PIMS

Page

Chapter # 5 Miscellaneous Table: Case table is used to define different scenarios. Index table is same table as defined in blending model. Pcalc is also calculating procedure for differend specs of the material.

Getting Started with Aspen PIMS

Page

S-ar putea să vă placă și