An exact ray model for oblique incident light on planar films

During recent years, ray tracing has frequently been used to study the absorption characteristics of structured solar cells. However, wave properties such as absorption enhancement due to resonances in optically thin solar films, cannot be explained by pure classical ray models. Here we present an exact three-dimensional ray model for oblique incidence of a plane electromagnetic wave on a thin film and show that the resonant structure of the absorption cross section calculated from our ray model is identical to exact calculations by electromagnetic wave theory. Both parallel and perpendicular polarized light are described exactly by the ray model presented. We validate the resonant structure of the absorption cross section of our ray model by an experimentally realized layered film, where we obtain perfect agreement between experiment and theory. We demonstrate further that for a beam with a finite beam waist, in accordance with Beer-Lambert’s law, absorption occurs along the path of the beam, while, in the case of a plane wave incident on an optically thin film, and contrary to Beer-Lambert’s law, absorption occurs along the axis perpendicular to the surface of the film.


Introduction
In optical systems where the wavelength is smaller than the structures applied to the surfaces, geometrical optics approaches have been successfully applied for evaluating and understanding the absorption efficiency of materials. Geometrical optics approaches take into account the path length of optical rays, and absorption properties are estimated for a large number of rays calculating the decay of the intensity of the rays due to absorption. The intensity decay is achieved by attenuating the rays according to the Beer-Lambert's law. Efficient absorption is an important feature for solar cells: an efficiency increase is obtained when a large number of the incoming light rays can be trapped in the solar cell and be effectively absorbed by the cell before they leave it [1][2][3].
In systems with structures that are of the same size as the wavelength of the incoming light, wave resonance phenomena occur. Examples of such systems are optically thin solar cells, such as thin film solar cells, as well as solar cells made from epitaxially grown thin silicon foils. Since wave resonance phenomena are due to the wave nature of light, a simple geometrical ray-optics approach is not sufficient to model them. In the field of quantum chaos, an approach based on classical trajectories and rays in the corresponding classical systems has been used extensively to study and explain wave properties of quantum systems. Especially in the area of quantum chaos, where the phase space of the corresponding classical systems shows chaotic behavior, ray models have been used for understanding the inherent properties of the systems. Remarkably, the ray models of quantum chaos systems can explain quantum (wave) properties of the systems [4,5]. In order to include the wave properties of the system in the ray model, each ray is assigned a phase in analogy to the Feynman formulation of quantum physics [6]. One-dimensional quantum problems can be described exactly by such ray models [7][8][9]. For two-and three-dimensional systems that show chaotic behavior, approximation formulas have been calculated based on semi-classical formulas that take into account special trajectories and rays of the systems including phase properties of the rays. For example, for so-called quantum ray-splitting billiards, the density of states can be calculated taking the phenomenon of ray-splitting fully into account [10][11][12][13][14].
When an electromagnetic wave front of a plane wave is perpendicularly incident on a plane ray-splitting surface, such as the surface of a solar cell or a ray-splitting boundary between layers in solar cells, we can consider the system as an effectively one-dimensional system. We have recently presented an exact ray model for the perpendicular incidence of electromagnetic radiation on a system of ray-splitting boundaries. Our ray model takes into account the phases and describes exactly the wave properties of the light in effectively one-dimensional systems, i.e. layered optically thin solar cells with perpendicular incidence [15]. The ray model describes the interference properties and the absorption efficiency of layered systems, such as layered solar cells, exactly. We presented an approach for calculating the optical generation rate of layered solar cells analytically and numerically for any layered system with perpendicular incidence.
The description of three-dimensional electromagnetic wave propagation in layered surfaces for the general case of oblique incidence is of high interest. Planar optical structures can be exactly described by electromagnetic wave theory or by the transfer matrix (S-matrix) method [15][16][17][18][19]. Ray simulations are frequently used to evaluate the efficiency of solar cells, and oblique incidence is the generic case for most solar cells under most operating conditions. In the paper at hand, we present a ray model that describes exactly the absorption and resonance properties for the situation when a plane wave is incident on a three-dimensional layered system with plane surfaces and with an arbitrary angle of incidence. This three-dimensional system is translationally invariant in one dimension and can thus be simplified to a two-dimensional problem. The proposed model is an extension of the ray theory presented in Ref. [15], i.e., a ray theory for one-dimensional systems, which is equivalent with a three-dimensional system that is translationally invariant in two directions, with absorption. The model presented in this paper is valid for flat, three-dimensional, optically thin solar cells, where a plane wave propagates toward the system from an arbitrary incoming direction. Since the ray picture is frequently used to describe interference properties in physics text books, we take the opportunity to highlight general aspects related to the derivation of resonance patterns in thin films with oblique incidence that are often overlooked in physics text books.
In Section 2, we briefly review our theory of normal incident light in order to set the stage for our main topic, the case of oblique incident light. We discuss this case in two stages. In Section 3, we treat the case of real index of refraction (no absorption), followed by the case of complex index of refraction (absorption included), discussed in Section 4. Section 5 discusses absorption in the case of a Gaussian beam. In Section 6, we validate our ray model by comparison with measured data.

