Near the surface, sediments are in an open geochemical system due to groundwater flow, diffusion and evaporation. Here their composition may be changed by mineral dissolution and transport of the dissolved components. At greater depth, below the reach of significant meteoric water flow, the porewater has an exceedingly low mobility and capacity to transport solids in solution. The porewater will gradually approach equilibrium with the minerals present, reducing the concentration gradients in the porewater and the potential for both advective and diffusive transport of solids in solution. Significant increased porosity (secondary porosity) is dependent on the dissolution and removal of solids in solution which may occur during freshwater flushing at shallow depth dissolving feldspar and precipitating kaolinite. Below the reach of freshwater the porewater flow is limited and represents a geochemically nearly closed system. The porewater will in most marine sediments be in equilibrium with calcite, even if it occurs in small amounts. Prediction of rock properties such as porosity and seismic velocity at a certain depth in a sedimentary basin must be based on the burial history (effective stress and temperature), but the primary mineralogical and textural composition of the sediments is equally important. Studies of depositional environments and provenance should therefore be integrated with diagenesis and be a part of basin analysis which is used for basin modelling.