Simulation of polyelectrolyte-catalysed reaction between divalent ions