A Brief History of Oil Refining

Since its beginnings in the mid-nineteenth century, oil refining technology has evolved in a continuous process of adaptation to the demands of society, in matters as vital as the supply of energy, lighting, transportation or new materials to improve the quality of life. In that time, this has been one of the greatest examples of how the technological innovation of an industry contributes to the welfare and development of society. The objective of this manuscript is to describe the history of these technological advances and the causes that motivated them.


INTRODUCTION
Since its beginnings in the mid-nineteenth century, oil refining technology has evolved in a continuous process of adaptation to the demands of society, in matters as vital as the supply of energy, lighting, transportation and producing chemicals to improve the quality of life. In that time, this has been one of the greatest examples of how the technological innovation of an industry contributes to the welfare and development of society. 1 The objective of this manuscript is to describe the history of these technological advances and the causes that motivated them. The magnitude of the achievements obtained by the refining industry far exceed the available space, which is why in this manuscript the detailed technical description of the processes has been sacrificed and attempts have been made to expose the causes that have motivated the successive technological advances, establishing a common thread, such as the evolution of the refinery configuration over time. 2,3 CHEMICAL ENGINEERING AND OIL REFINING The purpose of a refinery is to transform crude oil into more valuable products that meet the demands of the market, both in quantity and quality, respecting safety and environmental regulations. Since the production of crude oil began in 1850, the market for petroleum products has been chang-ing continuously and drastically in some cases, forcing the refineries to modify their configurations to meet this demand. Refineries have also adapted to the growing diversity of crude oils with different compositions.
The evolution of the refineries has been deeply linked to the advances of Engineering and vice versa. In the refinery´s process units, term coined by P.H. Groggins in 1928, we can find all the examples of the unit operations as defined by Arthur D. Little in 1912. The concept of unit operations in Chemical Engineering is very much related to the development of refining technology. In 1910, the most important chemical industry in the world was in Germany, where synthetic dye companies such as the IG Farbenindustrie AG or the Haber-Bosch process for the manufacture of ammonia, were milestones in the chemical industry. However, the design of these plants was based on the product to be obtained and their equipment was designed specifically without benefiting from the exchange of experience with the manufacturing technology of other products. On the other hand, Chemical Engineering, founded by Warren K. Lewis from the Massachusetts Institute of Technology (MIT), is based on identifying and grouping common processes or unit operations. Based on this classification, a process unit is designed by choosing several unit operations seeking the highest efficiency, performance and economy. The developments in each of the unit operations are shared between the different technologies and these evolved rapidly benefiting from the common experience. Some authors have cited the use of unit operations in the American chemical industry as one of the causes of their worldwide leadership until the 1970s. In the sequel, we will describe the main milestones that have guided the evolution of the petrochemical industry and the refinery configuration evolution. 5

THE PIONEERS OF THE INDUSTRY
In the early days of the industry, fuel was the main use of crude oil, even though it had been found that the combustion of crude oil, as an energy source in oil wells, produced toxic fumes and gases that prevented its use. Then, crude oil started to be processed in oil refineries that evolved, as shown in Figures 1 and 6, from discontinuous distillation in foundry vessels that had kerosene as their major product to the highly complex refineries that we have today, which produce a multitude of different fuels and petrochemical products from a variety of different crudes.
Samuel M. Kier was the first person to distill oil. By 1845 in southwestern Pennsylvania, he verified the pres-ence of oil in the salt production facility he owned, when drilling wells to obtain salt water, a liquid with a strong odor mixed with brine appeared. In general, this was considered an inconvenience in the production process and was usually burned or poured into nearby waterways. Kier was an innovative entrepreneur and decided to use oil as fuel for the lamps that illuminated brine wells at night, despite the smoke and its bad smell. This allowed him to use the already expensive whale oil available at the time for other applications. He even bottled it and sold it for 50 cents as a medicine, establishing a commercial network for its distribution. In 1849, Kier shared oil samples with James C. Booth, a chemist in Philadelphia, and both agreed that it could be used as fuel for lighting lamps, but that it could be greatly improved if refined so that its combustion did not produce fumes and odors. In 1850, Kier began to experience different distillation processes and was the pioneer of this use of oil, by obtaining a product called "Carbon Oil" that allowed lighting in oil lamps with little smoke and odors. Kier partnered with John T. Kirpatrick and tested the first oil distillation in Pittsburgh, Pennsylvania. 6 In 1846, Semyonov and Alekseev had already produced oil in the Baku oil fields (Azerbaijan), then in 1859, Edwin L. Drake began producing oil near Titusville, Pennsylvania and the market was flooded by oil production. The first refineries were built in Europe, in 1854 Ignacy Lukasiewicz built a primitive crude oil refinery near Jasło in southern Poland, distilling kerosene from a tar sand available in the region. The first large refinery was started in 1856 near Ploiești (Romania), one of the best-known and oldest oil fields in Europe and Bucharest was the first city in the world to be lit with kerosene lamps in 1857. Also in 1859, a kerosene refinery was built on Pirallahi Island (Azerbaijan), distilling the so-called "kir" produced in the Baku oil fields near the Caspian Sea and in 1860 already 58 refineries were built in Pennsylvania. There are currently about 700 refineries in the world that can process close to 100 million barrels of oil per day. 7,8 In 1860, due to indiscriminate whaling and the near extinction of these species, the use of whale oil as fuel for lighting had become expensive. The price of whale oil was $ 1.77 per gallon and almost doubled that of crude oil, which was sold at $ 0.90 per gallon. This fact, together with the invention and improvement of the kerosene lamp in 1857 by Michael Dietz, further strengthened the supremacy of kerosene for lighting. 9 In the refineries, crude oil was distilled to produce kerosene that was used for lighting lamps. The advantage of kerosene in this case was that it did not emit smoke when burned due to the paraffinic nature of Pennsylvania crude. The heaviest parts were used as lubricants for steam engines, which were ubiquitous at that time. The lighter distillation fractions such as naphtha, propane and butane were considered to be a residue and were burned in flares since their high vapor pressure and low flash point prevented their safe storage. 10 The installation was operated in a discontinuous mode and the oil was loaded in a vessel where it was heated with gas or other crude product. This heating generated a residue inside the container and other equipment that required cleaning from time to time. The dephlagmator tower was the precursor of the distillation towers and separated the generated vapors that were sent to a separator where the gaseous fraction and the final kerosene product were separated. This product was redistilled to control its flash point and thus allowed its safe use in the lamps reducing the generation of smoke. The heavy fraction or Tar was re-distilled under vacuum, obtaining a lubricating oil and greases in addition to waxes and paraffin for candle making.
At this time, and as means for transportation were needed, both the oil and the products produced began to be transported in barrels and a standard measure that still survives emerged. A barrel of oil had 42 gallons, about 159 liters. The measure was imported from England, where a law issued by Edward IV in 1482, established 42 gallons as the standard capacity for herring barrels and to prevent scams in the fish trade. In 1866, seven years after the discovery of the first well by Colonel Drake, the Pennsylvanian producers confirmed this measure as the norm in the oil business. The discontinuous distillation system was limited in terms of capacity. As the size of the vessel increased, the ratio between the heat transfer surface and the volume of oil decreased, and therefore, it was not profitable to increase the process capacity more than a given volume of oil. A long contact time between the oil and a hot surface led to oil decomposition and the deposition of a layer of coke, which further limited direct heat transfer. It was also quite risky to subject large quantities of oil to direct heating. The maneuvers of loading the oil and emptying the residue, in addition to the cleaning of the systems, required a lot of time and effort making the entire process very inefficient. As the demand for kerosene grew, two distillation units began to be used, one for the first separation and the second to refine the quality of the kerosene, paving the road for continuous distillation. 11 In 1880, continuous distillation was introduced, the process consisted of several vessels connected to each other and heated separately at growing temperature levels. The vessels were installed so that the oil flowed by gravity from the first to the last. The product was subjected to successive distillations, the operation was adjusted by means of the "look box" through which the distilled product could be seen and depending on its color the operating conditions were adjusted to improve the separation by distillation of light and heavy naphtha and kerosene. In the last vessel the temperature was successively increased causing oil cracking to obtain more kerosene. The residue from the last vessel was used to obtain lubricants or fuel oil.
One of the drawbacks during the combustion of kerosene related to the variability of the distillation quality, was the emission of noxious odors and gases due to the presence of sulfur compounds in kerosene and gasoline. In 1885, Herman Frasch discovered that copper or lead oxides reacted with the sulfur compounds of petroleum and could be regenerated and reused, thus eliminating the problem of odors and producing sulfur. This technology started the oil treatment industry to eliminate oil contaminants. 12 In 1900, the partial condensation was introduced, which allowed a better separation of the products. A partial condenser or Dyke tower was installed between the vessel and the water-cooled condenser. The lower part of the tower was filled with stones and insulated with bricks to facilitate the condensation of heavier compounds that were subsequently sent back to the distillation vessel. The light part passed to another section where it condensed in air-cooled tubes to obtain a head product. The rest of the stream continued towards the water-cooled condenser.
Vacuum distillation was developed to solve the need to separate less volatile products, such as lubricating oils without degrading their properties due to high temperatures. The boiling point of the heaviest cut obtained by atmospheric distillation is limited by the temperature and residence time at which it begins to decompose thermally modifying the quality of the cut.
Around 1910, some of those limitations were solved when a continuous distillation process was developed by grouping several connected containers, where the products were flowing from one to another subjected to increasing temperatures to obtain a stepped vaporization of the different cuts. Heat exchange systems with cold feed oil and stirring systems were introduced that improved the process efficiency. Instead of condensers, fractionation columns were installed with internal liquid-vapor exchange systems, which, although rudimentary, improved the quality of the fractionation.
To eliminate the direct heating system of a vessel and improve the capacity and efficiency of the system, it was necessary to find a system with a high surface to volume ratio, which could be heated throughout its entire surface. This would allow faster heating while having smaller volumes of crude oil so that they could flow rapidly through the heating zone and minimize coke formation by increasing heat transfer. In 1910, Milo J. Trumble introduced a distillation process that met these requirements and is shown in Figure 2. The oil was pumped through a pipe into a furnace and the furnace outlet was directed to a tower -the evaporator -where vaporized and liquid products flowed over a series of screens. The vapors were collected in a central pipe and the hot residue transferred its heat to the cold load in a heat exchanger. In the initial design, the vapors were condensed in a single stream, later the system was modified to obtain three or more fractions. The first plant was installed in Santa Fe, California in 1911. 13 The advantages of the Trumble process meant lower operating costs due to a large increase in the energy efficiency of the process; in addition, the installation cost was also lower compared to existing systems. Furthermore, the design allowed the construction of higher capacity plants. In 1925, the initial design of the condensers was replaced by tray towers, which simplified and improved the process leading to the present distillation unit designs. The separation between the furnace and the distillation tower was the fundamental innovation to achieve efficient distillation units.

