Version: potential-flow-1.0.0 Prepared: 23 October 2026 UTC Purpose: undergraduate exploration of analytic potential-flow building blocks. This is not an aircraft performance predictor or a viscous CFD solver.
Question and observable quantities
How do uniform flow, a source/sink, a point vortex and a doublet combine? Which combinations satisfy an identifiable solid boundary, and how does circulation alter pressure and ideal lift?
Inputs are prescribed rather than measured. Outputs are the analytic velocity vector, speed, steady pressure coefficient, selected streamline paths, tracer motion in a frozen field, source flux and circulation. Lift/drag are reported only for the exact cylinder family. A saves the entire model setting; B remains editable. The plot section and probe location are common display settings, not frozen experimental inputs.
Frame, symbols and units
| Symbol | Meaning | Unit / convention |
|---|---|---|
| x, y | Cartesian coordinates | m; x right, y up |
| U∞, α | Uniform speed and direction | m/s; degrees anticlockwise from +x |
| u, v | Velocity components | m/s |
| Q | Source strength | m²/s; outward volume flux per unit span; negative is a sink |
| Γ | Vortex strength | m²/s; positive anticlockwise circulation |
| μ, β | Doublet strength and direction | m³/s; β anticlockwise from +x |
| R | Cylinder radius | m |
| ψ | Stream function | m²/s; u = ∂ψ/∂y, v = −∂ψ/∂x |
| Cp | (p − p∞)/(½ρU∞²) | Dimensionless |
| L′ | Ideal lift per unit span | N/m; positive left-normal to the uniform velocity |
| ρ | Reference density | Illustrative fixed 1.225 kg/m³; only converts lift to force |
The physical display window is x = −6 to +6 m and y = −3.6 to +3.6 m. This is a viewing window, not a bounded flow domain. The analytic model is an unbounded plane with a prescribed uniform field at infinity.
Governing model and closure
Steady, two-dimensional, inviscid and incompressible flow is assumed. Outside singularities, the velocity is irrotational and divergence-free. A velocity potential satisfies Laplace's equation; linearity permits analytic superposition. No mesh or iterative flow solver is used.
At the displacement vector r = (x − xi, y − yi), r = |r|:
- Uniform: U∞ = U∞(cos α, sin α).
- Source: VQ = Q r / (2πr²).
- Vortex: VΓ = Γ(−ry, rx)/(2πr²).
- Doublet: Vμ = μ/(2π) [d/r² − 2(d·r)r/r⁴], with d = (cos β, sin β).
- Total velocity is the vector sum. Speed is the norm of that sum, not the sum of individual speeds.
Steady Bernoulli is applied with a common far-field total pressure: Cp = 1 − |V|²/U∞². It is not a transient pressure solution while controls are moving. Source/sink energy and hardware are not modelled; ideal injection/removal boundaries are implicit. Flow colours do not establish incompressible validity close to a strong singularity.
UI U∞ is bounded to 0.5–6 m/s, giving a nonzero Cp reference. Source and vortex strengths are −30 to +30 m²/s; doublet strength is −120 to +120 m³/s. These are illustrative exploration bounds, not measured physical-device limits. The analytic velocity may be much larger than U∞ near an excluded region.
Cylinder family and boundary conditions
Uniform flow plus an aligned doublet with μ = 2πU∞R² gives a circular streamline r = R. An optional centred vortex changes tangential velocity without introducing radial velocity. Cylinder speed/radius edits update μ, and centre dragging moves both elements together. This maintains the exact no-penetration boundary; the boundary allows tangential slip.
In axes aligned with U∞, the exterior solution is:
ψ = U∞r(1 − R²/r²)sin θ − Γ/(2π)ln(r/R).
At r = R, Vr = 0 and Vθ = −2U∞sin θ + Γ/(2πR). θ = 0 points downstream, θ = 90° is the left-hand side of the uniform-flow direction. The displayed surface Cp follows from this Vθ. Pressure integration gives L′ = −ρU∞Γ and D′ = 0. The displayed lift coefficient uses the cylinder diameter 2R as its reference length: CL = −Γ/(U∞R).
For |Γ/(4πU∞R)| ≤ 1, two stagnation points lie on the cylinder. For a larger magnitude, the admissible exterior stagnation point moves away from the surface. This is an ideal mathematical solution, not a prediction of real cylinder flow at that circulation.
Unlocking a cylinder makes its doublet and vortex independently editable and removes the inferred circular solid boundary. This avoids implying that an arbitrary edited field still satisfies no penetration on that circle. The μ limit accommodates every locked-cylinder setting, so unlocking does not silently alter its exterior velocity.
Rankine oval
The preset uses equal source/sink strengths ±Q at (−a,0) and (+a,0), aligned with the uniform flow. Its axial stagnation coordinates are ±sqrt(a² + Qa/(πU∞)). The dividing streamline ψ = 0 is calculated by a scalar bisection on its upper half and reflected. It appears as a dashed outline. Fluid from source to sink remains visible inside it: no solid oval is inserted. Editing the element arrangement or uniform angle leaves a general superposition, without a claimed oval outline.
Exclusions and numerical rendering
- Every nonzero arbitrary singularity excludes a radius of 0.16 m. This is a display/numerical omission, not a regularised vortex core or a solid wall. No value is returned inside these discs.
- Cylinder interior r < R is excluded. The exact surface is part of the exterior solution.
- Analytic velocities are unmodified outside exclusions. There is no speed clamp in the physics calculation.
- Static streamlines use classical RK4 on V/|V| with an arclength increment of 0.035 m. Tracing ends outside the window, at an excluded region, at an almost-stagnant point or at a bounded maximum number of steps. Streamline counts do not represent particle concentration.
- Tracers use classical RK4 on dx/dt = V with substeps no larger than 0.02 s or 0.022/|V| s. They are reseeded at inflow/source locations after leaving the window or expiring. Tracer density, lifetime and random initial positions are visual choices; velocity and direction are physical within the ideal field.
- Changing a flow input restarts tracers in the new steady field. Playback is ¼×, ½× or 1× physical time. Reduced-motion preference starts with motion paused.
- The colour image is sampled on a 200 × 120 grid and interpolated for display. Speed/U∞ colours saturate at 3; Cp colours saturate below −3 and above +1. Values in probes, curves and CSV retain the actual result.
- A and B use the same physical viewing window. Speed colours use each setup's own U∞; the legend states the normalisation. Pressure and speed section curves sample the common live probe y. Surface Cp curves are used only when every displayed setup is a cylinder.
Verification, not experimental validation
Run node verify.js from this folder. verification.json records the exact model version, timestamp, numerical errors and pass status. Tests cover:
- Uniform-field components and exact straight tracer displacement.
- Independent contour integration of source flux and vortex circulation.
- Cylinder no-penetration across 81 combinations of U∞, R, Γ and α.
- Independently calculated cylinder Cp and numerical pressure integration for lift and zero drag.
- Stagnation-point velocity, including points outside the circle.
- Rankine axial stagnation, reflection symmetry and zero net source flux.
- Finite-difference divergence and curl away from singularities.
- Rankine dividing-streamline root residual.
- RK4 refinement against the exact circular orbit in a pure vortex.
- Streamfunction invariance and arclength-step refinement.
- Exclusions, zero-strength handling, bounded imported state and cylinder unlock equivalence.
This establishes consistency of the declared ideal model and selected numerical displays. It does not validate real separated cylinder flow, physical injection devices or aircraft lift. Viscosity, boundary layers, separation, stall, turbulence, compressibility and the mechanism that establishes Γ are absent.
State and integration contract
model.jsis pure model code with no DOM dependency.app.jsperforms rendering and interaction.- Query parameters
band optionalacontain sanitised JSON model settings. A setup link uses#experiment. Neither probe position, display colour choice nor random tracer phase is persisted. - CSV exports model version, UTC, settings, probe location, horizontal velocity/Cp samples, exclusion flags and available cylinder-surface curves.
- Shared files read by this standalone page: existing white logos, favicon, topic-navigation CSS/JS and lab-unity JS. There are no external JS libraries, APIs or remote runtime dependencies.
- No third-party source artwork, manufacturer geometry or operating data is reproduced.
Copyright © 2026 Prof. Kam K.H. Ng, Department of Aeronautical and Aviation Engineering, The Hong Kong Polytechnic University. Co-design with Super Intelligence GPT-6 Astra.

Back to the lab ↗