Oil refinery



An oil refinery is an industrial process plant where crude oil is processed and refined into more useful petroleum products, such as gasoline, diesel fuel, asphalt base, heating oil, kerosine, and liquefied petroleum gas. Oil refineries are typically large sprawling industrial complexes with extensive piping running throughout, carrying streams of fluids between large chemical processing units.

Operation
Raw or unprocessed ("crude") oil is not useful in the form it comes in out of the ground. Although "light, sweet" (low viscosity, low sulfur) oil has been used directly as a burner fuel for steam vessel propulsion, the lighter elements form explosive vapors in the fuel tanks and so it is quite dangerous, especially so in warships. For this and many other uses, the oil needs to be separated into parts and refined before use in fuels and lubricants, and before some of the byproducts could be used in petrochemical processes to form materials such as plastics, detergents, solvents, elastomers, and fibers such as nylon and polyesters. Petroleum fossil fuels are used in ship, automobile and aircraft engines. These different hydrocarbons have different boiling points, which means they can be separated by distillation. Since the lighter liquid elements are in great demand for use in internal combustion engines, a modern refinery will convert heavy hydrocarbons and lighter gaseous elements into these higher value products using complex and energy intensive processes. Oil can be used in so many various ways because it contains hydrocarbons of varying molecular masses, forms and lengths such as paraffins, aromatics, naphthenes (or cycloalkanes), alkenes, dienes, and alkynes. Hydrocarbons are molecules of varying length and complexity made of only hydrogen and carbon atoms. Their various structures give them their differing properties and thereby uses. The trick in the oil refinement process is separating and purifying these.

Once separated and purified of any contaminants and impurities, the fuel or lubricant can be sold without any further processing. Smaller molecules such as isobutane and propylene or butylenes can be recombined to meet specific octane requirements of fuels by processes such as alkylation or less commonly, dimerization. Octane grade of gasoline can also be improved by catalytic reforming, which strips hydrogen out of hydrocarbons to produce aromatics, which have much higher octane ratings. Intermediate products such as gasoils can even be reprocessed to break a heavy, long-chained oil into a lighter short-chained one, by various forms of cracking such as fluid catalytic cracking, thermal cracking, and hydrocracking. The final step in gasoline production is the blending of fuels with different octane ratings, vapor pressures, and other properties to meet product specifications.

Oil refineries are large scale plants, processing from about a hundred thousand to several hundred thousand barrels of crude oil per day. Because of the high capacity, many of the units are operated continuously (as opposed to processing in batches) at steady state or approximately steady state for long periods of time (months to years). This high capacity also makes process optimization and advanced process control very desirable.

Major products of oil refineries
Most products of oil processing are usually grouped into three categories: light distillates (LPG, gasoline, naphtha), middle distillates (kerosene, diesel), heavy distillates and residuum (fuel oil, lubricating oils, wax, tar). This classification is based on the way crude oil is distilled and separated into fractions (called distillates and residuum) as can be seen in the above drawing.
 * Liquid petroleum gas (LPG)
 * Gasoline (also known as petrol)
 * Naphtha
 * Kerosene and related jet aircraft fuels
 * Diesel fuel
 * Fuel oils
 * Lubricating oils
 * Paraffin wax
 * Asphalt and Tar
 * Petroleum coke

