Fundamentals / Physics / Electrodynamics

Recovering a vector field from divergence, curl and boundary data

A numerical field solver returns three components at every point. Divergence measures sources and curl measures circulation, yet neither measurement detects a spatially uniform offset. Helmholtz decomposition makes precise what can be recovered, how to compute it, and what the boundary must supply.

Invert the vector Laplacian in open space

Let \(\boldsymbol F\) be smooth on all of space and rapidly decreasing, together with its needed derivatives, so integration by parts has no surface term at infinity. The identity \(\nabla^2\boldsymbol F=\nabla(\nabla\cdot\boldsymbol F)-\nabla\times(\nabla\times\boldsymbol F)\) reduces reconstruction to three scalar Poisson inversions. Define \(G(\boldsymbol r)=1/(4\pi|\boldsymbol r|)\); distributionally \(-\nabla^2G=\delta^3\). For \(d=\nabla\cdot\boldsymbol F\) and \(\boldsymbol c=\nabla\times\boldsymbol F\), convolution with \(G\) gives

\[\Phi=G*d,\]
\[\boldsymbol A=G*\boldsymbol c,\]
\[\boldsymbol F=-\nabla\Phi+\nabla\times\boldsymbol A .\]

To verify, first note that \(\nabla\cdot\boldsymbol c=0\); a supplied curl field must satisfy this compatibility condition. Moving the derivative through convolution gives

\[\nabla\cdot\boldsymbol A=G*(\nabla\cdot\boldsymbol c)=0.\]

The divergence of the proposed \(\boldsymbol F\) is \(-\nabla^2\Phi=d\), and its curl is

\[\nabla(\nabla\cdot\boldsymbol A)-\nabla^2\boldsymbol A=\boldsymbol c.\]

Any difference from the original field has zero divergence and curl, hence componentwise zero Laplacian. Smoothness and decay on all space force this harmonic difference to vanish. The reconstructed vector pieces are unique in this setting, while adding a gradient to an unrestricted vector potential still leaves its curl unchanged.

Derive the Fourier projectors

On a periodic grid separate the mean mode first. For a nonzero Fourier wavevector \(\boldsymbol k\) with convention \(e^{i\boldsymbol k\cdot\boldsymbol r}\), differentiation multiplies by \(i\boldsymbol k\). A longitudinal component is parallel to \(\boldsymbol k\), so its amplitude must reproduce the scalar product \(\boldsymbol k\cdot\widehat{\boldsymbol F}\). Subtraction leaves a perpendicular component:

\[\widehat{\boldsymbol F}_L=\frac{\boldsymbol k(\boldsymbol k\cdot\widehat{\boldsymbol F})}{|\boldsymbol k|^2},\]
\[\widehat{\boldsymbol F}_T=\widehat{\boldsymbol F}-\widehat{\boldsymbol F}_L.\]

The first projector squared equals itself, and the two pieces are orthogonal. Thus their squared magnitudes add mode by mode, even for complex amplitudes with the Hermitian inner product. Equivalently the longitudinal piece has zero curl and the transverse piece has zero divergence. At \(\boldsymbol k=0\), the denominator vanishes and both derivative measurements are zero. A known mean, applied uniform field or boundary condition supplies that information. Setting the mean to zero silently would discard an actual applied bias.

Recover a patterned measurement

Take a two-dimensional periodic field \(\boldsymbol F=\boldsymbol b+\boldsymbol a\cos(2x+y)\) in dimensionless periodic coordinates with \(\boldsymbol a=(3,1)\), \(\boldsymbol b=(1,0)\). Its measured divergence is \(-7\sin(2x+y)\). Its out-of-plane curl is \(+\sin(2x+y)\), from \(\partial_xF_y-\partial_yF_x\). Projection with \(\boldsymbol k=(2,1)\) gives \(\boldsymbol a_L=(2.8,1.4)\), \(\boldsymbol a_T=(0.2,-0.4)\). The squared amplitudes are 9.8 and 0.2, summing to the original 10; only 2 percent of the nonconstant modal power is transverse. Neither differentiated pattern contains the bias. At phase zero the observed x-component is four, of which 2.8 is longitudinal, 0.2 transverse and one is uniform.

The graph scans phase, showing the x-component of the measured field, the two recovered varying pieces and the mean. Change the input amplitudes until \(\boldsymbol k\cdot\boldsymbol a=0\), then until \(\boldsymbol k\times\boldsymbol a=0\). Changing the mean should move only the total and constant terms. In a discretised solver the differentiation symbol used in a projection must match the numerical divergence being tested; the exact spectral \(i\boldsymbol k\) and a finite difference need not represent the same grid operator.

Specify a boundary on a finite domain

One convenient decomposition writes \(\boldsymbol F=\nabla u+\boldsymbol T\) with \(\nabla\cdot\boldsymbol T=0\) and \(\boldsymbol T\cdot\boldsymbol n=0\) on the boundary. Solve the Neumann problem \(\nabla^2u=\nabla\cdot\boldsymbol F,\ \partial_nu=\boldsymbol F\cdot\boldsymbol n\). The divergence theorem makes these data compatible. The potential is determined up to an additive constant in a connected domain, which does not affect its gradient. Orthogonality follows from integrating \(\nabla u\cdot\boldsymbol T\) by parts: both the volume divergence and boundary normal term vanish. Holes can admit nontrivial fields with zero curl and divergence, so reconstructing a full vector field from its derivatives alone can require additional circulation data.

Tutorial on recovering missing information

With \(\boldsymbol k=(2,1)\), a sensor returns divergence \(-5\sin(2x+y)\) and curl \(-5\sin(2x+y)\). Infer the cosine amplitudes \(a_x,a_y\).

Work through the solution

From the divergence, \(2a_x+a_y=5\). From the curl, \(2a_y-a_x=5\). Solving gives

\[a_x=1,a_y=3.\]

The projected amplitudes are \((2,1)\) and \((-1,2)\), with equal squared magnitude. The mean remains independent of both readings.

On an annulus \(a<r<b\), consider \(\boldsymbol H=\boldsymbol e_\theta/r\). Which derivative and boundary data vanish? Propose one measurement that distinguishes it from zero.

Work through the solution

Its planar divergence vanishes and its out-of-plane curl is \(r^{-1}\partial_r(rH_\theta)=0\) on the annulus. Its normal component vanishes at both circular boundaries. Nevertheless circulation around any circle surrounding the hole is \(2\pi\). The axis where the field is singular is excluded, so the all-space uniqueness argument does not apply.

A computed projection claims longitudinal power 6, transverse power 4, and original power 13 in one nonzero Fourier mode. Is this consistent with exact orthogonal projection in the same norm?

Work through the solution

No. The two projected vectors are perpendicular, so their powers must sum to the original 13. Check whether powers include the same normalisation, whether the mean was included, and whether the solver and diagnostic use the same differentiation symbol and inner product.

Further reading · University of Virginia, Helmholtz's theorem and uniqueness · Rochester electromagnetic theory, transverse and longitudinal projections.

Study the full derivation

Vector calculus through flux, circulation and singular sources · Electrostatic field theory and measurement

A closed-surface flux and a closed-path circulation answer different experimental questions. Starting from small physical collecting surfaces shows why the associated differential operators look different in Cartesian, cylindrical and spherical coordinates.