Ray theory for describing normal incident light
In the following, we develop a ray model for the general case of oblique incidence. To introduce the reader to the concept of a ray model that can describe wave properties of an optical system, we start the discussion by considering perpendicular incidence. As model systems we use the systems shown in Fig. 1. The model systems consist of (a) a single film with a mirror on the backside of the film and (b) a single film without a mirror. A ray model for perpendicular incidence is an effectively one-dimensional problem and can be described exactly by a scalar wave equation [15]. The scalar wave equation is equivalent to exact three-dimensional electromagnetic theory and independent of polarization since both polarization directions are equivalent for normal incident light. For system (a) the reflection amplitude, r 1dfm , can be calculated exactly as where n is the complex refractive index of the film, k is the angular wave number of the incoming plane wave, and a is the thickness of the film. The mirror is assumed to be perfect.
For the system in Fig. 1b, the reflection and transmission amplitudes, r 1df and t 1df , respectively, can be calculated exactly as where n is the complex refractive index of the film, k is the angular wave number of the incoming plane wave, and a is the thickness of the film.
We have previously shown that the reflection amplitude, r, of Eq. (1), i. e., for a plane wave propagating towards a system as shown in Fig. 1a with perpendicular incidence, can be evaluated exactly by a sum of rays, taking into account all possible rays of the system as shown in Fig. 2a, according to where r l , t l , r r , and t r are the amplitudes of the respective rays that are reflected or transmitted at the boundary between air and film. The amplitudes depend only on the refractive index of the film. The subscripts of the amplitudes indicate if the respective rays are approaching the boundary from the left (l) or from the right (r). The exact expressions for the amplitudes are given in Ref. [15]. The factor e iπ represents the phase that a ray acquires by reflection at the mirror, n is the refractive index of the film, k is the angular wave number, and a is the thickness of the film. The model shown in Eq. (3) is called a ray model since it is built on the summation of all possible rays in the system. While Eq. (3) is exact and equivalent to Eq. (1), its analytical strength lies in the fact that each ray contribution can be read directly from it. (a) When a plane wave is propagating towards a single film with a mirror behind all of the light will be reflected in case of a non-absorptive film.
In the case of an absorptive film, the light is partly absorbed and partly reflected. (b) In the case where there is no mirror behind the film, the light is partly reflected at the surface and partly transmitted. If the film is absorptive, a part of the light is absorbed by the film as well. For both situations, the refractive index outside of the film is n 0 and the refractive index of the film is n, where n > n 0 . Fig. 2. Frame (a) shows the three simplest rays that contribute to the reflection amplitude in Fig. 1a. Frame (b) shows the three simplest rays that contribute to the transmission and reflection amplitude for the system shown in Fig. 1b.
In [15] we have shown that the inclusion of phases in the ray model is essential for describing the interference properties of the material. Interference properties lead to absorption resonances in the material when the film thickness matches multiples of the wavelength.
The same procedure can be used to establish a ray model for a single film without mirror, as shown in Fig. 1b, by summing up all possible rays that contribute to the total reflected and transmitted rays, respectively. The corresponding reflection and transmission amplitudes are given by where r l , t l , r r , and t r are the amplitudes as described above. n is the complex refractive index of the film with thickness a, and k is the wave number. The factor e − ika outside the parentheses in Eq. (4b) is included to remove the phase the ray would have obtained if it had passed the film without the mirror. The three simplest rays that contribute to the sums for the reflection and transmission amplitudes given in Eq. (4b) are shown in Fig. 2b. Absorption properties of materials are taken into account by the imaginary part of the complex refractive index n = n r + in i . Thus n accounts for both the refraction and absorption properties of the material. In Ref. [15] it is shown that only a few rays are sufficient to describe system properties with high accuracy.

Exact ray theory for oblique incidence without absorption
Our ray model can be extended to a three-dimensional model for planar films. We consider the situation illustrated in Fig. 3, where a plane electromagnetic wave propagates towards a planar film. Reflection and transmission amplitudes can be obtained by solving the respective electromagnetic problem [16], taking into account the polarization of the incident radiation. Fig. 4 illustrates how the coordinate system and angles are chosen in order to evaluate the system by exact electromagnetic theory. The incoming wave is a plane wave with wavelength λ. The angular wave number of the wave outside the material is given by k 0 = 2π λ and can be decomposed into x-and y-components according to

Exact electromagnetic description of the system
where θ 0 is the angle of incidence as shown in Fig. 4. The absolute value of the angular wavenumber inside the film is given by k = nk 0 , where n is the refractive index of the film. Since the ycomponent of k is constant through the boundary, the components of the angular wavenumbers inside the film are given by k y = k y,0 = k 0 sin θ 0 = ksin θ (6) and for k x and k y , respectively, where θ is the angle of refraction as shown in Fig. 4. Snell's law can be derived from Eq. (6) [16]. For a detailed presentation of the derivation of the expressions for the reflection amplitudes for oblique incidence on a plane surface, we refer to textbooks on electromagnetic theory such as [16]. By setting the surface charge to zero, the expressions for the transmission and reflection amplitude for the two polarizations for the system presented in Fig. 3 are given in Table 1. Fig. 5 shows how the reflection and transmission probability, R = |r| 2 and T = |t| 2 , change as the angle of incidence equal to 0 • , 30 • and 45 • for a film with thickness of 500 nm and a refractive index of 1.84. We chose the refractive index as n = 1.84 since it corresponds to the refractive index of the SiN x -film at 630 nm used for the measurements presented and discussed in Sec. 6.
We observe that the positions of the maxima depend on the angle of incidence of the incoming plane wave. The dependence on the angle of Fig. 3. A plane wave is propagating with an arbitrary angle of incidence towards a single film. The wave is partly reflected at the first surface and partly transmitted through the film. The refractive index of the film is n and the refractive index of the area outside is n 0 = 1. The refractive index of the film is n. In front of the film, the refractive index is n 0 = 1, i.e. vacuum. A plane wave is propagating towards the film in the xy-plane with an angle of incidence θ 0 . The angle of reflection, θ R , is equal to θ 0 . The angle of refraction, θ, can be found by Snell's law. For the transmitted ray behind the film, the direction of the angle of the transmitted ray is θ t = θ 0 .

Table 1
According to electromagnetic theory [16], the reflection and transmission amplitudes can be found for parallel and perpendicular polarized light for the system shown in Fig. 4. k x,0 and k x are given in Eqs. (5a) and (7). n is the refractive index of the film and a is the thickness of the film.

Parallel polarization
incidence can be seen in the expressions of the amplitudes for perpendicular and parallel polarized light in Table 1. As shown in Eqs. (5a) and (7), k x,0 and k x depend on the angle of incidence.

Ray model for oblique incident light -started inside the film
In order to build a ray model to describe the system, we need to add up all possible rays that contribute to the reflected and transmitted rays as shown in Fig. 6. In order to accomplish this, we study in this section a ray model that is suggested in two well-known text books [20,21]. Implementing this model and comparing it with the results of exact E&M calculations, we will show at the end of this section that the model suggested in these two text books is not correct.
If we hypothesize that we can calculate the Eqs. (5a) and (7) for the reflection coefficient for oblique incidence based on a ray model, we would expect that not only the x-components of the rays contribute. We would expect that rays contribute according to their travelled path inside the film as in the case described in Sec. 2.
To illustrate this, we consider Fig. 6. We start by evaluating how the reflection amplitude can be described by rays. The simplest ray that contributes to the reflected ray is the one that only reflects at the first boundary between air and the material. This ray is named Ray 0 in Fig. 6. The shortest possible ray that contributes to the reflected ray that transmits into the film and back travels a distance of d = 2l through the film, where l = a cos θ and θ is the angle of refraction. The phase and attenuation collected inside the film by this ray (called Ray 1 in Fig. 6), is given in Table 2 in the table entry for Ray 1. In order to develop a ray formula for oblique incidence, we have to take into account all possible rays. The four simplest rays are shown in Fig. 6. All rays are listed in Table 2. r l , r r , t l and t r are the amplitudes for reflection and transmission at the boundary and are given by Fresnel's equations [16]. They are shown in Table 3 for parallel and perpendicular polarized electromagnetic radiation.
In analogy to how the amplitudes for the reflected rays are found (see Table 2), the amplitudes of the transmitted rays can be found. We need to include all possible rays that contribute to the transmitted ray. It is important to notice that we also need to multiply the sum with the phase e − ik0l . This phase corresponds to the phase the ray would obtain by passing through the region of the film as if the film were not there. The explicit expression is given by With the help of the expressions for r and t, the reflection and transmission probabilities can be found. Fig. 7 shows R and T for a system as in Fig. 3, where the angle of incidence is 30 • and the angle of refraction is 2.5. Frames 3a and b show the results for R and T for parallel polarized light, while Frames 3c and d show the results for perpendicular polarized light. In all frames we compare the exact E&M results (blue solid line) for the reflection and transmission probabilities with the results obtained by the ray model suggested in Refs. [20,21] (red solid line).  Table 1. The thickness of the film is 500 nm and the refractive index of the film is n = 1.84. By adding up the amplitudes from all possible rays that contribute to the reflected and transmitted ray, the reflection and reflection probability can be found. The path length of contribution to the reflection probability from Ray1 which transmitting through the front of the film and is reflected at the backside of the film is d = 2l = 2a cos θ . θ is the angle of refraction (see Fig. 3).

