|Fig. 1: Oil generation, migration, and accumulation.|
It is very hard to underestimate the significance of oil for the development of human civilization. The oil is used to produce gasoline, jet fuel, synthetic materials, plastic, synthetic oils, asphalt. In order for the oil to be created and later recovered several steps have to happen.  First of all, there should be organic material preserved and buried deep underground before it decays due to oxidation. Second, the organic material should be buried deep enough to be exposed to high temperatures where the transformation into oil can happen. Third, the oil should not get too deep where the temperatures are so high that the oil further decomposes into natural gas and graphite. Forth, there should be a reservoir rock with sufficient amount of pores or cracks that can hold the oil. Fifth, there should be a cap rock on top that prevents the oil from ascending further up and seeping into the ground.
There are three necessary components in the generation and accumulation of oil: source rock, reservoir rock, and cap rock (Fig. 1).  Source rock is a rock with high concentration of organic material that can be transformed into oil under the action of high temperature. Not every organic material can be transformed into oil, for example, wood can form only coal and methane. The remains of algae can transform into oil and, at higher temperatures, into natural gas. The most typical source rock is shale which is a fine grain rock that comes mostly from clay. Another example of source rock is limestone which is composed of calcite CaCO3, the main building element in sea shells.
The organic material in source rocks is transformed into oil at temperatures between 65°C and 150°C. These temperatures are reached at depths between about 2000 and 5500 m.  Deeper into the ground the temperature is higher than 150°C. At these temperatures the oil is irreversibly converted into natural gas and graphite. The range of depths between 2000 and 5500 m is called the oil window. Only natural gas can be found below this window. Other important conditions for oil generation are pressure and time. Chemical reactions run faster at higher temperatures. At lower temperatures, or smaller depths, the oil may take millions of years to form. If a source rock has not been buried deep enough for a long period of time, the conventional oil does not form. An example is the shale oil rocks.
After the oil is created, it is pushed by pressure upwards. Under the pressure from the oil the shale rock (which is a typical source rock) can form cracks and allow the oil to flow either upwards or in horizontal directions. The rocks that can both store and transmit the oil are the reservoir rocks.  Good reservoir rocks have high porosity, which is the ability to store fluid, and permeability, which is the ability to transmit fluid. Usually, these two characteristics are correlated: the higher the porosity the higher the permeability. A lot of reservoir rocks are sandstone and carbonates. Sandstone is a rock composed of sand size grains. Carbonates consist of calcite and dolomite. The dolomite is obtained from calcite CaCO3 by substituting one of the calcium molecules with magnesium CaMg(CO3)2. 
|Fig. 2: Estimate of undiscovered oil reserves (top) and the distribution of tectonic plates (bottom). The shields, shown in orange, have no oil reserves. The oil is found in orogens and in basins: blue and green. (Courtesy of the U.S. Geological Survey. Source: Wikimedia Commons.)|
Calcite is accumulated at the bottom of the ocean from the remains of the sea shell organisms.  Calcite can absorb magnesium from the water and substitute some of its calcium molecules, thus forming dolomite crystals. The density of dolomite is higher than the density of calcite, as a result, pores form around the dolomite crystals inside calcite. The second effect is solubility of calcite in mildly acid water (the acidity of water may be due to presence of CO2), while dolomite is only soluble in highly acidic water. Thus the calcite around the dolomite crystals can dissolve which increases the size of the pores.
The last but not the least is that there should be a cap rock that prevents the oil from seeping into the surface of the Earth. The cap rock is a rock that cannot transmit oil. Examples of cap rock are shale rocks or limestone and sandstone rocks immersed in shale.  The presence of cap rocks is a necessary condition but not sufficient, the cap rocks have to form structures, called traps, that can accumulate the oil and gas.
An example of a trap is an anticline which looks like a dome of a cap rock over the reservoir rock (Fig. 1).  Anticlines can form as a result of squeezing a plane of the cap rock from the sides. Natural gas, which is usually formed together with the oil, is the lightest element, it will be at the top of the dome (unless it completely dissolves in the oil). Then there is a deposition of oil. Deep underground salty water, called brine, is the densest, it is at the bottom below the oil (Figs. 1).
Most evidence supports an organic rather than an inorganic origin of oil.  First of all, the oil is mostly found in sedimentary rocks rather than igneous rocks, such as granite and basalt. Second, the oil has optical rotary power, i.e. ability to rotate the polarization of light, which is typical for organic matter and is attributed to the presence of cholesterol. Third, many crude oils contain porphyrins, which may come either from chlorophyll in plants or from red cells in blood. Forth, most crude oils contain nitrogen, which is an essential element in amino acids. Fifth, the oil is found in sedimentary rocks spanning many geological times from Precambrian (more than 500 million years ago) to Pleistocene (about a million years ago), which is an indication that oil forms continuously in the sedimentary rocks. Sixth, the sedimentary rocks contain enough organic material to form the oil. The chemical composition of the petroleum is similar to the composition of the organic material, although there is more carbon and hydrogen and less oxygen and nitrogen in the oil compared to the organic material.
The knowledge about oil generation, migration and accumulation can be used to search for oil fields and to estimate the remaining oil reserves. Oil is formed and trapped in sedimentary rather than igneous rocks. Regions where the ancient precambrian igneous rocks are exposed at the surface of the Earth are called shields. As one can see from Fig. 2 the world oil reserves are not found in the shields but in orogens which are regions between tectonic plates that experience deformation forces due to the motion of the plates. These forces create basins: areas of deep sedimentary rocks which are necessary to produce the oil. The forces also deform the sedimentary rocks which leads to creation of traps necessary for oil and gas accumulation. One can also see in Fig. 2 that the basins and orogens coincide with many oil reach regions: east and west costs of America, around the Persian gulf, along the Ural mountains, across the Caspian sea, in Siberia, in the north of Africa.
Since all the orogens and basins on the Earth are known, one can estimate the amount of undiscovered oil (assuming that the current theory of oil formation is correct). For instance, recent USGS survey estimates the amount of undiscovered conventional oil to be below 600 billion barels.  The estimated proven world reserves are below 1700 billion barrels.  At the current production rate, the proven reserves would last for about 50 years.  Adding the undiscovered oil gives at most 70 years for the conventional oil. If we were to use oil beyond 70 years, there should be either better ways to recover the conventional oil, [5,6] or one will have to rely on unconventional oil, such as the heavy oil, [7,8] oil sands, [9,10] and shale oil. [11,12]
© Dmitry Malyshev. The author grants permission to copy, distribute and display this work in unaltered form, with attribution to the author, for noncommercial purposes only. All other rights, including commercial rights, are reserved to the author.
 N. J. Hyne, Nontechnical Guide to Petroleum Geology, Exploration, Drilling, and Production, 2nd Ed. (Pennwell Books, 2001).
 A. I. Levorsen, Geology of Petroleum (W. H. Freeman, 1954).
 "An Estimate of Undiscovered Conventional Oil and Gas Resources of the World," U.S. Geological Survey, Fact Sheet 2012-3042, March 2012.
 BP Statistical Review of World Energy 2013," British Petroleum, June 2013.
 G. Glatz, "A Primer on Enhanced Oil Recovery," PH240, Stanford University, Fall 2013.
 M. Alshakhs, "Modifying Water Salinity to Improve Oil Recovery," PH240, Stanford University, Fall 2013.
 K. R. Alnoaimi, "Heavy Oil Recovery: Definitions and Means," PH240, Stanford University, Fall 2010.
 B. Reinhardt, "Heavy Oil Recovery and Usage," PH240, Stanford University, Fall 2010.
 H. Park, "Oil Sands Conundrum," PH240, Stanford University, Fall 2012.
 J. Lagasca, "Alberta Grosmont Carbonates: The Next Frontier in Oilsands," PH240, Stanford University, Fall 2012.
 S. Herron, "U.S. Oil Shale," PH240, Stanford University, Fall 2010.
 G. Glatz, "Oil Shale Pyrolysis," PH240, Stanford University, Fall 2013.