Skip to content

DOC: Make the user guide's examples converge as printed - #36

Merged
thclark merged 1 commit into
mainfrom
doc/guide-examples-converge
Oct 30, 2026
Merged

thclark merged 1 commit into
mainfrom
doc/guide-examples-converge

Conversation

@thclark

@thclark thclark commented Oct 30, 2026

Copy link
Copy Markdown
Owner

A reader following the getting-started guide on a Linux laptop reported that the single-point example (alpha 5) did not converge while lower alphas did, and that only a small part of the NACA 4412 polar was valid.

Findings

Neither depends on the host. macOS, Linux arm64 and Linux x86_64 (Ubuntu 24.04 containers) give identical panels, identical results and a byte-identical polar JSON. Both problems are in the docs:

  • Single point. NACA 0012 at alpha 5, Re 1e6 does not converge from a fresh start, and more iterations don't help (tried 30, 50 and 100). It is an isolated point: 4.5 and 5.5 converge. The pristine DP reference XFOIL fails at the same point on the same panels (VISCAL: Convergence failed), and at 4.5 it converges in 8 iterations, as yFoil does. "Your first analysis" had sidestepped this with Re 1e9.
  • 4412 polar. The Polars page never said how naca4412.json was made. The only command producing it earlier in the guide, on the Geometry page, makes a sharp-TE, 200-node section. On that section the sweep fails from alpha 1.5 and halts after four failures at alpha 3, giving 13/41 valid. XFOIL does exactly the same (last converged alpha 1.0, CL 0.49137 in both). The 160-node blunt-TE section the docs figure was made from gives 41/41 valid.

Changes

  • Single-point examples (Your first analysis; Analyse a single point) now use alpha 4 at Re 1e6, which converges in 7 iterations.
  • The Polars page now generates the section: yfoil geometry naca 4412 -n 160 -o naca4412.json.
  • The Geometry page's 4412 example is now 160 nodes with a blunt TE. --sharp is still documented further down that page.
  • scripts/guide-figures.sh runs the new commands. naca0012_a5.fig becomes naca0012_a4.fig, and the other seven figures regenerate byte-identical.

scripts/docs-check.py passes.

A reader following the guide hit an unconverged single point and a polar
with 13 of 41 points valid. Neither depends on the host: macOS, Linux arm64
and Linux x86_64 give identical results, and the reference XFOIL fails at
the same points on the same panels.

- The single-point examples used NACA 0012 at alpha 5, Re 1e6, which from a
  fresh start fails to converge in XFOIL and yFoil alike (4.5 and 5.5
  converge); "Your first analysis" had sidestepped it with Re 1e9. Both now
  use alpha 4 at Re 1e6.
- The Polars page never said how naca4412.json was made, and the only
  command producing it earlier in the guide (Geometry page) made a sharp-TE,
  200-node section, on which the sweep halts at alpha 3. The Polars page now
  generates the section, and the Geometry example is the 160-node blunt TE.

scripts/guide-figures.sh runs the new commands; naca0012_a5.fig becomes
naca0012_a4.fig and the other figures regenerate byte-identical.
@thclark
thclark merged commit 8bd3482 into main Oct 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant