For the igneous rocks and the majority of the metamorphic rocks, the porosity is relatively low and can be ignored. The density of these rocks thus will depend mainly on component minerals, it varies between 2,6 and 3,4 103 Kg/m3. The pressure plays a role at the beginning because the pores and the fractures are closed when the pressure increases and the density increases, then, very quickly it remains stable.

For the sedimentary rocks, which are the principal reservoirs, the density varies much more:

Density of the main sedimentary rocks (from Wohlenberg, 1982)

For the unconsolidated sediments, like soils or sands, the density can decrease when they are dry until values much lower than 1,3 103 Kg/m3. Another characteristic of porous sediments is their relative compressibility, which has as the consequence that their density varies with depth and thus the pressure. This relation is not linear and reaches an asymptotic value for great depths (approximately 2 km).