Though there are differing theories on the origin of hydrocarbons, the organic theory is the more widely held and studied hypothesis.
Petroleum scientists are particularly interested in the association between hydrocarbons and sedimentary rocks. Sedimentary rocks (rocks formed from fragments of other rocks or chemically precipitated) are much more likely to have properties that allow hydrocarbons to generate, migrate, and be stored between their grains. Sedimentary rocks that accumulate in water-rich environments, such as lakes and oceans in particular, tend to preserve and generate hydrocarbons more efficiently.
Marine life, from the simplest plankton and single-celled life forms to the more complex crustaceans and fish species, contains carbon molecules. As these animals die and decay over millions of years, carbon molecules, through processes of heat and pressure, degrade into hydrocarbon compounds (see figure below). Sufficient volumes of accumulations may form oil and gas reservoirs over time.
Increasing heat and pressure help to encourage decomposition of carbon compounds from the remains of marine life. Larger organic molecules crack to form lower weight compounds leading to the separation between the volatile products (hydrogen and simpler chain carbons such as methane) and liquid products (C13+). The transformation of this organic material, called kerogen, into oil and gas hydrocarbons leads to the progressive increase of the hydrogen/carbon ratio.
Generally, the lower the temperature and shallower the depth, the heavier the hydrocarbon component formed. Though temperature is the critical factor, the amount of time that the organic material is exposed to heat and pressure is also an important factor in the production of hydrocarbons. These factors determine the relative amounts of natural gas versus oil that is found in a particular reservoir. The figure below shows the relationship between depth, temperature, and probable petroleum production.
In a simple sense, gas, oil, and solid hydrocarbons such as coal are merely different stages in the creation of hydrocarbons from organic matter.
Any sediment capable of becoming a source rock for oil may also produce gas. In this case, gas produced will be associated gas, occurring in the same reservoir and coexisting with crude oil. However, not all sediment capable of producing gas will also produce oil, leading to the huge reserves of nonassociated gas, or gas without oil, which is found in many parts of the world.
Much like a kitchen sponge appears to be solid, but once it is squeezed, liquid drains out, rocks may appear solid, but contain liquids inside the void spaces between rock grains. A bucket of beach sand is another analogy. If a glass of water is poured onto the sand, the water appears to disappear into the sand. It actually fills the empty pore spaces between the individual sand grains. As more water is added, it continues to fill the entire pore space until there is no more empty space, forcing the water to overflow from the bucket. Oil and gas fill the pores of rocks in the same way as the water in the bucket. Imagine if two solid layers like the faces of a steel vise squeeze the bucket of sand. If the bucket is tightly packed with sand, the grain structure of the sand in the bucket prevents the bucket from deforming. If a hole is drilled through the steel faces of the vise, any liquid in the pores of the rock will squirt out. A well drilled into an oil or gas reservoir acts the same way. If the oil and gas reservoir pressure is higher than the pressure in the well, the hydrocarbon is forced to come out of the well.
Gas accumulates in a particular location if nature provides the following geologic conditions:
● A source rock with sufficient decomposing organic matter.
● Reservoir rock with favorable porosity and permeability. Typically, sedimentary rocks such as sandstones and certain limestones are the best reservoirs connected via migration paths to the source rock. Porosity refers to the proportion of void space between the rock grains and permeability measures the ability of fluid to pass through the rock.
● The presence of a rock formation or layer, usually above the reservoir rock, that has low permeability, thus sealing the reservoir and preventing the gas from escaping. Typically, these cap rocks are shales, salts, and clays.
The presence of a trap, or specific geologic/geometric configuration, which prevents lateral escape of gas.
● Because of density differences, oil will accumulate above the water layer, and gas, if present, will accumulate above the oil layer and collect in the highest part of the trap, forming a gas cap above the liquid layers. Density also helps to explain why oil and gas migrate to the highest point in a formation, if sufficient porosity and permeability conditions exist. Natural gas components may also exist dissolved within the oil layers, separating on the surface when the pressure is reduced.
A classic gas trap is an anticlinal trap, as shown in below.