Petroleum reservoir quality prediction: overview and contrasting approaches from sandstone and carbonate communities

Abstract The porosity and permeability of sandstone and carbonate reservoirs (known as reservoir quality) are essential inputs for successful oil and gas resource exploration and exploitation. This chapter introduces basic concepts, analytical and modelling techniques and some of the key controversies to be discussed in 20 research papers that were initially presented at a Geological Society conference in 2014 titled ‘Reservoir Quality of Clastic and Carbonate Rocks: Analysis, Modelling and Prediction’. Reservoir quality in both sandstones and carbonates is studied using a wide range of techniques: log analysis and petrophysical core analysis, core description, routine petrographic tools and, ideally, less routine techniques such as stable isotope analysis, fluid inclusion analysis and other geochemical approaches. Sandstone and carbonate reservoirs both benefit from the study of modern analogues to constrain the primary character of sediment before they become a hydrocarbon reservoir. Prediction of sandstone and carbonate reservoir properties also benefits from running constrained experiments to simulate diagenetic processes during burial, compaction and heating. There are many common controls on sandstone and carbonate reservoir quality, including environment of deposition, rate of deposition and rate and magnitude of sea-level change, and many eogenetic processes. Compactional and mesogenetic processes tend to affect sandstone and carbonate somewhat differently but are both influenced by rate of burial, and the thermal and pressure history of a basin. Key differences in sandstone and carbonate reservoir quality include the specific influence of stratigraphic age on seawater composition (calcite v. aragonite oceans), the greater role of compaction in sandstones and the greater reactivity and geochemical openness of carbonate systems. Some of the key controversies in sandstone and carbonate reservoir quality focus on the role of petroleum emplacement on diagenesis and porosity loss, the role of effective stress in chemical compaction (pressure solution) and the degree of geochemical openness of reservoirs during diagenesis and cementation. This collection of papers contains case study-based examples of sandstone and carbonate reservoir quality prediction as well as modern analogue, outcrop analogue, modelling and advanced analytical approaches.

Abstract: The porosity and permeability of sandstone and carbonate reservoirs (known as reservoir quality) are essential inputs for successful oil and gas resource exploration and exploitation. This chapter introduces basic concepts, analytical and modelling techniques and some of the key controversies to be discussed in 20 research papers that were initially presented at a Geological Society conference in 2014 titled 'Reservoir Quality of Clastic and Carbonate Rocks: Analysis, Modelling and Prediction'. Reservoir quality in both sandstones and carbonates is studied using a wide range of techniques: log analysis and petrophysical core analysis, core description, routine petrographic tools and, ideally, less routine techniques such as stable isotope analysis, fluid inclusion analysis and other geochemical approaches. Sandstone and carbonate reservoirs both benefit from the study of modern analogues to constrain the primary character of sediment before they become a hydrocarbon reservoir. Prediction of sandstone and carbonate reservoir properties also benefits from running constrained experiments to simulate diagenetic processes during burial, compaction and heating. There are many common controls on sandstone and carbonate reservoir quality, including environment of deposition, rate of deposition and rate and magnitude of sea-level change, and many eogenetic processes. Compactional and mesogenetic processes tend to affect sandstone and carbonate somewhat differently but are both influenced by rate of burial, and the thermal and pressure history of a basin. Key differences in sandstone and carbonate reservoir quality include the specific influence of stratigraphic age on seawater composition (calcite v. aragonite oceans), the greater role of compaction in sandstones and the greater reactivity and geochemical openness of carbonate systems. Some of the key controversies in sandstone and carbonate reservoir quality focus on the role of petroleum emplacement on diagenesis and porosity loss, the role of effective stress in chemical compaction (pressure solution) and the degree of geochemical openness of reservoirs during diagenesis and cementation. This collection of papers contains case study-based examples of sandstone and carbonate reservoir quality prediction as well as modern analogue, outcrop analogue, modelling and advanced analytical approaches.
Gold Open Access: This article is published under the terms of the CC-BY 3.0 license.
Porosity and permeability (reservoir quality) exert fundamental controls on the economic viability of a petroleum accumulation (Blackbourn 2012).
They need to be quantified from basin access and exploration, via appraisal and field development through secondary and tertiary recovery in order to minimize cost and maximize return on investment. Consequently, the question of reservoir quality prediction is becoming ever more critical with exploration and production of petroleum in increasingly challenging conditions and from less conventional reservoirs. The porosity of a reservoir affects the volume of oil or gas in place and permeability affects the rate at which oil and gas flow from the reservoir to the wellbore (Gluyas & Swarbrick 2004). Measuring porosity and permeability using core analysis techniques , or using wireline logs via a combination of density, sonic, neutron and NMR logs (Rider & Kennedy 2011), is essential for reservoir characterization but these approaches do not directly reveal the controls on reservoir quality and thus do not facilitate prediction away from the wellbore. Defining grain types and their mineralogy, grain-grain contacts, intergranular volume (a proxy for the extent of compaction), matrix type and amount, cement mineralogy and morphology, and pore types, their genesis and proportions is vital in order to establish the dominant controls on reservoir quality ( Fig. 1; Primmer et al. 1997). Quantifying the conditions of effective stress, temperature and thermal history as well as the composition of fluids under which a sedimentary rock evolved, from deposition through burial and uplift, is also essential to achieve a holistic understanding and make credible forward predictions of reservoir quality. Processoriented diagenetic models that consider these depositional and burial history characteristics may provide deeper insights into the controls on reservoir quality while also having the potential to serve as powerful tools for prediction, particularly when integrated with other disciplines such as sedimentology, structural geology, geomodelling and reservoir engineering.
Despite the importance of understanding the controls on porosity and permeability of reservoirs, numerous fundamental issues lack consensus. Reservoir quality is controlled by interdependent sedimentary and diagenetic factors, including the origin of the sediment (provenance), depositional environment, weathering and climatic conditions in the hinterland and at the site of deposition, compaction, recrystallization and dissolution, authigenic mineral growth, petroleum charge, depth of burial, extent and rate of heating, fluid pressure and effective stress and structural deformation . Some of these factors are interlinked but they are typically considered separately, thus hampering reservoir quality prediction. Yet further issues arise owing to some fundamental unresolved controversies that thwart the development of universally accepted models and approaches for reservoir quality prediction. These include the effect of petroleum on mineral growth, the question of whether effective stress or temperature controls pressure solution (chemical compaction) and the question of open v. closed systems during the diagenesis of reservoirs. These controversies will be addressed at the end of this paper.
Traditionally, carbonate and clastic reservoir quality prediction has been undertaken by what are effectively separate communities, although there are many apparent overlaps (Figs 1-3). There are also many assumptions adopted by one community for which contradictory assumptions have been made by the other community. Bringing these scientific communities together provides an opportunity to take a leap into bigger advancements in reservoir quality prediction for clastic, carbonate and unconventional reservoirs. The aim of this paper, and the accompanying volume, is to achieve some level of consensus as to our true current understanding of the controls on reservoir quality across both communities. Fig. 2. Controls on carbonate reservoir quality split between the major controls of the origin of the carbonate grains: the 'carbonate factory', eogenetic (early/shallow burial diagenetic) controls, mesogenetic (burial diagenetic) controls and even telogenetic (uplift-related) influences. The carbonate factory is controlled by sea-level variations, climate, ocean currents and supply of nutrients and the amount of clastic material fed into the systems. Together these control the types and abundances of different life forms, grain types and mineralogy and the amount of matrix-micrite. If the split between eodiagenetic and mesogenetic is accepted to be about 2000 m and 60-708C then mechanical compaction and the replacement of unstable mineral grains and matrix start in the eogenetic realm and continue into the earlier stages of the mesogenetic realm. Similarly, dolomitization and redox processes, such as sulphate reduction, occur in both the eogenetic and mesogenetic realms although under quite different conditions of temperature, stress and fluid composition. LMC, low magnesium calcite; HMC, high magnesium calcite.
Overview of reservoir quality controls in carbonates and sandstones

Depositional characteristics of primary sediments
Even before diagenesis starts, the primary make-up of the sediment has a major role in influencing the history and reservoir quality evolution of the subsequent rock (Nguyen et al. 2016;Figs 2 & 3). In carbonates, the mineralogy of primary CaCO 3 is of fundamental importance to the subsequent reactivity of the sediment. The composition of seawater and global sea-level have fluctuated through time, leading to preferential precipitation of aragonite and/or high-Mg calcite at specific times (Sandberg Fig. 3. Controls on sandstone reservoir quality split between the major controls on clastic grains: the 'clastic factory', eogenetic (early/shallow burial diagenetic) controls, mesogenetic (burial diagenetic) controls, and even telogenetic (uplift-related) influences. The clastic factory is controlled by geology in the source sediment area, climate, relief and the length of the sediment transport systems. Together these control the composition of the sand (QFL), the amount of matrix, sediment texture and the extent of in-situ (autochthonous) carbonate generation. If the split between eodiagenetic and mesogenetic is accepted to be about 2000 m and 60-708C then the mechanical compaction processes of grain rearrangement and ductile grain compaction start in the eodiagenetic realm and continue into the earlier stages of the mesogenetic realm. Grain fracturing can start in deformation bands during shallow burial (eodiagenesis) and continue during burial into the mesogenetic realm. Similarly reactive grain dissolution and/or replacement by minerals stable at low temperature occurs in both the eodiagenetic and mesogenetic realms although under quite different temperature, stress and fluid composition conditions. 1983). Aragonite and high-Mg calcite are metastable and therefore the resultant carbonate is more reactive than limestone that is deposited during periods when low-Mg calcite is preferentially precipitated (Fig. 2). In sandstones the supply of sediment involves a wide variety of depositional minerals (quartz, feldspars and the spectrum of clay, carbonate and ferromagnesian minerals; Fig. 3). A new perspective and improved database of mineral distribution in modern clastic sedimentary environments may serve to help understand where minerals accumulate in specific environments and so help to develop appropriate analogues to be used to understand and predict mineral distribution in ancient and deeply buried rocks deposited in an equivalent depositional environment (Wooldridge et al. 2017a, b). Furthermore, some new carbonate plays involve Mg-clay minerals and their partial dissolution, raising important questions about the origin and diagenetic importance of siliceous minerals in carbonate systems (Tosca & Wright 2015).

