The mechanics of hydrothermal systems: II. Fluid mixing and chemical reactions