Skip to content
SHD Sim
Menu

Validation/Incompressible flow

Potential flow past a cylinder

Two numbers a reader can check on paper — the speed at the shoulder is exactly twice the stream, and the pressure coefficient there is exactly −3.

VerificationSurface maximum 1.9977 U against an exact 2 U; Cp from Bernoulli −2.991 against −3

Why this case

The potential solver had no reference of any kind behind it, and it is the one solver in the product whose answer is written down exactly. Two of its numbers a reader can check on paper without running anything: the speed at the shoulder of the cylinder is exactly twice the freestream, and the pressure coefficient there is exactly −3.

Nobody measured those. Nobody fitted them. There is no scatter band to hide inside.

PhysicsIncompressible, irrotational — a Laplace equation for the velocity potential
BodyA circular cylinder, radius a = 0.5 m, from an STL
StreamU = 10 m/s
SidesSymmetry — see the far-field note below
MeshesThree surface refinements: 0.0625, 0.03125 and 0.015625 m near the body
DomainSwept: 9, 17, 41 and 161 radii of clearance
ReferenceThe classical doublet in a uniform stream; Lamb, Hydrodynamics, §68
AgreementSurface maximum 1.9977 U against an exact 2 U; Cp −2.9906 against an exact −3

The exact solution

The classical doublet in a uniform stream. For a cylinder of radius a in a stream U, with θ measured from the freestream direction,

    u_r     =  U cos(theta) (1 - a^2/r^2)
    u_theta = -U sin(theta) (1 + a^2/r^2)

On the surface r = a the radial part vanishes and the speed is |u| = 2 U |sin θ|, so there are stagnation points at θ = 0 and π and a maximum of exactly 2 U at the shoulder. By Bernoulli the surface pressure coefficient is

    Cp = 1 - 4 sin^2(theta)      which is exactly -3 at the shoulder

What “exact” is exact for, and what it is not

The second difference is that a finite-volume solution lives at cell centres, and the nearest cell centre to the surface is half a cell out. At radius r = a + dr the exact speed is already lower than the surface value by about dr/a. So every ring measurement is reported twice: once against the surface value 2 U, which is the number a reader can check on paper and which is dominated by that offset, and once against the exact solution at the cell’s own radius, which isolates the solver.

Result

Surface maximum and shoulder pressure coefficient against the exact values, under refinement
Cell size at the surfaceCellsSurface maximum / Uvs an exact 2Cp at the shouldervs an exact −3
0.0625 m7 2681.95890−2.06 %−2.8373−5.42 %
0.03125 m28 5801.98644−0.68 %−2.9460−1.80 %
0.015625 m114 3401.99765−0.12 %−2.9906−0.31 %
Speeds and pressure coefficients are the fixture's own, all at 161 radii of clearance; the per-cent columns are those numbers against the exact 2 and −3. The Cp here is the one that follows from the measured speed by Bernoulli — see the caveat below.
Pressure coefficient at the shoulder on three meshes, approaching the exact minus three
The pressure coefficient at the cylinder’s shoulder on three surface refinements, against the exact −3. Both the plotted values and the cell counts are from the fixture; the domain is 161 radii across in all three.
Error over the whole near-body ring, and over the field
Cell size at the surfaceRing RMS vs the exact solution at the cell radiusRing RMS vs the surface value 2UVolume-weighted field RMSContinuity error
0.0625 m0.04597 U0.09063 U0.01526 U5.3 × 10⁻¹²
0.03125 m0.02760 U0.04621 U0.01027 U1.1 × 10⁻¹¹
0.015625 m0.01902 U0.02088 U0.00682 U3.6 × 10⁻¹¹
Both ring columns fall under refinement. The larger of the two is the comparison against the surface value, which carries the half-cell offset described above; the smaller isolates the discretisation. The field norm is volume weighted, because an unweighted mean over cells is not a norm of a function — refining puts more cells where the cells got smaller, so an unweighted average moves because the population moved.

Three things the harness had to change

Each was established by changing it alone, and each is reported rather than treated as a knob.

  • The far field. The product’s external-flow default gives the side patches freestream conditions. The potential solver does not solve a momentum equation — it solves a Laplace equation for the velocity potential, and takes its boundary conditions from the pressure’s. A freestream pressure is an inlet-outlet, so the potential is fixed wherever the solver decides there is outflow, and the sides leak. Measured on the default case at 161 radii of clearance, the far-field speed runs from 34 m/s at the inlet corners down to 0.1 m/s at the outlet, against a freestream of 10. The same case with the sides set to Symmetry — one product setting, nothing else touched — has a far field uniform to better than a per cent. That control is what makes the first result a finding rather than a guess, and the leaking case is kept as this benchmark’s failing fixture.
  • A missing scheme. Writing the pressure out of the potential solver needs a divergence scheme the product writes into no case at all, and which cannot be inferred from the default. Without it the run dies after the potential solve and before anything is written, so nothing at all appears. It was added here so that a pressure exists to compare with, and reported as a gap.
  • The potential solver’s relative tolerance. The product writes a relative tolerance of 0.01 and no non-orthogonal correction settings, so the solver runs one pass and stops the linear solve two decades down: measured continuity error 1.08 × 10⁻³. With the relative tolerance at zero and 20 non-orthogonal correctors, the same mesh reaches 7.3 × 10⁻¹². A benchmark that left the default would be reporting the linear solver’s stopping criterion rather than the discretisation, so it is tightened, and the continuity error is carried into every table above where it can be seen.

What this page does not establish

  • The surface-speed maximum is still 0.12 % low on the finest mesh, and it has not been refined further. The trend across the three meshes is monotonic towards 2 U, but three points do not establish a rate, and no order of convergence is claimed anywhere on this page.
  • The stagnation point is not converged. The minimum speed on the ring should be zero; it is 1.4880, 0.7945 and 0.4099 m/s on the three meshes, against a stream of 10. Halving with each refinement is the right behaviour for a cell centre a half-cell off a stagnation point, but it is not a small number and this page does not report it as agreement.
  • Potential flow is not the flow past a real cylinder. There is no viscosity, no boundary layer, no separation and no drag in this solution at all. The case verifies that the solver reproduces the mathematics it claims to solve; the unsteady wake behind a real cylinder is a different case.

Repeat this yourself

Every case here is set up from the worked examples in the product, with no hand-editing of solver files — so you can run it, and get the same numbers. The free tier runs real cases up to 250,000 cells of fluids, or 100,000 nodes of solid, with no account needed to download and no time limit.

All validation cases · Written by the team building SHD Sim.