Skip to main content
Sandbox Physics

Complex analysis · fluid geometry

Schwarz–Christoffel Flow Mapper

Why does a conformal map change flow speeds near corners even though it preserves angles? A conformal map stretches and turns each tiny patch by the same amount in every direction, so local angles survive. Lengths are multiplied by that stretch factor and flow speeds are divided by it, so the flow speeds up wherever the map squeezes it. Around a protruding sharp corner the ideal speed becomes infinite at the tip; inside a recessed corner it drops to zero.

Two planes side by side show a simple flow over a straight wall being mapped onto a step, a ramp or a polygonal bump. Move the linked probe to check that angles are preserved, and compare how much the flow speeds up at the corners with the numerical errors at the wall and in the integral.

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 wall that the fluid slips along. A conformal map bends the real axis into the straight segments of a polygonal wall. Every streamline and equipotential is carried by the same map, and the chain rule gives the physical speed.

Why it mattersThe bent grid is only the surface. The wall shape predicts where an ideal fluid speeds up, comes to rest or approaches a singularity, and a probe linked across both planes lets you measure those predictions.

Start with the essentials

Focus question
How can the map keep a small right angle a right angle and still change the speed by a large factor?
One-sentence intuition
Near each point, the derivative rotates and rescales a small patch. Lengths are multiplied by ∣f′∣|f'|, but the physical velocity is divided by the derivative. Keeping angles does not mean keeping sizes or speeds.

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)

Each prevertex sits on the real axis. Its exponent is the interior angle on the fluid side divided by pi, minus one. Integrating the derivative produces straight wall segments. The map is normalized by fixing it at an anchor point in the upper half-plane.

A family of two-corner steps

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

Changing the spacing and the exponent gives a family of steps and ramps. With a zero exponent the map is the identity. You choose the prevertices; putting the physical vertices anywhere you like would require solving a separate nonlinear problem for the parameters.

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 image vortex of opposite sign makes the real axis a streamline. To get the physical velocity you divide by the map derivative; redrawing the preimage velocity on a bent grid would be wrong. The vortex is held in place from outside. The small disk around it is only left out of the display; it is not a finite core.

Power laws near a corner and tracer timing

∣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 measure distance in the preimage plane and assume the derivative of the potential is finite and nonzero there. Measured by physical distance from the corner, the exponent is different. The tracer equation must include the squared metric factor so that tracers follow physical trajectories.

Exact formula for the right-angle step

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)

When the turning fraction is one half, this elementary antiderivative gives an independent check on the numerical integral. Multiplying the two principal square roots picks the branch for the upper half-plane. Subtract its value at the anchor before comparing.

Common difficulties

Fast flow at a corner is not turbulence

Typical misconceptionThe corner turns a warm color, so the model must be showing separation or a turbulent wake.

Better mental modelThis is ideal flow that slips along the walls. Where the wall juts into the fluid, the speed can grow without bound. Real viscosity, rounded corners, separation and boundary layers need other equations. The color scale tops out, but the mathematical singularity is still there.

Each small error check tests one thing

Typical misconceptionOne small error number proves the result is accurate everywhere, corners included.

Better mental modelThe wall check samples points a short distance from the wall, away from the corners. The angle check uses small centered differences. The path residual tests whether the integral is the same along different paths. Only the right-angle step has an exact formula to compare with. Contour resolution changes how the picture is interpolated, not the tolerance of the integration.

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: Apart from how each panel is framed, the two planes now match. The local scale returns to one, the speed equals the background flow, and the wall-normal fraction stays small.
  2. 02

    Compare the two corners

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

    What to observe: One corner shrinks lengths and speeds the flow up; the other stretches lengths and slows the flow down. The two probe arms stay perpendicular.
  3. 03

    Put a vortex near the wall

    Select Vortex near wall, reverse the circulation and change the vortex height. Pause or step the tracers, then compare with Polygonal bump.

    What to observe: The streamlines change direction and shape, and the opposite-signed image still keeps fluid from crossing the wall. The vortex stays put, and tracers that leave the display window are seeded again.
  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.

Conceptual inspiration: FluidMotion. Original simulations and graphics; the model limits are described above.

FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy