Layer-Stack Builder
Build a coherent stack of uniform layers. Select a layer to edit its thickness and material, change layer order, or save the complete structure. This coherent, isotropic calculation uses planar electromagnetic boundary conditions.
Building a stack one layer at a time
A stack is a list of uniform layers between two semi-infinite media. Each layer has a material and a thickness, and each neighbouring pair meets at a flat interface. The thin-film page treats one layer; the Bragg mirror and cavity pages treat repeated ones. Here the layers can be anything, in any order, including absorbing materials from the material library. The editor below computes reflection, transmission and absorption, the field at every depth, and sweeps over wavelength, angle or the first layer's thickness.
A new layer changes everything in front of it
Number the media from the incident side, , to the exit medium, . Each interface has a single-interface amplitude , with the admittance from the calculation section, and each finite layer a propagation factor , where is its thickness and the normal wave number is also defined in that section. The solver starts in the exit medium, where nothing comes back (), and works towards the light:
is the reflection amplitude seen from inside medium , looking at its back face. The factor carries through layer and back—a round trip. For the exit medium, .
With one layer this is the thin-film formula. With more, each step treats everything behind an interface as one effective mirror, : the reflection of the rest of the stack, delayed and attenuated by one round trip through layer . Change any layer and every on its incident side changes with it. A layer has no fixed contribution that you could add up separately; its effect depends on what surrounds it.
Fields inside the stack
Inside layer , which starts at depth , the tangential electric field is a forward and a backward wave. With , and ,
The forward amplitude is anchored at the layer's entrance and the backward one at its exit, so in an absorbing layer both exponentials only decay. Tangential and are continuous at every interface, which fixes all the amplitudes once the incident wave is given. The Depth profile tab plots from this solution. Both use the full field vector, and is the field of the incident wave alone, which sets the normalization; the chart labels it Eref.
Where the light is absorbed
The power summary gives absorption as . That does not say which layer took the light. The field does: absorption goes as . Normalized to the incident power,
Here includes the normal component in TM, as does. The page does not evaluate this integral, but integrated over the gold in the examples below it matches from the power summary in both polarizations. Byrnes (section 4.5) derives the absorption profile from the decrease of the Poynting vector with depth; the expression above is the equivalent form from Poynting's theorem. The practical consequence: the same absorbing layer takes more light where the standing wave is strong and less near a node.
Derivation from Maxwell's equations
Start from the macroscopic Maxwell equations for a linear, isotropic, nonmagnetic medium with no free charge. Fields vary as , units are SI, is the relative permittivity, is the vacuum wave number and is the vacuum admittance, always written out.
In a uniform region is constant, so . Taking the curl of Faraday's law, substituting the Ampère–Maxwell law and using gives the Helmholtz equation, with :
The interface page derives from it the conserved (in units of ), the normal wave number , the optical admittance and the single-interface ; the thin-film page does one layer. Subscript 0 labels the incident medium: is its optical admittance and its index, while and keep their vacuum meaning.
1. Fields in a layer. Every field carries the common factor . In layer , from to , the tangential amplitude ( in TE, in TM) and the tangential magnetic field are, with and as in the lecture,
with the plus sign for TM () and the minus sign for TE (); the sign is common to every term and cancels. With neither exponential grows across the layer. In the incident medium, the forward amplitude and the backward amplitude are both referred to , so . In the exit medium, the forward amplitude is referred to the back surface and there is no backward wave.
2. The recursion. Define : backward over forward amplitude at the exit face of layer , where the forward wave has become . At the entrance face of layer the same ratio is . Continuity of and at gives
Dividing the second equation by the first removes both amplitudes. Solving for and dividing numerator and denominator by :
The right-hand side of the first expression is the admittance of everything behind the interface. Nothing returns from the exit medium, so . At the backward-to-forward ratio in the incident medium is the reflected amplitude, so .
3. Forward amplitudes. The continuity of gives the next forward amplitude, using the recursion for :
The solver runs the recursion from the back, then this step from the front, starting at .
4. Absorption. In TE the field is alone. In TM the component of adds . With , Poynting's theorem for time-harmonic fields and the -independence of the flux give
The incident flux has this form in both polarizations; in TM the unit comes with , so . Integrating over layer and dividing by the incident flux, with , gives the absorption formula above. Tangential and are continuous, so is too, and the layer integrals telescope. Just in front of the stack the normalized flux is (the incident medium is lossless, so its interference terms carry no net flux); behind it, . Hence
The solver takes ; the integral is an independent way to reach the same number and to split it between layers.
5. Reciprocity. For reciprocal , as for every material here, is unchanged when the stack is lit from the other side at the same , provided both exterior media carry propagating waves at that ; and the need not be.
Three things to try
Add a layer. The page opens on a 250 nm free-standing film with , at 30° in TE. Press Add layer. The new 100 nm layer uses the first layer's material, so there is no new interface: optically it is a 350 nm film. The reflection zero moves from 707 to 495 nm and the 20.7% peak from 471 to 660 nm. The zeros sit where one round trip in the film is a whole number of wavelengths, , with the angle inside the film and a positive integer: 707 nm for 250 nm, and 990 and 495 nm for 350 nm. The 990 nm zero lies outside the 400–900 nm sweep. Now set Layer material to TiO₂ · Zhukovsky. That is a real interface, and the largest reflection in the 400–900 nm sweep rises to 54.5%, near 774 nm.
Swap an absorbing layer. Choose Gold · Johnson–Christy for the added layer and set its thickness to 20 nm. Open Power summary. At the 550 nm operating wavelength it shows R = 11.9%, T = 54.2% and A = 34.0%. Press Move layer up, so the gold faces the light. Now R = 27.5% and A = 18.3%; T is still 54.2%. With on both sides, swapping two layers is the same as lighting the stack from the other side. For reciprocal materials like these, T is the same in both directions; R and A need not be once something absorbs. With three layers, swapping two neighbours is no longer a reversal, and T generally changes too.
Look inside. Open Depth profile, which plots . With the gold in front, that ratio at its surface () is about 0.38. Press Move layer down: at the gold's surface—now nm—it is about 0.77. The film absorbs nothing, so A is the gold's absorption, and it roughly doubles with the field. Then set Sweep parameter to First layer thickness (nm) and open Parameter dependence: A in the gold swings between about 20% and 34% as the film thickness moves the standing wave on and off the metal, repeating about every 195 nm, . The sweep varies only the first layer in the list, nearest the incident medium.
Drag to orbit · click a region to inspect
Calculation and evidence
Time dependence is . Amplitudes are tangential (TE) or (TM), with
Interfaces use Fresnel amplitudes; propagation uses . Reflection recursion composes scattering responses using only decaying exponentials in passive finite layers. TM amplitudes use tangential , so has the opposite sign to Byrnes's convention; reflectances are unaffected.
The exterior media must be transparent and positive-index. Internal layers can be passive and absorbing. All layers are coherent, uniform, isotropic and nonmagnetic. An exact zero normal wave number is reported as a singular amplitude basis; nearby angles remain calculable. No roughness, incoherent thick-layer approximation or beam envelope is included.
Independent fixtures use Steven Byrnes’s tmm 0.2.0 for oblique TE/TM, absorbing films, evanescent layers and multilayers. Powers agree within in the fixtures. Checks also cover boundary fields, antireflection and zero-thickness limits. The Python fixture generator is retained with the source.
History of the method
Multilayer calculations are older than computers. According to Angus Macleod's history of optical coatings, Pierre Rouard's 1936 Paris thesis already included an iterative technique for optical multilayer calculations. After the Second World War the Journal of the Optical Society of America carried a good number of theoretical papers on calculating the properties of coatings. Most were iterative; Walter Welford, publishing as W. Weinstein, put his method into matrix form. Florin Abelès's doctoral thesis, published in 1950, laid the theoretical foundation of the characteristic-matrix technique still in general use; that line is on the matrix-methods page.
Multilayer filters date from the late 1930s. Walter Geffcken at Schott in Jena produced the first narrowband interference filters, and most of that early work was kept secret. After the war, German coating results reached the United States. In 1946 Howard Tanner and Luther Lockhart described a German three-layer antireflection coating: a quarter-wave of intermediate index next to the glass, a half-wave of high index, then a quarter-wave of low index. Macleod notes that the half-wave layer, which broadens the antireflection band, has since appeared in coating after coating. In the 1950s Peter Berning and Arthur Francis Turner introduced the concept of potential transmission and devised the induced-transmission filter; their 1957 paper applies induced transmission in absorbing films to band-pass filter design.
For a long time the arithmetic was the obstacle. Macleod describes the volume of calculation as the great barrier of the 1950s: Smith charts were adapted to thin films, approximations were popular, and coatings were tuned by trial and error in the coating machine. In 1958 Philip Baumeister described designing a filter by successive approximations on an IBM 650, which Macleod treats as the beginning of computer-aided coating design. The same field calculation is now used well outside coatings. As one example, Pettersson, Roman and Inganäs calculated the optical field inside organic solar cells from measured complex indices and layer thicknesses, and used it to model photocurrent spectra and optimize the layer structure.
References
Steven J. Byrnes, Multilayer optical calculations, 2016, revision 5 (2020): field conventions, transfer matrices, flux and absorption. The browser implementation uses scattering recursion for numerical stability; the Python implementation supplies independent fixtures.
Angus Macleod, History of Optical Coatings and OSA before 1960, in OSA Century of Optics, ed. Paul Kelley, Govind Agrawal, Mike Bass, Jeff Hecht and Carlos Stroud (The Optical Society), pp. 68–75. A historical review, read in full; it is the source for the Rouard, Geffcken, Weinstein, Abelès, Tanner–Lockhart, Berning–Turner and Baumeister statements above.
Pierre Rouard, Études des propriétés optiques des lames métalliques très minces, Annales de Physique, 11th series, 7, 291–384 (1937); thesis presented to the Faculté des Sciences de Paris on 19 November 1936. Cited from metadata and Macleod's review; the thesis was not consulted.
W. Weinstein (W. T. Welford), The reflectivity and transmissivity of multiple thin coatings, Journal of the Optical Society of America 37(7), 576–581 (1947). Not consulted.
Howard A. Tanner and Luther B. Lockhart, German reflection reducing coatings for glass, Journal of the Optical Society of America 36(12), 701 (1946). Not consulted; the coating description follows Macleod.
Peter H. Berning and A. F. Turner, Induced transmission in absorbing films applied to band pass filter design, Journal of the Optical Society of America 47(3), 230–239 (1957). Not consulted.
Philip Baumeister, Design of multilayer filters by successive approximations, Journal of the Optical Society of America 48(12), 955–958 (1958). Not consulted.
Leif A. A. Pettersson, Lucimara S. Roman and Olle Inganäs, Modeling photocurrent action spectra of photovoltaic devices based on organic thin films, Journal of Applied Physics 86(1), 487–496 (1999). Only the abstract was read.
Calculation source code · Implementation and validation notes