Simulation and optimization of stall control for an airfoil with a synthetic jet