Chemical reactor theory