Fundamentals / Physics / Electrodynamics / Magnetism, induction and field dynamics

Posing an electromagnetic evolution problem

A solver cannot evolve 'a pulse in a box' from geometry and a time step alone. It needs material laws, compatible initial fields, a charge-conserving source, and enough boundary data to specify what enters the domain. The same bookkeeping is required when interpreting a real transient measurement.

Separate the evolution equations from the constraints

In vacuum with prescribed sources the evolution system can be written \(\partial_t\boldsymbol B=-\nabla\times\boldsymbol E\) and \(\partial_t\boldsymbol E=c^2\nabla\times\boldsymbol B-\boldsymbol J/\epsilon_0\). The divergence conditions \(\nabla\cdot\boldsymbol B=0\) and \(\nabla\cdot\boldsymbol E=\rho/\epsilon_0\) constrain the initial data. Differentiating the first in time gives zero from the divergence of a curl. Differentiating the second constraint residual gives \(-[\nabla\cdot\boldsymbol J+\partial_t\rho]/\epsilon_0\). Compatible charge evolution therefore preserves an initially satisfied Gauss constraint. An arbitrarily chosen charge movie and unrelated current movie can violate it before a single boundary reflection occurs.

A numerical solver based only on the two curl equations does not automatically repair bad initial data. In an initial periodic vacuum box a uniform charge density of one sign is inadmissible because the integral of a periodic divergence is zero. One can prescribe a neutralising background as part of a separately justified model, choose net-neutral initial sources, or choose open boundaries that permit net electric flux. Silently discarding the zero Fourier mode of the charge would solve a different problem. Similarly, preserving a constant divergence error exactly during time integration shows consistency of the discrete curls with the chosen derivative, not correctness of the initial physical state.

Construct a right-running pulse from two initial fields

In one-dimensional vacuum choose \(\boldsymbol E=E_y(x,t)\hat{\boldsymbol y},\ \boldsymbol B=B_z(x,t)\hat{\boldsymbol z}\). Then

\[\partial_tE_y=-c^2\partial_x B_z,\ \partial_tB_z=-\partial_xE_y.\]

Define \(w_+=E_y+cB_z,\ w_-=E_y-cB_z\). Addition and subtraction give

\[\partial_tw_++c\partial_xw_+=0,\]
\[\partial_tw_- -c\partial_xw_-=0 .\]

Thus \(w_+\) travels towards \(+x\) and \(w_-\) towards \(-x\). The initial conditions \(E_y=E_0e^{-(x-x_0)^2/(2s^2)}\), \(B_z=E_y/c\) specify a right-running packet. Prescribing the same electric shape but \(B_z=0\) launches two oppositely directed electric pulses each of half the original height. Measuring only the initial electric waveform would fail to distinguish the two preparations. At \(E_0=60\,\mathrm{V/m}\), the peak magnetic field for the first preparation is \(0.200\,\mu\mathrm T\). An observer \(0.90\) m farther right sees its peak \(3.00\) ns later in vacuum.

The component energies provide another independent comparison. Initialising only \(E_y\) contains half as much total energy as initialising \(E_y\) and its matched \(B_z\). At late times when the two pulses no longer overlap, each half-amplitude pulse has one quarter of the energy of the full matched pulse; the sum is half, as required. In the overlap region it is better to use the characteristic combinations themselves. In these units \(u=\epsilon_0(w_+^2+w_-^2)/4\) and \(S_x=\epsilon_0c(w_+^2-w_-^2)/4\) for the transverse fields. Equal oppositely running amplitudes can store energy with zero net flux.

Specify only incoming characteristic information at an open end

In \(0<x<L\), \(w_+\) enters at the left end and \(w_-\) at the right. Values travelling out are determined by the interior solution. For a pure outgoing plane wave at the right boundary prescribe \(w_-=0\), equivalently \(E_y-cB_z=0\), while allowing \(w_+\) to exit. At a perfectly conducting fixed wall the tangential electric field vanishes, so there \(w_-=-w_+\), reflecting the electric amplitude with a sign reversal. A boundary with a real voltage-like reflection coefficient \(r\) gives \(w_-=r w_+\) in this one-dimensional equal-medium case. The time-integrated returned energy fraction is \(r^2\). Specifying both \(E_y\) and \(B_z\) independently at all times generally overdetermines a wave boundary and can amount to fixing both incident and reflected waves inconsistently.

