---
title: Schwarz-Christoffel mapping
heading: Straightening polygons, and the field at the edge of a capacitor plate
eyebrow: A12 · Lesson 25 · Schwarz-Christoffel mapping
xp: 40
---

::: hook
Lesson 24 used conformal maps to solve for fields in shapes whose maps were known: circles, strips, sectors. Real electrodes have edges and corners. The field near the edge of a capacitor plate, at a step in a waveguide or in the slot between two microstrip lines is set by those corners, and the **Schwarz-Christoffel** formula builds a map for any polygon, corners included. Applied to the edge of a parallel-plate capacitor, it explains why sharp edges break down first and gives the smooth electrode shape that avoids it: the Rogowski profile used in high-voltage gear.
:::

::: play
- The curve is the Rogowski profile, the half-voltage equipotential near the edge of a plate a distance $d$ above a ground plane, in units of $d$. Far inside the gap it's flat at $y = d/2$; beyond the edge it curls up and away.
- The readout is the field along the profile at the slider's point, as a fraction of the uniform field deep in the gap. It never exceeds 1.
:::

```sim plot
view: graph
x: x = -1.5..1.2
y: y = 0..2.5
slider: u = -3..2 step 0.1 = 0
plot: 0.5 + exp(pi*x - 1)/pi | label: Rogowski profile (units of d)
point: (1 + u)/pi, 0.5 + exp(u)/pi | label: point on the profile
readout: field there, over the uniform field = 1/sqrt(1 + exp(2*u)) | digits: 3
```

::: predict
## A thin metal plate ends with a sharp edge, a distance $d$ above a grounded plane, at a voltage $V$. Deep inside the gap the field is $V/d$. What is the field right at the sharp edge?

- [ ] $V/d$
- [ ] $2V/d$
- [x] Unbounded: it grows without limit toward the edge
- [ ] Zero, because the plate ends there

::: reveal
Unbounded. At a sharp edge the map from the simple $w$-plane to the real geometry has $dz/dw = 0$, so the field, which goes as $|dw/dz|$, blows up there (like $1/\sqrt{r}$ near a thin edge). Real edges have a small radius, which caps the field but still leaves it far above $V/d$: the edge is where the air breaks down first, which is why high-voltage electrodes are rounded to a carefully chosen profile.
:::
:::

::: nameit
## The formula

A map from the upper half of the $w$-plane onto the inside of a polygon, with the real axis going to the polygon's edges, has the derivative

$$\frac{dz}{dw} = A\prod_k (w - w_k)^{\alpha_k - 1}$$

where the **prevertices** $w_k$ on the real axis map to the corners, and $\alpha_k\pi$ is the interior angle at corner $k$. Walking along the real axis, each factor turns the image's direction by $(1 - \alpha_k)\pi$ as $w$ passes $w_k$, which is exactly what makes a corner. Integrating gives the map itself, up to the constants $A$ and the integration constant, which fix the polygon's size and position.

- A 90° corner has $\alpha = \frac12$: a factor $(w - w_k)^{-1/2}$.
- A corner of 270° (a reentrant corner, like the outside of a step) has $\alpha = \frac32$: $(w - w_k)^{1/2}$.
- A corner "at infinity" of a channel, interior angle 0, has $\alpha = 0$: $(w - w_k)^{-1}$, which integrates to a logarithm.

## The capacitor edge

Take a thin plate at height $d$, at potential $V$, covering $x \le 0$, above a ground plane $y = 0$. The map

$$z = \frac{d}{\pi}\left(1 + w + e^w\right)$$

takes the strip $0 \le \text{Im}\,w \le \pi$ onto the region around the plate: $\text{Im}\,w = 0$ goes to the ground plane and $\text{Im}\,w = \pi$ to both faces of the plate. In the strip the potential is simply $\varphi = V\,\text{Im}(w)/\pi$, so the equipotentials are the images of horizontal lines, and the field is

$$|E| = \frac{V}{\pi}\left|\frac{dw}{dz}\right| = \frac{V/d}{|1 + e^w|}$$

## The Rogowski profile