THE INTERNAL COMBUSTION ENGINE AND ITS FUELS
The demand for oil remained stable during the second half of the 19th century. In 1878 and thanks to the invention of the electric light bulb by Thomas Edison, the demand for lighting kerosene began to decline, although it remained in many places far from cities or in services such as rail transport. In 1893, Rudolf Diesel developed the Diesel engine, and in 1889 Gottlieb Daimler, Wilhelm Maybach and, independently, Karl Benz developed the internal combustion engine that has been the transportation paradigm since then. In 1901, Ransom E. Olds began the production of affordable price cars under the Oldsmobile brand. Henry Ford built his first gasoline vehicle in 1896 and founded the Ford Motor Company in 1903. In 1908, he started selling the T model for $ 950 and he revolutionized the world transport and also the oil industry. In fact, the demand did not stop growing until the Arab oil embargo of the 70´s. Beetween 1907 and 1917, 15 million Ford Model T vehicles were sold in the US, and the price dropped to $280 thanks to the reduction in the assembly line costs. This technological innovation drastically changed the oil refining industry. 14 In the first refineries, the most demanded products were kerosene and light distillates. Gasoline was a byproduct until the beginning of the 20th century, when the development of the combustion and automobile engines caused a large increase in the demand for automotive gasoline and other refinery products such as asphalt, lubricants and fuel oil.
Although the history of the asphalt dates back to the time of the Babylonians, paving tests with naturally obtained asphalts were made in the nineteenth century. It was in 1870 when Belgian chemist Edmund J. DeSmedt paved the Avenue of Pennsylvania in Washington DC with a mixture of asphalt. Then, in a short time the first patents for asphalt road blends were filed. In 1901, the Warren brothers built the first modern asphalt factory in Massachusetts. As a result of the success of the car industry, by 1908 all the roads necessary for the circulation of cars were paved with asphalt, thus adding another product of great demand to the oil industry. These technological advances doubled the demand for asphalt every decade from 1880 until the oil crisis in 1973.
Another important milestone was the change from coal to fuel oil as marine fuel. In 1911, Winston Churchill was appointed First Lord of the Admiralty and with the collaboration of Admiral John Fisher decided to change the fuel of British Navy ships from coal to fuel oil, the heaviest and most abundant fraction of oil. This fact was justified by the easier handling due to its liquid state and the greater calorific value of the fuel, which allowed the boats navigate faster. At the time, it was a hotly debated decision because Britain produced large quantities of coal and also due to the complicated logistics of the world's fuel oil supply, but given its technical advantages, fuel oil was quickly adopted as the preferred marine fuel. 15

