We propose a mathematical model and a numerical scheme to describe compaction processes in a sedimentary rock layer undergoing both mechanical and geochemical processes. We simulate the sedimentation process by providing a sedimentation rate, and we account for chemical reactions using simplified kinetics describing either the conversion of a solid matrix into a fluid, as in the case of kerogen degradation into oil, or the precipitation of a mineral solute on the solid matrix of the rock. We use a Lagrangian description that enables to recast the equations in a fixed frame of reference. We present an iterative splitting scheme that allows solving the set of governing equations efficiently in a sequential manner. We assess the performances of this strategy in terms of convergence and mass conservation. Some numerical experiments show the capability of the scheme to treat two test cases, one concerning the precipitation of a mineral, the other the dissolution of kerogen