The half-voltage line $\text{Im}\,w = \pi/2$, with $w = u + j\pi/2$, maps to

$$x = \frac{d}{\pi}(1 + u) \qquad y = \frac{d}{2} + \frac{d}{\pi}e^u$$

Along it $|E| = (V/d)/\sqrt{1 + e^{2u}}$, which never exceeds the uniform field $V/d$. An electrode machined to this shape (scaled to the gap) has no point where the field is higher than in the uniform region, so it breaks down evenly instead of at its rim.
:::

::: example
## Write the Schwarz-Christoffel derivative for a map from the upper half-plane to the half-strip $-\pi/2 < \text{Re}\,z < \pi/2$, $\text{Im}\,z > 0$, with corners at $w = \pm 1$. What is the map?

::: solution
1. **Corner angles.** Both corners are 90°, so $\alpha = \frac12$ at each.
2. **The derivative.**
   $$\begin{aligned} \frac{dz}{dw} &= A(w - 1)^{-1/2}(w + 1)^{-1/2} \\ &= \frac{A}{\sqrt{w^2 - 1}} \end{aligned}$$
3. **Integrate.** Choose the constant so that $dz/dw = 1/\sqrt{1 - w^2}$ (the two forms differ by a factor of $\pm j$, depending on the branch); this integrates to
   $$z = \arcsin w$$
4. **Check the corners.** $\arcsin(\pm 1) = \pm\pi/2$ puts the corners in place, and the real axis beyond them maps to the strip's vertical sides.
5. **The inverse.** So $w = \sin z$ maps the half-strip back to the half-plane, a map that turns problems in a slot into problems above a flat surface.

**Answer:** $\frac{dz}{dw} = \frac{A}{\sqrt{w^2 - 1}}$, and the map is $z = \arcsin w$ (so $w = \sin z$ takes the half-strip back to the half-plane).
:::
:::

::: example
## For the plate-edge map, find the field on the ground plane directly below the plate's edge, as a fraction of the uniform field.

::: solution
1. **On the ground plane.** There $w = u$ is real, and
   $$x = \frac{d}{\pi}(1 + u + e^u)$$
2. **Below the edge.** There $x = 0$, so
   $$1 + u + e^u = 0$$
   and Newton's method gives $u = -1.2785$.
3. **The field there.**
   $$\begin{aligned} \lvert E\rvert &= \frac{V/d}{1 + e^u} \\ &= \frac{V/d}{1.2785} \\ &= 0.782\,V/d \end{aligned}$$
4. **What it means.** The field under the edge has already fallen to 78% of its uniform value, while at the edge itself it's unbounded: the plate's edge concentrates field on top and starves the ground below it.

**Answer:** the field below the edge is 0.782 of the uniform field, about 78%.
:::
:::

::: example
## Trace the Rogowski profile at $u = -2, 0, 1, 2$ in units of $d$, and the field along it.

::: solution
1. **Evaluate the profile at each u.** Lengths are in units of $d$:

| $u$ | $x/d$ | $y/d$ | $|E|/(V/d)$ |
|---|---|---|---|
| −2 | −0.318 | 0.543 | 0.991 |
| 0 | 0.318 | 0.818 | 0.707 |
| 1 | 0.637 | 1.365 | 0.345 |
| 2 | 0.955 | 2.852 | 0.134 |

2. **Read the shape.** Deep in the gap the profile sits at $d/2$ with the uniform field; by the time it has curved away the field has fallen smoothly.
3. **The point of the profile.** Nowhere along it is the field larger than in the gap, which is the profile's whole purpose.

**Answer:** the profile runs from $(-0.318, 0.543)$ at $u = -2$ to $(0.955, 2.852)$ at $u = 2$, in units of $d$, while the field falls smoothly from 0.991 to 0.134 of $V/d$, never above the gap's value.
:::
:::

::: check
given: th = 45 | 90 | 135 | 270
answer: th/180 - 1
tolerance: 0.5%

## A polygon has an interior angle of {th}° at one corner. What exponent does that corner's factor $(w - w_k)$ get in the Schwarz-Christoffel derivative?

