Virtual Wind Tunnel
Potential flow around an airfoil or a cylinder by a panel method with the Kutta condition: lift, circulation, surface pressure, a lift polar and the flow field.
How it is calculated
The body is a closed, counter-clockwise contour of straight panels. The airfoil uses the NACA four-digit thickness/camber construction with camber position and a closed trailing-edge coefficient . The cylinder has unit normalized diameter. Geometry coordinates are normalized by chord or diameter.
For a target in panel-local coordinates and panel length , the integrated unit-source velocity is
Rotating these velocities and projecting onto outward normals and tangents gives the dense matrices and . Exterior self-influences are and . A positive, counter-clockwise vortex sheet has normal influence and tangential influence .
The no-penetration system and trailing-edge Kutta condition are
where is the sum of the first and last rows of and . With LU solves of ,
For the cylinder, circulation is prescribed as zero. Surface velocities are . The residual is .
The lift polar uses superposition: the sources for any angle are , where and solve for unit winds along and ; the Kutta condition then gives the circulation at each of 49 angles from to exactly, without solving again.
Bernoulli gives . Pressure is integrated panel by panel to give . Independently, circulation gives with counter-clockwise circulation positive. Their finite-panel discrepancy is a discretization effect; it need not vanish to machine precision. Dimensional lift per span is .
The picture is in the tunnel frame: the wind blows along and the body is turned by . Velocities anywhere follow from the solved source and vortex strengths. The colours (a scale diverging from near black at : blue suction, orange overpressure) are the pressure coefficient on a grid, blended between its points; points inside the body (winding number 1) take the value of the nearest panel, so the map meets the surface. The same scale colours the surface. Streamlines start at the inlet at equal spacing, so equal flow passes between neighbours and their crowding shows the speed; they are traced with steps along the flow (second-order Adams–Bashforth on the direction, shorter near the body). Particles move along them at the local speed (by the time of flight), so they spread out where the air is fast and bunch up where it slows. The picture shows the steady flow; it is not an unsteady simulation.
For readability, the pressure chart shows separate upper/lower PCHIP curves over . Cards and force integrals use the original panel values, including the leading-edge extrema.
Assumptions
Steady, two-dimensional, incompressible, inviscid, irrotational exterior flow, with circulation selected by the Kutta condition for an airfoil. The cylinder is noncirculating. No boundary layer, turbulence, wake shedding, stall, viscous drag or finite-span correction is modeled. Speed of sound is fixed at 343 m/s, approximately air at 20 °C. The equations are derived here from the cited source/vortex panel formulation. Reference checks are assistant-added limiting-case checks, not an external certification.
Where it applies
Use 32–512 panels, thickness/chord 0.06–0.24, camber/chord 0–0.06 and angles within ±12°. These are exploration limits, not a claim that real flow stays attached. A peak surface Mach warning flags a breakdown of the incompressible approximation. 128 panels resolve the lift coefficient to about 0.5 %; 512 take several seconds on a phone. Streamlines very close to the surface are approximate where the steps are long compared with the panels. Do not interpret the small computed pressure-drag residual as a prediction of real aerodynamic drag. Odd panel counts slightly unbalance airfoil sampling.
References
- W. H. Mason, Applied Computational Aerodynamics, Chapter 4: Incompressible Potential Flow Using Panel Methods, especially the two-dimensional source/vortex formulation and Kutta condition. https://archive.aoe.vt.edu/mason/Mason_f/CAtxtChap4.pdf
- L. A. Barba et al., AeroPython Lesson 11: Vortex-source panel method; independent formulation of the lifting-body source panels plus one uniform vortex sheet. https://github.com/barbagroup/AeroPython/blob/master/lessons/11_Lesson11_vortexSourcePanelMethod.ipynb
- Potential Flow, Chapter 3: noncirculating cylinder solution Cp = 1 − 4 sin²θ, extrema +1 and −3. https://booksite.elsevier.com/samplechapters/9780080966328/Chapter_3.pdf
Inputs
| Input | Symbol | Unit | Default |
|---|---|---|---|
| Flow · press ▶ | phase | 0.32 | |
| Body | body | NACA airfoil | |
| Angle of attack | alpha | deg | 5 |
| Thickness / chord 0.12 means 12% thickness. The trailing edge is closed. | t_c | 0.12 | |
| Maximum camber / chord 0.02 means 2% camber, at 40% chord. | m_c | 0.02 | |
| Chord / cylinder diameter | c_chord | m | 1 |
| Freestream speed | U_inf | m/s | 25 |
| Air density | rho_air | kg/m^3 | 1.225 |
| Surface panels 128 panels give the lift coefficient to about 0.5 %. More panels refine the leading edge and take longer: 512 is several seconds on a phone. | N | 128 |
Results
With the default inputs above, the calc gives:
| Result | Value |
|---|---|
| Lift coefficient | 0.856 |
| Lift per span | 327.6 N/m |
| Circulation Γ | -10.8 m²/s |
| Peak suction · Cp | -1.911 |
| Peak surface Mach | 0.124 |
Checked against sources
Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).
Cylinder Cp · complete analytic distribution
Source: Exact potential flow around a noncirculating circular cylinder: Cp(θ)=1−4sin²(θ−α), independent of size and speed. Compare the numerical panel solution at all actual control-point angles. Potential Flow, Chapter 3, cylinder example. https://booksite.elsevier.com/samplechapters/9780080966328/Chapter_3.pdf
Inputs: Body = Circular cylinder · analytic benchmark; Surface panels = 64; the others as above.
| Result | Source | This calc |
|---|---|---|
| cylinder_error | 0 ± 1 × 10⁻⁸ | 4.441 × 10⁻¹⁵ |
Cylinder stagnation and shoulder · Cp = +1, −3
Source: Exact noncirculating cylinder solution: stagnation Cp=1, shoulder Cp=−3, zero resultant force. At α=180°/64, the first and seventeenth control points align exactly with those locations. Potential Flow, Chapter 3. https://booksite.elsevier.com/samplechapters/9780080966328/Chapter_3.pdf
Inputs: Body = Circular cylinder · analytic benchmark; Surface panels = 64; Angle of attack = 2.813 deg; the others as above.
| Result | Source | This calc |
|---|---|---|
| Surface pressure coefficient [1] | 1 | 1 |
| Surface pressure coefficient [17] | -3 | -3 |
| Lift coefficient | 0 ± 1 × 10⁻⁸ | -1.534 × 10⁻¹⁵ |
| Numerical pressure-drag residual | 0 ± 1 × 10⁻⁸ | -1.518 × 10⁻¹⁶ |
Symmetric airfoil at zero incidence · zero lift
Source: Reflection symmetry of the unique attached potential-flow solution with the Kutta condition gives equal upper/lower pressure and zero circulation for a symmetric airfoil at zero incidence. Mason, Applied Computational Aerodynamics, Ch. 4; AeroPython Lessons 10–11. This is an exact limiting case, not a value copied from this implementation.
Inputs: Angle of attack = 0 deg; Maximum camber / chord = 0; the others as above.
| Result | Source | This calc |
|---|---|---|
| Lift coefficient | 0 ± 1 × 10⁻⁸ | -2.851 × 10⁻¹⁷ |
| Dimensionless circulation | 0 ± 1 × 10⁻⁸ | 2.94 × 10⁻¹⁷ |







Responses