Table 2
The contribution to the reflected ray from the four simplest rays as illustrated in Fig. 6. Assuming that the rays are attenuated according to the actual travelled distance inside of the film turns out to give an incorrect description of the absorption properties of the system. The amplitudes r l , r r , t l , and t r can be found in Table 3, k is the angular wave number in the film, and 2l is the path length the ray travels during one reflection inside the film, as illustrated in Fig. 6.
Ray 0 r l Ray 1 t l t r r r e 2ikl Ray 2 t l trr 3 r e 4ikl Ray 3 t l trr 5 r e 6ikl Ray N t l trr 2N− 1 Sum of all rays We observe that the results obtained from the exact calculations (blue solid lines) do not agree with the results obtained from the ray model suggested in Refs. [20,21]. For instance, the maxima and minima in all frames of Fig. 3 occur at different wavelength locations. While Fig. 3 shows the results for a specific incident angle of 30 • , additional calculations show that the difference increases as the angle of incidence increases. Another remarkable observation is that for the exact E&M calculations the maxima and minima shift towards shorter wavelengths as we increase the angle of incidence. For the ray model implemented according to Refs. [20,21] the opposite happens: the maxima and minima shift towards larger wavelengths. This shows that the ray theory suggested in Refs. [20,21] is not viable as a method for obtaining an exact ray model. The correct procedure for obtaining an exact ray model is presented in the following section.

Ray model for oblique incident light -started according to the wave front
Correcting the ray model discussed in the previous section, we demonstrate in this section that we need to consider the phase difference of rays with respect to the wave front of the incoming and outgoing plane waves in order to obtain an exact ray model, i.e., a ray model that reproduces the exact electromagnetic results for oblique incidence. This procedure is in agreement with theory presented, e.g., by Fowles [22] and Hecht [23].
Let us consider the wave front of a plane wave as illustrated by the red dashed line in Fig. 8. When comparing the two incoming rays (Ray 1 and Ray 0) that merge into the same outgoing ray in Fig. 8, we find the path difference Δx due to the shorter propagation distance of ray 0 outside the film. Therefore, the difference in optical path length between Ray 1 and Ray 0, as shown in in Fig. 8, is where n is the refractive index of the film and l is the geometrical length the ray travels inside the film. Compared to the ray model presented in the previous section, where we only took into account the path length inside the film, we obtain an additional term Δx by which the path difference is reduced.
By evaluating the contribution to the phase and the attenuation of the radiation caused by the difference in the travelled distance, simple geometrical considerations give an additional phase to Ray 1 in Fig. 8 equal to where k 0 is the angular wave number in vacuum and k x is the xcomponent of the angular wave number in the film described by Eq. (7). Table 3 In general, when light propagates towards the surface of a material, part of the incoming radiation is transmitted and part of the incoming radiation is reflected at the boundary between the two materials. The transmitted amplitude, t, and the reflected amplitude, r, are given by Fresnel's equations [16,22] and depend on the angle of incidence, θ 0 , the angle of refraction, θ, and the polarization of the light. The amplitudes also depend on the refractive index of the material, which, in our case, is n 0 = 1 for air and n for the film, as shown in Fig. 4. The subscripts of the amplitudes indicate if the respective rays are approaching the boundary from the left (l) or from the right (r).

Parallel polarization
Perpendicular polarization r l cos θ − ncos θ0 cos θ + ncos θ0 cos θ0 − ncos θ cos θ0 + ncos θ t l 2cos θ0 cos θ + ncos θ0 2cos θ0 cos θ0 + ncos θ r r ncos θ0 − cos θ cos θ + ncos θ0 ncos θ − cos θ0 cos θ0 + ncos θ t r 2ncos θ ncos θ0 + cos θ 2ncos θ ncos θ + cos θ0  . 8. Three incoming rays (Ray 0, Ray 1 and Ray 2) that exit the system at the same position and contribute to the reflected ray. Two rays (Ray 1 and Ray 2) zig-zag in the interior of the film, exit at the same position, and contribute to the transmitted ray. n 0 and n are the refractive indexes of air and the material in the film, respectively. a is the film thickness and l is the geometrical path length the rays travel from the front surface to the back surface of the film. Δx is the path length difference that Ray 0 and Ray 1 (Ray 1 and Ray 2, respectively) travel outside of the film.
The quantities l, a, and θ are illustrated in Figs. 4 and 8. They are the geometrical path length inside the film, the thickness of the film, and the angle of refraction, respectively. Equation (10) shows that by evaluating the rays correctly, it turns out that the total reflection amplitude, as described by our ray theory, should only depend on the x-component of the wave number.
Therefore, a ray model that takes into account the phase difference collected by considering only the x-components of rays inside the film is equivalent to the exact ray model that uses the phase differences with respect to the incoming and outgoing wave fronts. The expressions for the four simplest rays and the Nth ray of the exact ray model are listed in Table 4.
The transmission amplitudes are found in analogy to the reflection amplitudes (see Table 4). Multiplying the factors in the ray sum by the phase e − ikx,0a , corrects for the phase the ray would have gained in the absence of a film. The sum of all possible rays that contribute to the transmission amplitude is therefore given by It can be shown that the sum of all possible rays in Table 4 and the sum given in Eq. (11) are in fact identical with the expressions in Table 1. This equivalence is obtained by performing the sum over the infinitely many rays using the summation formula for geometric series and by including the correct expressions for r l , t l , r r , and t r . Fig. 9 shows that, contrary to the incorrect ray model discussed in Sec. 3.2, the ray model presented in this section agrees completely with the results of exact electromagnetic theory and yields the same resonance structure. The system underlying the results in Fig. 9 consists of a film of thickness 500 nm and a refractive index equal to 1.84. The angle of incidence is 30 • . To produce the results in Fig. 9 it was necessary to include only 10 rays in the ray sum. Based on this fact, we conclude that, in general, only a few rays are needed to describe the system with close to perfect accuracy. This is in agreement with the observations for the one-dimensional ray model [15].