THE CONVERSION INCREASE
The rise of transport vehicles based on internal combustion engines created a new challenge for the oil industry. At the beginning of the 20th century, the proportion of products obtained by distillation did not match the market demand. The automobile industry and later on the aviation industry improved their engine designs to increase power, which led to the need for higher quality fuels able to maintain higher compression ratios in the engines.
The introduction of the internal combustion engine and the decrease in vehicle prices increased the demand for oil and especially for gasoline, compared to the traditional kerosene market. Improving the distillation of oil was not enough to meet the demand and in response, the refining industry developed conversion processes to obtain more gasoline and reduce the proportion of heavy products while improving its quality. Adjusting to market demand and producing higher quality fuel and products have been the factors that have guided many of the innovations in oil refining technology, some of these process development dates are shown in Table 1.
Indeed, a key conversion process to meet the demand of gasoline has been oil cracking, first thermal and later catalytic. There are already references in 1850 and since 1860 to using thermal cracking of hydrocarbons for the production of kerosene. Initially, thermal cracking was carried out at atmospheric pressure at which the kerosene yield was high. The process consisted basically on heating a vessel with oil until all the kerosene had been produced and the overhead product had a dark color. At that point, the distillation was stopped and the heating of the vessel was maintained to favor the thermal cracking reactions that produced lighter products of lower molecular weight. After a certain operation time that was empirically fixed, distillation was resumed by extracting cracked light products. This practice increased the kerosene yield, but did not produce gasoline in large quantities. In 1889, two English chemists, J. Dewar and B. Redwood, registered a patent on cracking carried out at pressures greater than atmospheric. When the pressure was raised, the selectivity of the process changed and much more gasoline than kerosene was produced. In pressure cracking, the oil was heated to about 425 °C in specially reinforced vessels to operate at pressures of about 7 kg/cm 2 for 24 hours. Then, the distillation of the cracked product began and low molecular weight compounds were obtained. Those compounds were treated with sulfuric acid to remove the gums and residues formed by the generation of olefins and diolefins and then redistilled to produce gasoline and a residual fuel oil. 16 The first process that innovated the technology to increase the conversion of the refineries, was the thermal cracking patented in 1912 by William Burton and Rob-ert Humphreys. The Burton-Humphreys process doubled the gasoline production of a refinery and prevented fuel shortages during World War I. W.M. Burton, who was responsible for one of the Standard Oil Company refineries, had the idea of cracking only the fraction called diesel instead of the whole oil fraction with boiling points higher than kerosene. Depending on the crude oil treated, diesel constitutes 30 to 50% of the total volume. This change together with improvements in the design of the cracking installation made by R.M. Humphreys in 1910, allowed the first thermal cracking unit in Indiana Standard to be successfully launched in 1913. 17 The Burton process operated discontinuously at a temperature of 425 °C and 5 to 7 kg/cm 2 , the cracking vessel had to be stopped every day and the residue was cleaned out. The process was successful but from 1914 to 1922 a series of continuous cracking technologies were developed that significantly improved the process. In these technologies the diesel was pumped and heated to the operating temperature, it was maintained under these conditions and then the cracked products were sent to a distillation unit where they were separated into gases, gasoline, diesel and a residue often known as tar. Gasoline from thermal cracking had a higher octane number so it worked much better in combustion engines than the gasoline produced by direct distillation.
In 1914, Jesse Dubbs and J. Ogden Armor founded the National Hydrocarbon Company, which would later be the Universal Oil Products (UOP). The UOP would grow to be the largest technology licensor for petroleum refining and petrochemicals. In 1919, UOP commercialized the Dubbs process, which solved some of the technical problems of the Burton-Humphreys process. The Dubbs process generated fewer coke deposits, treated heavier crudes and had longer operating cycles. The Dubbs process developed by the UOP, meant an advance in thermal cracking technology and its use was competitively extended until the forties. In this case, the feedstock was crude oil with the light fractions removed. The feedstock was preheated with the reaction products, sent to an oven and from there to a reaction chamber. The biggest advance of the Dubbs process was to recirculate the cracked stream from the fractionation section to the reaction section; this allowed a finer control of the reaction and stabilized the process. 18,19 The "Tube and Tank" process introduced a significant advance by adding the concept of the cracking reactor. In this process, diesel preheated by heat exchange with the reaction products, was pumped into a furnace where cracking was carried out. The outlet was sent to a reaction chamber (Soaker), where it was kept at the temperature and reaction pressure for a certain time until the cracking reactions were completed. The reaction products then entered a low pressure separator where all the products were vaporized except for the residue. The vapors left the separator at the top and were distilled to obtain gases, gasoline and gas-oil. The residue from the bottom of the separator was extracted for use as asphalt or fuel oil. With the exception of a lower operating temperature, the "Tube and Tank" process can be considered a precursor to the current delayed coking units. 20 In 1919, the UOP sued the Standard Oil Company for the thermal cracking patent since they considered that Dubbs had preference over the Burton process. Dubbs filed a patent in 1909 on the manufacture of asphalts that included the production of gasoline through an operation similar to thermal cracking. This lawsuit, which ended in 1931 with an adverse result for the UOP, placed the company in a difficult situation and gave rise to a company model of great importance for refining technology. In this way, a licensing company, whose maximum exponent was the UOP itself, had its own research, development and engineering resources to market processes that were sold to those refining companies who did not have R&D departments and were, therefore, at a disadvantage with large companies such as Standard Oil that had their own technologies. Hiram Halle, president of the UOP, created this concept, that has become popular within other companies such as Scientific Design, Axens, Haldor Topsoe, KBR, etc .
The license to operate a process allows a compa-ny to acquire the design of a plant and its catalyst. The company builds the plant according to the design of the licensor who collaborates during the engineering and supervises the construction and commissioning until compliance with guarantees of capacity and quality. Apart from the income due to the purchase of the design, catalyst and license, the licensor charges annual fees or royalties depending on the capacity processed by the plant, which allows to continue investigating to improve the process. The licensor also benefits from the experience acquired during the installation of the new plants to improve the technology. The refinery, in turn, benefits from the installation of competitive technologies that allow it to remain profitable without having to wait for the development of the process or incurring research and development expenses. 21,22 THE SEARCH FOR GASOLINE The manufacturers of internal combustion engines complained to the refineries that the quality of the gasoline was not uniform and the engines had disparate performances depending on the origin of the distilled oil. Better gasolines allowed the engines to go at more revolutions by providing more power without affecting the integrity of the engine. Poor quality gasoline, on the other hand, produced a knock on the engine that affected its performance and could cause mechanical damages. The ability of gasoline to avoid engine knocks is expressed as its octane number on a numerical scale. The scale is based on pure chemicals, ranging from n-heptane with an octane number of 0 to isooctane with a value of 100. This scale was proposed by Graham Edgar of the Ethyl Corporation in 1926. A high octane gasoline burns slowly in the engine piston producing a regular movement of the engine. On the other hand, the low octane gasoline burns quickly, generating sudden increases in pressure on the piston that generate the engine knocking and can damage the engine. 23 A similar parameter is defined in diesel engines, the cetane number, developed in 1930 by the Cooperative Fuel Research (CFR). The cetane number measures the time between fuel injection and the beginning of its combustion. In this case, unlike gasoline engines, the more paraffinic the diesel, the better the cetane number is because the ignition delay in the engine is smaller.
In 1919, Charles F. Kettering and Thomas Midgley from General Motors began studying the phenomenon of knocking and in 1921, they discovered that a mixture of tetraethyl lead and gasoline attenuated this phenomenon. In a few years the process of synthesis of tetraethyl lead (TEL) was industrialized and refineries could manufacture gasoline with a constant octane number from naphtha of different crude oils. The TEL additive added 5 to 7 octane numbers to gasoline, but its toxicity made it very difficult to handle in the refineries. Afterwards, its harmful effects on humans were discovered when lead compounds were emitted in the exhausted gases. 24 Between 1920 and 1930, gasoline demand growth confirmed the trend of converting heavy residue and distillates into high quality gasoline. Another advance was the consolidation of vacuum distillation as a second stage after atmospheric distillation. It has been indicated that the heavy distillation cut consisted of hydrocarbons that did not vaporize at atmospheric pressure. Subjecting this cut to vacuum distillation allows an additional amount of distillate, known as vacuum diesel, to be vaporized and sent directly to the thermal cracking units, increasing the refinery's gasoline yield. Also in the thirties, the thermal reforming of naphtha was introduced, a seeking an increase in the octane number. In this process the naphtha was subjected to cracking reactions in a reactor after heating in a furnace. The process had a low selectivity and added little performance to high octane gasoline, for these reasons, its use was limited. The solution for further increasing the yield and quality of the gasoline was achieved by means of catalysis. It can be said that the introduction of catalysis in the refining industries opened a new era in this industry. Catalysts allowed to improve yields without the necessity of introducing major modifications in the original design.
As we have seen, the reaction mechanism of thermal cracking is not very selective towards the desired products and generates a large amount of gases rich in unsaturated hydrocarbons or olefins, which are generally burned to provide the necessary energy in the cracking process. Olefins are very reactive compounds and can be combined to form heavier and more useful cuts. The processes of Polymerization and Alkylation were developed in the thirties to valorize this very rich olefin stream converting it into high octane gasoline. In 1935, the Pure Oil and Philips Company developed a thermal polymerization process, although its low yields doomed it to be quickly surpassed by catalyst-based processes. In 1930, the Russian chemist V.N. Ipatieff from UOP, investigating in the Riverside Laboratory (Illinois), introduced the first important catalytic process in refining technology. The catalytic polymerization, shown in Figure 3, employed a catalyst based on phosphoric acid supported on alumina. Light olefins reacted with each other giving rise to heavy olefins of longer chain length and whose boiling points allowed their use in the formulation of high octane gasolines. The efficiency of the process was improved by separating the light olefins in a gas recovery plant for processing in the polymerization unit. This unit increased the value of the gaseous stream produced during cracking and thermal reforming and was included in the schemes of the refineries of the thirties. Since the Ipatieff's discovery, the polymerization has played an important role in the refinery until the development of olefin alkylation. 25,26 The alkylation of olefins produced either by thermal or catalytic cracking had been a developing field since the thirties. It was mainly used in the alkylation of isobutane and butene or propylene to produce branched paraffins of seven or eight carbon atoms with high octane number. The alkylation of paraffins was discovered by V.N. Ipatieff in 1935. In the search for gasoline with a high octane number, a consortium of refining companies -Anglo-Iranian (future BP), Humble (future Exxon), Shell, Standard Oil and Texaco -developed the alkylation process of butene and isobutane to produce high octane gasoline by means of a strongly acid catalyst. This process was commercialized in 1938 at the Humble refinery in Baytown, Texas. The catalyst used for this reaction was sulfuric acid. The alkylation produced large quantities of aviation gasoline that was particularly important during World War II. In 1940, Phillips Petroleum (future Phillips 66) developed alkylation with hydrofluoric acid, which produced better reaction yields. The alkylation process combines light olefins, mainly butenes, with paraffinic isobutane, to produce a high octane gasoline. This reaction needs, as we have seen, an acid catalyst, hydrofluoric or sulfuric acid, under conditions that maximize the performance and quality of the product. The resulting alkylate has an excellent octane number, as well as a low vapor pressure and does not contain sulfur, olefins or aromatics, all this makes it the ideal component for formulating gasoline. 27 Research and development in alkylation technology has been aimed at eliminating the use of sulfuric or hydrofluoric acids as catalysts. For a long time, solid catalysts have been sought to replace them and recently, the Alkyclean process of Lummus and Neste Oil has been commercialized, with a zeolitic catalyst from Abermarle. Another option has been to use ionic liquids instead of acids, as in the Chevron and UOP IsoAlky process. 28 THE CATALYTIC CRACKING Until 1925, high-boiling petroleum molecules reacted with low-boiling molecules subjected to thermal cracking reactions, mainly through the processes developed by Dubbs and Burton-Humphreys. In 1930, approximately half of the gasoline produced in the world came from thermal cracking processes, the average octane number was 70 versus values between 50 and 60 for direct distillation gasoline. The thermal cracking gasoline was mixed with polymerization or thermal reforming gasoline to produce a base gasoline of octane number 65, which required tetraethyl lead (TEL) for increasing the octane number to 70 and 80 for Regular and Premium gasoline, respectively. The compression ratio demanded by the engines of the increasingly powerful cars created by the industry needed something else and by 1936, a new process opened the way to obtain high octane gasoline. In 1915, the Mcaffe catalytic cracking, process used aluminum trichloride as a catalyst, and operated in a discontinuous mode due to the deposition of sludge formed by hydrocarbons and aluminum chloride residues. Between 1912 and 1926, Gurwitsch and Herbst described the activity of certain activated clays, but it took until 1936 when the French chemist, Eugene Houdry presented a process where the problems of catalyst deactivation, regeneration and stability were solved, in combination with an effective process design. Looking for better quality gasoline, he studied the chemistry of hydrocarbons and the synthesis of branched chains of paraffins and olefins that gave gasoline a higher octane number. Houdry designed a cyclic reaction-regeneration system with activated clays and fixed-bed reactors that maintained the energy balance of the cracking unit and allowed for continuous operation, greatly facilitating the commercialization of the process.
The cyclic operation of these fixed-bed cracking units used the heat of regeneration to obtain high cracking temperatures in the reactors and became a reality when the Houdry Process Corporation together with the Socony Vacuum Oil Company and the Sun Oil Company, built the first industrial units for both companies between 1936 and 1938. The catalyst was loaded in a series of parallel tubes which were kept in a bed of molten salts. The Houdry process was very successful and in World War II it is considered that 90% of the aviation gasoline used, with an octane number of 100, contained products obtained in Houdry units. The war increased the needs for aviation gasoline and accelerated the diffusion of the new process. Between 1938 and 1950 many units were built and despite subsequent developments, some of the units were still operative in 1960. 29,30 Again, World War II and the demand of large quantities of high octane aviation gasoline was an incentive for the oil industry in the search for technological improvements in refining processes. The industry, especially at the Allied side that had access to large quantities of oil, dedicated its best talents and means to respond to the war needs. Processes such as alkylation, isomerization, toluene production for explosives and, finally, the greatest innovation among the conversion processes of heavy oil fractions, catalytic cracking in fluidized bed, came out from research work at companies and academia.
The production of fuels by catalytic cracking required large investments to install the reactors where the reactions occurred, as well as the associated product separation equipment. In addition, the Houdry Company charged very expensive licenses for the use of its technology. Then, some companies decided to study other technological processes. This group known as Catalytic Research Associates was formed by Standard Oil of New Jersey (Exxon), MG, Kellog, Standard Oil Company of Indiana (Amoco), Anglo-Iranian Oil Company (BP), Royal Dutch Shell, Texaco and Universal Oil Products (UOP). 31 In an attempt to improve the process and especially to avoid the discontinuous operation of the cracking reactors, designs were created in which the catalyst moved continuously from the reactor through a purge zone to the regenerator, and from there once regenerated it returned to the reactor again. This was achieved in the so-called mobilized bed operation, which was introduced by Socony-Vacuum Oil Company in 1942. The pellet-shaped or extruded catalyst moved by gravity from the reaction zone to the regeneration zone and then was raised from the bottom of the regenerator to the reactor inlet by means of a bucket system. At the beginning of the fifties, this design was improved by replacing the elevator with a pipe where the catalyst circulated mobilized by a high speed gas. The designs were marketed by the Socony Vacuum Oil Company under the name of "Thermofor Catalytic Cracking" (TCC), and by the Houdry Process Corporation under the name of "Houdry Flow". These units have operated satisfactorily for many years but disappeared due to their limitations in the heat balance that prevented building units of more than 20,000 barrels per day.
In 1942, the Catalytic Research Associates consortium, under the leadership of the Standard Oil of New Jersey introduced the first fluid bed cracking unit, "Fluid Bed Catalytic Cracking" (FCC). A key fact of this technological milestone was the suggestion by Warren K. Lewis and Edwin R. Gillian from the MIT that a low velocity gas could fluidize the powder catalyst making it behave like a liquid. Subsequent tests confirmed this hypothesis and a pilot plant was built that began operating in 1940, from there, the Model I of the Fluid Catalytic Cracking unit was launched in May 1942, being the first FCC unit in the world. 32 The FCC represents one of the paramount developments in oil refining technology and was based on the idea coming from the academia that the catalyst could behave like a fluid. For this, the catalyst was in the form of very fine particles with sizes smaller than 70 microns and kept in suspension by a stream of reacting vaporized hydrocarbons. In this way, the catalyst crossed the reactor and was collected in cyclones, while reacted hydrocarbons went to the fractionation section. The deactivated catalyst passed from the cyclones of the reactor to the bottom of the regenerator and was fluidized by an air stream that produced coke combustion. Then, once its activity was recovered, it travelled back to the reactor, on a closed loop, as shown in Figure 4. This revolutionary idea changed the refining industry and gave the industry a high conversion cracking process with an unbeatable energy balance, as the heat generated was recovered in the process.
Over the years, improvements have been added to this design, such as the reduction of the contact time between the catalyst and the feedstock jointly introduced into a tubular reactor or riser, where the reaction occurs in a high turbulence regime. The design of the FCC could be easily scaled due to the good control of the reaction temperature provided by the heat exchange between the catalyst and the charge. This fluidized bed reactor design has been used in other processes with exothermic or endothermic reactions.
The FCC converts heavy distillates into high octane gasoline, gases with a high olefin content and distillates known as Light Cycle Oil (LCO) and Heavy Cycle Oil (HCO), finally producing a residue known as Slurry. With a proper design and in the right operating conditions, the FCC's performance in terms of produced gasoline and distillates can be 75-80% by volume of the unit feedstock.
The stream of light olefin-rich gases could be sent to the polymerization or alkylation units, already described, to produce high octane gasoline. The FCC and alkylation processes are of great importance in the manufacture of gasoline. The gasoline yield of both processes, that is, FCC gasoline and alkylate obtained from FCC light olefins, exceeds 90% of the FCC feedstock volume. 33 As we have seen, isobutane is consumed in the alkylation process, therefore, the process of isomerization of butanes can be included in the refinery scheme to supplement the natural content of isobutane in the crude. In 1930, V.N. Ipatieff discovered that the butane molecules present in gasoline could be transformed into isobutane using an aluminum trichloride catalyst. In those years, this did not raise much interest because the isobutane content of gasoline was limited by its high volatility. But the need for high octane aviation gasoline revived interest in this process and large quantities were produced during the war to feed the alkylation units that supplied the Allied air forces. Later in the fifties and sixties, coinciding with the development of the catalytic reforming and the demand for high octane streams, the light gasoline composed of pentanes and hexanes with low octane was identified as a potential feedstock for the isomerization process and alumina-supported platinum catalysts were developed to increase the octane number from 60 to 90. In the 1980s, the possibility of using zeolites to isomerize light naphtha was investigated; in that vein, the mordenite-supported platinum catalysts were shown to be excellent for isomerization.
After the emergence of the FCC, thermal cracking processes were progressively abandoned due to their lower yields and selectivity to gasoline and distillates, and thermal cracking technology evolved towards an increase in cracking severity and the use of vacuum residue as feedstock. This process, known as Delayed Coking or Coker, was introduced in 1929 by Indiana Standard Oil, based on the facilities of a Tube and Tank unit in Whithing (Indiana). In the Coker the feedstock is heated and maintained at high temperature until the long chain hydrocarbon molecules are cracked into light hydrocarbons and also decomposed to a carbonaceous residue known as coke. Periodically the reactors, typically from two to six, or Coke Drums are filled with this coke and must be switched off to eliminate the accumulated coke, in a reaction-decoking cycle of the reactors. The products of the coker are light olefins, as well as naphtha and diesel with low quality that must be hydrotreated prior to marketing. The coke that is extracted from the reactors, depending on its quality, is used as fuel or other uses such as the manufacture of anodes. 34

