Simulation of crosslinking reaction