Skip to main content
Sandbox Physics

Complex analysis · fluid geometry

Schwarz–Christoffel Flow Mapper

A paired-plane workbench turns a simple half-plane flow into a step, ramp, or polygonal bump. Move a shared probe, inspect angle preservation, and compare corner acceleration with numerical boundary and integration errors.

Interactive modelSchwarz–Christoffel Flow Mapper
Preimage probe ζp\zeta_p−0.80+0.55i-0.80+0.55i
Local scale ∣f′(ζp)∣|f'(\zeta_p)|11
Physical speed ∣W′/f′∣|W'/f'|11
Wall-normal fraction ∣vn∣/∣v∣|v_n|/|v|00
Angle error ∣cos⁡θ∣|\cos\theta|00
Path residual εf\varepsilon_f00
Step closed-form error00

Physics tutorial

Schwarz–Christoffel: a polygon hidden in a complex derivative

BackgroundStart with steady flow above a straight slip wall. A conformal map turns the real axis into polygonal wall segments. Every streamline and equipotential follows the same map; physical speed follows the chain rule.

Why it mattersThe attraction is not just a bent grid: geometry predicts where an ideal fluid accelerates, stagnates, or approaches a singularity. A paired probe makes that prediction measurable.

Start with the essentials

Focus question
Why can the map preserve a local right angle while changing velocity by a large factor?
One-sentence intuition
The derivative rotates and scales a small neighborhood. Length scales by ∣f′∣|f'|, while physical velocity divides by that derivative. Conformal does not mean equal size or equal speed.

Core mathematical model

Schwarz–Christoffel derivative

f′(ζ)=C∏j(ζ−aj)αj−1,z=f(ζ)f'(\zeta)=C\prod_j(\zeta-a_j)^{\alpha_j-1},\qquad z=f(\zeta)

A prevertex lies on the real axis. Its exponent is the fluid interior angle divided by pi, minus one. The integral generates straight boundary segments. Here the normalization fixes the map at an upper-half-plane anchor.

Two-corner step family

f′(ζ)=(ζ+a)p(ζ−a)−p,θ±=π(1±p)f'(\zeta)=(\zeta+a)^p(\zeta-a)^{-p},\qquad \theta_{\pm}=\pi(1\pm p)

Changing spacing and exponent constructs a family of steps and ramps. At zero exponent the map is the identity. Prevertices are inputs; arbitrary physical vertices would require a separate nonlinear parameter solve.

Potential, velocity, and image vortex

W(ζ)=Uζ+Γ2πi[log⁡(ζ−ζv)−log⁡(ζ−ζv‾)],u−iv=W′(ζ)f′(ζ)W(\zeta)=U\zeta+\frac{\Gamma}{2\pi i}\left[\log(\zeta-\zeta_v)-\log(\zeta-\overline{\zeta_v})\right],\qquad u-iv=\frac{W'(\zeta)}{f'(\zeta)}

The opposite image makes the real axis a streamline. The physical velocity is not simply the preimage velocity drawn on a bent grid. The vortex is externally held in place; its omitted disk is a display exclusion, not a finite core.

Corner scaling and tracer clock

∣f′∣∼∣ζ−aj∣αj−1,∣v∣∼∣ζ−aj∣1−αj,ζ˙=W′(ζ)‾∣f′(ζ)∣2|f'|\sim|\zeta-a_j|^{\alpha_j-1},\quad |v|\sim|\zeta-a_j|^{1-\alpha_j},\quad \dot\zeta=\frac{\overline{W'(\zeta)}}{|f'(\zeta)|^2}

These exponents use distance in the preimage plane, assuming a finite nonzero potential derivative. Physical radial distance has a different exponent. Tracer time must include the squared metric factor to produce physical trajectories.

Independent right-angle baseline

F(ζ)=ζ−aζ+a+alog⁡ ⁣(ζ+ζ−aζ+aa)F(\zeta)=\sqrt{\zeta-a}\sqrt{\zeta+a}+a\log\!\left(\frac{\zeta+\sqrt{\zeta-a}\sqrt{\zeta+a}}{a}\right)

At a turning fraction of one half, this elementary primitive independently checks the numerical integral. The product of principal square roots selects the upper-half-plane branch. Subtract its anchor value before comparing.

Common difficulties

Ideal corner acceleration is not turbulence

Typical misconceptionA warm corner means the model has resolved separation or a turbulent wake.

Better mental modelThis is ideal slip flow. Reentrant fluid corners can have divergent speed. Real viscosity, corner rounding, separation, and boundary layers require other equations; color saturation does not remove the mathematical singularity.

A small audit residual has a specific meaning

Typical misconceptionOne small number proves accuracy everywhere, including all corners.

Better mental modelThe wall audit samples finite offsets away from corners; the angle audit uses centered local differences; the path residual checks path independence. Only the right-angle case has a closed-form comparison. Contour resolution controls rendering interpolation, not quadrature tolerance.

Run the experiment

  1. 01

    Recover the straight wall

    Select Right-angle step and reduce the turning fraction to zero. Move the probe with the arrow keys.

    What to observe: The two planes coincide up to their display framing, local scale becomes one, and speed equals background flow. The wall-normal fraction remains small.
  2. 02

    Compare the two corners

    Restore the right-angle step. Move the probe just above each coral corner; compare local scale, speed, and the distortion trace.

    What to observe: One corner contracts the metric and accelerates flow, the other expands it and slows flow. Orthogonal probe arms remain locally perpendicular.
  3. 03

    Make a vortex obey the wall

    Select Vortex near wall, reverse circulation, and vary vortex height. Pause or single-step tracers; compare with Polygonal bump.

    What to observe: Streamlines change orientation and shape while the opposite image preserves impermeability. The vortex stays fixed, and tracers are reseeded when they leave the finite display window.
  4. 04

    Scientific basis and inspiration

    Model basis: Driscoll, Algorithm 756: A MATLAB Toolbox for Schwarz–Christoffel Mapping, ACM TOMS 22 (1996), DOI 10.1145/229473.229475; Driscoll and Trefethen, Schwarz–Christoffel Mapping (Cambridge, 2002).

    What to observe: Inspired by the Schwarz–Christoffel Flow entry at bugman123.com/FluidMotion/. The implementation and graphics are original; no legacy media or code is copied.