Eodiagenesis (early/shallow burial diagenesis)
Diagenesis starts as soon as sediment has been deposited and the eventual reservoir quality is at least partly a function of the conditioning that the sediment experienced in the near-surface realm Worden & Burley 2003;Figs 2-4). Early/shallow burial diagenesis, also known as eodiagenesis (Choquette & Pray 1970;Morad et al. 2000;Worden & Burley 2003), is the result of a combination of (1) changing conditions (e.g. pH, redox state and CO 2 -saturation) compared with those in which sediment was initially deposited or formed; and (2) continued progress towards thermodynamic equilibrium. Eogenetic processes include meteoric infiltration, groundwater flow, bioturbation, microbial activity and seawater reflux leading to dolomite and anhydrite precipitation (Figs 2 & 3). The pivotal role of eodiagenesis is widely acknowledged in the carbonate community (Tucker & Wright 1990;Moore & Wade 2013;Tosca & Wright 2015) although the sandstone community seems to have taken longer to acknowledge the universal importance of the processes that condition a sediment before it undergoes mesodiagenesis. One of the most important eogenetic reactions in carbonates is the dissolution, or replacement by low-Mg calcite, of aragonite and high-Mg calcite. This can be facilitated by the flux of seawater within carbonate sediments above and below the sediment -water interface, and meteoric water during platform emergence. All of these processes tend to happen relatively soon after deposition and can result in widespread cementation and lithification of the primary sediment as well as a drastic redistribution of porosity prior to burial.
The problem of defining eodiagenesis. The definition of eodiagenesis and mesodiagenesis (i.e. burial diagenesis) is somewhat academic but it raises questions about the primary controls on diagenesis: depth, temperature, effective stress, fluid composition and mineral composition. Depth of burial is typically treated as a master control although rate of burial, depth-related heating and depth-related effective stress are the extrinsic variables that primarily need to be taken into account (Figs 2 & 3). Fluid composition is somewhat more important for carbonates than sandstones simply because carbonate minerals tend to be more soluble and have faster dissolution and precipitation rates than silicate minerals (see later section on 'Open v. closed diagenetic systems and secondary porosity'). Eodiagenesis in sandstones has been defined in terms of sediment that is (1) within the realm of subaerially influenced water (oxidized and with CO 2 influenced by surface biological activity), (2) buried to less than about 2000 m or (3) buried to depths where the sediment is at less than about 60 or 708C (Figs 2 & 3; Choquette & Pray 1970; Morad et al. 2000;Worden & Morad 2003). In sandstones, temperature is probably the most important delimiter between eodiagenesis and mesodiagenesis (Fig. 3) since few mineral reactions happen in sandstones during burial between exiting the realm where microbial processes are dominant and moving to depths/temperatures where a semi-predictable suite of reactions (e.g. illitization of smectite, feldspar dissolution, quartz cement, dolomite growth) starts to occur. Elapsed time also plays a role, given that most diagenetic reactions are kinetically controlled (Ehrenberg et al. 2009). Thus rocks exposed to lower temperatures for longer periods may have comparable extents of diagenetic alteration to younger, hotter counterparts.
Why eodiagenesis matters to deeply buried sandstone and carbonate reservoirs. Eogenetic processes fundamentally condition the sediment prior to its burial and heating. Eodiagenesis can lead to total or partial occlusion of pores owing to mass cementation (e.g. by calcite) and it can lead to alteration (replacement or dissolution) of unstable detrital components (aragonite, feldspars, opaline silica, etc.) owing to interaction with groundwater. Eodiagenesis can lead to accumulation of normally minor components such as Fe-minerals during times of reduced sedimentation. The role of eodiagenesis in sandstone reservoir quality is becoming increasingly acknowledged, for example in terms of the possible creation of coats on detrital grains that then may inhibit later quartz cement (Dowey et al. 2017;Wooldridge et al. 2017a, b;Daneshvar & Worden 2017;Fig. 5). Eodiagenesis can lead to the early growth of carbonate and sulphate cements that either may inhibit compaction or be widely disseminated and so greatly damage porosity. Subsequent mesogenetic processes are contingent upon both the primary sediment character and the combination of eogenetic processes that were imposed on the primary sediment.
Dominant eogenetic minerals in sandstones and carbonates. The main pore-filling and replacing cementing minerals that develop during eodiagenesis of sandstones and carbonates are calcite, dolomite, siderite, pyrite, gypsum, kaolinite, smectite, berthierine (Fe-rich 7 Å clay), glauconite and amorphous or cryptocrystalline silica (Figs 2 & 3; Morad et al. 2012). These minerals can be found as eogenetic phases in both carbonates and sandstones. Eodiagenesis leads to locally pore-filling cements (commonly carbonate, less commonly sulphate) as nodules or concretions (Fig. 4); grain coats ( Fig. 5), replacement of unstable detrital or diagenetic components such as aragonite or high-Mg calcite clasts, feldspar grains or lithic grains; and a suite of (typically biologically mediated) redox processes involving carbon, iron and sulphur compounds and minerals. Eodiagenesis of carbonates is dominated by the growth of calcite and dolomite (Tucker & Fig. 4. Effects of eodiagenesis: nodules, nodular beds and concretions. (a) Upper Jurassic Portland Limestone with chert beds, Wessex Basin, UK (Maliva et al. 1999). (b) Lower Jurassic Bridport Sandstone, Wessex Basin, UK, with bioclast-derived calcite cemented nodules and nodular layers, Wessex Basin, UK (Bryant et al. 1988). (Images (a) and (b) courtesy of Richard Worden.) Wright 1990; Moore & Wade 2013). Eodiagenesis of sandstones is dominated by the alteration of feldspars and other labile grain types to kaolinite and smectite and growth of Fe-minerals such as pyrite, siderite or Fe-clay depending on water composition (Worden & Burley 2003). Eogenetic growth of siderite, berthierine and glauconite can occur in carbonates and sandstones but only when there is an abundant supply of iron. Eogenetic silica cement as chert, grain-coating amorphous silica or microquartz grain coats Worden et al. 2012;French & Worden 2013) can grow in carbonates and sandstones, typically requiring a biogenic source of amorphous silica such as diatoms, radiolaria or sponge spicules (Vagle et al. 1994;Haddad et al. 2006). Mg-clay growth and dissolution during eodiagenesis is now recognized as an important component in the reservoir quality evolution of some lacustrine carbonate reservoirs (Tosca & Wright 2015).
Meteoric and surface water influences during eodiagenesis. Meteoric water has extremely low salinity (e.g. 10-20 mg l 21 in temperate coastal regions), is saturated with atmospheric oxygen and is mildly acidic (pH 5.6) owing to dissolved atmospheric CO 2 . As a consequence, the flow of meteoric water through recently deposited sediment will tend to cause a predictable series of diagenetic processes including: alteration of feldspars to kaolinite (or even gibbsite if there is sufficient meteoric water throughput), dissolution of relatively soluble minerals such as calcite or gypsum and oxidation of any reduced Fe-mineral (ferrous minerals such as pyrite, biotite or chlorite) (Figs 2 & 3). Meteoric water that percolates through soils and peats may develop high bicarbonate concentrations as it dissolves soil gasderived CO 2 owing to respiration, microbial decay or fermentation. Such waters effectively become weak solutions of carbonic acid that are capable of promoting dissolution, forming leached sandstone horizons known as ganisters in coaly, deltaic sequences (Percival 1983(Percival , 1992 and karstification in carbonates (Dewever et al. 2010). Microbiological processes may convert sulphide minerals into dissolved sulphate (via bacterial sulphate reduction). These waters effectively contain sulphuric acid, which is capable of exacerbating dissolution processes, especially of carbonate minerals, in both limestones and sandstones.
Meteoric water will continue to dissolve carbonate minerals until the water is saturated with carbonate; if flow is accompanied by evaporation of the meteoric water, then the water can become supersaturated with calcite and lead to calcite growth within the sediment. In both clastic and carbonate sediments, this results in calcrete growth first, followed by dolocrete and then ultimately gypcrete growth (Schmid et al. 2003). The ability of flowing meteoric water to alter feldspars to clay minerals will continue until the meteoric-derived groundwater develops high metal concentrations, for example during evaporation (Jacobson et al. 1988). Under humid conditions, vast cave systems can develop in carbonate rocks with dissolution taking place from percolating groundwater in the vadose zone, and also at the top of the water table (phreatic caves). Karstic terrain will not always develop during emergence of a carbonate platform, however; there has to be sufficient time and water of the correct composition for dissolution to take place and sediment permeability has to be high enough to facilitate fluid flux.
If surface water holds fine suspended sediment and percolates through a porous, unsaturated zone, e.g. a vadose zone of an unconsolidated, typically low salinity aquifer or into intertidal granular sediments at low tide in estuaries or deltas where the water typically approaches seawater salinity (Barrie et al. 2015), then the fine suspended sediment may be retained within the granular matrix. The matrix acts as a filter and traps the fine suspended sediment; this is known as mechanical infiltration (Matlack et al. 1989;Moraes & De Ros 1990;Herringshaw & McIlroy 2013). Infiltration is one way to add fine sediment to previously clean, clay-free sediment. Infiltration only happens when turbid water soaks into unsaturated permeable (typically granular) sediment and is thus of importance to granular sediment with a water table (i.e. deltaic, fluvial or intertidal clastic sediment). Infiltration is widely cited as a control on the presence of clay minerals in granular sediments. Although there have been few studies of modern sedimentary environments where this has been proved, there is a burgeoning soil-science literature where infiltration is accepted as a major control on redistribution of fine materials in a granular matrix (Dowey et al. 2017).

Animal-sediment interaction and eodiagenesis.
Bioturbation occurs when organisms live within sediment and disturb primary sediment structures; this occurs in both carbonate and clastic sediment (Taylor & Goldring 1993). Organisms live in recently deposited sediment to find shelter from predators, a home and/or nutrition within the sediment itself (Bromley 1996). Bioturbation physically moves sediment around and tends to mix primary sedimentary layers together. This mixing can lead to significant redistribution of porosity, which can result in the degradation of reservoir quality (Needham et al. 2005), enhanced vertical permeability and differential diagenesis, for example, preferential cementation of burrows (Walter & Burton 1990). Some animals can select the minerals they ingest; for example Macaronichnus preferentially ingests quartz, leading to quartz-rich back-filled burrows and the potential for locally enhanced permeability paths (Gingras et al. 2002). Microfauna, such as diatoms, as well as burrowing macrofauna, live in sediment (Vos et al. 1988), creating biofilms that result in a bulk sediment that is more coherent than expected (Schindler et al. 2015). Biofilms lead to the creation of thin coats of fine-grained minerals (i.e. clay and silt) on detrital grains (Wooldridge et al. 2017a, b) and the organically mediated precipitation of minerals, such as dolomite (Gingras et al. 2004).
Microbial influences on eodiagenesis. Microbial activity occurs in all near-surface sediments and needs to be accounted for in developing a holistic understanding of eodiagenesis and the early stages of reservoir quality evolution of sedimentary rocks (McMahon et al. 1992). Assuming there is sufficient biomass, different populations of bacteria utilize different sources of oxygen to survive in the sediment (Irwin et al. 1977). These sources include dissolved oxygen in water, oxygen derived from the reduction of nitrate to N 2 , oxygen derived from the reduction of ferric to ferrous iron and oxygen derived from the reduction of sulphate to sulphide. The metabolic activities of bacteria typically convert organic forms of carbon into CO 2 ; this CO 2 is the ultimate fate of the oxygen that has been removed from solution as well as from nitrate, ferric iron, oxidized manganese and sulphate. Bacterial processes thus lead to a series of chemically reduced species of iron, sulphur, manganese and nitrogen and an abundance of CO 2 (McMahon et al. 1992). Framboidal pyrite, common in many types of sediment including sandstones and carbonates, is the result of eogenetic microbial activity. In non-marine settings, or where marine aqueous sulphate has been exhausted and where ferric iron is abundant, the reduced form of iron is free to make eogenetic minerals other than pyrite, such as siderite or Fe-clay minerals, such as berthierine. Even in fully marine sediment, where detrital ferric iron minerals are abundant, there may not be enough sulphate (and thus sulphide) available to convert all the newly reduced iron into pyrite, thus allowing for the growth of other Fe minerals such as siderite or Fe-clay minerals including berthierine or glauconite (Worden & Burley 2003). Microbially created carbonate minerals may also result from the metabolic production of CO 2 ; these are best identified by a combination of textural, compositional and stable isotope studies. It is now recognized that some carbonate reservoirs only exist owing to microbial activity (Lipinski et al. 2013;Bahniuk et al. 2015).
Dolomitization and eodiagenesis. On a global basis, many carbonate reservoirs comprise a proportion of dolostone. Although many conceptual models of dolomitization have been presented, it is now widely concluded that platform-scale dolomitization is most likely to occur from the reflux of evaporated seawater, since this is the most volumetrically abundant source of fluids with a high-Mg/Ca ratio (Adams & Rhodes 1960;Jiang et al. 2016). Reflux is interpreted to occur owing to the formation of brine pools on the platform top, particularly within arid environments. Evaporation leads to precipitation of gypsum, thereby decreasing the Ca/Mg of the fluid, and increases brine density. The brine sinks and refluxes seaward through the sediment pile, with dolomitization being facilitated by the slight increase in temperature and occurring preferentially in sediments with a high reactive surface area and/or a 'seed' (nucleation point) for dolomitization, such as high-Mg calcite (Jones & Xiao 2005;Jiang et al. 2014). It is not always necessary for brines to have reached gypsum saturation for reflux dolomitization to occur since there simply needs to be repeated flux of seawater (Garcia-Fresca et al. 2012;Newport et al. 2017). Typical features of platform-scale dolomitization by reflux include stratabound, fabric-selective and sometimes fabric retentive dolomitization, all at temperatures of less than c. 608C. Basin-and field-scale analysis of carbonate reservoirs shows that dolomitization may improve permeability through a redistribution of porosity, creating a more effective pore network, although over-dolomitization (i.e. replacement and cementation) close to the source of the dolomitizing fluids may degrade reservoir quality (Lucia & Major 1994;Saller & Henderson 1998). Although dolomitization has been commonly reported in carbonate reservoirs, it has also been reported to occur in sandstones (Morad et al. 1992, especially in marginal marine depositional environments.

Mesodiagenesis (burial diagenesis)
The problem of defining mesodiagenesis. Burial diagenesis, sometimes known as mesodiagenesis (Choquette & Pray 1970;Morad et al. 2000;Worden & Burley 2003), has been defined in terms of sediment that (1) was physically separated from atmospherically influenced water, (2) was buried to greater than about 2000 m or (3) was buried to depths where the sediment is greater than c. 60 or 708C. For sandstones, temperature is probably the most important factor differentiating between eodiagenesis and mesodiagenesis since few mineral reactions happen in sandstones during burial between relatively shallow depths where microbial processes are dominant and moving to depths/temperatures where a range of chemical reactions (e.g. illitization of smectite, feldspar dissolution, quartz cement, dolomite growth) start to occur. Elapsed time also plays a role, given that most diagenetic reactions are kinetically controlled. Thus rocks exposed to lower temperatures for longer periods may have comparable extents of diagenetic alteration with younger, hotter counterparts.
Typical mesogenetic processes in sandstones and carbonates. Typical, but not universal, mesogenetic processes, as sandstones are buried from 60 to .1508C, are (in approximate order) development of K-feldspar overgrowths, chloritization of berthierine and chlorite growth, smectite illitization, K-feldspar and plagioclase albitization and dissolution and replacement by illite, quartz cementation, K-feldspar reaction with kaolinite to create illite, Fe-dolomite growth, stylolite formation, rare fracturing owing to shear, minor barite growth, minor pyrite growth and other minor or localized processes such as anhydrite growth. Most of these processes lead to a profound decrease in porosity although it is noteworthy that the creation of grain-coating chlorite or microquartz can impede quartz cementation and thus lead to better than expected reservoir quality (Ehrenberg 1993;Aase et al. 1996). In very deeply buried sandstones, the dominant remaining porosity type tends to be secondary pores (Fig. 6) within dissolved feldspar grains (Dutton & Loucks 2010).
Typical burial processes in carbonates include complete dissolution or replacement of aragonite and high-Mg calcite, often leading to the local creation of secondary porosity (Fig. 6), gypsum dehydration to anhydrite, pressure dissolution (chemical compaction), dolomitization, growth of calcite and/or dolomite spar that may become more Fe-rich with time, fracturing, secondary porosity generation and, locally, anhydrite reaction Mesogenetic carbonate and sulphate cements in sandstones and carbonates. Calcite and dolomite are, naturally enough, the dominant cements in carbonate reservoirs (Barnett et al. 2015;John 2015;Tosca & Wright 2015), but they are also common in sandstone reservoirs. Ferroan calcite and dolomite grow in carbonates during mesodiagenesis in rocks that contain, or have an influx of, iron. Since sandstones typically have a more complex detrital mineralogy than carbonates, they have a greater likelihood of containing abundant iron. Consequently, ferroan dolomite is a common mesogenetic cement in sandstones. If there is a very large amount of iron, exceeding the available amount of calcium and magnesium, then siderite can develop.
Anhydrite replaces eogenetic gypsum during burial and so is found in marginal marine carbonates deposited under relatively hot and arid conditions (Warren 1999). Anhydrite is an important cement in carbonate reservoirs since it reacts with petroleum fluids at elevated temperature producing toxic, corrosive and environmentally damaging H 2 S via thermochemical sulphate reduction (Worden et al. 1995(Worden et al. , 2000bWorden & Smalley 1996). Anhydrite is also a relatively common, but minor, mesogenetic cement in sandstones, especially those that are interbedded with evaporite lithologies (Sullivan et al. 1994).
Quartz cementation during mesodiagenesis of reservoirs. Quartz is the single most important pore-occluding cement in deeply buried sandstones (McBride 1989;Bjørlykke & Egeberg 1993;Worden & Morad 2000;Chudi et al. 2016;King & Goldstein 2016;Nguyen et al. 2016;Stricker & Jones 2016;Wells et al. 2015). Quartz cement grows as a function of time, temperature and grain size (see later section on 'The use of forward diagenetic models to study reservoir quality'; Walderhaug 1994aWalderhaug , b, 1996. Effective stress has been proposed to influence quartz cementation (and see later in the 'Controversies' section on the controls on pressure solution ;Bjørkum 1996;Sheldon et al. 2003). Fluid composition has also been proposed to influence quartz cementation (see later section on 'The effect of petroleum emplacement on sandstone and carbonate diagenesis'; Worden et al. 1998;Taylor et al. 2010;Worden et al. 2018). Quartz cement in sandstones can be inhibited by the presence of grain-coating materials such as microcrystalline quartz and chlorite (Ehrenberg 1993; Aase et al. 1996). Quartz can also be present in small amounts in carbonates, especially those associated with evaporitic lithologies.
Clay cementation during mesodiagenesis of reservoirs. Detrital clay minerals in primary sand deposits tend to be a complex mixture of illite, chlorite, kaolinite and smectite with less common accumulations of gibbsite, goethite, berthieriene, glauconite and palygorskite (Houseknecht & Pittman 1992;Worden & Morad 2003). In sandstones, mesodiagenesis lead to the conversion of smectite into illite and, to a lesser extent, into chlorite. During eo-and meso-diagenesis, gibbsite, goethite, berthieriene and palygorskite tend to react with other (detrital and eogenetic) minerals and aqueous species creating illite and chlorite. Kaolinite can be generated during mesogenetic feldspar alteration (Ehrenberg & Jakobsen 2001), but kaolinite tends to react with detrital K-feldspar to produce illite at elevated temperatures (Bjørkum et al. 1993). In the absence of K-feldspar, kaolinite transforms into dickite (a polymorph of kaolinite) at elevated temperature (Beaufort et al. 1998). Mesodiagenesis therefore leads to sandstones developing a simplified clay mineral assemblage that is typically dominated by illite and chlorite.
Illite is a very important pore-occluding mineral in clay-bearing sandstones (Nguyen et al. 2016), but can also be found in small quantities in carbonates. Where present, illite typically has a huge effect on reservoir properties such as permeability, water saturation (S w ), resistivity and wettability (Worden & Morad 2003;Worthington 2003).
Chlorite represents a complex group of Fe-Mg -Al-rich clay minerals that are seldom of much importance to carbonates but can be of paramount importance to sandstones since the Fe-rich variety of chlorite can coat detrital grains and inhibit quartz cementation (Dowey et al. 2012;Stricker & Jones 2016). Since Fe-rich chlorite limits the growth of quartz cement and so preserves porosity in deeply buried sandstones, it can be an important mineral in Fe-rich sandstones. Fe-chlorite can develop where there was insufficient supply of dissolved sulphate during eodiagenesis (to create sulphide and thus lock the iron up as pyrite) and insufficient supply of dissolved, typically biogenic, carbonate (to lock the iron up by creating siderite). Mg-rich chlorite can also be present in sandstones, typically from arid and semi-arid environments, but typically occurs as a pore-filling cement rather than a grain-coat phase (Worden & Morad 2003;Morad et al. 2010).
Other mesogenetic cements in sandstone and carbonate reservoirs. Cements of lesser importance to sandstone reservoir quality include pyrite, barite, albite, K-feldspar, halite and zeolites. Pyrite is a ubiquitous trace diagenetic mineral in carbonates and sandstones. Barite is a relatively common, but volumetrically minor, late diagenetic mineral in deeply buried sandstones (Khalifa & Morad 2012); barite is typically interpreted to be derived diagenetically altered detrital K-feldspar. Barite is relatively rare in carbonates, except those that have experienced hydrothermal mineralization (Neilson & Oxtoby 2008). Sandstones rich in detrital feldspar are routinely found to contain a few per cent feldspar cement, including albite and K-feldspar (Schmid et al. 2004). Feldspar cements are also found, albeit rarely, in carbonates (Spotl et al. 1996). Halite cement is common in sandstones and carbonates that are stratigraphically or structurally adjacent to evaporite beds or salt diapirs. Rarely, halite can fill pores and destroy reservoir quality when present in large volumes (Schroder et al. 2005). Zeolite cements are common in volcaniclastic sediments and can fill a significant proportion of the porosity. However, volcaniclastic sandstones tend to have low permeability owing to their large quantities of clay minerals and ductile grains (Zhu et al. 2012) and therefore are of relatively little economic significance in most basins.
Trace mesogenetic cements in sandstones and carbonates include base metal sulphides (galena, sphalerite), Fe-oxides, ilmenite, rutile and apatite. These minerals seldom influence reservoir quality in sandstone or carbonate hydrocarbon reservoirs.

Compaction and structural diagenesis
Compaction includes the family of processes that lead to porosity loss via grain reorganization (repacking), ductile grain deformation, brittle grain fracture and pressure solution (see later section on 'Pressure solution or chemical compaction'). Structural diagenesis broadly refers to the interaction of deformation and geochemical processes in rocks ). This term is generally applied where diagenetic reactions take place in association with deformation structures such as fractures, faults, and deformation bands. Structural controls on reservoir quality have received much interest from both sandstone and carbonate communities in recent years. Carbonates tend to become relatively hard and brittle soon after deposition, owing to the precipitation of eogenetic frameworkstrengthening cements (Fig. 2), and they subsequently tend to undergo fracturing in response to changes in stress. Sandstones can be relatively weak and capable of substantial mechanical compaction (by grain reorientation, grain re-packing, and ductile deformation) and large-scale (bed-scale) ductile deformation owing to changes in stress until mesodiagenesis commences. Early cementation of sandstones, e.g. by carbonate cement, naturally strengthens the rock and inhibits mechanical compaction (Fig. 3).
Normal compactional processes occur in response to the progressive increase in vertical effective stress associated with increasing overburden thickness during normal sedimentation and are important since they lead to porosity loss. Loose granular materials respond to increased effective stress by realigning grains to adopt a close-packed (lower porosity) structure, weak-brittle grains undergo fracturing and disaggregation while weakductile grains undergo ductile deformation (Worden et al. 2000a). The magnitude of compactional porosity loss in the absence of pore-filling materials is a function of the mechanical properties, size distributions and abundances of the constituent clastic particles together with the magnitude and orientation of the 3D stress distribution (Pittman & Larese 1991;Chuhan et al. 2003;Karner et al. 2005). Stabilization of sediment by cement precipitation can inhibit compaction by creating a strong framework (Pittman & Larese 1991). Carbonates and sandstones typically have quite different compactional responses to increasing effective stress since carbonates tend to lithify (cement) and strengthen soon after deposition.
Under certain circumstances, stylolites (chemicaldissolution/pressure solution seams; see later) may develop. In carbonates, this can happen at depths greater than c. 300-600 m (30-408C; Ebner et al. 2009) whereas in sandstones this only happens in rocks at greater than c. 2500 m (.908C ;Bjørkum 1996). This difference in depth and temperature probably reflects the much lower solubility and dissolution rates of silicate minerals than carbonate minerals. In both carbonates and sandstones, stylolites may nucleate on clay, or organic-rich, laminae or at grain contacts with enhanced solubility (e.g. quartz-muscovite grain contacts).
Fracturing and deformation bands in sandstone reservoirs. Fracture-related porosity is viewed as paramount and beneficial to reservoir quality in many carbonate reservoirs. Fractures can form in response to burial (vertical loading), in the vicinity of salt diapirs and displacive faults or in response to folding. Fractures have also been recognized as critical for production in many tight gas sandstone reservoirs. In contrast, shear stresses in porous sandstones commonly result in fine-grained gouge in the axis of a fault. Away from the axis of a fault, cataclastic deformation bands (Busch et al. 2015;Griffiths et al. 2016) are common in poorly lithified sandstones (i.e. not deep or hot enough to have experienced mesogenetic cementation) with deformation bands being the result of localized shear, sand grain disaggregation and locally enhanced rates of quartz cementation. Deformation bands may also form from vertical loading that is not related to tectonic stress (Fossen 2010). Deformation bands undergo localized quartz cementation far earlier (at lower temperatures) than their undeformed host owing to locally increased surface area and generation of highly reactive quartz fracture surfaces (Lander et al. 2008a, b;Griffiths et al. 2016).
Reservoir quality can be affected by deformation bands owing to the locally reduced porosity and permeability. Deformation bands are less commonly reported from carbonates, probably because the host sediment is stronger and not capable of the creation of shear bands. It remains to be seen whether deformation band fracturing mechanisms are truly dependent on host-reservoir lithology.
Fracture porosity and carbonate reservoirs. The form and distribution of fractures in carbonates has been widely studied over the last 10 years. In particular, the mechanical stratigraphic layering of carbonate platforms has been well described; dissipation of stress varies according to bed thickness, such that more numerous (i.e. more narrowly spaced), shorter fractures tend to occur in thinner beds while thicker beds have more widely spaced, longer fractures (Nelson 2001). Some fractures cut across bed boundaries, while others terminate or slip at bed contacts, particularly where there is a contrast in competency between rigid carbonate beds and ductile, clay-rich beds. Fracture densities also vary between lithologies (e.g. limestone and dolomite), between facies with different petrophysical properties and with distance from faults (Korneva et al. 2017 -online). Nearly all carbonate reservoirs are fractured, but the importance of those fractures to reservoir performance depends on matrix porosity, fracture pore volumes and connectivity of the fracture network.

Telodiagenesis (uplift-related diagenesis)
The diagenesis of sedimentary successions that have been exhumed during uplift or basin inversion is referred to as uplift-related diagenesis, or telodiagenesis (Choquette & Pray 1970;Abdel-Wahab & Turner 1991;Morad et al. 2000;Worden & Burley 2003). The most extreme case of telodiagenesis is when the overburden to a given suite of sediment rock is totally eroded so that these rocks now sit at the Earth's surface. Under these circumstances, telodiagenesis is effectively the same as weathering and includes the processes of (1) oxidation of reduced phases such as pyrite, Fe-clay minerals and Fe-carbonates, and (2) dissolution or alteration of minerals by low pH groundwater including alteration of feldspars to clay minerals and dissolution of carbonate and sulphate minerals. Note that weathering reactions of sedimentary rocks tend to reverse what happened during the previous burial diagenesis event. There are also physical consequences of uplift and removal of overburden, including the development of decompaction joints (Neuzil 2003) that serve to allow the fluids that cause weathering to penetrate metres or even 10's of metres below the surface.
During the earlier stages of uplift, before sedimentary rocks re-emerge at the Earth's surface, it is possible that other processes may start to alter the mineralogy and fabric of a sandstone or a carbonate. Dedolomitization may occur in carbonates (Fig. 2); this is a process whereby dolomite is replaced by calcite during uplift, especially in aquifers (Jacobson et al. 2010). Calcite in carbonates and sandstones can be dissolved leaving enhanced porosity (Mahdi & Aqrawi 2017). Anhydrite can be replaced by gypsum if there is sufficient water available (Fig. 2). Silicate reactions, typically orders of magnitude slower than carbonate and sulphate reactions, are less likely to occur until the sediment is very close to the Earth's surface. Note that shales do not typically decompact during uplift (until the weathering zone is reached) and that shale porosity values can be used to estimate the degree of uplift (Law 1998): mesogenetic compaction processes are considered to be largely irreversible although decompaction joints are a common attribute of brittle rocks at outcrop (Figs 2 & 3). Finally, bacterial sulphate reduction can occur, leading to dissolution of sulphate and its local replacement by calcite, and biodegradation of hydrocarbons, significantly reducing oil quality (Saller et al. 2014).
When sedimentary rocks have been exhumed but have not been exposed at the Earth's surface, then the weathering reactions of oxidation, feldspar alteration to clay and carbonate and sulphate mineral dissolution can still occur if the overlying rocks allow the ingress of surface-related fluids either through a permeable matrix or via fractures and joints. The telodiagenesis realm in low-permeability non-brittle rocks may extend to no more than a few metres below the Earth's surface ). The telodiagenesis realm in sedimentary rocks with considerable matrix permeability (which to hydrogeologists are known as aquifers) can extend for hundreds of metres or more below the Earth's surface.
It is worth reflecting on the fact that every unconformity surface, in all sedimentary successions, has probably experienced telodiagenesis. It is also worth adding a note of caution that for all analogue studies of sedimentary rocks at outcrop, the mineralogy and reservoir quality of the outcrop are unlikely to represent what would be found in equivalent rocks that have not undergone uplift.

Analytical techniques
There is almost total overlap in the range of analytical tools and techniques that have been used for reservoir quality prediction in sandstones and carbonates (Fig. 7). Reservoir quality is often first considered using routine techniques such as seismic interpretation, wireline logging and core analysis, irrespective of host reservoir type. Sedimentological core description, to reveal rock type, lithofacies, sedimentary and tectonic structures and macroporosity, is also fundamental to both sandstones and carbonates. There is also increasing emphasis on the application of trace fossil types and abundance Fig. 7. Carbonate and clastic reservoir quality communities use many of the same techniques and data types and could learn much from each other. The first available data are seismic (e.g. attribute) data although analogue studies also help inform decisions. Drilling wells provides data via mud-logging (cuttings analysis) and drilling conditions (e.g. rate of penetration data). Wireline and subsurface logging provide high-quality indirect reservoir-quality data. If core is collected then core analysis (routine and special) follows. Routine core analysis includes porosity, permeability, grain density and fluid saturation measurements. Special core analysis includes wettability, relative permeability and pore size distribution measurements. Detailed core description should come next with the production of a detailed sedimentary log. In order to understand the link between core description and core analysis and log data, petrographic techniques need to be applied, preferably to core plugs. After petrographic analysis, there is a range of specialist techniques (e.g. mineralogy analysis using SEM-EDS, fluid inclusions studies and radiogenic and stable isotope techniques) that can be applied to answer questions about the timing of cement growth, the timing of petroleum filling, the effect that petroleum had on reservoir quality, the origin of the materials that caused cementation, the type of water that facilitated diagenesis and reservoir quality evolution.
(ichnology) to help reveal subtleties of the environment of deposition as well as the influence of bioturbation on reservoir quality.
A wide variety of petrological techniques are routinely used to describe sandstones and carbonates to help make sense of core analysis data in light of rock fabric and diagenetic history. Standard petrological techniques include transmitted and reflected light optics, secondary electron imaging of broken rock chips, back-scattered electron microscopy (BSEM) of polished sections, cathodoluminescence techniques integrated with light optics or BSEM (SEM-CL) images (Griffiths et al. 2016;Nguyen et al. 2016;Wells et al. 2015), and point chemical analysis of secondary X-rays in the SEM using energy dispersive spectral (EDS) detectors. Optical and compositional analysis of detrital heavy minerals has been used as a provenance tool while trace element analysis of diagenetic cements has been used to determine the sources of cement and interpret formation water origin and migration (Götte 2016; Kraishan et al. 2000).
Mineralogical analyses (to give proportions of component minerals) of cuttings and core samples is applied to both sandstone and carbonate successions using X-ray diffraction (Gier et al. 2015) and infrared techniques, supplementing point counting with a petrographic microscope. Chemical analysis of cuttings and core samples is less frequently applied to sandstone and carbonate successions but can be achieved using benchtop X-ray fluorescence (Gier et al. 2015), portable X-ray fluorescence and inductively coupled plasma-based tools used to solve questions of lithology determination, sediment provenance and chemical stratigraphy specifically to help build reservoir models through improved correlation.
A new generation of integrated SEM-EDS tools, such as QEMSCAN (Armitage et al. 2010(Armitage et al. , 2013bDaneshvar & Worden 2017), now permits automated mineral identification and mapping of areas from standard polished sections (6 cm 2 ), or larger if desired (Fig. 5). QEMSCAN analysis primarily provides detailed, repeatable, quantitative mineralogy based on chemical analysis of micron-sized spots collected at pre-defined points across a polished section. If the electron beam spacing is small enough (i.e. approaching 1 mm between the analytical points) then a high-resolution mineral map of the thin section is produced. The image of the rock reveals the distribution of mineral and porosity across the selected area; this provides a valuable stepping stone between thin section description and core description as well as providing information about porosity and its distribution. QEMSCAN analysis cannot routinely differentiate different forms of the same mineral (e.g. calcite cement from calcite grains, quartz cement from quartz grains), but future integration of CL detectors may lead to increased functionality of these automated approaches.
A suite of geochemical techniques are also routinely applied to both sandstones and carbonates. These include a range of fluid inclusion techniques (Wells et al. 2015) such as homogenization thermometry to reveal trapping temperature, freezing point depression to reveal aqueous salinity and fluid inclusion compositional analysis using thermal phase changes as well as microbeam techniques. Conventional light element stable isotope analyses (H, C, O, S) have also been applied to sandstones and carbonates for many years with C and O stable isotopes proving especially useful for constraining the origin, timing and conditions of carbonate cement growth (King & Goldstein 2016). More recently clumped C-O isotopes have proved invaluable to determination of the temperature of carbonate mineral growth in both sandstones and carbonates (John 2015). Radiogenic isotope analysis (e.g. 87 Sr/ 86 Sr) is also used, more in research than routine cases, to constrain the timing and origin of carbonate cements (King & Goldstein 2016). Radiometric analysis for dating (e.g. using K -Ar techniques) has been applied to sedimentary and diagenetic problems with interesting and thoughtprovoking results, but this is not routine in reservoir quality studies. The analysis of less conventional stable isotopes (Mg, Fe, etc.;Geske et al. 2015) is now possible although the science of metal isotopes is in its relative infancy and has not yet found routine application for reservoir quality analysis.

The use of modern analogues to study reservoir quality
Carbonate sedimentology and reservoir quality prediction has developed in major ways based upon the study of modern (Holocene) sedimentary analogues (Dravis 1979;McClain et al. 1992;Whittle et al. 1993;Macintyre et al. 1996;Harris 2010). The sandstone community has more recently started using modern analogues to help develop predictive models of reservoir quality with some focus on understanding carbonate cement distribution, especially in aquifers, marginal marine settings and arid intracontinental soils (Arakel 1986;McBride et al. 1995;McBride & Parea 2001). New focus on the use of clastic depositional analogues to help with reservoir quality prediction has arisen with an imperative to understand the origin and distribution of grain-coating clay minerals that serve to inhibit quartz cement and thus preserve porosity, in deeply buried sandstone reservoirs (Dowey et al. 2017;Wooldridge et al. 2017a, b;Daneshvar & Worden 2017), but with much work yet to be done to extend the approach to carbonate cemented marine sandstones and their relationship to modern clastic sedimentary systems. There is much still to learn about reservoir quality prediction from the study of modern clastic environments.

Experimental simulation of diagenesis
A useful way to develop new understanding about sandstone and carbonate reservoir quality and diagenesis is to perform experiments in laboratories. No experiment can fully reproduce natural conditions, not least since most geological processes take much longer than the time available to researchers. There are a variety of ways to speed up processes, including using higher temperatures than found in diagenetic systems; an example of this are routine rock-eval pyrolysis measurements of source rock maturity and richness (Hunt 1995), simulation of dolomitization (Kaczmarek & Sibley 2011) and measurements of the rate of redox reactions during thermochemical sulphate reduction (Cross et al. 2004). Reaction rates can also be increased by using analogue materials that are more soluble than silicates or carbonates (Sathar et al. 2012) and fluid compositions that are exceptionally far from equilibrium with the host rock (Heald & Renton 1966;Chermak & Rimstidt 1990;Lander et al. 2008a).
Experiments on compaction and mineral diagenesis have, thus far, more commonly been applied to sandstones than carbonates, this possibly owing to (1) the greater importance of mechanical compaction for sandstones than carbonates and (2) the more complex mineralogy and geochemistry of sandstones than carbonates being more amenable to experimental simulation. However, chemomechanical compaction of fine-grained carbonates has been successfully reproduced during experiments under low temperature conditions, proving the importance of water composition (Wang et al. 2016), as well as the effect of the presence of oil v. water on compaction, pressure solution and porosity loss (Risnes et al. 2003). Much work has recently been undertaken on the experimental simulation of reactions between CO 2 and host rocks to determine the effects of carbon capture and storage on reservoir and caprock quality, utilizing realistic low temperatures and relatively long-duration experiments (Armitage et al. 2013a).
Experiments on the eogenetic evolution of clastic sedimentary systems have revealed interesting roles for animal -sediment interactions (McIlroy et al. 2003;Needham et al. 2005Needham et al. , 2006Worden et al. 2006), as well as more conventional physical processes such as infiltration (Matlack et al. 1989). As the recognition of the importance of the biological origin of grain-coating materials develops (Wooldridge et al. 2017a, b), then new questions emerge about the durability of these grain coats that demand to be tested under experimental, as well as empirical (i.e. from modern analogues), conditions. The role of biological grain coats on the mechanical properties of sediment also needs to be determined to assess with matrix stabilization resulting from sediment -biological interactions.
The use of forward diagenetic models to study reservoir quality Over the past 20 years, reservoir quality assessment has expanded from a focus on characterization to encompass process-oriented models. These models have been designed to predict rock properties in undrilled locations and reconstruct properties through geological time. Augmenting the discipline with models has reinforced, and not detracted from, the importance of rock characterization given that such data are essential for constraining parameters and testing performance. In addition to their obvious utility in diagenetic research and hydrocarbon exploration and production, diagenetic models have important applications in geothermal energy production and waste disposal and are vital components for constraining rock properties through time in fields as diverse as palaeohydrology, structural deformation and seismology. Notable model types include reactive transport models, coupled effectoriented compaction and cementation models, and grain/pore scale geometrical models. Diagenetic models of all types benefit from integration with depositional models that constrain the composition and texture of sediments and from 3D basin models that constrain thermal, stress and fluid flux histories.
Reactive transport models (RTMs) consider a comprehensive set of aqueous geochemical reactions while accounting for mass transport by fluid advection and diffusion (Bethke 1996(Bethke , 2008. These models account for the thermodynamic driving forces for reactions but also consider reaction kinetics. The grid cells in such models generally have dimensions on the orders of metres, with time scales that may range from hundreds to millions of years. RTMs have been widely applied to carbonate systems, especially in the area of dolomitization (Jones et al. 2002(Jones et al. , 2003(Jones et al. , 2004Xiao & Jones 2006;Whitaker & Xiao 2010;Consonni et al. 2016). They also have been used to simulate silicate reactions associated with sandstone and mudstone diagenesis (Czernichowski-Lauriol et al. 1996;Thyne et al. 2001;Brosse et al. 2003;Sanjuan et al. 2003;Xiao & Jones 2006;Yuan et al. 2017;Geloni et al. 2015). Geloni et al. (2015) incorporated compaction into their RTM simulations, thereby addressing an important factor that has been missing from most previous RTM studies. Although RTMs have been widely applied to waste disposal and CO 2 injection problems (Pollyea & Fairley 2012;Steefel et al. 2015), to date we are unaware of published studies where results from RTM simulations served as a basis for making pre-drill porosity and permeability predictions that were subsequently evaluated by post-drill sample characterization. Challenges associated with using RTMs for reservoir quality prediction studies include providing appropriate boundary conditions for fluid flow through geological time, defining grain-scale reactive surface areas and their evolution with diagenetic alteration, applying the appropriate reaction kinetics (particularly for silicate reactions), incorporating compaction and linking diagenetic alteration to permeability and other rock properties (Bartels et al. 2005;Xie et al. 2015).
Coupled effect-oriented compaction and cementation models, unlike RTMs, do not have a thermodynamic foundation, although they do incorporate theoretically robust algorithms (Ajdukiewicz & Lander 2010). To date the focus of such models has been on sandstones, where compaction is an important mechanism of porosity loss and where geochemical reactions mainly involve relatively insoluble aluminosilicates. The model scale of reference is comparable with a core plug and simulations are designed to be directly comparable with petrographic and core plug data (Lander & Walderhaug 1999). Simulation timescales typically span millions of years. Compaction simulations generally consider mean grain size and sorting, variations in the mechanical properties of framework grains and pore-filling materials, as well as effective stress. Additionally, coupled effect-oriented compaction and cementation models incorporate kinetic models for quartz overgrowth cements (Walderhaug 1994b(Walderhaug , 1996, plagioclase albitization (Perez & Boles 2005), the reaction of kaolinite and K-feldspar to form fibrous illite (Franks & Zwingmann 2010;, and the reaction of volcanic rock fragments and other labile mineral grains to form grain-coating chlorite (Bonnell et al. 2014). Other diagenetic processes such as carbonate cementation and replacement may be considered in a simulation but currently are not predicted a priori except where they occur as a by-product of albitization and volcanic rock fragment alteration. A prerequisite to applying models of this type involves an optimization procedure where model parameter values are obtained that provide an optimal match with samples that have associated petrographic, core analysis and burial history data. Pre-drill reservoir quality predictions may be made by accounting for the compositions, textures and burial histories of the prediction locations. This modelling approach reproduces wide ranges in observed extents of diagenetic alteration in sandstones (Walderhaug et al. 2000;Taylor et al. 2004;Perez & Boles 2005;Lander et al. 2008a;Tobin et al. 2010;English et al. 2017) and has proven to be an accurate basis for pre-drill prediction of porosity, permeability, seismic velocities and other rock properties (Taylor et al. 2010(Taylor et al. , 2015Wojcik et al. 2016;Chudi et al. 2016). Current limitations of the approach include its applicability only to sandstones and siltstones, consideration of a restricted set of geochemical reactions and the lack of mass transfer simulation. Challenges in applying the approach for reservoir quality prediction include obtaining adequate analogue datasets for parameter optimization and assessing when diagenetic processes not considered by the modelling approach (e.g. carbonate cementation) may materially impact reservoir quality.
A final class of diagenetic models simulates processes at the grain and pore scale. Such models are enticing because they have the potential to predict textures and morphologies that may be compared directly with data from natural samples and laboratory experiments and because they serve as a more rigorous basis for predicting a wide range of rock properties compared with the model types discussed above. To date, most grain/pore scale simulation studies either have involved imposing a predefined diagenetic state as a means to rigorously simulate the impact of diagenetic alteration on bulk rock properties (Bakke & Øren 1997;Øren & Bakke 2002Øren & Bakke , 2003Øren et al. 2007;Jin et al. 2012;Mousavi & Bryant 2013;Prodanovic et al. 2013;van der Land et al. 2013;Hosa & Wood 2017) or consider a subset of the diagenetic processes that affect reservoir quality (Abe & Mair 2005;Lander et al. 2008a;Marketos & Bolton 2009;Gale et al. 2010;Cheung et al. 2013;Ankit et al. 2015;Lander & Laubach 2015;Wendler et al. 2016). Although the promise of models of this class is enormous, considerable work is needed to develop comprehensive modelling approaches that are capable of making accurate pre-drill predictions. Improvements in our ability to accurately predict reservoir quality in both clastics and carbonates probably will arise not only from new developments within each of the model types discussed above but also by linking these types into integrated modelling systems that take advantage of the strengths that each has to offer. For instance, the reaction and mass transport capabilities of an RTM could be enhanced by coupling with a grain/pore scale model that rigorously simulates compaction and dissolution/precipitation in 3D and that predicts reactive surface areas in addition to fluid transport and mechanical properties.

Pressure solution or chemical compaction?
Pressure solution, now routinely called chemical compaction by some sandstone diagenesis practitioners, is controversial because it is unclear whether it is actually driven by pressure or simply by elevated solubility owing to increased temperature or even by specific mineral -chemical conditions such as at mica -quartz interfaces (Oelkers et al. 1996;Sheldon et al. 2003;Walderhaug et al. 2006;Kristiansen et al. 2011). In fact, it is not pressure that is the main variable; rather it is effective (or contact) stress that needs to be accounted for where effective stress is equal to the lithostatic pressure minus the fluid pressure. Contact stresses show major variations along a given grain-grain contact with the stress gradient, causing a chemical potential gradient and thus leading to diffusion out of the contact zone (Sheldon et al. 2003). Pressure solution happens more readily (shallower) in carbonates than in sandstones but there seems to be little debate about the role of effective stress v. temperature in carbonates. Some relatively shallowburied (,600 m) carbonate successions contain horizontal stylolites owing to normal burial (Ebner et al. 2009) that are cut by vertical stylolites owing to thrust tectonics (Starmer 1995); this suggests that the direction of principal effective stress (pressure) is the master control, at least in carbonate successions (Fig. 8). However, note that the role of thermally mediated processes involved in chemical compaction, so widely acknowledged in the sandstone world, may have lessons for carbonate reservoir quality prediction. If pressure solution is indeed driven by increasing effective stress then high degrees of (early) overpressure could lead to anomalously elevated reservoir quality owing to restricted amounts of cement (Stricker & Jones 2016). In contrast, if pressure solution is not driven by increasing effective stress then early overpressure cannot be the cause of reduced amounts of cement and enhanced reservoir quality.
Open v. closed systems and secondary porosity Some older models of sandstone diagenesis invoked large-scale water flow systems as the main controls on reservoir quality (Giles et al. 2000); these tended to assume relatively open geochemical systems. Some invoked a vital role for organic acids derived from source rocks (e.g. enhancing the concentration The structures in this rock suggest that pressure (or more correctly, effective stress) plays a major part in the chemical compaction of rocks, thus apparently contradicting Bjørkum (1996) in which it was speculated that pressure plays a negligible role in chemical compaction. (Image courtesy of Richard Worden.) of scarcely soluble Al and Si; Barth & Riis 1992). Alternative models have recognized the limited complexing ability of organic acids and their scarcity in formation waters and now tend to assume a relatively closed system for sandstone diagenesis (Lander & Walderhaug 1999). In fact the degree of 'openness' is likely to be partly a function of the aqueous solubility of a given species in a sandstone with alumina, silica and TiO 2 being effectively immobile (and thus part of a closed system) while CO 2 is demonstrably part of an open diagenetic system in sandstones (Király et al. 2016).
Observations from cemented veins routinely show limited penetration of the cementing fluid from the vein into the matrix, suggesting that mass-import of material cannot be a process that affects the bulk properties of a porous rock unit (reservoir; Fig. 9). Nonetheless, there are detailed, large-scale studies of diagenetic systems that seem to require loss and gain of species such as calcium and magnesium ( Fig. 9; Consonni et al. 2016;Poteet et al. 2016), potassium (Gier et al. 2015) and even aluminium to explain the distribution of minerals in reservoirs (Nguyen et al. 2016).
Fundamental proof of the openness of CO 2 in diagenetic systems comes from (1) pyrolysis experiments that show that CO 2 is generated from source rocks in large volumes (Andresen et al. 1994;Hunt 1995) and (2) the d 13 C values of carbonate cements reflecting external input in many systems (Macaulay et al. 2000). Carbonate rocks probably involve open system diagenesis during dolomitization ( Fig. 9; Whitaker & Xiao 2010;Jiang et al. 2014;Consonni et al. 2016) and are also probably susceptible to influxes of CO 2 during kerogen maturation (Heasley et al. 2000).
Secondary porosity in carbonates, previously accepted as a routine cause of enhanced reservoir quality, has recently become controversial with issues surrounding whether it happens, what it looks like and whether it actually enhances overall reservoir quality (Ehrenberg et al. 2013). Despite published scepticism, mesogenetic porosity has proved to be essential to the effectiveness of reservoirs in some carbonate systems (Barnett et al. 2015;Poteet et al. 2016). Interestingly, the perception of the importance of secondary porosity in sandstones has risen and fallen but now seems to be recognized as crucial in some tight gas sandstones and other deeply buried sandstones where secondary porosity (after feldspar dissolution) is just about the only remaining porosity (Dutton et al. 2012;Nguyen et al. 2016).
The question of open v. closed systems is probably too simplistic for both sandstones and carbonates. Most cases probably fall somewhere between being at least partly a function of the species under consideration, the scale of observation, and palaeohydrology of the system. Better application of geochemical considerations, more routine use of high-precision quantitative mineral analyses and high-density sampling, and more rigorous palaeohydrological studies need to be made by the reservoir quality community to better assess the role of material flux for reservoir quality analysis of carbonates and sandstones.
The effect of petroleum emplacement on sandstone and carbonate diagenesis The question of the role of petroleum emplacement on sandstone diagenesis (and the possible preservation of porosity) has fired up much excitement with numerous papers seeking to address the problem from a combination of theoretical, oil-field data and experimental approaches (Marchand et al. 2001;Bloch et al. 2002;Taylor et al. 2010;Sathar et al. 2012;Wells et al. 2015). Some have concluded that petroleum emplacement has no influence on sandstone diagenesis (Taylor et al. 2010). Some have concluded that petroleum emplacement stops sandstone diagenesis (Gluyas et al. 1993), while others have concluded that sandstone diagenesis can be inhibited (slowed down) by petroleum emplacement (Worden et al. 1998;Marchand et al. 2001;Worden et al. 2018).
The equivalent debate has been somewhat more muted in the world of carbonate diagenesis (Heasley et al. 2000;Kolchugin et al. 2016;Morad et al. 2016) with many practitioners simply assuming that addition of petroleum will, in one way or another, seriously impede the diagenetic processes that influence reservoir quality. There is an overlap of interests in the case of carbonate cemented sandstone reservoirs which have, in some cases, been shown to display differences in the amount of cement above and below oil-water contacts (De Souza & Silva 1998).
Progress can be made by careful examination of high-quality petrographic data, in conjunction with detailed analysis of fluid saturation, specific to each core plug, derived from petrophysical wireline logs and an analysis of the timing of petroleum filling. It is also important to take account of primary compositional and textural variation between individual samples ensuring that assessment of the effect of varying water saturation is made between samples that were originally similar .
A special case of the effect of petroleum emplacement on diagenesis is thermochemical sulphate reduction (TSR), during which oxidized sulphate (typically anhydrite) reacts with reduced carbon in petroleum fluids producing calcite, H 2 S and several other phases such as water, elemental sulphur, CO 2 and mineral sulphides. TSR is common in deeply buried, anhydrite-bearing carbonates (Worden & Smalley 1996;Cai et al. 2003), where it leads to toxic and corrosive sour (H 2 S-rich) gas but may also lead to small increases in reservoir porosity (Jiang et al. 2018). TSR is more rarely considered or reported in sandstones (Worden & Smalley 2001;, although it may be a Fig. 9. Role of open systems in reservoir diagenesis. (a) Termination of fault/fracture controlled dolomite body, Lower Carboniferous Limestone, North Wales Platform. Dolomitized beds are located beneath thin, low permeability beds and terminate sharply against fractures. (b) Fracture-controlled calcite cementation in Upper Devonian Balnagown Group (aeolian facies of the Gaza Formation) at Tarbert Ness in NE Scotland. The fracture has led to localized calcite cementation of the sandstone owing to an influx of cementing species but the effect is limited to the near-fracture (proximal) region since the new cement closed pores and limited advective influx into the more distal parts of the sandstone. (Image (a) courtesy of Cathy Hollis, image (b) courtesy of Richard Worden.) common but minor process in which the sour gas is ameliorated by reaction with Fe-minerals, resulting in commonly reported late-stage pyrite cement.

Burial dolomitization
Although most platform-scale dolomitization takes place in the shallow subsurface (see section on 'Dolomitization and eodiagenesis'), significant volumes of dolomite can also form during mesodiagenesis, especially in the vicinity of faults. There has been much focus on the genesis and importance of so-called hydrothermal dolomite bodies as reservoir rocks in recent years (Davies & Smith 2006). Typical features include non-stratabound geometry, with bodies forming irregular and discontinuous 'halos' around faults, usually in the hanging wall of normal faults or within the uppermost array of faults (Reidal shears) within strike-slip faults. Dolomite is usually non-fabric selective and fabric destructive, forming complex characteristic textures (e.g. zebra dolomite) with large vuggy pores connected by fractures (Davies & Smith 2006). Fluid inclusion data and associated mineralization (e.g. quartz, fluorite, barite and galena) point to elevated temperatures of dolomitization in many cases, explaining why this type of dolomite has been described as hydrothermal in origin. Although these bodies have been well described from outcrop, their importance as reservoir targets has not been proven. Furthermore, there is no satisfactory model for their formation; whereas some bodies appear to have formed from compactional dewatering of adjacent clastic basins (Frazer et al. 2014), in many cases identification of a satisfactory source of brine and Mg is lacking. It has been shown, primarily using clumped isotopes, that some reportedly fault-related, 'hydrothermal' dolomite bodies formed initially at lower temperature by normal marine reflux processes and were then altered (recrystallized), after deformation, by high-temperature fluids (Swart et al. 2016). Certainly, the study of these bodies continues to provide important information on fluid flux and reaction in the burial realm and is leading to a new generation of conceptual models, including faultcontrolled convection of seawater, sometimes via basal sandstone aquifers ).

Conclusions
(1) Sandstones and carbonates are typically studied using the same suite of analytical tools and techniques starting with log analysis and petrophysical core analysis, core description, then into routine petrographic tools and even into the less routine realms of stable isotopes, fluid inclusions and other geochemical approaches.
(2) Reservoir quality in sandstones and carbonates is influenced by many of the same factors including: depositional environment, relative sea-level change, grain types, grain size and sorting, matrix proportion, biogenic input (e.g. from a nearby shelf ), rate of deposition and isolation from surface conditions, palaeoclimate, soil formation (only in exposed sediment), near-surface water composition, eogenetic water flux (type, amount), rate of burial and heating (T max ), timing of oil filling, timing and magnitude of fluid overpressure development, fracturing and the importance of redox conditions for element minerals that contain Fe and S (typically Fe-silicates, pyrite, anhydrite), mass transfer associated with diffusion and fluid advection which impacts carbonate reactions in both carbonate and sandstone reservoirs owing to the high solubility of the associated minerals. (3) Sandstones and carbonates have some significant differences in the controls on their reservoir quality including: carbonates are influenced by the depositional age of sediment (on the type of CaCO 3 : aragonite v. calcite seas); carbonates tend to experience limited porosity loss from compaction owing to the strengthening effect of cements that form at low effective stresses; most sandstones undergo considerable porosity loss owing to compaction; silicate minerals are much less soluble than carbonate minerals, leading to a greater tendency for local conservation of mass for diagenetic reactions in deeply buried sandstones than carbonates; and sour gas (H 2 S) and CO 2 may substantially modify reservoir quality in carbonates but are less important in sandstones. (4) Reactive transfer models provide important insights into understanding the spatial variations in diagenetic reactions and have great promise for predicting a broad range in diagenetic reactions involving mass transfer in both carbonates and sandstones. To date the primary focus of these models is on process understanding; they have seen limited use for pre-drill reservoir quality prediction. On the other hand, process-oriented diagenesis models have had impressive success in accurately predicting reservoir quality of sandstones in a variety of basins prior to drilling where compaction, quartz cementation and reactions involving certain framework grains and clay minerals are the main diagenetic processes. Current models of this type, however, do not consider a number of processes that may be important in some reservoirs such as carbonate cementation and zeolite formation processes that RTMs could be used to address. (5) Some of the key controversies in sandstone and carbonate reservoir quality focus on the role of petroleum emplacement on diagenesis and porosity loss, the role of effective stress in chemical compaction (pressure solution), the degree of geochemical openness of reservoirs during diagenesis and cementation and the origin of hydrothermal dolomite. (6) Improved dialogue between sandstone and carbonate reservoir quality practitioners and researchers may help to resolve some of the research questions and problems. There are interesting and exciting possibilities for overlap between these two previously relatively isolated communities.
We would like to credit reviewers Ian Billing and Sadoon Morad for their insightful and useful comments. The final version of Figure 7 is largely thanks to the Ian Billing's suggested improvements. Series editor Dave Hodgson is also thanks for his helpful and positive comments. Finally we would like to thank all the hard work by the many reviewers of the 20 papers in this special publication.