THE ZEOLITES
As changes in the mechanical design of the FCC were introduced, the catalyst itself saw great improvements. The original catalysts were acidic clays of the montmorillonite type. With them, good yields were obtained of high-octane gasoline. These clays were progressively replaced by synthetic amorphous silica-alumina catalysts, which were more stable under regeneration conditions and gave a good product distribution. Gasoline yields increased from 20% in thermal cracking to 40% with silica-alumina catalysts. In 1945, after three years of operation, the importance of the shape of the catalyst, its pore distribution and also the improvement of its attrition resistance produced by operating cycles in fluidized regime were clearly identified. Also, modifying the silica/alumina ratio, usually at 65/35, allowed better product yields. In 1952, the silica/magnesium catalysts were introduced with increases in gasoline yield but a worsening of octane, their bad behavior in regeneration prevented their commercial success. An important revolution in the technology of catalytic cracking was the synthesis and catalytic use of zeolites. This constitutes one of the innovations with the highest impact on refining technology. 35 Crystalline silica-alumina zeolite compounds have been known for more than 150 years and are present in nature. They had been used in ion exchange applications, but their catalytic properties were discovered in the late 1950s. The zeolites can be synthesized by modulating their acid character and pore size. It can be said that the synthesis of zeolites allows to design an appropriate catalyst for each reaction. The first attempts to use the zeolites in catalytic cracking failed, and for a long time it was thought that their regular and uniform pore structure was inferior to the pore distribution of amorphous materials and given that the reactions occur inside the pores of the catalyst, zeolites were not useful for this purpose. In the mid-1950s, the Union Carbide Corporation commercialized the first synthetic zeolite of the Faujasite X and Y type. Initially, they were used as adsorbents although soon later were used as catalysts. 36 In 1960, Rabo's work, once again, drew attention to the use of zeolites as catalysts for the isomerization reaction, but it was Plank and Rosinsky at the Socony-Mobil Corporation who stabilized the X and Y zeolites so that they could withstand the temperature and the presence of steam in the reaction-regeneration cycles of catalytic cracking, without losing their crystalline character. This catalyst had greater activity and selectivity than the amorphous silica-alumina catalysts of the time. Although they were initially used in the Thermofor (TCC) process at the end of 1961, zeolites were quickly applied to the FCC. The high selectivity of these catalysts reduced the amount of feed oil required to produce gasoline. In fact, between 1964 and 1970, the rate of installation of FCC units was reduced by one million barrels per day, thanks to the good yields of the new catalyst that allowed to supply the gasoline market without the need of adding more FCC capacity. Extrapolated to savings in crude oil to be distilled in the refinery, this meant about $ 200 M per year with oil prices prior to the 1973 crisis. As in the Dubbs process, there was a lawsuit over the priority in the patents of the catalyst that lasted ten years and ended giving Plank and Rosinsky the rights of his patent over several oil companies. 37 Following the introduction of the zeolite-based FCC catalyst, a number of improvements increased its stability and selectivity. In 1977, Mobil Oil launched a new generation of catalysts that included a combustion promoter that contained less than 50 ppm of platinum on alumina. This allowed the regeneration of the catalyst to very low levels of coke at lower regeneration temperatures and also the conversion of carbon monoxide generated in the regeneration to carbon dioxide, reducing emissions and improving the heat balance.
In 1974, Mobil Oil introduced a new zeolite, Figure 5, called ZSM-5 (Zeolite Socony Mobil), with applications in many processes such as the FCC (where it increased the production of propylene and butenes) catalytic reforming, catalytic removal of waxes in lubricating oils, isomerization of xylenes and disproportionation of toluene, etc. The description of the huge development of zeolites since the ZSM-5 discovery onwards, exceeds the scope of this manuscript, but we can say that zeolites are present in virtually all refining processes and have con-tributed to the present and future development of the refineries. 38,39 CATALYTIC REFORMING AND HYDROTREATMENT After World War II, the availability of FCC and alkylate gasoline meant that low octane naphtha produced by distillation had no place in the formulation of high octane gasoline. In the late forties, the development of a new process that constitutes an important technological innovation in the oil refining industry took place. This process known as catalytic reforming had a precedent in the thermal reforming of naphtha developed in the thirties, but as in thermal cracking, the reaction mechanism was not very productive towards high octane gasoline and gave low yields. Catalytic reforming converts low octane naphtha into high octane gasoline, also known as reformate or reformed gasoline. The catalytic reforming of naphtha improves the octane number by catalyzing reactions like isomerization of paraffins to branched paraffins, dehydrocyclization of paraffins to aromatics, dehydrogenation of naphthenes to aromatics and hydrocracking of some paraffins. The reformate product is rich in aromatic hydrocarbons such as benzene, toluene and xylenes. Over time, this formed the foundation for the aromatic-based petrochemicals associated with oil refineries.
During World War II, the catalytic reforming was used to produce toluene from methylcyclohexane, as a raw material for explosives and aviation gasoline. In 1947, Standard Oil of Indiana, launched a fluid bed catalytic reforming unit. Unfortunately, an explosion destroyed the unit and delayed this development by thirty years highlighting the difficulty of operating with hydrogen at high pressures. In 1950, there was a sharp advance in reforming technology when UOP introduced Platforming, based on a bifunctional catalyst of platinum on acid alumina developed by Vladimir Haensel, a disciple of Ipatieff. Other similar developments such as Catforming of the Atlantic Reforming Company or Houdryforming from the Houdry Process Corporation were marketed, but the success of the Platforming process was overwhelming, as the platinum content needed was as low as 0.3% by weight. The catalyst employed gamma-alumina whose acidity was maintained by adding small amounts of hydrochloric acid to the unit charge. The operating conditions were between 25-40 k/cm 2 pressure and 430-510ºC temperature. The operating cycles lasted between six and twelve months and the activity was maintained by gradually increasing the reaction temperature. After the operating cycle, the unit was stopped and the catalyst was replaced by a fresh one. The discarded catalyst was sent to disposal after being subjected to a platinum recovery process. Very soon it was learned how to regenerate the catalyst in the unit itself through oxidation and activation of the catalyst loaded into the reactors. 40,41,42 A fundamental advantage of the reformer unit for the refinery was that during the reforming of naphtha, hydrogen was produced and could be used for hydrotreatments or hydrocracking reactions. In fact, the catalytic reforming process provided a high percentage of the hydrogen demand of the refinery. The bifunctional character of the reforming catalysts, where the reforming reactions occur in the active centers of platinum and alumina, was described in 1953 by Mills, Heinemann, Milliken and Oblad. In 1953, it was discovered that etaalumina was more stable and active than the catalyst based on alumina. In 1954, Standard Oil of Indiana introduced the Ultraforming process, and in 1956 ESSO introduced the Powerforming process. These processes operated at lower pressures and favored aromatization reactions producing reformate with more aromatics and better octane numbers.
The reforming reactions are mainly endothermic and therefore the best design is to alternate unit reactors and furnaces to get conditions as close as possible to an isothermal profile. Generally, three reactors are installed, in the first two the endothermic dehydrogenation reactions occur, while in the third reactor the slightly exothermic hydrocracking and hydrogenation reactions take place. To favor a low pressure drop in the reaction system, the reforming reactors have a radial flow with a specific design that is part of the technology. In 1967, there was a great technological advance with the introduction of bimetallic catalysts. Chevron developed the Rheniforming process whose catalyst was platinum-rhenium on alumina, and this combination gave great stability to the catalyst by prolonging the cycle length and increasing the resistance to poisons such as sulfur. In 1975, Exxon developed a catalyst from iridium and platinum allowing a stable operation at low pressures. In 1970, Larry Stines from UOP developed another important milestone in this technology, the continuous catalytic reforming process, licensed as "Continous Catalytic Regeneration" (CCR), which eliminated the need to stop the operation of the unit to regenerate the catalyst. 43,44,45 The catalytic reforming platinum catalyst is rapidly deactivated in the presence of poisons such as sulfur, which may be present in the unit feedstock. Sulfur is part of all crude oils in greater or lesser proportions and, as the use of catalytic reforming was expanded by industry, it became necessary to develop a technology to remove sulfur and other contaminants from the unit's feed.
The hydrotreatment process dates back to 1869 when Berthelot studied the hydrogenation of coal to liquid hydrocarbons. Following the research work of Sabatier (1897), Ipatieff in 1900, and Bergius in 1910, the first coal hydrogenation plant was installed in Leuna in 1927. In 1940, the I.G. Faberindustrie successfully employed tungsten and molybdenum sulphide catalysts on alumina. In the first half of the twentieth century and during the war, Germany was the leader of the hydrogenation technology. Due to the shortage of oil, Germany was forced to produce hydrocarbons from coal in this way, and in 1944, 3.5 million tons where produced through this process. In the US, the first plant was installed in 1928 in Baton Rouge belonging to the Standard Oil Company of Louisiana, other companies such as Humble Oil and Shell installed plants in the forties, but their use was limited by the lack of hydrogen availability in the refineries. In the fifties the introduction of catalytic reforming provided abundant and cheap hydrogen and hydrotreatment units were installed for treating naphtha and other oil cuts. The hydrotreatment process used the hydrogen generated by the catalytic reforming unit and a cobalt and molybdenum sulfide catalyst was used to remove sulfur, nitrogen and other poisons from the reforming catalyst. The hydrotreatment process was also used to remove these contaminants from the distillates produced in the refinery. The hydrotreatment acquired more and more relevance in the configuration of the refineries from 1970s onwards. 46 As a complement to the hydrotreatment of refinery cuts and to improve the quality of LPG and light gaso-line and kerosene, the chemical treatment processes of these streams or sweetening were improved, based on the oxidation reactions of mercaptans with chemical substances such as sodium plumbite or the use of liquid phase catalysts based on iron chelates, like in the Merox process of UOP. 47 The manufacture of lubricating oils also experienced a great boom with the popularization of the automobile industry. The necessary technology is very specific and is not usual in refineries that produce fuels. The lubricant manufacturing process requires the use of crude oils from the Middle East whose vacuum distillates generate a highly paraffinic stream. The aromatic components are then removed by the furfural extraction process and heavy paraffins are also removed by solvent extraction, such as the methyl ethyl ketone (MEK) process, to improve their cold properties. After the development of appropriate catalysts, paraffins can also be removed catalytically in dewaxing reactors. Also, asphaltenes are removed from the heavy distillation cut by propane extraction. The lubricating oil is then subjected to a treatment to remove olefins and diolefins by passing through activated clay reactors or by severe hydrotreatment. Waxes obtained from solvent dewaxing undergo a residual oil removal before commercialization.

