Wing fences, also known as boundary layer fences and potential fences are fixed aerodynamic devices attached to aircraft wings. Not to be confused with wingtip devices, wing fences are flat plates fixed to the upper surfaces (and often wrapping around the leading edge) parallel to the airflow. They are often seen on swept-wing aircraft. They obstruct span-wise airflow along the wing, and prevent the entire wing from stalling at once.
As a swept-wing aircraft slows toward the stall speed of the wing, the angle of the leading edge forces some of the airflow sidewise, toward the wing tip. This process is progressive, airflow near the middle of the wing is affected not only by the leading edge angle, but also the spanwise airflow from the wing root. At the wing tip the airflow can end up being almost all spanwise, as opposed to front-to-back over the wing, meaning that the effective airspeed drops well below the stall. Because the geometry of swept wings typically places the wingtips of an aircraft aft of its center of gravity, lift generated at the wingtips tends to create a nose-down pitching moment. When the wingtips stall, both the lift and the associated nose-down pitching moment rapidly diminish. The loss of the nose-down pitching moment leaves the previously balanced aircraft with a net nose-up pitching moment. This forces the nose of the aircraft up, increasing the angle of attack and leading to stall over a greater portion of the wing. The result is a rapid and powerful pitch-up followed by a complete stall, a difficult situation for a pilot to recover from. The "Sabre dance" (which caused many F-100 Super Sabres to crash) is a notable example of this behavior.
Wing fences delay, or eliminate, this effect by preventing the spanwise flow from moving too far along the wing and gaining speed. When meeting the fence, the air is directed back over the wing surface. Similar solutions included a notch in the leading edge, as seen on the Avro Arrow, or the use of slats, as on the earlier versions of the F-86. Slats can act as fences directly, in the form of their actuators, but also reduce the problem by improving the angle of attack response of the wing and moving the stall point to a lower speed.