Suppose \(L=1.20\,\mathrm m,\ x_0=0.30\,\mathrm m\). The centre of a right-running pulse reaches the conducting end at \(3.00\,\mathrm{ns}\). A detector at \(x=0.60\,\mathrm m\) first sees the incident centre after \(1.00\,\mathrm{ns}\), then the reflected centre after \((0.90+0.60)\mathrm m/c=5.00\,\mathrm{ns}\). The two electric traces have opposite signs, while their magnetic contributions at the wall add. Swapping the conducting end for a matched boundary removes the reflected peak within this exact one-dimensional model. A local planar absorbing condition on a curved three-dimensional boundary may still reflect oblique waves; the exact statement depended on one normal mode and its wave impedance.

Derive uniqueness from energy

Take two solutions with the same sources, initial data and perfectly conducting closed boundaries in vacuum. Their difference satisfies homogeneous Maxwell equations with zero initial fields and zero tangential electric field at the wall. Poynting's theorem for the difference says \(dU_\Delta/dt=-\oint(\boldsymbol E_\Delta\times\boldsymbol H_\Delta)\cdot\boldsymbol n\,dA=0\) because the flux normal to a conducting wall vanishes. Since \(U_\Delta\) is a sum of nonnegative squared fields and initially zero, it stays zero. Thus the interior fields agree. A passive outgoing boundary can only remove this difference energy, so the same conclusion holds given no incoming difference signal. This proof shows why specifying incoming boundary data and initial fields correctly is more fundamental than choosing a particular potential gauge.

The argument also supplies a stability target for computation. With no drive and a perfectly reflecting cavity the discrete total energy should remain bounded, and with an absorbing passive end the loss of field energy should match outgoing flux. An unphysical sign in the wall update can inject energy, producing a growing solution even when the interior scheme is stable. Fixing the numerical grid spacing alone cannot cure an active boundary condition. At a material interface Maxwell jump conditions must be applied to the appropriate tangential or normal fields, since setting all Cartesian components continuous would generally violate flux or polarisation physics.

Discretise space and time without destroying wave kinematics

For the one-dimensional system use \(E_j^n\) at integer time and integer position, with \(B_{j+1/2}^{n+1/2}\) at half steps in both. Integrating Faraday on a small rectangular loop gives

\[B_{j+1/2}^{n+1/2}=B_{j+1/2}^{n-1/2}-(\Delta t/h)(E_{j+1}^{n}-E_j^n).\]

Ampère then gives \(E_j^{n+1}=E_j^n-c^2(\Delta t/h)(B_{j+1/2}^{n+1/2}-B_{j-1/2}^{n+1/2})\) without current. For material sources include the appropriate time-centred current. The staggered layout places discrete curls where the updated component lives. In several dimensions a compatible divergence of the curl vanishes by cancellation of oriented face-edge contributions.

Substitution of waves \(e^{i(kjh-\omega n\Delta t)}\) with the matching half-step phases yields \(\sin(\omega\Delta t/2)=(c\Delta t/h)\sin(kh/2)\) on the positive-frequency branch. Stability on a one-dimensional uniform grid requires \(c\Delta t/h\le1\). For \(h=5.0\,\mathrm{mm}\), the upper vacuum time step is \(16.7\,\mathrm{ps}\). A cubic three-dimensional mesh imposes the more restrictive \(c\Delta t/h\le1/\sqrt3\), about \(9.63\,\mathrm{ps}\). In one dimension the equality case transports compatible resolved plane waves at the correct speed on this grid. Numerical dispersion generally returns at smaller Courant number or for diagonal propagation in multiple dimensions. Sample a pulse across enough sites that phase and dispersion errors lie below the intended time-delay uncertainty.

A careful initialisation also respects the half time step. Assign \(B^{1/2}\) from the analytic field at that shifted time or use a consistent half-step update. Assigning \(B^0\) directly where \(B^{1/2}\) is required can create a spurious left-running component in what should have been a one-way pulse. Examine \(w_-\) reconstructed at common space and time before attributing a tiny backward peak to the material. For a real calculation, refine both space and time, compare detector arrival times as well as peak amplitudes, and integrate energy flux over complete transit windows. Solver convergence, charge compatibility, and a pulse moving in the intended direction are independent tests.