THE HYDROCRACKING
In the late fifties and early sixties, the emergence of turbojet engines in commercial aviation led to an increase in the consumption of kerosene as aviation fuel. The demand for kerosene had declined since the days of the kerosene lamp, when it was the star product of the refinery, but jet fuel demand turned kerosene again into a key product of the refinery. The turbine manufacturers demanded from the industry that, for security reasons, aviation kerosene came exclusively from the crude distillation. With the development of the hydrocracking process in 1960, the industry had a technology that produced excellent aviation fuel. The hydrocracking, like hydrotreatment, was developed mainly in Germany from 1910 until the end of the war. Between 1925 and 1930, the I.G. Faberindustrie in collaboration with the Standard Oil of New Jersey developed the high pressure hydrocracking of heavy to light cuts. In 1960, Chevron Research Co., Unocal in collaboration with Esso and UOP launched several processes that popularized the technology. 48 Hydrocracking is a very versatile process that can use heavy vacuum distillates as feedstock to obtain LPGs, light naphtha, naphtha, aviation kerosene, diesel and an unconverted residue with excellent properties for manufacturing lubricants. The process also removes all contaminants such as sulfur, nitrogen and oxygenated compounds, thus, the quality of the products meet in many cases the specification of the commercial product. Hydrocracking reactions occur in the presence of hydrogen with a silica-alumina catalyst or zeolites at very high pressures. A disadvantage is the high cost of the process due to the need to use equipment with a high pressure and temperature design; on the other hand, hydrogen consumption raises the operating costs over other conversion processes such as FCC.
The oil refining technology experienced dramatic technological improvements from 1940 to 1970, mainly due to WWII and the post-war economic boom, many of them are shown in Figure 6.
The continuous incorporation of new technologies to the configuration of a refinery improved the availability and quality of petroleum cuts, but increased their blending complexity in order to meet the quality specifications and the economic optimum. Linear programming had been introduced during the war to optimize many problems of manufacturing military supplies. In 1948, George B. Dantzig discovered the Simplex method that facilitates the resolution of large systems of linear equations subject to restraints and from there, linear programming spread throughout in the industry as a way to optimize refinery operations. Linear programming requires a large number of equations to find how to supply the refinery markets with the crude available, taking into account the yields and qualities produced by the refinery. Whereas its initial use required great simplifications, the increasing power of computers gradually provided the basis for the economic management of any refinery. 49

