Analytic solutions to optimal control problems in crystal growth processes