Everything the calculator computes, for a thin-film stack, a coated cylinder or a multilayered sphere, lit by a plane wave, a point dipole or a focused beam, follows from the same four equations and the same two boundary conditions. This section states them once, fixes the conventions used throughout the site, and shows the step that makes all three geometries tractable: separation of variables, which turns the vector field problem into a scalar second-order ordinary differential equation in one coordinate. The next section explains why that equation is solved, in every geometry, by a transfer matrix.
Maxwell's equations in a piecewise homogeneous medium
The media on this site are linear, isotropic and piecewise homogeneous: the stack, the cylinder and the sphere are made of regions in which the relative permittivity and permeability are constants, separated by sharp interfaces. Inside each region, with no free charges or currents, Maxwell's equations read
with the constitutive relations and .
The time convention. Every field is monochromatic with the time dependence , so a plane wave travelling along is . With this convention an absorbing medium has a refractive index with a positive imaginary part, , , which is how the optical-constant tables on this site list and (the calculator's is ). Engineers often use instead, where the same medium has ; results carry over by complex conjugation, and the sign of every phase and of in ellipsometry flips with it. For harmonic fields the curl equations become
so that is fixed by alone: . In each homogeneous region, taking the curl once more gives the vector Helmholtz equation
and . The vacuum wavenumber is , with the vacuum wavelength, which is the wavelength every spectrum on this site is plotted against. The wave impedance of a region, , is what distinguishes a magnetic medium from a dielectric of the same ; for the non-magnetic materials that make up almost every example here, and .
The two boundary conditions
At an interface between two regions, integrating Faraday's and Ampère's laws over a vanishing loop that straddles it gives the conditions every solution must satisfy:
the tangential components of and of are continuous (there are no surface currents in a dielectric or a metal described by a bulk ). Continuity of the normal components of and follows from these two together with the divergence equations and need not be imposed separately. Two conditions is exactly the number a second-order equation needs, and that count is the whole reason the transfer matrix exists.
One exception matters on this site. A two-dimensional sheet, such as graphene, carries a surface current and makes the tangential jump by ; PyStratify models such sheets as a jump condition at the interface rather than as a layer of finite thickness. A surface current is also how an idealised metal is treated in the limit of a perfect conductor.
Separation of variables: one scalar equation per channel
The vector Helmholtz equation separates in exactly the coordinate systems in which the interfaces of our three geometries are coordinate surfaces: planes , cylinders and spheres . In each, the field is a superposition of modes labelled by the quantum numbers of the other two coordinates, and the dependence on the coordinate normal to the interfaces is a scalar function obeying a second-order linear ordinary differential equation. The three cases are:
| geometry | normal coordinate | channel labels | the equation for | its two independent solutions |
|---|---|---|---|---|
| films | in-plane wavevector ; polarization s or p | , | ||
| cylinders | azimuthal order ; axial wavenumber | Bessel's equation, , | , | |
| spheres | angular momentum (and ); electric or magnetic | spherical Bessel's equation, | , |
The pattern is the same in every row. The first solution is regular (a standing or incoming wave, finite at the centre); the second is outgoing and singular at the origin, where and diverge. In a slab geometry the same roles are played by waves running towards and away from an interface. Inside region the field of one channel is therefore
with two unknown amplitudes per region and per channel. The vector field is rebuilt from by the appropriate vector harmonics: for a film, is transverse to the plane of incidence (s, TE) or is (p, TM); for a sphere, the vector spherical harmonics , , of Jackson and Moroz (or Bohren and Huffman's , ; the two notations give identical results) carry the angular dependence, and each splits into an electric (TM) and a magnetic (TE) multipole; for a cylinder the orders carry , and at normal incidence the two polarizations, along the axis and along it, decouple exactly as s and p do for a film. The channels are orthogonal, so each channel is solved on its own, and the cross sections and powers are sums over channels with no cross terms.
In the boundary conditions, the continuity of tangential becomes the continuity of (up to a known factor) and the continuity of tangential , which is proportional to , becomes the continuity of a first derivative of weighted by the region's admittance. At each of the interfaces, each channel therefore gives two linear equations, exactly what is needed to pass from to .
Counting the unknowns
For interfaces there are regions and amplitudes per channel, and the interfaces supply equations. The two missing conditions describe the source and the far field:
- Regularity: no singular outgoing wave may emerge from the centre of a sphere or the axis of a cylinder unless a source sits there, so in the core. For a film, the equivalent statement is that nothing travels towards the stack from the far side of the substrate.
- The incident field: a plane wave fixes the regular amplitude in the outermost region (for a film, the amplitude of the wave arriving from the incident medium). A point dipole instead adds a known singular outgoing wave at its own position, which is why a dipole problem is the same problem with one amplitude shifted, and a focused beam is a plane wave problem integrated over the angles the objective fills.
The reflected and transmitted waves of a film, the scattering coefficients , of a sphere, and the , of a cylinder are nothing but the remaining amplitudes once the system is solved. From them follow the far field (reflectance and transmittance; cross sections and the scattering pattern), the near field in every region (the coefficients are the field), the power absorbed in each layer or shell by Poynting's theorem, and, for a dipole, the power it radiates compared with the same dipole in free space, which is its decay rate.
Conservation laws as checks
Because the medium is linear and the equations are exact, a lossless structure must satisfy for a film and for a particle, and the reciprocity theorem relates a problem to its reverse. These identities, together with the closed forms of a single interface (the Fresnel equations), a single sphere (Mie's coefficients) and a single cylinder, are the first lines of the Verification page: every solver on this site is checked against them before it is checked against other codes and against papers.
References
- J. D. Jackson, Classical Electrodynamics, 3rd ed. (Wiley, 1999), ch. 7 and §9.7
- J. A. Stratton, Electromagnetic Theory (McGraw-Hill, 1941), ch. VI–VII and IX
- M. Born and E. Wolf, Principles of Optics, 7th ed. (Cambridge University Press, 1999), §1.1–1.6, doi:10.1017/CBO9781139644181
- C. F. Bohren and D. R. Huffman, Absorption and Scattering of Light by Small Particles (Wiley, 1983), ch. 2–4 and 8, doi:10.1002/9783527618156
- A. Moroz, Ann. Phys. 315, 352 (2005), doi:10.1016/j.aop.2004.07.002
- I. L. Rasskazov, P. S. Carney and A. Moroz, OSA Continuum 3, 2290 (2020), doi:10.1364/OSAC.399979