What is the working principle of a Gurney Flap? Recently I came across a airfoil improvement called a 'Gurney flap', see image.




I don't really understand the working principle of a Gurney.
Wikipedia states:


  The Gurney flap increases lift by altering the Kutta condition at the trailing edge. The wake behind the flap is a pair of counter-rotating vortices that are alternately shed in a von Kármán vortex street.In addition to these spanwise vortices shed behind the flap, chordwise vortices shed from in front of the flap become important at high angles of attack.


I don't understand how the flap could generate vortices in front of the flap.
Wikipedia states the following effects:


  The Gurney flap increases the maximum lift coefficient ($C_{L_{max}}$), decreases the angle of attack for zero lift ($\alpha_0$), and increases the nosedown pitching moment ($C_M$), which is consistent with an increase in camber of the airfoil. It also typically increases the drag coefficient ($C_d$), especially at low angles of attack, although for thick airfoils, a reduction in drag has been reported.


Is it simply a ridge that stops the flow, and thereby increases the pressure at the top surface? 

How come the drag is decreased for thick airfoils if it generates extra vortices?
Adding the flap to an existing airfoil increases the angle of attack of the airfoil - just draw a straight line from the leading edge to the trailing edge: after adding the flap, the trailing edge has moved down to the tip of flap. The line before and after resemble flat plates at different angles of attack.

The vortex in front of the flap is produced because the flow can't make the sharp right angle turn around the flap, it can't perfectly follow the geometry.

The increase in CLmax should come from an associated increase in effective camber.

Total drag consists of skin friction drag (mostly, for an airfoil that is just "thick") and pressure drag. Maybe the increase in effective camber changes the relative amounts of both, leading to a net decrease of drag.