THE PETROCHEMISTRY
In 1907, a Belgian chemist, Leo Hendrik Baekeland, synthesized the first plastic from phenol and formaldehyde, Bakelite. Years later, a pioneer in polymer research, Wallace H. Carothers confirmed the work of Hermann Staudinger, and took the company E.I. du Pont de Nemours to market the first synthetic rubber, neoprene, in 1932 and the first synthetic textile fiber, Nylon, in 1939. 50,51 But it was not until there was a high availability of raw materials that petrochemicals developed fully. Once again, thermal cracking was the origin of a basic technology for petrochemicals. The Steam Cracker or Cracker originated when C.P. Dubbs introduced steam into its cracking process and verified that there was a decrease in coke formation because the steam decreased the partial pressure of the hydrocarbon molecules and therefore, the coke formation reactions; in addition, the production of olefins increased dramatically. In the 1920s, Union Carbide and Standard Oil of New Jersey were the first companies to develop crackers for the production of ethylene and propylene.
The Cracker is currently the foundation of the chemical industry and produces three of the most demanded molecules such as: ethylene, propylene and butadiene. The cracker is versatile as several different feedstocks, i.e. LPGs, naphtha, natural gas or diesel can be used to produce other light olefins and aromatics such as benzene and toluene employed in the petrochemical industry.
The lack of some raw materials during World War II, such as rubber, whose production areas were occupied by Imperial Japan, promoted governmental efforts to obtain rubber substitutes from petroleum, such as butadiene 53 . The post-war economic development raised the demand for petrochemicals such as polyethylene, polypropylene, PET, phenol and synthetic detergents. In the refinery, and in order to separate the aromatic compounds in the reformed naphtha, aromatic extraction units with solvents such as sulfur dioxide or glycols followed by separation processes of benzene, toluene and xylenes began to be installed. The pioneer of the aromatic extraction technology was the Romanian Lazar Edeleanu who in 1907, developed a sulfur dioxide extraction process to improve the quality of kerosene, eliminating the aromatics that produced lamp fumes from burning. In 1912, the Royal Dutch Shell began studying the process and in 1916 it was marketed in Europe. The American company evaluated its installation at the Martinez refinery in California in 1915, but different problems were found and the process was not in service until 1927. The technology was extended to other companies such as California Standard Oil, Associated Oil and the Union Oil in those years. In 1928, Shell and Tidewater began using the Edeleanu process to extract aromatics from the lubricant bases, improving their quality. 52,53 At the end of the 1950s, improvements in the design and reliability of the alkylation units with sulfuric or hydrofluoric acid led to the progressive abandonment of the catalytic polymerization units as a way to convert light olefins into high octane gasoline. The polymerization found its place in the petrochemical industry where the development of catalysts by Ziegler and Natta, founded the polymer industry from ethylene and propylene. In 1951, while trying to convert propylene into gasoline, J. Paul Hogan and Robert L. Banks of Philips Petroleum obtained polypropylene and a short time later polyethylene was also obtained. 54 Since 1960, the petrochemical industry developed in the fifties, experienced great success; especially the production of light olefins for plastics. The demand for ethylene tripled in those years. In the refineries, the aromatic extraction from reformed naphtha benefited from the synthesis of new solvents such as Sulfolane synthesized by Shell or Morfilane by Uhde, these new solvents increased the stability and safety of the process. The aromatic production plants became more complex thanks to the development of zeolitic catalysts and molecular sieves that increased the selectivity to produce preferably the para-xylene isomer, a raw material in the production of plastics; as well as the conversion of toluene, with lower commercial demand, into xylene and benzene through disproportionation or dealkylation reactions, Figure 7.
The integration of the refinery and one or several petrochemical plants is an incentive for the growth of large industrial complexes, with both, operational and process synergies between the refinery and the petrochemical plant, Figure 8. Typical examples of integration are the production of phenol, cumene and acetone by the Hock process, using benzene from catalytic reforming and propylene from FCC and the manufacture of linear alkyl benzene (LAB) as a detergent base material, again by the alkylation of benzene with paraffins extracted from the kerosene cut, UOP-CEPSA process. Another example is the production of purified terephthalic acid (PTA) from para-xylene from the aromatic complex of the refinery, a process developed by the Scientific Design Company; the reaction of PTA with ethylene glycol produces polyethylene terephthalate (PET), a raw material for plastic or fiber bottle manufacturing. 55 The large increase in propylene demand in the 21st century has changed the role of FCC and in some parts of the world such as Asia and the Middle East, propylene has replaced gasoline as the main product. The technology involved alters the catalyst to include a larger proportion of ZSM-5 and also changes the design of the reactor internals to modify the contact time. In some cases, the designs add a second riser reactor where cracked naphtha is processed obtaining propylene yields of 30-40 % compared to yields less than 10% in a conventional FCC. The petrochemical complex based on FCC complements the aromatic plant in the production of petrochemical products in the modern refinery.  the Ayatollah's revolution, the price of crude oil rose from 2 to 12 dollars per barrel. Thereafter, OPEC maintained the price of crude oil at high values with the consequent impact on the profit margin of the oil refineries. The response of the refining industry to this important change affected two aspects of the technology.
Oil refining is a technology that requires high energy consumption, the processes described so far require high temperatures and pressures, as well as the transfer of large volumes of liquids, and those are high energy demanding processes. On average, and depending on its configuration, a refinery consumes 5% of the processed crude oil to supply the necessary energy for the process. The oil crisis led the technology to focus on efficiency and energy recovery in the refinery, affecting both, existing processes and new projects with very demanding energy consumption objectives. The main modifications to the technology involved the installation of heat exchangers, heat recovery from waste streams like the heat from the furnace stacks, or the generation of steam with process streams and the cogeneration of electricity from waste gases. All steam and electricity utility systems were also analyzed to optimize energy use. Finally, new tools were developed to design energy recovery systems such as the "pinch" analysis developed by Linnhoff and Vredeveld at the end of the seventies, looking for the optimal way to exchange process streams from the point of view of energy recovery. 56 The rise in crude oil price revived the technologies for conversion of heavy oil cuts to light cuts, and many refineries incorporated FCC units and to a lesser extent hydrocracking so that less oil was necessary to achieve the same amount of high value-added products. This trend also revived the technologies for the conversion of the so-called Bottom of the Barrel or vacuum residue; among them we have cited the Delayed Coker as the heir of thermal cracking, which allowed 70% conversions to light products and a coke that was used as fuel in cement plants or to manufacture electrolysis anodes. Also, a modality of soft thermal cracking known as viscorreduction or Visbreaker was developed with conversions that dropped to 20%, but a fuel oil with commercial viscosity was obtained. This unit was oriented to the production of marine fuels with viscosities of 180 or 360 cSt and its advantage was that it eliminated the need to mix the vacuum fuel oil with light products to decrease its viscosity and density, with the consequent savings in distillates that could be directed to formulate other more valuable products. The energy crisis also triggered the emergence of the vacuum residue hydrocracking technology, in this case the conversion of the residue occurred in the presence of hydrogen on a cata-lyst at high pressures and temperatures. The reactor type ranged from fixed bed to ebullated or fluidized bed, giving rise to different processes. Units were installed in the eighties and nineties but the high cost and the need for hydrogen favored the Delayed Coker technology.

