Model-based design of optimal chemical reactors