::: right
Right. $\alpha = \given{th}/180$, and the exponent is $\alpha - 1$ = {answer}.
:::

::: misses
- [1 - th/180] Check the sign: the exponent is $\alpha - 1$.
- [th/180] That's $\alpha$ itself. The factor's exponent is $\alpha - 1$.
- [any] Not yet. Write the angle as $\alpha\pi$, then subtract 1 from $\alpha$.
:::
:::

::: check
given: d = 1 | 2 | 5; x = -0.5 | 0 | 0.5
answer: d/2 + d/pi*exp(pi*x - 1)
unit: mm
tolerance: 0.5%

## A plate sits {d} mm above a ground plane. Where is the Rogowski profile's height, in mm, at $x$ = {x} × {d} mm (with the plate's edge at $x = 0$)?

::: right
Right. From $x = \frac{d}{\pi}(1 + u)$, $u = \pi x/d - 1$, and $y = \frac{d}{2} + \frac{d}{\pi}e^u$ = {answer}.
:::

::: misses
- [d/2 + d/pi*exp(pi*x)] Solve $x = \frac{d}{\pi}(1 + u)$ for $u$ first: $u = \pi x/d - 1$.
- [d/2] That's the height deep inside the gap. Near the edge the profile rises.
- [any] Not yet. Find $u$ from $x$, then $y = d/2 + (d/\pi)e^u$.
:::
:::

::: check
given: u = -1 | 0 | 0.5 | 1.5
answer: 1/sqrt(1 + exp(2*u))
tolerance: 0.5%

## Along the Rogowski profile at parameter $u$ = {u}, what is the field as a fraction of the uniform gap field?

::: right
Right. $|1 + e^{u + j\pi/2}| = \sqrt{1 + e^{2u}}$, so $|E|/(V/d) = 1/\sqrt{1 + e^{2u}}$ = {answer}.
:::

::: misses
- [1/(1 + exp(u))] That's the ground plane's formula, where $w$ is real. On the profile, $e^w = je^u$ is at right angles to 1.
- [sqrt(1 + exp(2*u))] That's upside down: the field goes as $|dw/dz|$, the reciprocal of $|dz/dw|$.
- [any] Not yet. Evaluate $|1 + e^w|$ at $w = u + j\pi/2$ and take its reciprocal.
:::
:::

::: check
kind: python
given: px = -3 | 0.5 | 2; py = 0.25 | 0.5 | 0.9

## For the plate-edge map with $d = 1$ and $V = 1$, find the potential at the point $z$ = ({px}, {py}) by inverting $z = \frac{1}{\pi}(1 + w + e^w)$ with Newton's method in complex arithmetic until the step is below $10^{-13}$. Start from `w = complex(np.pi * px - 1, np.pi * py)` inside the gap (`px` < 0), where the map is nearly a straight line, and from `np.log(np.pi * z)` beyond the edge, where $e^w$ dominates. Set `w` to the result, `phi` to $\text{Im}(w)/\pi$, and `E` to the field size $1/|1 + e^w|$.

```python starter
import numpy as np
w = complex(np.pi * px - 1, np.pi * py)
phi = py
E = 1
print(w, phi, E)
```

```python solution
import numpy as np
z = complex(px, py)
w = complex(np.pi * px - 1, np.pi * py) if px < 0 else np.log(np.pi * z)
for _ in range(100):
    f = (1 + w + np.exp(w)) / np.pi - z
    step = f / ((1 + np.exp(w)) / np.pi)
    w -= step
    if abs(step) < 1e-13:
        break
phi = w.imag / np.pi
E = 1 / abs(1 + np.exp(w))
print(w, phi, E)
```

```python tests
import numpy as np
z = complex(px, py)
assert abs((1 + w + np.exp(w)) / np.pi - z) < 1e-12, "w should map back onto the point: (1 + w + e^w)/π = z."
assert 0 < w.imag < np.pi, "The point lies between the plates and ground, so 0 < Im w < π."
assert abs(phi - w.imag / np.pi) < 1e-12 and abs(E - 1 / abs(1 + np.exp(w))) < 1e-12, "phi = Im(w)/π and E = 1/|1 + e^w|."
if px < -2:
    assert abs(phi - py) < 0.01, "Deep inside the gap the potential is nearly the uniform value, y/d."
```