THE ENVIRONMENT
In the 1970s, concerns about the impact of hydrocarbons on human health and the environment increased greatly. This trend continues today, largely leading the evolution of refining technology. In summary, regulations with an impact on refining technology began with the elimination of tetraethyl lead (TEL) as an improver of the octane number of gasoline. The main regulations with an impact on refining technology can be summarized as follows: • the changes in fuel quality specifications eliminating the contaminant content, • the regulations related to emissions from refinery effluents, • the introduction of biofuels • and finally the decarbonization of oil refining, which will surely have a strong impact in the future of the industry. In 1974, a period began that lasted until the 1990s in which the TEL was eliminated from the gasoline formulation as an octane improver. There was a great concern about the composition of vehicle effluents. The installation of a combustor with a platinum catalyst, which converts both nitrogen compounds and the remaining hydrocarbons into inert molecules solved this problem; for that purpose no poisons were allowed in the car effluents that could damage the platinum catalyst. Lead is a permanent poison for platinum catalysts, therefore, its removal was necessary, apart from the harmful nature of lead compounds for humans. This fact increased the importance of catalytic reforming in refineries, making reformate the main contribution of octane to gasoline formulations. The gasoline components produced in other process units such as FCC, alkylation, hydrocracking and polymerization have a relatively constant octane number. The product of catalytic reforming has octane numbers from 80 to more than 100. Unfortunately, as the severity of the operation increases to raise the octane number, the gasoline yield decreases. The normal performance in reforming can vary from 70 to 90% in feed volume, depending on whether the octane is high or low.
In the eighties, the process of etherification of four or five carbon olefins from the FCC unit with methanol was developed as an alternative to TEL to produce methyl tert-butyl ether (MTBE) or tert-amyl ether (TAME). These ethers have a high octane number and good properties as a gasoline component and their use extended from 1980 onwards. In the 1990s, the regulations regarding oxygenated compounds in gasoline were updated. Subsequently, MTBE was replaced by ethyltert-butyl ether (ETBE) due to various aquifer contamination episodes with MTBE caused by its high water solubility. In those years, the direct injection of ethanol into gasoline also began, although there are limitations in several quality specifications that advise against exceeding 10% in ethanol content. 57 The next environmental impulse came from the 1990s and continues today, fuel specifications hardened the limit values of pollutants in the benefit of human health and the environment. In a very general way, this affected especially the sulfur content in fuels and limited the content of aromatic and unsaturated compounds. Additionally, the density of fuels was limited in order to obtain lighter products with less complex and harmful combustion products. In Europe, the AUTO OIL program was the framework for the development of these new specifications in which the automobile industry, the refining industry and the European Commission were represented. The evolution of the EURO specifications resulting from this analysis, strongly increased the regulatory pressure that oil refining technology had to solve. The impact of the new specifications on the manufacturing technology of automotive fuels covered several complex aspects. 58 The limitation of sulfur forced the industry to rethink the use of FCC naphtha in gasoline, the FCC naphtha sulfur content depends directly on the FCC feedstock. The first option is to hydrotreat the FCC feedstock. Since the sulfur specification virtually eliminates this compound, hydrotreatment is often not sufficient. The injection of additives based on magnesium oxides that react with sulfur and remove it from reaction products has also become popular. The most widespread solution has been the hydrotreatment of FCC naphtha, this process was a technological advance after an indepth study of the distribution of sulfur compounds and olefins in FCC products.
Compounds that give a high octane number to FCC naphtha are olefins and aromatics and hydrotreatment reactions in the presence of hydrogen tend to saturate those compounds, thus removing their aromatic and unsaturated character and reducing the desired octane number. Refining technology elegantly solved this problem by discovering that the light fraction of the FCC unit contained the highest proportion of the compounds that contribute to the octane number and the heavy part contained the sulfur compounds. Various technologies were developed by separating both parts of the naphtha and selectively hydrotreating the heaviest part with catalysts that desulfurized keeping the high octane compounds intact to a large extent. The technologies designed by ExxonMobil, UOP and especially Axens solved this challenge and nowadays FCC gasoline is still the main component of gasoline. 59 The next major challenge for gasoline was the limitation of aromatic content and especially of benzene in its formulation. Aromatic compounds have a high octane number and high density, which favors compliance with the vapor pressure of gasoline. The greatest contribution of aromatics to gasoline is made through reformed gasoline, refiners had to limit this component in the formulation and increase the contribution of FCC naphtha, oxygenated ethers and gasoline from alkylation. An added problem was to eliminate benzene from reformed naphtha, also in this case there was a technological analysis of how benzene was formed during catalytic reforming and two strategies were designed for its elimination. One strategy was the elimination of the so-called proto-benzenes or compounds that give rise to benzene during the reforming reactions and which were removed by distillation of the light part of the charge to the catalytic reforming. The other option was to eliminate the benzene present in the reformate by distillation. The limitation in aromatics and benzene was not a major problem in complex refineries, but in those without an FCC unit, it was a serious problem since its formulation was based on reformed naphtha, and they were forced to buy FCC naphtha to make their gasoline formulations, seriously compromising their future.
The other major automotive fuel, diesel, was also deeply affected by the new specifications. In this case, the technology focused on the removal of sulfur by hydrotreatment. Although diesel was desulfurized since the seventies, the almost total elimination of sulfur was an important technological challenge. Firstly, the different sulfur compounds present in the diesel were identified and it was determined that depending on the position of the sulfur atom in the hydrocarbon molecule, its elimination could be more or less difficult. This implied that it was relatively easy to remove compounds with accessible sulfur atoms, but it was very difficult when sulfur atoms were in a position that hindered their access to the catalyst. Dimethyl dibenzothiophenes are an example of molecules resistant to hydrotreatment for this reason. This fact induced two important technological advances, a great development of cobalt-molybdenum and nickel-molybdenum catalysts supported on alumina, improved with advances on the understand-ing of the desulfurization reaction mechanisms, and the design of suitable reactors to carry out this process. Catalyst manufacturers like Abermarle, UOP, Haldor Topsoe, Axens, etc., made an important effort to put these catalysts on the market in a few years. 60 It is worth discussing in more detail the design of the hydrotreatment reactors for sulfur removal. During the diesel hydrodesulfurization reaction, liquid diesel, partially vaporized and hydrogen in the gas phase are present in the reactor, therefore, the flow in the reactor is mixed in the so-called "trickle-bed" reactor system. This is a problem since one requirement for efficient reaction on the catalyst is that the reactants are well mixed facilitating their access to the catalyst surface. Since 2000, there was a technological change in the design of the hydrodesulphurization reactor internals. Using tools such as Computerized Flow Design (CFD), the designs of the gas-liquid distributors were improved to obtain reactors of increasing diameter and, therefore, units of greater capacity. Today we can find mixed flow reactors of six meters in diameter when in the nineties three meters was an insurmountable limit. 61 As we have seen, the refineries have been forced to hydrotreat most of their products prior to their marketing. The question then became what to do with all the sulfur compounds that are removed from gasoline and distillates, and indeed, this is another technological and environmental challenge that the industry has had to solve. Hydrodesulfurization reactions remove sulfur from the oil cuts in the form of hydrogen sulfide, this compound is incorporated into the refinery gas system that channels all the gaseous streams produced in the different refining processes and that are used as fuel in the furnaces of the process units. Prior to environmental regulations, these sulfur compounds were oxidized to sulfur dioxide during combustion, and were emitted from refinery furnace stacks. European and American emission regulations began to regulate refinery emissions in the 1980s. The technology solved this new challenge by installing sulfur absorption units with ethanolamine-based compounds, which react quickly with hydrogen sulfide. Ethanolamine captures hydrogen sulfide and in an absorption-regeneration cycle produces a stream of light sulfur-free hydrocarbons that are sent as fuel to the furnaces of the refinery and a so-called acid gas with a 95% content of hydrogen sulfide that is sent to the sulfur recovery units for conversion into solid or liquid sulfur that is marketed. This transformation is carried out in Claus units, based on the reaction discovered by Friedrich Claus in 1883 and modified by IG Farbenindustrie AG in 1937. The Claus process partially oxidizes hydrogen sulfide to sulfur dioxide that reacts with the remaining hydrogen sulfide to produce elemental sulfur. Sulfur recovery in a refinery exceeds 99.5% in this way, and can reach 99.9% through the waste or tail gas treatment unit, prior to its emission. 62 The next fuel subjected to quality specifications, Marine fuel oil, is still an issue for refiners. Marine fuel oil or bunker moves the engines of ships and is formulated with heavy distillates and vacuum residue. The International Maritime Organization (IMO) regulated a maximum sulfur content in marine fuels of 0.5% after 2020. Marine fuel is typically formulated with heavy cuts, which cannot undergo further valorization in the refinery process units. There are many refineries that use delayed coking units to convert all their heavy residue into naphtha and distillates. The less complex refineries or those serving the bunker markets employ their production of vacuum residue and heavy distillates for this purpose. An advantage of bunkering production used to be that marine fuel, whose sulfur specification was 3.5% by weight prior 2020, was a sink for much of the sulfur entering the refinery, this is not possible after 2020.
Alternatives to meet the sulfur content of marine fuels, include the installation of scrubbers with seawater that remove sulfur dioxide from the effluent of ship's engines. Another option is to change the fuel for products with lower sulfur content, such as natural gas, since it is possible to adapt the engines to these other fuels. A final option for the refineries is to produce marine fuels similar to the current ones but with a sulfur content less than 0.5%. The price of marine fuel has historically been below the price of crude oil and this raised doubts about the price of this new low sulfur fuel, and whether the necessary investments in hydrotreatment processes of vacuum residue and distillates involved in its formulation were justified, considering a solution similar to that of gasoline and diesel.
Many refineries rely on distilling low sulfur crude, whose residue allows a marine fuel to be obtained that meets the sulfur specification. From the technological point of view, there are processes for the conversion of the residue into more profitable products such as delayed coker or solvent deasphalting, but they do not produce fuel oil and would force the refinery to leave the bunker market. Other technologies such as residue hydrocracking obtain conversions to gasoline and distillates in the vicinity of 70% and allow the refinery to formulate low sulfur fuels by desulfurization of the vacuum residue. Residue hydrocracking technology (RHC) has undergone a breakthrough in recent years since its inception in the 1980s, and recently ENI, CLG and UOP have introduced the "Slurry" technology with a very small particle size catalyst that allows conversions of up to 90%, practically eliminating the residue from the refinery. The evolution of the markets after the new specification of sulfur for marine fuels, will consolidate the best option for refineries in terms of conversion of the Bottom of the Barrel. 63