Exact ray theory for oblique incidence with absorption
When the film is absorptive, part of the light entering the film is absorbed. In order to construct a ray model for an absorptive film, a system as in Fig. 10 is considered. The system consists of a film with a perfect mirror behind it. In this case, no light is transmitted. In the absence of absorption this system would have reflection probability equal to 1.
In order to evaluate how the system behaves in this case, we consider how reflection and refraction are described at a boundary of an absorptive medium. The approach presented by Fowles [22] describes how a plane wave behaves at a boundary.
For an absorptive material, the refractive index is a complex number given by In addition, the wave propagation vector inside the film is also complex and given by The plane wave inside the material with amplitude A is denoted by

Table 4
The contribution to the reflected ray from the four simplest rays as illustrated in Fig. 6. The phase collected according to the travelled distance is found by Eq. (10), which starts the ray at the wave front (see Fig. 8). r l , r r , t l and t r can be found in Table 3, k x is the xcomponent of the angular wave number in the film given by Eq. (7), and a is the thickness of the film.  . 10. Oblique incident radiation is propagating from air, with refractive index n 0 = 1, towards a material with refractive index n. When the material is absorptive, i.e., n ∈ C, a part of the radiation is absorbed by the material, while the rest is back-reflected.
For a film infinitely extended in the y direction, the field needs to be translationally invariant along the boundary. From this it follows that k r → and k i → have different directions. The wave is said to be inhomogeneous. k i → is normal to the boundary. From this it follows that the wave is attenuated in the same direction.
From the argumentation in Fowles [22] it follows that the components of the wave vector are given by The equations stated above are identical to the expressions for the components given in Sec. 3 (Eqs. (7) and (6), respectively). When absorption is present, k x is complex.
The exact expression for the reflection amplitude can be found by electromagnetic theory. By setting the surface charge to zero, and the free surface current to zero, the reflection amplitude for a plane wave that is propagating with an oblique angle of incidence is given by for perpendicular polarized light, and by for parallel polarized light, where n is the complex refractive index of the film, a is the thickness of the film and k x,0 and k x are the x-components of the angular wave numbers in air and inside the material, respectively. Naïvely, according to Beer-Lambert's law, one would expect the rays to lose intensity along their trajectory. However, it turns out, by following the argumentation in Sec. 3.3, that only the x-component of the wave vector is needed in order to evaluate the system in terms of rays.
By summing over all rays that contribute to the reflected ray, as shown in Fig. 11, we can build an exact ray model that includes absorption in analogy to the way we built a ray model without absorption in Sec. 3.3.
In Table 5 the expressions for the four simplest rays and the Nth ray of the exact ray model, including absorption, are listed.
Summing over all rays, we obtain an expression for the reflection amplitude as r = r l + t l t r e iπ e 2ikxa ∑ ∞ ν=0 (e iπ r r e 2ikxa ) ν , where r l , t l , r r and t r are the amplitudes (computed according to Fresnel's equations given in Table 3) that the rays incur along their paths due to reflection or transmission at the boundary between air and film. The term e iπ is the phase caused by reflection at the mirror, and e 2ikxa is the phase collected according to the travelled distance for the different rays.
It can be shown that Eq. (18) is in fact identical with the expressions in Eqs. (16) and (17). This equivalence is obtained by performing the sum over the infinitely many rays using the summation formula for geometric series and by including the correct expressions for r l , t l , r r , and t r .

Beams absorb according to Beer-Lambert law
In order to simulate a beam, we used the COMSOL Multiphysics {\textregistered} software to perform the modelling [24]. A Gaussian beam was sent towards a single film as in Fig. 3 with different angles of incidence (0 • -50 • ). The spot radius of the beam is 5.0 μm, where the beam radius is defined as the distance from the center of the beam with maximum value E 0 to where the value of the electric field has dropped to E0 e or ~ 0.37E 0 [23]. The beam has an energy corresponding to a wavelength of 500 nm. We compared two film thicknesses for the same width of the beam spot: In the first case the thickness of the film is chosen to be of the same size as the film, in the second case the thickness of the film is much larger than the width of the beam spot. The real part of refractive index of the film is set to 1.84. Fig. 12 shows the Gaussian beam in case of a non-absorptive film. In case of a thin film (5 μm), the standing waves that are created are parallel to the film boundary. For the thicker film (75 μm), we observe that the beam behaves as we would expect for a classical ray, except for the interference pattern in front of boundaries where the waves corresponding to an incoming and a reflected ray interfere. In order to evaluate how radiation is absorbed inside the film as a function of the path, we evaluate the absorbance. The absorbance is given by Fig. 11. Schematic illustration of the ray model for the thin-film system of Fig. 4. By adding up the amplitudes from all possible rays that contribute to the outgoing ray, the absorption cross section can be found. The path length of the shortest ray that is transmitting through the front of the film and is reflected at the mirror on the backside of the film is d = 2l = 2a cos θ . θ is the angle of refraction as shown in Fig. 4.

Table 5
The exact absorption cross section for oblique incidence can be found by taking into account the phases and the attenuation of rays that start in the incoming wave front and end in the outgoing wave front. This is equivalent to considering only the x-components of the rays inside the film. r l , r r , t l , and t r are the amplitudes for reflection and transmission at the boundary at x = 0 according to whether the ray is approaching the boundary from the left or the right, respectively. The amplitudes can be found by use of Fresnel equations [16] and are shown in Table 3. e iπ is the phase shift caused by reflection at the mirror. Sum of all rays where T f = I I0 . I 0 is the intensity of the beam when it enters the film and I is the intensity after a given path length [25]. T f can also be found by where E 0 and E are the electric fields when the beam enters the film and after a given path length, l, respectively; k is the angular wave number and n i is the imaginary part of the refractive index [16]. The absorbance can therefore be found analytically by Therefore, the loss of energy is expected to follow Beer-Lambert's law (Fig. 13). Let us first consider Beer-Lamberts law in the case of a thick film. Fig. 13 shows the intensity of the electric field along the center of the beam as a function of path length. Fig. 13a shows that the intensity decreases exponentially and Fig. 13b shows the trend by means of a logarithmic y-axis. Fig. 13c shows the absorbance, computed according to Eq. (19), for the five angles of incidence in Fig. 13a. The black, dashed line is the fitted line through the absorbance values for the five angles of incidence, resulting in n i = 0.00103, according Eq. (21). Therefore, unlike in the case of oblique plane-wave incidence, where we saw that absorption only happens in x-direction, the simulation of the beam predicts that, in accordance with Beer-Lambert's law, the absorption is along the path of the beam.
The situation is different for a thin film. The behavior of the electric field in a thin film is shown in Fig. 12a. Locally, in the center of the beam, the electric field behaves as a plane wave and the standing waves are normal to the boundary. In Fig. 14a the absolute square of the electric field is plotted inside of the film as a function of the distance along the normal of the boundary at the center of the beam shown in Fig. 12a.
In Fig. 14b, the solid line is the trend of the absolute square of the electric field, |E| 2 , in the center of the beam as a function of the distance along the normal of the boundary, plotted with a logarithmic y-axis. The dashed lines in Fig. 14b indicate how we would expect the absorption to take place as described in Sec.4. Fig. 14c shows the trend (blue solid line) and the expected absorption (red dashed line) in the case of an angle of incidence equal to 50 • . The yellow solid line indicates how |E| 2 decays if we assume that the absorption decreases as a function of the full path length of the classical ray. For comparison this decrease is projected on the x-component. We see that the absorption actually decreases along the x-component for a thin film. We observe further that the deviation increases as x increases.
In Fig. 14d, |E| 2 is plotted together with the exact description of |E| 2 in the case where an infinite plane wave hits the film. The angle of incidence is 50 • . We observe that the resonances occur at the same xpositions for both models.
It is straightforward to explain this result. In the case of plane-wave incidence, the system, which includes the incident, reflected, and transmitted waves, as well as the film itself, is translationally invariant in the y-direction. Therefore, there is no possibility of absorption in the y-direction, since any exponential decay in y-direction would break translational invariance.
In addition to this mathematical explanation, there is a physical explanation: In a situation with a plane incident wave on an infinitely extended film in the y-direction, the y direction is continuously fed by incoming radiation with components in the y-direction, all along the boundary of the film. Therefore, because of this continuous power input along the boundary, decay in the direction of the boundary cannot happen. This is very different for a beam with a beam spot that is small with respect to the film thickness. In this case, from the perspective of the beam, the material looks homogeneous, which means that absorption also happens in the y-direction. Since the beam breaks the translational symmetry in the y-direction, there is also no formal symmetry argument that would prevent dissipation in y-direction. In other words, because of the localization of the beam, and unlike in the incident planewave situation, energy dissipated in the y-direction is not replenished. Therefore, absorption happens in both x-and y-directions, i.e., along the path of the beam, in accordance with Beer-Lambert's law.
The above arguments also give rise to the prediction of a transition from pure x-absorption in the case of incident plane waves to pure Beer-Lambert's law in the case of thin, sharply localized beams: If the beam waist is much smaller than the film thickness, then we expect Beer-Lambert's law to hold. In the opposite case, where the beam waist is much larger than the film thickness, we expect the case of pure x-absorption to hold. Since optically thin solar-cell structures are typically of the order of the wavelengths of the incident light, and since the widths, i. e., the illumination areas of solar cells are typically much larger than a wavelength, we expect the case of pure x-absorption to be the relevant case for optically thin solar cells in practical applications.

Resonances in an optically thin SiN x film
In order to demonstrate experimentally how the resonance structures change as a function of the angle of oblique incidence, we measured the reflection probability R as a function of the angle of incidence for a thin, Although the complex index of refraction n of SiN x is wavelength dependent, for our purposes it can be assumed to be constant. Moreover, since n was not specifically measured for our particular sample (SiN x / Al/Si), but to be able to compare the measured resonance structures qualitatively with our theoretical ray models, we assume a generic, constant value for the complex index of refraction of n = 1.84 + 0.012i [26]. The reflection probability R was measured using a home-built spectral response measurement system consisting of a Newport Oriel Apex illuminator with a Cornerstone 260 monochromator, a set of collimating and focusing lenses, and an integrating sphere with center-mounted sample holder from Labsphere (model RTC-060-SF). An achromatic depolarizer (Thorlabs model DPU-25) was used to convert the beam of light from the monochromator into a pseudo-random polarized beam of light. The reflected beam from the sample was collected by a silicon photodiode detector (Hamamatsu model S1336-5BQ). The measurements were performed with an angle of incidence equal to 10 • , 20 • , 30 • , 40 • , and 50 • . The sample was illuminated by a partly coherent, monochromatic light. The exact bandwidth (spectral resolution) of the monochromatic light in our experiment was not explicitly measured, but according to the specifications for this monochromator with a slit width manually set at 1.002 mm in the Oriel TracQ basic software, the bandwidth typically varies from Δλ = 3.2 nm and 3.1 nm at blaze wavelengths of 350 nm and 750 nm, respectively, to Δλ = 6.4 nm at blaze wavelength of 1000 nm in the spectral range of interest in our experiment, i.e., 350-1100 nm. Thus, the coherence length, l c , of our light source/monochromator combination can be found according to where λ is the wavelength and Δλ is the bandwidth [22]. Thus, the coherence length in our experiments is at least (350 nm) 2 /3.2 nm ≈ 38 μm, which, compared to the thickness of our film, is large. Therefore, we can assume that our sample is irradiated by a coherent light source that allows us to see resonance structures in the reflection probability R as a function of λ. Fig. 15a shows the measured reflection probability R as a function of the wavelength. In Fig. 15c we trace the position of an absorption resonance, i.e., a dip in the R, in our measured data (squares in Fig. 15c) as a function of the angle of incidence. At 10 • this resonance occurs at approximately 600 nm and, as shown in Fig. 15c, shifts toward lower wavelengths as a function of increasing angle of incidence. The predictions of our correct ray theory (presented in Seg. 3.3), stars in Fig. 15c, follow this trend. The predictions of the incorrect ray theory, discussed in Sec. 3.2, show an incorrect upward trend and strongly disagree with both our measured results and our exact ray model. Thus, from this three-way comparison, we conclude that a ray model built on only considering rays inside the film, gives wrong predictions of the wavelengths at which film resonances will occur. As shown in Fig. 15c), the error increases as the angle of incidence increases.
There are many instances where a resonance structure such as the one illustrated in Fig. 15a, can be observed directly in nature. An example is the colorful pattern that can be seen in thin oil films floating on top of water puddles or on the surface of soap bubbles. If the angle of illumination changes, the color changes. The color change is caused by the change in the position of the resonances as illustrated in Fig. 15a. In summary, as we showed in this section, constructing a ray model that describes the positions of resonances quantitatively and accurately needs to be build on rays that are started in the wave front. Fig. 13. Intensity of the electric field |E| 2 along the path of the ray inside the film. The refractive index of the film is 1.84 + 0.001i. The thickness of the film is 75 μm. Frame (a) shows how the intensity decreases along the central line of the beam inside the film from the point of entry into the film to a distance l inside of the film, terminating at l ≈ 30 μm. This termination point is chosen to avoid areas with strong interference inside of the film. Frame (b) shows a log-plot of the average intensity inside of the film. Frame (c) shows the absorbance calculated by COMSOL for five different angles of incidence as shown in (a) and (b). The dashed line is the fitted line through the absorbance values for the five angles of incidence, resulting in an imaginary part of the refractive index of 0.00103, according to Eq. (21).

