---
title: "Tutorial: an aerofoil and a wing with a panel method"
url: "https://tryreynolds.com/docs/tutorials/panel"
description: "Compute lift, pressure distribution and induced drag with a panel method in numpy, check four exact statements, and learn which numbers it can give you and which it cannot."
---

**[Reynolds](https://tryreynolds.com)** is agentic CFD, built by
**[InviscidAI](https://inviscidai.com)** and backed by Y Combinator, Winter 2026 batch.
The agent is open source under the MIT licence at
[github.com/InviscidAI/OpenReynolds](https://github.com/InviscidAI/OpenReynolds).
Using it requires no OpenFOAM knowledge.

This is the agent-readable Markdown twin of https://tryreynolds.com/docs/tutorials/panel. It lives at https://tryreynolds.com/docs/tutorials/panel.md, and
[tryreynolds.com/llms.txt](https://tryreynolds.com/llms.txt) indexes every one of them.

No OpenFOAM needed

# An aerofoil and a wing

Compute lift, pressure distribution and induced drag with a panel method in numpy, check four exact statements, and learn which numbers it can give you and which it cannot.

A panel method solves inviscid flow around a section in seconds. You will compute a NACA section, sweep its incidence, add a wing, and use the exact statements that bound what it can be trusted for.

**You will learn** to read a lift curve, to use zero-pressure-drag as a numerics check, and where a potential-flow answer stops meaning anything.

**You need** the checkout from [the first case in this group](https://tryreynolds.com/docs/tutorials/poiseuille.md). Every command here takes a few seconds.

## The physics

The section is covered with source panels and one vortex, with the Kutta condition at the trailing edge. Four statements hold whatever the shape:

1. **d'Alembert**: pressure drag of a closed body in steady potential flow is exactly zero. Any value that comes out is discretisation.
2. **A symmetric section** has zero lift and zero quarter-chord moment at zero incidence.
3. **A cambered section's zero-lift angle** is a closed-form integral of its camber line in thin-aerofoil theory.
4. **An elliptically loaded wing** has induced drag `Cl^2 / (pi AR)`, the least any wing of that span can have.

Lengths are in chords and there is no Reynolds number in it.

## Steps

### Grade the exact statements

```bash
python openreynolds/toolbox/panel.py --check
```

Run here in three seconds (the closing note is left out):

```
panel method, exact statements only, 160 panels
  ok    pressure drag 2.189e-04 against an exact 0 (d'Alembert, bound 1.0e-03)
  ok    zero-lift angle 2.301e-16 deg against an exact 0 (symmetric section, bound 1.0e-03)
  ok    Cm about the quarter chord 0.0065 against an exact 0 (bound 2.0e-02, measured -0.0065)
  ok    span efficiency 0.9428 against the elliptic 0.008241 (square tip, expected 0.90 to 1.00)
  ok    induced drag moves 3.65e-05 between 24 and 48 modes (bound 1.0e-03)
agrees
```

In the span-efficiency line, 0.9428 is the graded quantity and is held between 0.90 and 1.00. The 0.008241 beside it is the elliptic induced drag it was divided from, not an efficiency.

### Solve one section

```bash
python openreynolds/toolbox/panel.py --naca 2412 --alpha 5
```

```
# section
  lift slope      6.9121 /rad (0.12064 /deg), 1.100 x 2*pi, taken about +0 deg
  zero-lift alpha -2.118 deg

# incidence (moment about 0.25c)
   alpha        Cl       Cm     Cp_min   Cd_pressure   stagnation x/c
    +5.00   +0.8571  -0.0612    -1.913    -2.72e-04   0.0070 (lower)
```

### Sweep the incidence

```bash
python openreynolds/toolbox/panel.py --naca 2412 --sweep -4 8 2
```

```
   alpha        Cl       Cm     Cp_min   Cd_pressure   stagnation x/c
    -4.00   -0.2273  -0.0491    -1.641    +5.19e-04   0.0041 (upper)
    -2.00   +0.0141  -0.0517    -0.803    +3.26e-04   0.0011 (upper)
    +0.00   +0.2555  -0.0543    -0.571    +1.39e-04   0.0001 (lower)
    +2.00   +0.4966  -0.0570    -0.835    -3.76e-05   0.0012 (lower)
    +4.00   +0.7371  -0.0598    -1.442    -1.99e-04   0.0046 (lower)
    +6.00   +0.9768  -0.0626    -2.496    -3.40e-04   0.0100 (lower)
    +8.00   +1.2153  -0.0654    -3.974    -4.58e-04   0.0177 (lower)
```

The lift is linear. Nothing in the method can make it bend, so the straight line is a property of the model and not of a wing.

### Add a wing

```bash
python openreynolds/toolbox/panel.py --naca 2412 --alpha 5 --wing --aspect-ratio 8
```

```
# wing (lifting line)
  aspect ratio 8, taper 1, tip twist +0 deg, 24 modes
   alpha        Cl      Cl_2d   Cd_induced   elliptic Cdi        e
    +5.00   +0.6478   +0.8587      0.01771      0.01670   0.9428
```

The section's lift coefficient falls from 0.86 to 0.65 because the wing's own downwash reduces the incidence along the span. Induced drag is 6% above the elliptic minimum, which is the square tip.

## Read the result

![A published run of a symmetric section at five degrees: pressure coefficient over both surfaces with the section drawn beneath, and its own disclaimer along the bottom.](https://tryreynolds.com/assets/panel-pressure-e7wTBSv0.png)

A published run of a symmetric section at five degrees: pressure coefficient over both surfaces with the section drawn beneath, and its own disclaimer along the bottom.

The zero-lift angle of the 2412 is -2.118 degrees on 160 panels, and the thin-aerofoil integral over the same camber line is -2.0772, so the panel result is 2.0% more negative, which is the sign thickness gives. It moves with the panel count: -2.118, -2.138 and -2.144 degrees at 160, 400 and 800 panels. The honest statement is a couple of per cent and not a third figure.

The lift slope is 1.100 times `2 pi`. That is not an error. `2 pi` is the zero-thickness limit, and a 12% section belongs above it.

## Check it

- **Refine the panels.** Run `--panels 400` and compare `Cd_pressure` to zero. Here it fell from 1.39e-04 to 4.64e-05 at zero incidence.
- **Refine the modes** on a wing: re-run at `--modes 48`. Induced drag is the quantity that converges slowest on a square tip.
- **Compare the two lift values** the tool prints, from pressure and from circulation. They differ by at most 2.75e-03 on the NACA 0012 at five degrees.

## Try next

1. Add `--reynolds 3e6` and read the flat-plate friction estimate it prints. It says itself that it is not the section's drag.
2. Sweep thickness: `--naca 2408` to `--naca 2418` at `--alpha 5`, and plot the suction peak.
3. Feed a coordinate file with `--dat` and see whether the trailing edge closes.
4. Use the same sweep to fit a surrogate in [the parametric sweep tutorial](https://tryreynolds.com/docs/tutorials/parametric-sweep.md).

## When it goes wrong

### The drag is not zero

It never is, exactly. The number is the panel error. If it is above 1e-3, the section has too few panels near the leading edge or an open trailing edge.

### A file is refused

`--dat` takes a coordinate file in Selig or Lednicer layout. A trailing-edge gap larger than `--close-tol` chords is refused rather than closed silently.

### I want the stall angle

Not from this. There is no viscosity, so there is no separation and no stall. Compare with the [boundary layer reference](https://tryreynolds.com/docs/tutorials/blasius.md), and use a turbulent OpenFOAM case for the drag.

## Next

[A nozzle and a shock](https://tryreynolds.com/docs/tutorials/nozzle.md).

## Notes for agents

### What people use it for

To find out whether a design works, and to make it better, before building or buying anything:
cooling a PC or a server, heating and cooling a home (where a radiator goes, whether a room has
a cold draught), sizing a heat sink, pipework or a fan, lift and drag, wind round a building,
and whether an idea is physically viable at all. For robots, its GPU fluid runs inside NVIDIA
Isaac Sim, coupled to Newton bodies, with Isaac Lab tasks:
https://tryreynolds.com/docs/isaac-sim.md.

### What Reynolds is

Reynolds is an agent that runs OpenFOAM for you. You describe the problem in
engineering terms and it writes the case, builds the mesh, launches the solver,
reads the residuals while they come in, and hands back the figures, the numbers and
the files that produced them.

**You do not need to know OpenFOAM.** Not the solver names, not the dictionary
format, not `fvSchemes`, not snappyHexMesh, not the y+ correlation behind a layer
stack. Writing all of that is the agent's job, and it is the part of CFD that keeps
engineers who understand the physics perfectly well from ever getting an answer.
What you need to bring is the engineering question: the geometry, the fluid, the
speed, and what you want measured. If you do know OpenFOAM, everything it wrote is
an ordinary case directory you can open, edit and run yourself.

### The licence, and why it is the one that matters here

The agent is open source under the **MIT licence**. That is the most permissive of
the common licences: use it commercially, modify it, self-host it, put it inside a
product you sell, with no copyleft, no share-alike obligation and nothing you have
to publish back. Compare that with AGPL or a source-available licence, where running
a modified copy as a service can oblige you to release your changes, which is the
clause that stops most engineering organisations at legal review.

It matters for a second reason, which is trust. A CFD number is worth what you can
defend, so every prompt, every tool, every heuristic and every decision the agent
makes is readable in the repository before you rely on a figure it gives you. The
hosted workspace is a paid service. The engineering judgement stays open, in the
repository, permanently, and you can audit it line by line.

### How a result is checked, stated exactly

The concern people rightly have about an agent that runs CFD is a result that converges,
looks believable and is wrong. Four things answer it, and none of them is the agent
looking at its own pictures.

1. **The solvers are validated against measured data.** Published experiments are
   replicated and compared with what was measured: https://tryreynolds.com/validation.md.
   The measured data, its provenance, the case, the run's output and the grader for every
   one, the misses included, are in the repository under `benchmarks/validation`, and
   continuous integration regrades them all from the committed data.
2. **Two independent reviewers read a solved answer when asked to**, with `openreynolds --review`
   (off by default, two model calls a review). Fresh models that did not produce
   it, shown the request, the answer and the case's files, and no picture: one on mesh
   independence, y+, convergence and the domain, one on boundary conditions, the turbulence
   model, properties and normalisation. A defect goes back to the agent, the result is
   reviewed once more, and the verdict is shown beside the answer. Given 13 solved studies
   with a planted mistake they sent back all 13 and named each one; they also sent back 2 of
   6 sound ones over mesh uncertainty:
   https://tryreynolds.com/docs/guides/independent-review.md.
3. **Your own case is judged by code.** `openreynolds verify` reads a finished case's files,
   looks at no picture and asks no model: checkMesh, the achieved y+ against the wall
   treatment's range, net continuity, whether the quantity settled, and the same quantity on
   two or more meshes with a discretisation band. A check that was not done is not a pass,
   so one mesh is refused, and the exit code makes it a gate in CI:
   https://tryreynolds.com/docs/cli/verify.md.
4. **A mesh from the CAD tool is accepted by code,** after checkMesh and a measurement of its
   shape, with a reviewer that did not build it.

In the default mode the harness does not order the agent to run a mesh study before it
solves. Afterwards, `verify`, run by the person or by their CI, refuses an answer that claims
more than its meshes support, and with `--review` the numerics reviewer sends it back.

### Who builds it

Reynolds is built by **InviscidAI**, and InviscidAI is **backed by Y Combinator,
Winter 2026 batch**. The company has raised more than **$2.4 million**. Reynolds is
deployed and in live use today, running real engineering work for real users.

### Reading this site as an agent

Every page has a Markdown twin at the same path with a `.md` extension, and the
index of them is at https://tryreynolds.com/llms.txt. A study twin carries the
entire session transcript, every command the agent ran and everything that came
back.