Compare a matched return and a reflected pulse on a line

Match a travelling pulse at a material boundary

A single homogeneous characteristic impedance was built into the one-dimensional end conditions. Replace the boundary by an interface between lossless homogeneous nondispersive media with positive real impedances \(Z_1,Z_2\). At normal incidence from the left, write electric amplitudes \(E_i,E_r,E_t\) and choose the magnetic sign so a right-running wave has \(H=E/Z\) and a left-running one \(H=-E/Z\). With no free sheet current and no singular electric field at the interface, tangential continuity gives

\[E_i+E_r=E_t,\]
\[(E_i-E_r)/Z_1=E_t/Z_2.\]

Solving these two equations yields

\[r=\frac{Z_2-Z_1}{Z_2+Z_1},\]
\[t=\frac{2Z_2}{Z_2+Z_1},\]
\[\mathcal R=|r|^2,\]
\[\mathcal T=\frac{Z_1}{Z_2}|t|^2 .\]

The impedance factor in transmitted power is required even when electric continuity makes \(t=1+r\). With \(Z_1=300\,\Omega,Z_2=100\,\Omega\), the electric reflection is \(-1/2\) and transmission \(+1/2\). The reflected energy is one quarter, while transmitted energy is three quarters. Mistaking both energy fractions for one quarter merely because the two electric amplitudes have equal magnitudes leaves half the input pulse energy unexplained. At \(Z_2\to0\) the coefficients approach an electric short: the tangential electric field vanishes, even though the magnetic field doubles in the incident medium. Matching the impedances gives zero reflection even if material wave speeds differ, since those speeds depend on the product \(\mu\epsilon\) whereas impedance depends on their ratio.

Inject a short pulse with known area and width a sufficient distance to the left that it initially lies entirely in medium one. If the media are nondispersive and impedance independent of frequency across the pulse band, each electric waveform copies the incident temporal shape multiplied by its amplitude coefficient. A transmitted wave travelling at a different speed has a different spatial width for the same temporal width, so comparing stored energy by squaring peak fields and comparing equal geometrical intervals can easily mislead. A fixed detector measuring \(\int(E H)\,dt\) across a complete pulse directly measures transmitted energy per area. In a simulation integrate forward and backward flux at separate planes, include any energy still between the planes, and check that the field boundary gives the same answer when the detector positions are changed.

Manufacture a source that obeys charge continuity exactly

A verification case with prescribed charge and current can test different components from a source-free travelling wave. Consider a one-dimensional periodic interval with period \(2\pi/k\). Choose a longitudinal electric field \(E_x(x,t)=E_a \sin(kx)\cos(\omega t)\) and zero magnetic field. Gauss's law fixes \(\rho=\epsilon_0 kE_a\cos(kx)\cos(\omega t)\). Ampère–Maxwell requires

\[J_x=-\epsilon_0\partial_tE_x=\epsilon_0\omega E_a\sin(kx)\sin(\omega t).\]

Faraday gives no magnetic-field change because a purely \(x\)-directed function of \(x\) has zero curl. Differentiating the two source expressions verifies \(\partial_t\rho+\partial_xJ_x=0\), and the periodic spatial mean of the charge vanishes. This is a prescribed-source test of the equations, not a claim that an unspecified material spontaneously supplies those currents.

For period \(0.20\,\mathrm m\), \(E_a=100\,\mathrm{V/m}\), and \(f=2.0\,\mathrm{MHz}\),

\[k=31.42\,\mathrm{m^{-1}}.\]

The charge-density amplitude is \(27.8\,\mathrm{nC/m^3}\) and the free-current-density amplitude \(0.0111\,\mathrm{A/m^2}\). At \(t=0\) the longitudinal electric energy is maximal and current vanishes. One quarter period later the electric field and charge are zero while the source current is maximal at the spatial electric-field antinodes. At every point where \(E,J\) are nonzero their product is \(-\partial_t(\epsilon_0E^2/2)\); the prescribed external charges exchange energy with the field without a magnetic Poynting flux. A discrete divergence residual and an independently measured field-energy change can therefore check the signs and amplitudes of the source implementation.