Discussion
Basic physics textbooks (see, e.g. Refs. [20,21]) describe and evaluate the resonance structures of thin-film wave systems on the basis of rays. We have earlier showed the importance of associating phases with the rays [15]. If this is done correctly, the rays will also describe the resonances caused by the wave nature of light. Several basic textbooks base their ray models on evaluating the path differences inside the film only (see, e.g., Refs. [20,21]). A ray model which is based on this set-up is presented in Sec. 3.2. As Fig. 7 shows, this approach gives an incorrect description of the system. The ray model presented in Sec. 3.3 shows how we also have to include the travelled distance outside the film when we evaluate how different rays contribute to an outgoing ray. We need to evaluate the rays from one common ray front as shown in Fig. 8. In the present paper we have shown that an exact description of the absorption cross section can be obtained by summing all possible rays in a wave front that are propagating with oblique incidence through boundaries. We have shown that it is important to compute the phases of contributing rays with respect to the incoming wave front.
The ray model for the general case of oblique incidence is expected to be valid for any situation where the ray splitting surfaces are planar; they do not need to be parallel. Corners and edges are expected to introduce small errors. The strategy for a general situation where the ray model is used is to consider an incoming wave front and a defined outgoing direction. The Fresnel equations are used to calculate the reflection and transmission amplitudes each time rays hit a boundary between two materials and are split into a transmitting and reflecting ray. Additional phases collected by the rays along their paths need to be taken into account and the phases collected by reflection at a mirror.
Ray tracing is a frequently used approach for estimating the absorption efficiency of solar cells. Ray models that describe solar cells are often used to investigate systems where the system dimensions are much larger than the wavelength of the incident radiation [2,[27][28][29][30][31]. In these cases the phases are not included in the models at all. However, some models have already been presented that use the phases of rays, but they are not taking the wave front into account [32].
Only a few simple rays are necessary to describe the absorption properties of the investigated system. This is an advantage of our ray theory compared with time consuming numerical calculations of the electric field of the systems. As the complexity of the system increases, it is expected that more rays need to be included [15]. The system investigated is a single film with mirror. This system can be extended to a system consisting of several layers using the hierarchical summation scheme (HSS) [15]. HSS needs to be applied in conjunction with the angle-dependent Fresnel equations and the x-components of the angular wave number. HSS is summing up the contributing rays in the correct order. A further adjustment of the presented ray theory and the HSS method makes it possible to use the ray theory to include the investigation of surface-structured systems.
In the way of additional support for our exact ray model, we presented experimental measurements of R for a SiN x -layer with a thickness of 400 nm. We obtained excellent agreement between our exact ray theory and the experiments, but noted a marked deviation of the results of the incorrect ray theory presented in some text books. This shows that the phase corrections that distinguish our exact theory from alternative, inexact theories are not small effects, but are sizable effects that can easily be observed in practice. Since ray methods are frequently used for designing better solar-cell geometries for improved light trapping, using an incorrect ray method may result in a failed solar-cell design and thus has practical consequences. Thus, in summary, we conclude that both in view of theoretical and practical considerations, it is important for the construction of exact ray models to evaluate the optical path lengths of rays starting from the wave front in order to obtain a correct results that agree with exact electromagnetic theory, in particular to obtain the correct positions of resonances in optically thin solar cells.

Conclusion
In this paper we presented an extension of the ray theory that is capable of describing the exact absorption properties for a film system where a plane wave is propagating towards the system with an arbitrary angle of incidence. This is done by summing up all possible rays that are contributing to an outgoing ray. Fresnel's equations are used to determine the reflection and transmission amplitudes for each ray splitting. The extended ray theory works for both perpendicular and parallel polarized light. We showed that it is important to carefully include the phases of the rays based on their travelled distances, and to include both travelled distance inside and outside of the film. If this is not done correctly, one obtains incorrect results for solar-cell properties, such as reflection probabilities and resonance structures. On the other hand, a correct ray description, as shown in this paper, provides a powerful raybased tool that in some applications, for instance in solar-cell design, may rival equivalent E&M-based wave simulations in computational efficiency.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
for understanding the coupling between dielectric spheres for photovoltaics with higher efficiency -No: 250678 financed by The Research Council of Norway.