The Hess-Smith panel method computes potential flow around arbitrary 2D shapes by distributing singularities along the body surface. Given an airfoil shape and angle of attack, it determines the velocity field, pressure distribution, and lift. Adjust parameters below to explore lift generated by flow over an airfoil.
To analyze flow over a two-dimensional geometry, the vortex-panel method of Hess and Smith starts by cutting a smooth surface into piecewise-linear panels.
The essence of the method is to construct the fluid flow we want through superposition of simpler fluid flows. We can superimpose fluid flows because, to a reasonable approximation, the flow is both inviscid and irrotational. Inviscid means that, away from surfaces at least, the flow is dominated by momentum forces and that viscous forces are negligible. Irrotational means that, even though the fluid may move in curved arcs, an individual parcel of fluid does not actually rotate. The upshot of these conditions, called the potential flow approximation, is that we can superimpose simple fluid flow solutions to construct a more complicated flow.
To compute flow around the airfoil, we use two potential flow features as our building blocks. First, source panels push fluid perpendicular to the respective panel surfaces.
Second, vortex panels create circulation around panel surfaces.
The figure below shows three panels, each with its own source/sink distribution, and with equal vortex distribution along the panels. On top of this, we’ve superimposed an incoming free stream velocity representing the geometry moving forward through the air.
The resulting flow for this toy example is nice, but it’s unphysical; air passes right through the panel surfaces. To remedy the situation, we apply two conditions. First, the non-penetration condition states that fluid cannot flow into or out of a solid surface, that it flows tangential to each panel surface.
Second, the Kutta condition states that fluid must leave an airfoil’s trailing edge smoothly. The logic is straightforward. The potential flow approximation indicates that any transverse velocity at the sharp cusp of the trailing edge would require the flow to have infinite velocity at that point. Viscosity, even though we’ve neglected it, becomes important at this point and would cause the airfoil to shed a vortex to prevent this unphysical infinite-velocity state. This vortex shedding would continue until smooth flow is obtained, so we assume the flow has already equilibriated and smooth flow has been obtained, therefore the transverse velocity component at the trailing edge is precisely zero.
Moreover, since the flow here is subsonic, this circulation generated by the Kutta condition propagates back upstream, adjusting the flow over the airfoil until we meet the classic description of an airfoil with flow circulating over the top faster than underneath, therefore generating lift by way of Bernoulli’s principle.
The rest of this document put the above physical arguments into a mathematical form we can solve.
Panel Geometry
We discretize the airfoil surface into panels connecting vertices. Each panel has endpoints and , with the control point placed at the midpoint:
The panel angle defines the local tangent and outward normal .
Panel Influence Coefficients
The velocity induced at a control point by a panel depends on the geometry relating them. Let and be the vectors from the endpoints of panel to control point :
The influence coefficients are expressed in terms of two geometric quantities. The first is the angle subtended by panel as seen from control point :
For the self-influence case (), the control point lies on the panel itself, and where is the winding direction. The second quantity is the log-ratio of distances from the control point to the panel endpoints:
Velocity Components
The induced velocity at control point from panel is most usefully expressed in the local coordinate system of panel . With denoting the angle difference between panels, the normal component of velocity (positive pointing outward from the body) is
and the tangential component (positive in the direction of increasing panel index) is
Notice that both the source strength and the vortex strength contribute to both velocity components. The normal velocities enter the no-penetration condition; the tangential velocities enter the Kutta condition.
Boundary Conditions
The no-penetration condition requires that fluid cannot pass through the airfoil surface. At each control point , the total normal velocity (from all panels plus the freestream) must vanish:
where is the angle of attack and is the freestream’s normal component at panel . Writing this condition at each of the control points gives linear equations in the unknowns.
The Kutta condition supplies the final equation. It requires that flow leaves the trailing edge smoothly rather than wrapping around at infinite velocity. Physically, this is what allows a real airfoil to generate lift. Mathematically, we enforce that the tangential velocities on the upper and lower surfaces are equal and opposite at the trailing edge:
where the total tangential velocity at panel is
With no-penetration equations and Kutta condition, we have exactly equations for unknowns.
Matrix Formulation
Expanding the boundary conditions and collecting coefficients, we obtain the linear system . The unknown vector contains all source strengths followed by the vortex strength:
For rows (no-penetration):
For row (Kutta condition), summing contributions from panels 1 and :
The result is equations for unknowns, which can be solved directly by matrix inversion. In this demo, the system is solved using LUP decomposition with partial pivoting.
Lift Coefficient
Once solved, the circulation is where is the total panel perimeter. By the Kutta-Joukowski theorem:
where is the length of the airfoil cross-section, called the chord length.
GPU Field Evaluation
The panel method solution (source strengths and vortex strength ) is computed on the CPU, then uploaded to the GPU. For each pixel, the fragment shader evaluates the induced velocity by summing contributions from all panels.
At any field point , iterating over panels:
where and are computed from the vectors to each panel’s endpoints.
The pressure coefficient follows from Bernoulli’s equation for incompressible flow:
Streamlines are traced by integrating the velocity field in the vertex shader. Each streamline is rendered as a triangle strip with opacity that fades toward the ends.