Analysis of vorticity amplification in the flow approaching a two-dimensional stagnation point