Prescribing those continuous formulas sampled separately on a staggered mesh does not necessarily produce exact *discrete* continuity. If the numerical current is sampled at half time and half space, integrate the cell continuity equation to update \(\rho\) from numerical boundary currents. Alternatively use the corresponding discrete sinusoidal differentiation factors \(2\sin(kh/2)/h\) and \(2\sin(\omega\Delta t/2)/\Delta t\) when manufacturing exact discrete data. Comparing the continuous and discrete constructions separates a model truncation error that converges with mesh refinement from a genuinely nonconserving source injection. A code can look excellent on transverse vacuum pulses and still fail this test because those pulses never challenge its charge handling.

Decide what a late echo means

A narrow pulse incident on a material slab can return signals from both interfaces. Separate the two in time when possible. If the slab thickness is \(d\) and its propagation speed \(v_2\), the round-trip delay inside it is \(2d/v_2\). Later echoes spaced by that delay suggest repeated internal reflections. Changing the outer computational boundary location while keeping the material and detector fixed provides a different test: an artificial wall echo moves in time by twice the boundary displacement divided by exterior speed. A genuine material echo keeps its material-defined delay. A calibrated single detector trace and these two perturbations can thus identify which part of the model causes a late pulse.

For \(d=0.30\,\mathrm m\) and \(v_2=1.5\times10^8\,\mathrm{m/s}\) the material echo spacing is \(4.0\,\mathrm{ns}\). Moving an external vacuum boundary outward by \(0.45\,\mathrm m\) would delay a returning boundary echo by \(3.0\,\mathrm{ns}\). If the incident pulse lasts 8 ns the echoes overlap strongly and individual peaks are difficult to assign. Broadening the bandwidth with a shorter source or fitting the full complex frequency response is then more informative than selecting the largest local maximum. Any comparison must include the source bandwidth and detector response because a perfectly converged field solution can still predict a different voltage from a finite-bandwidth probe.

Check a discretised field evolution against its phase

Keep the equations and initial mode fixed while refining the grid. Examine numerical phase delay alongside the physical propagation law.

Set a cavity ringing from specified initial fields

A one-dimensional lossless cavity consists of perfectly conducting parallel planes at \(x=0\) and \(x=L\). Use a polarisation \(E_y,B_z\) and ignore lateral edges. With no sources inside, the incoming characteristic at each wall is set by the condition \(E_y=0\). Instead of injecting a pulse during the calculation, prescribe an initial field \(E_y(x,0)=E_0\sin(\pi x/L)\) and \(B_z(x,0)=0\). These data obey the tangential electric wall condition. They also obey the divergence constraints because the spatial variation is along \(x\) while the fields are transverse. Initial data that satisfy a wave equation but violate either of these checks would model a different physical preparation.

Let \(k=\pi/L\) and try \(E_y(x,t)=E_0\sin(kx)F(t)\). The wave equation gives

\[F''+c^2k^2F=0.\]

