In geology, compaction refers to the process by which a sediment progressively loses its porosity due to the effects of loading. This forms part of the process of lithification. When a layer of sediment is originally deposited, it contains an open framework of particles with the pore space being usually filled with water. As more sediment is deposited above the layer, the effect of the increased loading is to increase the particle-to-particle stresses resulting in porosity reduction primarily through a more efficient packing of the particles and to a lesser extent through elastic compression and pressure solution.
The initial porosity of a sediment depends on its lithology. Mudstones start with porosities of >60%, sandstones typically ~40% and carbonates sometimes as high as 70%. Results from hydrocarbon exploration wells show clear porosity reduction trends with depth. In sediments compacted under self-weight, especially in sedimentary basins,the porosity profiles often show an exponential decrease, called Athy's law as first shown by Athy in 1930. A mathematical analytical solution was obtained by Fowler and Yang to show the theoretical basis for Athy's law. This behaviour can be easily observed in experiments and used as a good approximation to many real data.