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 NN straight panels. The airfoil uses the NACA four-digit thickness/camber construction with camber position p=0.4p=0.4 and a closed trailing-edge coefficient −0.1036-0.1036. The cylinder has unit normalized diameter. Geometry coordinates are normalized by chord or diameter.

For a target in panel-local coordinates (a,b)(a,b) and panel length ℓ\ell, the integrated unit-source velocity is

us=14πlog⁡a2+b2(a−ℓ)2+b2,vs=12πatan2⁡ ⁣(bℓ,a(a−ℓ)+b2).u_s={1\over4\pi}\log{a^2+b^2\over(a-\ell)^2+b^2},\qquad v_s={1\over2\pi}\operatorname{atan2}\!\bigl(b\ell,a(a-\ell)+b^2\bigr).

Rotating these velocities and projecting onto outward normals and tangents gives the dense matrices AA and AtA_t. Exterior self-influences are Aii=1/2A_{ii}=1/2 and (At)ii=0(A_t)_{ii}=0. A positive, counter-clockwise vortex sheet has normal influence gn=−At1\mathbf g_n=-A_t\mathbf1 and tangential influence gt=A1\mathbf g_t=A\mathbf1.

The no-penetration system and trailing-edge Kutta condition are

Aσ+γgn=b,kσ+γh=−(V∞,t,1+V∞,t,N),A\boldsymbol\sigma+\gamma\mathbf g_n=\mathbf b,\qquad \mathbf k\boldsymbol\sigma+\gamma h=-\bigl(V_{\infty,t,1}+V_{\infty,t,N}\bigr),

where k\mathbf k is the sum of the first and last rows of AtA_t and h=gt,1+gt,Nh=g_{t,1}+g_{t,N}. With LU solves of AA,

σ0=A−1b,σγ=−A−1gn,γ=−V∞,t,1−V∞,t,N−kσ0h+kσγ,σ=σ0+γσγ.\boldsymbol\sigma_0=A^{-1}\mathbf b,\quad \boldsymbol\sigma_\gamma=-A^{-1}\mathbf g_n,\quad \gamma={-V_{\infty,t,1}-V_{\infty,t,N}-\mathbf k\boldsymbol\sigma_0\over h+\mathbf k\boldsymbol\sigma_\gamma},\quad \boldsymbol\sigma=\boldsymbol\sigma_0+\gamma\boldsymbol\sigma_\gamma.

For the cylinder, circulation is prescribed as zero. Surface velocities are Vt=V∞,t+Atσ+γgtV_t=V_{\infty,t}+A_t\boldsymbol\sigma+\gamma\mathbf g_t. The residual is max⁡∣Aσ+γgn−b∣\max|A\boldsymbol\sigma+\gamma\mathbf g_n-\mathbf b|.

The lift polar uses superposition: the sources for any angle are cos⁡α σx+sin⁡α σy\cos\alpha\,\boldsymbol\sigma_x+\sin\alpha\,\boldsymbol\sigma_y, where σx\boldsymbol\sigma_x and σy\boldsymbol\sigma_y solve AA for unit winds along xx and yy; the Kutta condition then gives the circulation at each of 49 angles from −12∘-12^\circ to 12∘12^\circ exactly, without solving again.

Bernoulli gives Cp=1−(Vt/U∞)2C_p=1-(V_t/U_\infty)^2. Pressure is integrated panel by panel to give CLC_L. Independently, circulation gives CL,Γ=−2Γ/(U∞c)C_{L,\Gamma}=-2\Gamma/(U_\infty c) 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 L′=12ρU∞2cCLL'=\tfrac12\rho U_\infty^2cC_L.

The picture is in the tunnel frame: the wind blows along xx and the body is turned by −α-\alpha. Velocities anywhere follow from the solved source and vortex strengths. The colours (a scale diverging from near black at Cp=0C_p=0: blue suction, orange overpressure) are the pressure coefficient Cp=1−(V/U∞)2C_p=1-(V/U_\infty)^2 on a 52×2852\times28 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 0.02≤x/c≤0.980.02\le x/c\le0.98. 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

InputSymbolUnitDefault
Flow · press ▶phase0.32
BodybodyNACA airfoil
Angle of attackalphadeg5
Thickness / chord
0.12 means 12% thickness. The trailing edge is closed.
t_c0.12
Maximum camber / chord
0.02 means 2% camber, at 40% chord.
m_c0.02
Chord / cylinder diameterc_chordm1
Freestream speedU_infm/s25
Air densityrho_airkg/m^31.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.
N128

Results

With the default inputs above, the calc gives:

ResultValue
Lift coefficient0.856
Lift per span327.6 N/m
Circulation Γ-10.8 m²/s
Peak suction · Cp-1.911
Peak surface Mach0.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.

ResultSourceThis calc
cylinder_error0 ± 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.

ResultSourceThis calc
Surface pressure coefficient [1]11
Surface pressure coefficient [17]-3-3
Lift coefficient0 ± 1 × 10⁻⁸-1.534 × 10⁻¹⁵
Numerical pressure-drag residual0 ± 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.

ResultSourceThis calc
Lift coefficient0 ± 1 × 10⁻⁸-2.851 × 10⁻¹⁷
Dimensionless circulation0 ± 1 × 10⁻⁸2.94 × 10⁻¹⁷

Responses

Your email address will not be published. Required fields are marked *

L ading...