The Optimal Design of Chemical Reactors