Fast Optimal Control Algorithms with Application to Chemical Engineering