Geochemical modelling of dolomitization