::: right
Right. Deep in the gap the potential is just $y/d$; near and beyond the edge it isn't, and the map gives it exactly. Inverting a conformal map numerically is how such maps are used in practice, since few of them can be inverted by hand.
:::
:::

::: check
kind: derivation
vars: u = -2..2, v = 0.1..3

## For $z = \frac{d}{\pi}(1 + w + e^w)$ with $d = 1$ and $w = u + jv$, derive the field.

::: step
answer: (1 + exp(u)*cos(v))/pi

### $dz/dw = (1 + e^w)/\pi$. What is its real part?
:::

::: step
answer: sqrt((1 + exp(u)*cos(v))^2 + (exp(u)*sin(v))^2)/pi

### What is $|dz/dw|$?
:::

::: step
answer: 1/sqrt((1 + exp(u)*cos(v))^2 + (exp(u)*sin(v))^2)

### With $\varphi = \text{Im}(w)/\pi$ (for $V = 1$), the field is $\frac{1}{\pi}|dw/dz|$. What is it?
:::

::: right
Right. It's $1/|1 + e^w|$, which equals 1 deep in the gap ($u \to -\infty$) and blows up only at $w = j\pi$, the plate's edge, where $1 + e^w = 0$.
:::
:::

::: check
kind: choice

## Why is the field infinite at a perfectly sharp edge of a conductor, in terms of the map?

- [x] At the edge's prevertex $dz/dw = 0$, so the field, proportional to $|dw/dz|$, is infinite there
- [ ] Because charge can't sit on an edge
- [ ] Because the potential is discontinuous at the edge
- [ ] It isn't; the field is zero at an edge

::: right
Right. The map has to fold the half-plane's straight boundary around the edge, which compresses it to a point where $dz/dw$ vanishes. The potential is smooth in $w$, so in $z$ its gradient blows up there. Rounding the edge removes the zero.
:::

::: misses
- [2] Charge piles up at an edge; that's why the field is so strong there.
- [3] The potential is continuous; it's its gradient, the field, that blows up.
- [4] The field is strongest at an edge, not zero. It's zero in a reentrant corner, an inside corner, where $dz/dw$ is infinite.
:::
:::

::: explain
## A high-voltage electrode is shaped to follow the Rogowski profile instead of being a flat disk with a rounded rim. What does the profile achieve, and why does the Schwarz-Christoffel map make it easy to find?

::: model
Breakdown starts wherever the field is highest, and on a flat electrode that's its rim. The Rogowski profile is an equipotential of the field around the edge of a thin plate, chosen as the one along which the field never rises above the uniform value in the gap, so an electrode made in that shape has no hot spot. Finding it directly would mean solving Laplace's equation around an awkward boundary. The Schwarz-Christoffel map straightens the geometry into a strip, where the potential is just proportional to height and the equipotentials are horizontal lines; mapping one of those lines back gives the profile in closed form, along with the field on it.
:::
:::

::: practice

::: check
given: th = 60 | 120 | 135
answer: 1 - th/180
tolerance: 0.5%

## Walking along the real axis past a prevertex whose corner has interior angle {th}°, by what fraction of $\pi$ does the image's direction turn?

::: misses
- [th/180] That's $\alpha$. The turn is $(1 - \alpha)\pi$.
- [any] The turning angle is $(1 - \alpha)\pi$.
:::
:::

::: check
given: u = -1 | 0 | 1
answer: 1/(1 + exp(u))
tolerance: 0.5%

## For the plate-edge map, what is the field on the ground plane at $w = u$ = {u}, as a fraction of the uniform field?

::: misses
- [1/sqrt(1 + exp(2*u))] That's the formula on the half-voltage line. On the ground plane $w$ is real.
- [any] On the ground plane, $|E|/(V/d) = 1/(1 + e^u)$.
:::
:::
:::