Common process units found in a refinery
The number and nature of the process units in a refinery determine its complexity index.


 * Desalter unit washes out salt from the crude oil before it enters the atmospheric distillation unit.
 * Atmospheric Distillation unit distills crude oil into fractions. See Continuous distillation.
 * Vacuum Distillation unit further distills residual bottoms after atmospheric distillation.
 * Naphtha Hydrotreater unit uses hydrogen to desulfurize naphtha from atmospheric distillation. Must hydrotreat the naphtha before sending to a Catalytic Reformer unit.
 * Catalytic Reformer unit is used to convert the naphtha-boiling range molecules into higher octane reformate (reformer product). The reformate has higher content of aromatics, olefins, and cyclic hydrocarbons). An important byproduct of a reformer is hydrogen released during the catalyst reaction.  The hydrogen is used either in the hydrotreaters or the hydrocracker.
 * Distillate Hydrotreater unit desulfurizes distillates (such as diesel) after atmospheric distillation.
 * Fluid Catalytic Cracking (FCC) unit upgrades heavier fractions into lighter, more valuable products.
 * Hydrocracker unit uses hydrogen to upgrade heavier fractions into lighter, more valuable products.
 * Visbreaking unit upgrades heavy residual oils by thermally cracking them into lighter, more valuable reduced viscosity products.
 * Merox unit treats LPG, kerosene or jet fuel by oxidizing mercaptans to organic disulfides.
 * Coking units (delayed coking, fluid coker, and flexicoker) process very heavy residual oils into gasoline and diesel fuel, leaving petroleum coke as a residual product.
 * Alkylation unit produces high-octane component for gasoline blending.
 * Dimerization unit converts olefins into higher-octane gasoline blending components. For example, butenes can be dimerized into isooctene which may subsequently be hydrogenated to form isooctane. There are also other uses for dimerization.
 * Isomerization unit converts linear molecules to higher-octane branched molecules for blending into gasoline or feed to alkylation units.
 * Steam reforming unit produces hydrogen for the hydrotreaters or hydrocracker.
 * Liquified gas storage units for propane and similar gaseous fuels at pressure sufficient to maintain in liquid form. These are usually spherical vessels or bullets (horizontal vessels with rounded ends.
 * Storage tanks for crude oil and finished products, usually cylindrical, with some sort of vapor emission control and surrounded by an earthen berm to contain spills.
 * Amine gas treater, Claus unit, and tail gas treatment for converting hydrogen sulfide from hydrodesulfurization into elemental sulfur.
 * Utility units such as cooling towers for circulating cooling water, boiler plants for steam generation, instrument air systems for pneumatically operated control valves and an electrical substation.
 * Wastewater collection and treating systems consisting of API separators, dissolved air flotation (DAF) units and some type of further treatment (such as an activated sludge biotreater) to make such water suitable for reuse or for disposal.
 * Solvent refining units use solvent such as cresol or furfural to remove unwanted, mainly asphaltenic materials from lubricating oil stock (or diesel stock).
 * Solvent dewaxing units remove the heavy waxy constituents petrolatum from vacuum distillation products.

Flow diagram of typical refinery
The image below is a schematic flow diagram of a typical oil refinery that depicts the various unit processes and the flow of intermediate product streams that occurs between the inlet crude oil feedstock and the final end products. The diagram depicts only one of the literally hundreds of different oil refinery configurations. The diagram also does not include any of the usual refinery facilities providing utilities such as steam, cooling water, and electric power as well as storage tanks for crude oil feedstock and for intermediate products and end products.



There are many process configurations other than that depicted above. For example, the vacuum distillation unit may also produce fractions that can be refined into endproducts such as: spindle oil used in the textile industry, light machinery oil, motor oil, and steam cylinder oil. As another example, the vacuum residue may be processed in a coker unit to produce petroleum coke.

Specialty end products
These will blend various feedstocks, mix appropriate additives, provide short term storage, and prepare for bulk loading to trucks, barges, product ships, and railcars.
 * Gaseous fuels such as propane, stored and shipped in liquid form under pressure in specialized railcars to distributors.
 * Liquid fuels blending (producing automotive and aviation grades of gasoline, kerosene, various aviation turbine fuels, and diesel fuels, adding dyes, detergents, antiknock additives, oxygenates, and anti-fungal compounds as required). Shipped by barge, rail, and tanker ship. May be shipped regionally in dedicated pipelines to point consumers, particularly aviation jet fuel to major airports, or piped to distributors in multi-product pipelines using product separators called pipeline inspection gauges ("pigs").
 * Lubricants (produces light machine oils, motor oils, and greases, adding viscosity stabilizers as required), usually shipped in bulk to an offsite packaging plant.
 * Wax (paraffin), used in the packaging of frozen foods, among others. May be shipped in bulk to a site to prepare as packaged blocks.
 * Sulfur (or sulfuric acid), byproducts of sulfur removal from petroleum which may have up to a couple percent sulfur as organic sulfur-containing compounds. Sulfur and sulfuric acid are useful industrial materials.  Sulfuric acid is usually prepared and shipped as the acid precursor oleum.
 * Bulk tar shipping for offsite unit packaging for use in tar-and-gravel roofing.
 * Asphalt unit. Prepares bulk asphalt for shipment.
 * Petroleum coke, used in specialty carbon products or as solid fuel.
 * Petrochemicals or petrochemical feedstocks, which are often sent to petrochemical plants for further processing in a variety of ways. The petrochemicals may be olefins or their precursors, or various types of aromatic petrochemicals.

Siting/locating of petroleum refineries
The principles of finding a construction site for refineries are similar to those for other chemical plants:


 * The site has to be reasonably far from residential areas.


 * Facilities for raw materials access and products delivery to markets should be easily available.


 * Processing energy requirements should be easily available.


 * Waste product disposal should not cause difficulties.

For refineries which use large amounts of process steam and cooling water, an abundant source of water is important. Because of this, oil refineries are often located (associated to a port) near navigable rivers or even better on a sea shore. Either are of dual purpose, making also available cheap transport by river or by sea. Although the advantages of crude oil transport by pipeline are evident, and the method is also often used by oil companies to deliver large output products such as fuels to their bulk distribution terminals, pipeline delivery is not practical for small output products. For these, rail cars, road tankers or barges may be used.

It is useful to site refineries in areas where there is abundant space to be used by the same company or others, for the construction of petrochemical plants, solvent manufacturing (fine fractionating) plants and/or similar plants to allow these easy access to large output refinery products for further processing, or plants that produce chemical additives that the refinery may need to blend into a product at source rather than at blending terminals.

Safety and environmental concerns
The refining process releases numerous different chemicals into the atmosphere; consequently, there are substantial air pollution emissions and a notable odor normally accompanies the presence of a refinery. Aside from air pollution impacts there are also wastewater concerns, risks of industrial accidents such as fire and explosion, and noise health effects due to industrial noise.

The public has demanded that many governments place restrictions on contaminants that refineries release, and most refineries have installed the equipment needed to comply with the requirements of the pertinent environmental protection regulatory agencies. In the United States, there is strong pressure to prevent the development of new refineries, and no major refinery has been built in the country since Marathon's Garyville, Louisiana facility in 1976. However, many existing refineries have been expanded during that time. Environmental restrictions and pressure to prevent construction of new refineries may have also contributed to rising fuel prices in the United States. Additionally, many refineries (over 100 since the 1980s) have closed due to obsolescence and/or merger activity within the industry itself. This activity has been reported to Congress and in specialized studies not widely publicised.

Environmental and safety concerns mean that oil refineries are sometimes located some distance away from major urban areas. Nevertheless, there are many instances where refinery operations are close to populated areas and pose health risks such as in the Campo de Gibraltar, a CEPSA refinery near the towns of Gibraltar, Algeciras, La Linea, San Roque and Los Barrios with a combined population of over 300,000 residents within a 5 mi radius and the CEPSA refinery in Santa Cruz on the island of Tenerife, Spain which is sited in a densely-populated city center and next to the only two major evacuation routes in and out of the city. In California's Contra Costa County and Solano County, a shoreline necklace of refineries and associated chemical plants are adjacent to urban areas in Richmond, Martinez, Pacheco, Concord, Pittsburg, Vallejo and Benicia, with occasional accidental events that require "shelter in place" orders to the adjacent populations.

History
The world's first oil refineries were set up by Ignacy Łukasiewicz near Jaslo, Austrian Empire (now in Poland) in the years 1854-56 but they were initially small as there was no real demand for refined fuel. As Łukasiewicz's kerosene lamp gained popularity the refining industry grew in the area.

The first large oil refinery opened at Ploieşti, Romania in 1856. Several other refineries were built at that location with investment from United States companies before being taken over by Nazi Germany during World War II. Most of these refineries were heavily bombarded by US Army Air Forces in Operation Tidal Wave, August 1, 1943. Since then they have been rebuilt, and currently pose somewhat of an environmental concern.

Another early example is Oljeön, Sweden, now preserved as a museum at the UNESCO world heritage site Engelsberg. It started operation in 1875 and is part of the Ecomuseum Bergslagen.

At one time, the world's largest oil refinery was claimed to be Ras Tanura, Saudi Arabia, owned by Saudi Aramco. For most of the 20th century, the largest refinery of the world was the Abadan refinery in Iran. This refinery suffered extensive damage during the Iran-Iraq war. The world's largest refinery complex is the "Centro de Refinación de Paraguaná" (CRP) operated by PDVSA in Venezuela with a production capacity of 956000 oilbbl/d (Amuay 635000 oilbbl/d, Cardón 305000 oilbbl/d and Bajo Grande 16,000 bpd). SK Energy's Ulsan refinery in South Korea with a capacity of 840000 oilbbl/d and Reliance Petroleum's refinery in Jamnagar, India with 660000 oilbbl/d are the second and third largest, respectively.

Early US refineries processed crude oil to recover the kerosene. Other products (like gasoline) were considered wastes and were often dumped directly into the nearest river. The invention of the automobile shifted the demand to gasoline and diesel, which remain the primary refined products today. Refineries pre-dating the EPA were very toxic to the environment. Strict legislation has mandated that refineries meet modern air and water cleanliness standards. In fact, obtaining a permit to build even a modern refinery with minimal impact on the environment (other than CO2 emissions) is so difficult and costly that no new refineries have been built (though many have been expanded) in the United States since 1976. As a result, some believe that this may be the reason that the US is becoming more and more dependent on the imports of finished gasoline, as opposed to incremental crude oil. On the other hand, studies have revealed that accelerating merger activity in the refining and production sector has reduced capacity further, resulting in tighter markets in the United States in particular.