The initial magnetic field has no spatial gradient and the source-free Maxwell–Ampère law therefore sets \(F'(0)=0\). It follows that \(F=\cos\omega t\), with \(\omega=ck\). Use Faraday's first-order equation to find the sign and phase of \(B_z\), obtaining

\[E_y=E_0\sin(kx)\cos\omega t,\]
\[B_z=-\frac{E_0}{c}\cos(kx)\sin\omega t.\]

For a first-order time solver this pair gives a stronger check than the electric standing-wave frequency alone. A code with an incorrect sign in one curl can reproduce an electric snapshot but will transfer energy incorrectly on the next advance. The signs of the magnetic fields at the two ends are opposite. Their amplitudes peak one quarter period after the initial electric maximum. Perfectly conducting walls carry the necessary surface currents. The standing solution has no Poynting flux through them because the tangential electric field at each wall vanishes.

Per unit transverse area the total initial energy is \(\epsilon_0E_0^2L/4\), since the integral of \(\sin^2(kx)\) over the cavity is \(L/2\). At a general time the electric share is that total multiplied by \(\cos^2\omega t\), and the magnetic share is the same total multiplied by \(\sin^2\omega t\). The integral of their sum is constant, although energy continually flows within the cavity. For \(L=0.30\,{\rm m}\) the fundamental frequency is \(c/(2L)=499.65\,{\rm MHz}\) and its quarter period is about \(0.500\,{\rm ns}\). If \(E_0=100\,{\rm V/m}\), the stored energy is \(6.64\,{\rm nJ/m^2}\) and the peak induction is \(0.334\,\mu{\rm T}\).

The experiment can also reveal the discrete wave speed. A staggered one-dimensional mesh with spacing \(h=L/10\) and Courant number \(C=c\Delta t/h=0.5\) obeys \(\sin(\omega_{\rm num}\Delta t/2)=C\sin(kh/2)\). The predicted frequency ratio is \(2\arcsin[C\sin(kh/2)]/(Ckh)\), approximately \(0.9969\) here. Measuring too short a time interval to distinguish this phase lag from sampling uncertainty would give little information about spatial accuracy. Track many periods, use consistent time-centred field estimates, and halve \(h\) at fixed \(C\). At these small \(kh\), the leading phase error should decrease by roughly a factor of four.

A student prepares a mixture \(E_y(x,0)=E_0[\sin(\pi x/L)+0.30\sin(3\pi x/L)]\), still with initial \(B_z=0\). What should a midplane electric probe observe, and what fraction of the initial total energy is in the third mode?

Work through the solution

At the midplane the fundamental sine equals \(+1\), while the third sine equals \(-1\). The probe therefore reads \(E_0[\cos(\omega t)-0.30\cos(3\omega t)]\). Integrated over the full cavity, cross terms vanish because sine modes of different integer index are orthogonal. The third mode's energy fraction is

\[0.30^2/(1+0.30^2)=0.0826.\]

A single spatial probe samples mode amplitudes times their local shape and cannot identify an energy fraction directly. At the midplane all even modes have a node and would escape detection even if they contained substantial energy.

A solver allows an arbitrary spatially uniform constant to be added to \(B_z\) while leaving the computed oscillating electric field unchanged. Is this necessarily a bug?

Work through the solution

A constant transverse magnetic induction has zero curl and divergence in the ideal interior. It can be added as a static bias if the physical initial magnetic field and the exterior wall-current preparation permit it. In the test posed above the initial magnetic field was explicitly specified as zero, so a later spontaneously generated offset would be a numerical error. Monitoring the spatial mean of \(B_z\) provides a direct test: integrating Faraday's law over the interval gives its rate of change proportional to the difference of the wall electric fields, which is zero. This check tracks an initial-data constraint invisible to a comparison of electric oscillation frequencies alone.

Hermann Haus and James Melcher, Electrodynamic Fields, on wave propagation and standing waves.

Tutorial on initial and boundary compatibility

A vacuum pulse has at its centre \(E_y=100\,\mathrm{V/m}\) and \(cB_z=60\,\mathrm{V/m}\). If both fields have the same spatial shape, infer the two travelling electric amplitudes and the ratio of the energies associated with the two directions.

Work through the solution

The characteristics are \(w_+=160\) and \(w_-=40\,\mathrm{V/m}\). Since \(E=(w_++w_-)/2\), the component electric amplitudes are 80 and 20 V/m. Their separate directional energy ratio is \(160^2/40^2=16\), assuming identical envelopes. The total local flux initially points right although neither characteristic is zero.

A numerical field in a periodic box starts with \(\nabla\cdot\boldsymbol B=10^{-4}\) in some cells. The code uses a discrete divergence of its discrete curl that is identically zero and carries that pattern unchanged. Does reaching a small time-step tolerance guarantee physically acceptable initial conditions?

Work through the solution

No. The curl evolution preserves its initially supplied divergence. A compatible projection or constrained initialisation must remove the error in the correct discrete divergence norm, subject to boundary conditions and any physical mean field. Refining the time integration of inconsistent initial data leaves inconsistency.

A detector sees an amplitude echo 0.15 of an incident Gaussian pulse after reflection at a passive boundary. What is the reflected energy fraction and how much of the input energy remains unaccounted for if measured transmitted energy is 92 percent?

Work through the solution

Same-medium, same-shape electric amplitudes give \(0.15^2=0.0225\) reflected energy. With 0.92 transmitted, the remainder is \(1-0.0225-0.92=0.0575\) or 5.75 percent. It may include absorption, energy still in the structure, lateral flux or measurement error. A completed energy audit distinguishes these possibilities.