Chemical reactor design, optimization, and scaleup