Higher oil recovery after waterflood in carbonate reservoirs is attributed to increasing water wettability of the rock that in turn relies on complicated surface chemistry. However, calcite mineral reacts with<br>aqueous solutions, and can alter substantially the composition of injected water by mineral dissolution. Care-<br>fully designed chemical and/or brine flood compositions in the laboratory may not remain intact while the<br>injected solutions pass through the reactive reservoir rock. This is especially true for a low-salinity waterflood<br>process, where some finely-tuned brine compositions can improve flood performances, whereas others cannot.<br>We present a 1D reactive transport numerical model that captures the changes in injected compositions dur-<br>ing water flow through porous carbonate rock. We include highly coupled bulk aqueous and surface carbonate-<br>reaction chemistry, detailed reaction and mass transfer kinetics, 2:1 calcium ion exchange, and axial dispersion.<br>At typical calcite reaction rates, local equilibrium is established immediately upon injection. Using an open-<br>source algorithm (Charlton and Parkhurst 2011), we present a design tool to specify chemical/brine flooding<br>packages that correct for composition alteration by carbonate rock.<br>Here, we present a comprehensive 1D reactive transport model and validate it against analytic solutions<br>for rock dissolution, ion exchange, and longitudinal dispersion, each considered separately. A companion paper<br>compares the proposed theory against experiments on core plugs of Indiana limestone that serve as high velocity<br>probes for reaction-controlled and mass-transfer-controlled dissolution. Finally, in another companion paper,<br>we give examples of how injected salinity compositions deviate from those designed in the laboratory for water-<br>wettability improvement based on contact angles, zeta potentials, surface charge densities, and ion exchange.<br>How to correct the design chemical packages for exposure to reactive rock is also discussed in there.