THE BIOFUELS
The third area where environmental requirements have had an impact on the configuration of the refineries is biofuels. These constitute renewable energy and are defined as fuels suitable for use in internal combustion engines that have been produced from biomass obtained through biological processes, and in general they consist on a mixture of organic compounds with a high oxygen content. Their use is justified by the hypothesis that the carbon content of biomass comes from the photosynthesis process and eventually turns back into the atmosphere as a result of burning and carbon dioxide emissions, making the net carbon balance neutral. This last statement is subject to debate, and there is extensive bibliography discussing the net result of the carbon balance.
The biofuels consumed in the world are primarily ethanol, an alcohol produced by the fermentation of agricultural crops or lignocellulosic materials; biodiesel, a methyl ester resulting from the esterification of vegetable oils, such as palm oil, and methanol; and finally hydrotreated vegetable oil (HVO), which is manufactured by removing the oxygen present in vegetable oils by reactions in the presence of hydrogen. Biofuels are under great debate due to the effects that their production in large quantities has had on the food price, with which they share raw materials such as corn, wheat, palm oil, etc.; and also to due to changes in land use, either by varying the original yield of agricultural lands for cultivation or by dedicating areas of high biodiversity to the cultivation of biofuels. The last two phenomena are known as Indirect Land Use Change (ILUC) and have significantly conditioned European legislation. Nowadays, those biofuels coming from edible raw materials are known as conventional biofuels, and those whose raw materials are residues, animal fats, non-edible vegetable oils and cellulosic materials, and have no effect on the change of agricultural land use, are termed advanced biofuels. The regulations have increased the content of biofuels and the specification will lead refineries to introduce 10% biofuel (measured as equivalent energy) in the formulations of automotive fuels.
The refineries have been pioneers in the production of biofuels since the 90s, Figure 9; they included Bio-ETBE (EthylTercButil Eter) into the gasoline blending. ETBE is an oxygenated derivative of ethanol and butenes produced in the refinery. It is a good oxygenated component in the formulation of gasoline, thanks to its stability and high octane number. Refiners also incorporate biodiesel frequently produced in facilities near the refinery into diesel formulation. Biodiesel has some stability problems and its content is limited by the specification. Refining technology has developed processes for the production of hydrotreated vegetable oil (HVO) by selective deoxygenation of the fatty acids in the vegetable oil that are converted into paraffins. This process has a high hydrogen consumption and requires expensive construction alloys given the corrosive nature of vegetable oils. ENI, UOP, Haldor Topsoe, NESTE and AXENS have commercialized units and the production of HVO is today a common process in the refinery. In countries like Spain, where it is permitted by current legislation, it is common to co-process vegetable oil up to 5-7% by volume in existing hydrotreatment units. HVO has excellent properties as a diesel component. 64,65 The manufacture of HVO has resulted in a specific refinery configuration that today has two examples at the ENI refinery in Porto Marghera and La Mede refinery owned by TOTAL. Both are based on obsolete refineries without conversion capacity and whose economic viability was compromised. The refinery feedstocks are vegetable oils, animal fats, used cooking oils or recycled plastics; the hydrogen for the reactions involved can be provided by the existing catalytic reforming unit or by a hydrogen plant and the products obtained are separated and stored in the refinery facilities for distribution. The refinery produces renewable diesel or green diesel, renewable naphtha or green naphtha, LPGs and potentially aviation fuel. ENI is considering converting the Gela refinery in Italy to this scheme. There are technologies to produce bio-kerosene for jet fuel, however, despite its use in test flights, the implicit safety concerns in air transport means that the introduction of aviation biofuels is not expected soon. 66

THE FUTURE
The refineries have been implementing advances and technological innovations such as those we have described to satisfy their markets and the specifications applicable to their products, Figure 10. The choice of a refining technology is based on the specific circumstances of its operation and depends on the type of crude oil, the demand and quality of the products and economic factors such as the cost of crude oil and products, availability of services such as steam, water, electricity, etc., type and cost of catalysts and the cost of the necessary equipment for its operation.
Considering our current knowledge on the past and present of oil refining technology, it is worth asking whether the refinery will remain as a supplier of essential products for society or there are risks of the industry being overcome by new technological advances or even disappearing. If we look in the past and the successive energy transitions, we see, for example, that the oil industry began in 1859, but it took more than a century for coal to cease to be the main source of energy. Oil, in turn, represented 5% of energy consumption in 1840 and its growth was slow until 1900 when it represented 50% of the energy supply, sharing the leadership with fuels as exotic as whale oil. In general, history tells us that energy transitions are slow phenomena and also that usually the preceding energy sources do not disappear and remain in niches of consumption in considerable quantities, for example, around 1960, oil was the main source of energy surpassing coal, but since then, coal consumption has tripled despite being a secondary source of energy. 67 Historically, the transitions from one energy source to another have been due to the emergence of new technologies, better prices and lower energy costs and often to policies looking for more secured supplies. Nowadays, it is the climate change who is causing the transition from low-cost energy sources to energies whose costs are currently higher but seek to reduce the emission of greenhouse gases (GHG). The difference in costs is covered by different types of subsidies, incentives and regulations, until investments in research and development make those energies competitive. However, it should not be forgotten that the wealth growth in the world has always been associated with an efficient and cheap source of energy.
Petroleum refining technologies, as we have seen, have been responding to the environmental challenges that have been presented, but the last one we have mentioned, decarbonization, affects the very nature of its products that are made of carbon atoms. Next we will make a brief analysis of where it is more feasible to replace petroleum products and which of them will be maintained over time.
Vehicles with an internal combustion engine can be replaced by electric vehicles, hydrogen, hybrids, natural gas, etc., car manufacturers have understood this trend and regardless of the legislation they are making large investments in developing electric vehicles. As in the past, the automobile industry can dictate the demand for fuels and contribute to a significant decrease in diesel and gasoline consumption. At the moment, advances that allow the commercialization of electric heavy transport vehicles or the replacement of aviation fuel seem less viable. Therefore, the demand for diesel and especially aviation kerosene should be maintained for the next decade. Marine fuels, as we have already described, have the alternative of natural gas that would have a significant bunker market share in the coming years. Hydrogen also appears as a long term option for decarbonizated bunker fuels. The future of transport fuels is therefore a challenge, perhaps the most complicated one that the refining industry has to face.
Road paving is another market where the use of asphalt mixtures seems to be the most economically and technically viable alternative, and therefore, the demand for asphalt can be maintained over time. The future of lubricants, already threatened by synthetic lubricants, is associated with that of the internal combustion engine. If this disappears, a large part of the manufacture of lubricants will also disappear, although some demand will still exist for other lubrication applications such as oils for machines, greases, waxes, etc.
An area where oil seems irreplaceable is petrochemicals, this market demands 12% of the crude oil production and maintains sustained annual growth, especially in areas such as Asia where the standard of living is growing rapidly. The refineries have increased their integration with petrochemical plants starting with 5-10% of their products being petrochemicals to more than 20-30%.
In recent years, chemical products based on renewable raw materials have been developed. Although technically possible a disadvantage is the low production yield that makes large quantities of raw material necessary, and often leads to irrational demands on land availability and logistics. The recycling of plastics is also a booming trend.
The high demand for petrochemical products is giving rise to a new refinery configuration known as "Crude to Chemicals", which is a good example of what the future could be. In these refineries, existing technologies and new developments are combined to directly convert crude into petrochemical products with conversions that exceed 50%. We have examples of these refineries in Saudi Arabia and China where the direct conversion of crude oil is the technological challenge; in that vein, Exxon at its Jurong refinery, launched in 2014, a process of direct crude cracking. The number of refineries that might follow this production strategy is a concern due to the small size of the petrochemical market in comparison to the fuel market. 68, 69 CONCLUSIONS Presently, 85% of the world's energy consumption is generated by fossil fuels. The task of reducing the energy contribution of oil, requires time and substantial investments. It will be the society who will determine where and when this energy transition will materialize. Renewable energies should have the role of feasible energy alternatives without prejudice for the standard of living.
Finally, the refining industry is facing its most important challenge that must be solved thanks to new feedstocks and products, new technologies and to innovative mentality and adaptation to demand, which has always characterized oil refining.

ACKNOWLEDGMENTS
The author would like to thank Flor Garcia Mayoral from CEPSA Research Center for their guidance and valuable advices about the text. The author also thanks to the anonymous referees for their insights and comments that significantly improved the manuscript. BIBLIOGRAPHY