An Open-Source Monte Carlo Ray-Tracing Simulation Tool for Luminescent Solar Concentrators with Validation Studies Employing Scattering Phosphor Films

: Luminescent solar concentrators enhance the power output of solar cells through wave-guided luminescent emission and have great potential as building-integrated photovoltaics. Luminescent solar concentrators with a variety of geometries and absorbing–emitting materials have been reported in the literature. As the breadth of available experimental conﬁgurations continues to grow, there is an increasing need for versatile Monte Carlo ray-tracing simulation tools to analyze the performance of these devices for speciﬁc applications. This paper presents the framework for a Monte Carlo ray-tracing simulation tool that can be used to analyze a host of three-dimensional geometries. It incorporates custom radiative transport models to consider the effects of scattering from luminescent media, while simultaneously modeling absorption and luminescent emission. The model is validated using experimental results for three-dimensional planar and wedge-shaped luminescent solar concentrators employing scattering phosphor ﬁlms. Performance was studied as a function of length, wavelength, and the angle of incidence of incoming light. The data for the validation studies and the code (written using the Python programming language) associated with the described model are publically available.


Background and Motivation
In response to the intensifying effects of climate change [1], global adoption of sustainable technologies is increasing rapidly. The Energy Information Administration (EIA) forecasts that almost half of all electricity generation will be renewable by the year 2050, with nearly 20% of all electricity powered by solar energy specifically [2]. Amidst this immense growth, building-integrated photovoltaics (BIPV) have remained a relatively niche market [3], even though buildings contribute 40% of greenhouse gas emissions [4]. In response, increasingly aggressive renewable energy policies have been instituted across the globe. In California, all new residential buildings had to be net zero as of 2020, with commercial buildings following in 2030 [5]. New York has also recently passed a bill to achieve a net-zero carbon economy by 2050, arguably one of the most aggressive renewable policies in the US [6]. Additionally, the European Union has required that all new buildings be "Nearly Zero Energy Buildings" by the end of 2020 [7]. In the face of these stringent energy policies, the solar industry will need to adapt rapidly, and BIPV is an obvious solution due to the abundance of surface area available in the built environment [8]. As a result, even amid the COVID-19 crisis, the BIPV market is expected to reach USD 39.9 billion by 2027, up from USD 12.7 billion in 2020 [9].
More than just an attachment, a BIPV product must be able to function as the building exterior, providing insulation value and structural integrity, while still functioning as a PV product that harvests energy efficiently. Deploying BIPV can involve compromises  An LSC consists of four main classes of object: bundle, volume, boundary, and particle. Bundle interactions with various LSC objects are displayed above. There are four types of boundary: basic boundaries, transparent boundaries, opaque boundaries, and PV boundaries. Bundles interact with various boundary objects as they travel through volume objects. Opaque and transparent boundaries inherit all functionality from the basic boundary class. PV boundaries inherit all functionality from the opaque boundary class. There are three types of volume: basic volumes, absorbing volumes, and particle volumes. Bundles may be absorbed as they move throughout volume objects. Absorbing volumes inherit all functionality of basic volumes, and particle volumes inherit all functionality of absorbing volumes. Additionally, as bundles move through particle volumes, they may interact with a particle object. A particle object is assigned to a particle volume to process light interaction with a luminescent species. To evaluate both planar and wedge-shaped LSCs using a single model and create the potential for an infinite array of geometric configurations, LSC components have been broken up into a number of general categories. Therefore, in the model, a generic 3-D LSC's geometry consists of the following classes of objects: • Bundle: A bundle object represents a "packet of photons". It tracks the characteristics and position of the packet of photons as it moves through various volume objects and interacts with boundary and particle objects. Bundles are tracked in lieu of photons, as they have constant energy and can be easily sampled from irradiance spectra. • Volume: A volume object is a bounding region that consists of a particular material, providing the medium that a bundle will traverse through. Each volume has corresponding boundary objects, representing the facets of a particular volume. There are three types of volumes: basic volumes, absorbing volumes, and particle volumes. Bundles may be absorbed as they move throughout volume objects. Absorbing volumes inherit all functionality of basic volumes, and particle volumes inherit all functionality of absorbing volumes. Additionally, as bundles move through particle volumes, they may interact with a particle object. • Boundary: A boundary object contains the properties inherent to a facet. At a boundary, a bundle can be reflected, transmitted, or absorbed with varying probability, depending on the characteristics specific to that boundary object. There are four types of boundaries: basic boundaries, transparent boundaries, opaque boundaries, and PV boundaries. Opaque and transparent boundaries inherit all functionality from the basic boundary class. PV boundaries inherit all functionality from the opaque boundary class. • Particle: A particle object represents a scattering and/or absorbing and emitting element and tracks the characteristics of that element. A single particle object represents the many particles dispersed throughout a particular volume. In other words, a particle object is assigned to a particle volume to process light interaction with luminescent particles. For the LSCs modeled here, these are phosphor particles.
The classes of objects used in the tool are summarized in Figure 2. Each class is described in further detail, highlighting the method to set up LSC geometry using the tool, before subsequently discussing the process to model photon trajectory.   An LSC consists of four main classes of object: bundle, volume, boundary, and particle. Bundle interactions with various LSC objects are displayed above. There are four types of boundary: basic boundaries, transparent boundaries, opaque boundaries, and PV boundaries. Bundles interact with various boundary objects as they travel through volume objects. Opaque and transparent boundaries inherit all functionality from the basic boundary class. PV boundaries inherit all functionality from the opaque boundary class. There are three types of volume: basic volumes, absorbing volumes, and particle volumes. Bundles may be absorbed as they move throughout volume objects. Absorbing volumes inherit all functionality of basic volumes, and particle volumes inherit all functionality of absorbing volumes. Additionally, as bundles move through particle volumes, they may interact with a particle object. A particle object is assigned to a particle volume to process light interaction with a luminescent species. An LSC consists of four main classes of object: bundle, volume, boundary, and particle. Bundle interactions with various LSC objects are displayed above. There are four types of boundary: basic boundaries, transparent boundaries, opaque boundaries, and PV boundaries. Bundles interact with various boundary objects as they travel through volume objects. Opaque and transparent boundaries inherit all functionality from the basic boundary class. PV boundaries inherit all functionality from the opaque boundary class. There are three types of volume: basic volumes, absorbing volumes, and particle volumes. Bundles may be absorbed as they move throughout volume objects. Absorbing volumes inherit all functionality of basic volumes, and particle volumes inherit all functionality of absorbing volumes. Additionally, as bundles move through particle volumes, they may interact with a particle object. A particle object is assigned to a particle volume to process light interaction with a luminescent species.

Bundle
The attributes of a bundle object are updated stochastically as it moves through an LSC. Upon boundary or particle interaction, bundle position and direction may be updated. Upon particle emission, bundle wavelength, λ, and the number of photons, N λ , will be updated. The distance that a bundle has traveled will also be logged to determine the location of particle interaction and/or bundle absorption. Tracking these attributes then determines the likelihood that a bundle finds a particular fate as it interacts with various objects.
The model assumes a uniform distribution of light incident on the entrance boundary of an LSC. Therefore, if the bundle is entering the top surface of the LSC, separate random numbers between 0 and 1 would be multiplied against the length and width to find the entry point. Additionally, the initial direction of incident rays is defined in spherical coordinates by θ i and φ i . When initially specified for an entrance boundary, θ i and φ i are measured relative to an outward facing normal vector (or local z-axis). Figure 3 depicts The model assumes a uniform distribution of light incident on the entrance boundary of an LSC. Therefore, if the bundle is entering the top surface of the LSC, separate random numbers between 0 and 1 would be multiplied against the length and width to find the entry point. Additionally, the initial direction of incident rays is defined in spherical coordinates by θi and ϕi. When initially specified for an entrance boundary, θi and ϕi are measured relative to an outward facing normal vector (or local z-axis). Figure 3 depicts initial bundle position and direction. As a bundle interacts with various objects, its position and direction are updated until it is collected or lost. To determine initial bundle wavelength, , the energy-normalized emission spectrum of the light source must be known. For the validation studies discussed later, this is the spectrum of a full spectrum solar simulator (model 92193 from Newport [38]). Because is sampled from the entire useful range of the emitted spectra, a trapezoidal Riemann sum is used to find the cumulative normalized intensity (see Figure 4), which can be randomly sampled to determine . Given that it is a sum of the normalized intensity, the steeper slopes of the cumulative normalized intensity correspond with the higher peaks in normalized intensity. As a random number is generated between zero and the maximum value of the cumulative normalized intensity, the range of λ associated with steeper slopes in the cumulative normalized intensity will have a higher likelihood of being selected. The sampled can then be later updated if a bundle interacts with a luminescent particle. As discussed earlier, bundles are packets of photons. Therefore, once a bundle has been absorbed by a solar cell, the number of photons must be determined. The incident power on an LSC is divided equally between all bundles used for a simulation, though At the start of a simulation, bundle direction and position (θ i , φ i ), (x i , y i , z i ) are determined in the global system of coordinates (x, y, z). The local coordinate system is shown (x', y', z') without the y-axis for ease of visibility.
To determine initial bundle wavelength, λ i , the energy-normalized emission spectrum of the light source must be known. For the validation studies discussed later, this is the spectrum of a full spectrum solar simulator (model 92193 from Newport [38]). Because λ i is sampled from the entire useful range of the emitted spectra, a trapezoidal Riemann sum is used to find the cumulative normalized intensity (see Figure 4), which can be randomly sampled to determine λ i . Given that it is a sum of the normalized intensity, the steeper slopes of the cumulative normalized intensity correspond with the higher peaks in normalized intensity. As a random number is generated between zero and the maximum value of the cumulative normalized intensity, the range of λ associated with steeper slopes in the cumulative normalized intensity will have a higher likelihood of being selected. The sampled λ i can then be later updated if a bundle interacts with a luminescent particle.
The model assumes a uniform distribution of light incident on the entrance boundary of an LSC. Therefore, if the bundle is entering the top surface of the LSC, separate random numbers between 0 and 1 would be multiplied against the length and width to find the entry point. Additionally, the initial direction of incident rays is defined in spherical coordinates by θi and ϕi. When initially specified for an entrance boundary, θi and ϕi are measured relative to an outward facing normal vector (or local z-axis). Figure 3 depicts initial bundle position and direction. As a bundle interacts with various objects, its position and direction are updated until it is collected or lost. To determine initial bundle wavelength, , the energy-normalized emission spectrum of the light source must be known. For the validation studies discussed later, this is the spectrum of a full spectrum solar simulator (model 92193 from Newport [38]). Because is sampled from the entire useful range of the emitted spectra, a trapezoidal Riemann sum is used to find the cumulative normalized intensity (see Figure 4), which can be randomly sampled to determine . Given that it is a sum of the normalized intensity, the steeper slopes of the cumulative normalized intensity correspond with the higher peaks in normalized intensity. As a random number is generated between zero and the maximum value of the cumulative normalized intensity, the range of λ associated with steeper slopes in the cumulative normalized intensity will have a higher likelihood of being selected. The sampled can then be later updated if a bundle interacts with a luminescent particle. As discussed earlier, bundles are packets of photons. Therefore, once a bundle has been absorbed by a solar cell, the number of photons must be determined. The incident power on an LSC is divided equally between all bundles used for a simulation, though As discussed earlier, bundles are packets of photons. Therefore, once a bundle has been absorbed by a solar cell, the number of photons must be determined. The incident power on an LSC is divided equally between all bundles used for a simulation, though N λ will vary depending upon λ, as discussed next. The power of the solar spectrum simulator used in the validation studies is 451 W/m 2 . Therefore, using the area of the top surface of the LSC, the power per bundle can be found, depending on the number of bundles set for the simulation. Once a bundle has been absorbed, the number of photons, N λ , is calculated using the following expression [39]: where E is power (or instantaneous energy), λ is wavelength, h is Planck's constant, and c is the speed of light in a vacuum. At the start of a simulation, the distance traveled by a bundle is set to zero. A bundle will track the distance that it has moved throughout the LSC to find the point at which it could be absorbed by the matrix. Additionally, a bundle will separately track the distance it has moved inside of a volume that has a luminescent species homogeneously dispersed. The importance of separately handling absorption by the matrix and particle interaction is discussed next in the context of the various types of volume objects.

Volumes
The basic volume class has two derived classes built-in to represent the behavior of different types of materials. Therefore, the volume classes that have been created behave in one of the three following ways:

Basic Volume
The basic volume class simply exists as a medium to track bundle position but does not process absorption losses or allow for scattering by the volume. Good use cases for this class are volumes consisting of air, or thin layers of material, where absorption may be negligible. A basic volume will be assigned properties necessary for computing the index of refraction, but a bundle cannot be lost within it. The index of refraction can be set as a constant (such as air, where n = 1.0), or as a function of λ from experimental or theoretical means. For example, the index of refraction, n, for a transparent medium can be determined theoretically using the Sellmeier equation [40]: where b 1 and c 1 are experimentally determined Sellmeier coefficients.

Absorbing Volume
The absorbing volume class inherits the functionality of the basic volume class, but also probabilistically determines the pathlength, or the distance a bundle will travel before it is absorbed. If a bundle is absorbed and lost, the simulation resets and a new bundle is launched. For the LSC devices modeled later in this paper, an absorbing volume would be the matrix of the LSC, which consists of transparent silicone (Dow Corning Sylgard 184 [41]).
where α m,λ is the experimentally determined spectral absorption coefficient for the matrix as a function of λ, and r m is a randomly generated number from 0 to 1. Figure 5 shows α m,λ as a function of λ for the matrix material (silicone) used in validation studies. The distance a bundle has traveled towards l m is denoted as l m,t . l m is recalculated and l m,t is set to zero at the start of a trial and when a bundle is emitted by a particle. l m and l m,t are not reset under any other circumstance (i.e., no bundle reset upon boundary interaction, when a bundle changes volume, or when a bundle is scattered). This process is further detailed in [42]. upon boundary interaction, when a bundle changes volume, or when a bundle is scattered). This process is further detailed in [42].

Particle Volume
The particle volume class inherits all functionality from an absorbing volume but is additionally tied to the characteristics of a particle object assigned to the volume. A particle volume allows for a bundle to be lost, scattered, or absorbed and re-emitted by a particle separate from the absorption taking place due to the matrix material alone. In the LSCs characterized in this paper, a particle volume is the silicone matrix with phosphor particles homogenously dispersed.
Employing Equation (3) alone with the spectral absorption coefficient of the phosphor assumes that absorption and emission by luminescent particles occurs continuously (i.e., no spaces between phosphor particles) and that scattering is negligible. However, even for high concentrations of phosphor particles, there is a non-negligible distance between particles and scattering which is significant. Therefore, while the model still incorporates the Beer-Lambert law to effectively model absorption in continuous media (such as the silicone matrix in which phosphor particles are embedded), a modified version is used concurrently to incorporate the impact of the non-continuous attenuation of light by the luminescent species. A particle extinction coefficient, Γ, is found experimentally (as described in [42]) to determine the distance a bundle will travel to a particle, , using the analogous expression below: where is a randomly generated number from 0 to 1. The distance a bundle has traveled towards is denoted as , . is recalculated and , is set to zero at the start of a trial and when a bundle interacts with a particle. , is only increased when a bundle is traveling in a particle volume. This is another distinction between the simulation tool presented here and PVtrace, as PVtrace does not currently have a process to effectively model scattering luminescent media.

Boundaries
As mentioned in Section 3.2, each volume class also incorporates a collection of boundary classes, as each facet of a volume may have unique behavior. Thus, each volume is bound by an exclusive set of boundaries. When two volumes are adjacent, their respective boundaries on common facets will share an interface that allows bundles to pass between them. Volumes are built additively, individual boundary by individual boundary. Setting up the initial LSC geometry in this manner allows for flexibility and renders it painless to modify individual surface characteristics. The basic boundary class has three

Particle Volume
The particle volume class inherits all functionality from an absorbing volume but is additionally tied to the characteristics of a particle object assigned to the volume. A particle volume allows for a bundle to be lost, scattered, or absorbed and re-emitted by a particle separate from the absorption taking place due to the matrix material alone. In the LSCs characterized in this paper, a particle volume is the silicone matrix with phosphor particles homogenously dispersed.
Employing Equation (3) alone with the spectral absorption coefficient of the phosphor assumes that absorption and emission by luminescent particles occurs continuously (i.e., no spaces between phosphor particles) and that scattering is negligible. However, even for high concentrations of phosphor particles, there is a non-negligible distance between particles and scattering which is significant. Therefore, while the model still incorporates the Beer-Lambert law to effectively model absorption in continuous media (such as the silicone matrix in which phosphor particles are embedded), a modified version is used concurrently to incorporate the impact of the non-continuous attenuation of light by the luminescent species. A particle extinction coefficient, Γ, is found experimentally (as described in [42]) to determine the distance a bundle will travel to a particle, l p , using the analogous expression below: where r p is a randomly generated number from 0 to 1. The distance a bundle has traveled towards l p is denoted as l p,t . l p is recalculated and l p,t is set to zero at the start of a trial and when a bundle interacts with a particle. l p,t is only increased when a bundle is traveling in a particle volume. This is another distinction between the simulation tool presented here and PVtrace, as PVtrace does not currently have a process to effectively model scattering luminescent media.

Boundaries
As mentioned in Section 3.2, each volume class also incorporates a collection of boundary classes, as each facet of a volume may have unique behavior. Thus, each volume is bound by an exclusive set of boundaries. When two volumes are adjacent, their respective boundaries on common facets will share an interface that allows bundles to pass between them. Volumes are built additively, individual boundary by individual boundary. Setting up the initial LSC geometry in this manner allows for flexibility and renders it painless to modify individual surface characteristics. The basic boundary class has three derived classes built-in to represent the behavior of different facets. The boundary classes that have been created behave in one of the four following ways: The basic boundary class exists only as a receptacle for bundles, tracking the location of the bundle intersection, but absorbing all incident bundles with 100% efficiency. To find the location of bundle intersection, the model will evaluate each boundary of the volume in which the bundle currently resides, determining if there is a viable intersect. To find a potential intersect, the equations for a line (the bundle) are substituted into the plane equation (the boundary). Beginning this process, the plane equation for the boundary under evaluation is shown below [44]: where X f , Y f , Z f is the intersection point, n x , n y , n z is the normal vector of the target boundary, X p , Y p , Z p is any point on the target boundary, and with the line equations for the bundle being tracked defined by the following: is the starting point, and t is the distance to travel between planes/boundaries. These equations are substituted into the former to determine t: Solving for t in Equation (9) and then calculating X f , Y f , Z f using Equations (6)-(8) determines if there is a potential intersect on the plane that a boundary rests upon. Figure 6 shows the two possible intersection points that could be found in the global coordinate system based upon initial bundle trajectory. Multiple intersections may be found initially, but only one intersection will fall within the bounds of a boundary. Intersection #2 in Figure 6, for example, clearly falls outside of the LSC shown. Therefore, to evaluate if an intersection is valid, a rotation is employed to move into the local coordinate system of the target boundary, as is described later in this section in detail. From here, the Shapely Python library [45] is used by the model to check if the intersection point falls within the bounds of an LSC boundary facet. If the intersection point does fall inside of the boundary, and the bundle was not absorbed by the matrix along the way, the position of the bundle will be updated (as would be the case for intersection #1).
Energies 2021, 14, x 9 of 29 derived classes built-in to represent the behavior of different facets. The boundary classes that have been created behave in one of the four following ways:

Basic Boundary
The basic boundary class exists only as a receptacle for bundles, tracking the location of the bundle intersection, but absorbing all incident bundles with 100% efficiency. To find the location of bundle intersection, the model will evaluate each boundary of the volume in which the bundle currently resides, determining if there is a viable intersect. To find a potential intersect, the equations for a line (the bundle) are substituted into the plane equation (the boundary). Beginning this process, the plane equation for the boundary under evaluation is shown below [44]: where , , is the intersection point, 〈 , , 〉 is the normal vector of the target boundary, , , is any point on the target boundary, and with the line equations for the bundle being tracked defined by the following: where , , is the starting point, and is the distance to travel between planes/boundaries. These equations are substituted into the former to determine : Solving for in Equation (9) and then calculating , , using Equations (6)-(8) determines if there is a potential intersect on the plane that a boundary rests upon. Figure 6 shows the two possible intersection points that could be found in the global coordinate system based upon initial bundle trajectory. Multiple intersections may be found initially, but only one intersection will fall within the bounds of a boundary. Intersection #2 in Figure 6, for example, clearly falls outside of the LSC shown. Therefore, to evaluate if an intersection is valid, a rotation is employed to move into the local coordinate system of the target boundary, as is described later in this section in detail. From here, the Shapely Python library [45] is used by the model to check if the intersection point falls within the bounds of an LSC boundary facet. If the intersection point does fall inside of the boundary, and the bundle was not absorbed by the matrix along the way, the position of the bundle will be updated (as would be the case for intersection #1).

Transparent Boundary
A transparent boundary inherits the functionality of the basic boundary class as well, but additionally processes bundle refraction, allowing a bundle to exit the LSC entirely or transfer to an adjacent volume object within the LSC. To find the refracted bundle direction, χ λ , Snell's law [39] is used: where n 1,λ is the index of refraction of the previous volume, n 2,λ is the index of refraction of the volume a bundle is attempting to enter, and θ is the polar spherical coordinate of the bundle direction. With χ λ calculated, Fresnel's equations [39] can be used to compute the average spectral reflectivity, ρ(θ, λ): In this manner, the reflectivity can be used to probabilistically determine if a bundle is refracted or reflected (if a random number from 0 to 1 is less than ρ, a bundle is reflected).
The model must also know which volume a bundle is attempting to enter before reflectivity calculations can be done. Therefore, when a bundle reaches a transparent boundary, a series of calculations are done first to identify with which other transparent boundaries the original transparent boundary shares an interface (Figure 7). This is done so that these can be distinguished from transparent boundaries at the exterior facets of an LSC and so that a bundle can transition into the proper adjacent volume.

Transparent Boundary
A transparent boundary inherits the functionality of the basic boundary class as well, but additionally processes bundle refraction, allowing a bundle to exit the LSC entirely or transfer to an adjacent volume object within the LSC. To find the refracted bundle direction, , Snell's law [39] is used: where , is the index of refraction of the previous volume, , is the index of refraction of the volume a bundle is attempting to enter, and is the polar spherical coordinate of the bundle direction. With calculated, Fresnel's equations [39] can be used to compute the average spectral reflectivity, , : In this manner, the reflectivity can be used to probabilistically determine if a bundle is refracted or reflected (if a random number from 0 to 1 is less than , a bundle is reflected).
The model must also know which volume a bundle is attempting to enter before reflectivity calculations can be done. Therefore, when a bundle reaches a transparent boundary, a series of calculations are done first to identify with which other transparent boundaries the original transparent boundary shares an interface (Figure 7). This is done so that these can be distinguished from transparent boundaries at the exterior facets of an LSC and so that a bundle can transition into the proper adjacent volume.   Checking for antiparallel normals: Normals face inward toward the center of a volume; therefore, transparent boundaries sharing an interface must have normal vectors pointing in exactly opposite directions.

2.
Checking for coplanarity: The boundaries sharing an interface must fall along the same plane. The line falling between the centers of each boundary must therefore form a right angle with each normal vector. 3.
Checking for overlap: Now that it is known that boundaries face opposite directions and are coplanar, the area of intersection can be found easily in 2D using the Shapely library. If there is no area of intersection, the boundary is not an interface.
While rotational matrices are used to perform vector manipulation for a transparent boundary, this process is more intuitively described for an opaque boundary, as discussed next.

Opaque Boundary
An opaque boundary inherits the functionality of the basic boundary class (i.e., intersection with a bundle) but will also process bundle absorption and reflection (specular or diffuse) at a boundary. Therefore, if a valid intersection is found with a mirrored surface, for example, the efficiency of the mirror will determine if a bundle is absorbed or reflected. While intersection calculations are processed in the global coordinate system, as mentioned in Section 3.3.1, bundle interaction with a boundary is processed in the local coordinate system of the boundary to ensure that the same calculations always apply. This process is detailed below, and more information on rotational matrices and Euler angles can be found in [45].
The (x 1 , y 1 , z 1 ) coordinates are then rotated into the local coordinates (x 1 , y 1 , z 1 ) of the boundary. For the example shown in Figure 8, this is a 90 • rotation over the x-axis. Equation (15) depicts the rotational matrix, R x , employed to rotate over the x-axis, and Equation (16) shows the transformation of the incident light vector from global to local coordinates.
Energies 2021, 14, x 13 of 29 Figure 8. The global coordinate system (x, y, z), shown on the left, relative to the local coordinate system (x', y', z'), shown on the right. Intersection calculations are processed in the global coordinate system, but boundary interactions are processed in the local coordinate system.

PV Boundary
A PV boundary inherits the functionality of the opaque boundary class (i.e., intersection with a bundle and bundle absorption/reflection) but will also log collected bundles. Furthermore, a PV boundary allows for the use of both an internal quantum effi- Figure 8. The global coordinate system (x, y, z), shown on the left, relative to the local coordinate system (x', y', z'), shown on the right. Intersection calculations are processed in the global coordinate system, but boundary interactions are processed in the local coordinate system. In Equation (15), τ is the angle between the normal of a boundary and the z-axis of the global coordinate system.
In Equation (16), (x 1 , y 1 , z 1 ) are the global coordinates of the incident light vector on a boundary, and (x 1 , y 1 , z 1 ) represent the same vector in the local coordinates of the boundary.

3.
The incident light vector associated with the bundle is then processed in local coordinates according to a boundary's assigned properties. For example, to model specular reflection at a mirrored boundary (Figure 8), the incident light vector expressed in local coordinates is rotated by 180 • over the z -axis, and the direction of the vector is multiplied by -1. Equation (17) shows the rotational matrix, R z , employed to rotate over the z-axis, and Equation (18) shows the transformation employed to process specular reflection.
In Equation (17), π is the angle expressed in radians. In Equation (18), x 1 , y 1 , and z 1 are the local coordinates of the incident light vector on a boundary, and x 2 , y 2 , and z 2 are the local coordinates of the reflected vector.
To model diffuse reflection instead of specular reflection, a Lambertian distribution is assumed and the direction of the reflected light vector is randomly selected. Equations (19)- (20) are used to produce a Lambertian distribution in θ 2 and φ 2 .
In Equations (19) and (20), θ 2 and φ 2 are the local coordinates of the reflected vector, respectively, and r d is a random number from 0 to 1. Equations (12)- (14) are then used to convert to Cartesian coordinates in preparation for step 4.

4.
With a new vector direction determined in local coordinates, the vector is rotated back into the global coordinate system (x, y, z) to prepare to launch to the next boundary. Equation (21) depicts this transformation.
In Equation (21), x 2 , y 2 , and z 2 are the local coordinates of the reflected light vector, and x 2 , y 2 , and z 2 are the global coordinates of the reflected light vector.

5.
In the final step, the Cartesian coordinates (x 2 , y 2 , z 2 ) of the light vector associated with the bundle are converted back into spherical coordinates (θ 2 , φ 2 ) using: where (θ 2 , φ 2 ) are the global coordinates of the reflected vector. This vector is now ready for use in intersection calculations.

PV Boundary
A PV boundary inherits the functionality of the opaque boundary class (i.e., intersection with a bundle and bundle absorption/reflection) but will also log collected bundles. Furthermore, a PV boundary allows for the use of both an internal quantum efficiency, IQE(λ), and external quantum efficiency, EQE(λ), if known. The EQE(λ) is the number of collected charge carriers by the PV cell divided by the total number of incident photons (Equation (24)). This is distinct from the IQE(λ), which is the number of collected charge carriers divided by the total number of absorbed photons (Equation (25)). With IQE(λ) and EQE(λ) known, the transmittance, T(λ), of the solar cell can be found (Equation (26)) [46]. Therefore, at a solar cell, T(λ), is used to define if a bundle is absorbed by the solar cell and then the IQE(λ) is used to subsequently determine the number of photons collected by the solar cell. The short-circuit current can be found by multiplying the number of collected charge carriers by the fundamental physical constant for a unit of electric charge, 1.6022 −19 C. For the solar cells used in validation studies, IQE(λ) is unknown, and therefore the EQE(λ) (Figure 9) is used in place of the IQE(λ) and T(λ) = 1. This is a conservative assumption (EQE(λ) < IQE(λ)) and is expected to introduce some discrepancies between predictions and experimental results. Figure 8. The global coordinate system (x, y, z), shown on the left, relative to the local coordinate system (x', y', z'), shown on the right. Intersection calculations are processed in the global coordinate system, but boundary interactions are processed in the local coordinate system.

PV Boundary
A PV boundary inherits the functionality of the opaque boundary class (i.e., intersection with a bundle and bundle absorption/reflection) but will also log collected bundles. Furthermore, a PV boundary allows for the use of both an internal quantum efficiency, , and external quantum efficiency, , if known. The is the number of collected charge carriers by the PV cell divided by the total number of incident photons (Equation (24)). This is distinct from the , which is the number of collected charge carriers divided by the total number of absorbed photons (Equation (25)). With and known, the transmittance, λ , of the solar cell can be found (Equation (26)) [46]. Therefore, at a solar cell, λ , is used to define if a bundle is absorbed by the solar cell and then the is used to subsequently determine the number of photons collected by the solar cell. The short-circuit current can be found by multiplying the number of collected charge carriers by the fundamental physical constant for a unit of electric charge, 1.6022 −19 C. For the solar cells used in validation studies, is unknown, and therefore the ( Figure 9) is used in place of the and λ = 1. This is a conservative assumption ( < ) and is expected to introduce some discrepancies between predictions and experimental results. Figure 9. EQE as a function of wavelength, . Figure 9. EQE as a function of wavelength, λ.

Particle
The particle class determines the behavior of particle interaction when a bundle reaches a particle. As discussed earlier, Γ is found experimentally to solve for l p , and once l p,t equals l p , a bundle will interact with a particle object. Upon particle interaction, the likelihood of absorption, P a,λ , scattering, P s,λ , and emission (upon absorption), P e,λ , as a function of λ must be determined.
Using the method described in [42], the maximum probability of absorption, P a , is determined experimentally. Particle absorption is wavelength-dependent, so P a . is multiplied by the normalized absorption intensity of the particle at a given λ (Figure 10) to find P a,λ . P a,λ is then compared with a random number from 0 to 1 to determine if absorption or scattering occurs. The probability of scattering, P s,λ , is equal to 1 − P a,λ . This approach has been experimentally documented for phosphor particles [42], which are highly scattering.
of absorbed photons, but this would be impossible for bundles of constant energy without specifying an additional parameter. Therefore, the probability of emission, , , is employed as a function of QE [37].
where is the emitted wavelength, and is the absorbed wavelength. , is then used to determine if a bundle is emitted by a particle, in which case is sampled randomly from the cumulative emission spectra of the particle ( Figure 10) using a process similar to that described in Section 3.1. This section focused on the individual classes of objects used within the code of the MC model to represent the components of an LSC. The implementation of the MC model, relying upon the classes discussed thus far, is described next in Section 4.

Model Implementation Using Pre-Defined Objects Representing LSC Components
The functionality of the classes described in the previous section allows a wide variety of possible combinations of objects within the MC model. Figure 11 shows the general paths that a bundle can traverse through these objects, navigating probabilistically through the various volumes, boundaries, and particles that have been created. Each stage of the simulation is described in additional detail as well. If a bundle has been absorbed, the quantum efficiency (QE) of the luminescent species is used to determine if it will be lost or re-emitted. As bundles are given constant energy in the model, the QE cannot be used directly as described in [37]. Explained briefly, when QE is equal to one, the number of emitted photons should be equal to the number of absorbed photons, but this would be impossible for bundles of constant energy without specifying an additional parameter. Therefore, the probability of emission, P e,λ , is employed as a function of QE [37].
where λ e is the emitted wavelength, and λ a is the absorbed wavelength. P e,λ is then used to determine if a bundle is emitted by a particle, in which case λ e is sampled randomly from the cumulative emission spectra of the particle ( Figure 10) using a process similar to that described in Section 3.1. This section focused on the individual classes of objects used within the code of the MC model to represent the components of an LSC. The implementation of the MC model, relying upon the classes discussed thus far, is described next in Section 4.

Model Implementation Using Pre-Defined Objects Representing LSC Components
The functionality of the classes described in the previous section allows a wide variety of possible combinations of objects within the MC model. Figure 11 shows the general paths that a bundle can traverse through these objects, navigating probabilistically through the various volumes, boundaries, and particles that have been created. Each stage of the simulation is described in additional detail as well.
A. Begin Simulation An individual bundle starts here if the indicated number of trials have not already been completed. All bundle characteristics will be reset (θ, φ, λ, l m,t , and l p,t ). Figure 12 shows two examples of a bundle at the beginning of a simulation. A bundle will begin with a random position on a user-specified transparent boundary (x i , y i , z i ), with a specified direction (θ i , φ i ) relative to an outward-facing normal vector on this entrance boundary.
B. Process Bundle Entry As a bundle attempts to enter, Fresnel's equations for reflectivity and Snell's law are used to determine if the bundle is reflected before it can enter the LSC or if the bundle is refracted into a volume within the LSC. Figure 13a,b show a bundle attempting to enter the LSC.

A. Begin Simulation
An individual bundle starts here if the indicated number of trials have not already been completed. All bundle characteristics will be reset (θ, ϕ, , , , and , ). Figure 12 shows two examples of a bundle at the beginning of a simulation. A bundle will begin with a random position on a user-specified transparent boundary (xi, yi, zi), with a specified direction (θi, ϕi) relative to an outward-facing normal vector on this entrance boundary.
(a) (b) Figure 12. At the start of a simulation, a bundle attempts to enter on the top surface of an LSC. As this is the top surface, xi and yi are randomized, while zi is constant. θi is shown to be similar between (a,b), while ϕi is clearly distinct.

B. Process Bundle Entry
As a bundle attempts to enter, Fresnel's equations for reflectivity and Snell's law are used to determine if the bundle is reflected before it can enter the LSC or if the bundle is refracted into a volume within the LSC. Figure 13a,b show a bundle attempting to enter the LSC.

A. Begin Simulation
An individual bundle starts here if the indicated number of trials have not already been completed. All bundle characteristics will be reset (θ, ϕ, , , , and , ). Figure 12 shows two examples of a bundle at the beginning of a simulation. A bundle will begin with a random position on a user-specified transparent boundary (xi, yi, zi), with a specified direction (θi, ϕi) relative to an outward-facing normal vector on this entrance boundary.
(a) (b) Figure 12. At the start of a simulation, a bundle attempts to enter on the top surface of an LSC. As this is the top surface, xi and yi are randomized, while zi is constant. θi is shown to be similar between (a,b), while ϕi is clearly distinct.

B. Process Bundle Entry
As a bundle attempts to enter, Fresnel's equations for reflectivity and Snell's law are used to determine if the bundle is reflected before it can enter the LSC or if the bundle is refracted into a volume within the LSC. Figure 13a,b show a bundle attempting to enter the LSC.

C. Launch Bundle from Current Position
At a particular location, a bundle will be launched in global coordinates according to the characteristics of the bundle itself and the corresponding LSC objects that exist at that location. A bundle can be launched from a particle or a boundary. For example, if a bundle reflects from a boundary it may reflect diffusely, specularly, or of a custom distribution depending upon the type of surface it interacts with. This will then govern the direction,

C. Launch Bundle from Current Position
At a particular location, a bundle will be launched in global coordinates according to the characteristics of the bundle itself and the corresponding LSC objects that exist at that location. A bundle can be launched from a particle or a boundary. For example, if a bundle reflects from a boundary it may reflect diffusely, specularly, or of a custom distribution depending upon the type of surface it interacts with. This will then govern the direction, (θ, φ), in which a bundle will launch so that intersection calculations can be processed. All bundle interactions that do not result in conversion at a PV boundary or a bundle loss will return to this step.

D. Bundle Escapes
If a bundle is traveling in a direction that will lead it outside of the LSC altogether, it is lost and the simulation will reset and begin the next trial (in other words, the next bundle). To determine if a bundle will escape, inward facing normal vectors are established for every volume. If the angle between a bundle's direction vector and the normal of a boundary is greater than 90 • , and there is no adjacent volume, the bundle is lost. This can only occur at a transparent boundary. Figure 13a is an example of a bundle escaping due to reflection, and Figure 14 shows a bundle escaping due to refraction.

C. Launch Bundle from Current Position
At a particular location, a bundle will be launched in global coordinates according to the characteristics of the bundle itself and the corresponding LSC objects that exist at that location. A bundle can be launched from a particle or a boundary. For example, if a bundle reflects from a boundary it may reflect diffusely, specularly, or of a custom distribution depending upon the type of surface it interacts with. This will then govern the direction, (θ, ϕ), in which a bundle will launch so that intersection calculations can be processed. All bundle interactions that do not result in conversion at a PV boundary or a bundle loss will return to this step.

D. Bundle Escapes
If a bundle is traveling in a direction that will lead it outside of the LSC altogether, it is lost and the simulation will reset and begin the next trial (in other words, the next bundle). To determine if a bundle will escape, inward facing normal vectors are established for every volume. If the angle between a bundle's direction vector and the normal of a boundary is greater than 90°, and there is no adjacent volume, the bundle is lost. This can only occur at a transparent boundary. Figure 13a is an example of a bundle escaping due to reflection, and Figure 14 shows a bundle escaping due to refraction.

E. Bundle Switches Volume
Processed similarly to an escaping bundle, a bundle can leave a volume only to enter an adjacent volume. This will bring it back to step C, launching the bundle inside of the new volume. This can only occur at a transparent boundary that shares an interface with another transparent boundary. Figure 15 shows an example of a bundle transitioning from an absorbing volume to a particle volume.

E. Bundle Switches Volume
Processed similarly to an escaping bundle, a bundle can leave a volume only to enter an adjacent volume. This will bring it back to step C, launching the bundle inside of the new volume. This can only occur at a transparent boundary that shares an interface with another transparent boundary. Figure 15 shows an example of a bundle transitioning from an absorbing volume to a particle volume.

F. Bundle Absorbed
A bundle can be absorbed by a boundary, particle, or volume. If a bundle is absorbed at a PV boundary, it has the chance to be converted into electrons. If a bundle is absorbed at an opaque boundary, it is lost. In a particle volume, a bundle may be absorbed and lost by a particle before it reaches a boundary. Additionally, in an absorbing or particle volume, a bundle can be lost to the volume's matrix material. Figure 16a-c show these possible loss mechanisms.

F. Bundle Absorbed
A bundle can be absorbed by a boundary, particle, or volume. If a bundle is absorbed at a PV boundary, it has the chance to be converted into electrons. If a bundle is absorbed at an opaque boundary, it is lost. In a particle volume, a bundle may be absorbed and lost by a particle before it reaches a boundary. Additionally, in an absorbing or particle volume, a bundle can be lost to the volume's matrix material. Figure 16a-c show these possible loss mechanisms. Figure 15. Bundle transitions from an absorbing volume (silicone) to a particle volume (silicone with phosphor particles dispersed).

F. Bundle Absorbed
A bundle can be absorbed by a boundary, particle, or volume. If a bundle is absorbed at a PV boundary, it has the chance to be converted into electrons. If a bundle is absorbed at an opaque boundary, it is lost. In a particle volume, a bundle may be absorbed and lost by a particle before it reaches a boundary. Additionally, in an absorbing or particle volume, a bundle can be lost to the volume's matrix material.

G. Bundle Intersects Particle
A bundle may interact with a particle before it reaches a boundary. is established based upon the concentration of particles within the volume of an LSC [42] using Equation (4) and is recalculated upon particle interaction. , is reset to zero. This can only occur in a particle volume.

H. Bundle Intersects Boundary
Once a bundle has been launched within a particular volume, each boundary of that volume will be evaluated for a valid intersection point. This is done by using line-plane intersection calculations and then subsequently determining if the intersection falls within the bounds of a boundary, as described in Section 3.3.1. If a basic boundary is intersected, the bundle is immediately absorbed. If an opaque boundary is intersected, it may be reflected or absorbed. If a transparent boundary is intersected, it may be reflected or refracted. Boundary interactions are processed in local coordinates, as discussed in Section 3.3.3. , and , are not reset upon boundary interaction.

I. Bundle Absorbed and Emitted
Upon bundle intersection with a particle, a bundle can be absorbed and re-emitted. When this occurs, and are recalculated, , and , are set to zero, and a new is sampled from the emission spectrum of the luminescent species. Emission is handled

G. Bundle Intersects Particle
A bundle may interact with a particle before it reaches a boundary. l p is established based upon the concentration of particles within the volume of an LSC [42] using Equation (4) and is recalculated upon particle interaction. l p,t is reset to zero. This can only occur in a particle volume.

H. Bundle Intersects Boundary
Once a bundle has been launched within a particular volume, each boundary of that volume will be evaluated for a valid intersection point. This is done by using lineplane intersection calculations and then subsequently determining if the intersection falls within the bounds of a boundary, as described in Section 3.3.1. If a basic boundary is intersected, the bundle is immediately absorbed. If an opaque boundary is intersected, it may be reflected or absorbed. If a transparent boundary is intersected, it may be reflected or refracted. Boundary interactions are processed in local coordinates, as discussed in Section 3.3.3. l m,t and l p,t are not reset upon boundary interaction.

I. Bundle Absorbed and Emitted
Upon bundle intersection with a particle, a bundle can be absorbed and re-emitted. When this occurs, l m and l p are recalculated, l m,t and l p,t are set to zero, and a new λ is sampled from the emission spectrum of the luminescent species. Emission is handled isotropically. Figure 17 shows an example of a bundle being absorbed and re-emitted by a phosphor particle. isotropically. Figure 17 shows an example of a bundle being absorbed and re-emitted by a phosphor particle.

J. Bundle Scattered
Upon bundle intersection with a particle, there is a probability that the bundle will be scattered instead of absorbed. must be determined experimentally a priori, as described in [42]. If a bundle is scattered by a particle, and , are not reset, there is no shift in , but and , are reset. Figure 18 shows an example of a bundle being scattered isotropically by a phosphor particle.

J. Bundle Scattered
Upon bundle intersection with a particle, there is a probability that the bundle will be scattered instead of absorbed. P a must be determined experimentally a priori, as described in [42]. If a bundle is scattered by a particle, l m and l m,t are not reset, there is no shift in λ, but l p and l p,t are reset. Figure 18 shows an example of a bundle being scattered isotropically by a phosphor particle.

J. Bundle Scattered
Upon bundle intersection with a particle, there is a probability that the bundle will be scattered instead of absorbed. must be determined experimentally a priori, as described in [42]. If a bundle is scattered by a particle, and , are not reset, there is no shift in , but and , are reset. Figure 18 shows an example of a bundle being scattered isotropically by a phosphor particle.

K. Return to Bundle Launch
If a bundle has made it through the flow chart without being absorbed by a surface or escaping the LSC, it must return to step C to be launched again. Figure 19 shows an example of a bundle being launched due to reflection at an opaque boundary. Figure 20a

K. Return to Bundle Launch
If a bundle has made it through the flow chart without being absorbed by a surface or escaping the LSC, it must return to step C to be launched again. Figure 19 shows an example of a bundle being launched due to reflection at an opaque boundary. Figure 20a

J. Bundle Scattered
Upon bundle intersection with a particle, there is a probability that the bundle will be scattered instead of absorbed. must be determined experimentally a priori, as described in [42]. If a bundle is scattered by a particle, and , are not reset, there is no shift in , but and , are reset. Figure 18 shows an example of a bundle being scattered isotropically by a phosphor particle.

K. Return to Bundle Launch
If a bundle has made it through the flow chart without being absorbed by a surface or escaping the LSC, it must return to step C to be launched again. Figure 19 shows an example of a bundle being launched due to reflection at an opaque boundary. Figure 20a

MC Model Validation
To validate the simulation tool, previously published experimental data have been used [17,22]. Predictions were generated for planar and wedge-shaped LSCs (Figure 1) of varying aspect ratio employing green phosphor films [47] as both aspect ratio and the direction of incident light relative to an LSC have a significant influence on its performance [22].
LSCs were characterized over a range of lengths and incidence angles. Using these

MC Model Validation
To validate the simulation tool, previously published experimental data have been used [17,22]. Predictions were generated for planar and wedge-shaped LSCs (Figure 1) of varying aspect ratio employing green phosphor films [47] as both aspect ratio and the direction of incident light relative to an LSC have a significant influence on its performance [22].
LSCs were characterized over a range of lengths and incidence angles. Using these experimental data, it was possible to determine the validity of the model in a range of possible configurations. Table 1 shows the geometric dimensions used for the wedgeshaped and planar LSCs.  Figure 21. General configuration of wedge-shaped and planar LSCs with volume objects labeled. Boundary objects also make up individual volume objects but are not shown for simplicity. Figure 22. Polar and azimuthal incidence angle, θi and ϕi, as defined in [22]. The global coordinate system used in the model is depicted. β is the tilt angle up from the ground, and the yellow globe represents the sun.
Opaque boundaries were used to represent the mirrored surfaces in the LSC, while PV boundaries were used to represent the facets representing edge solar cells. Transparent boundaries were used for all other boundaries, defining the top surface of the LSCs and the interfaces between volumes. The input characteristics of the objects defined in the

Object Attributes Used in Validation Studies
These dimensions combine to define the boundaries belonging to each volume of each LSC. Volumes are assigned in the manner seen in Figure 21. For the planar LSC shown, Volume 0 is a particle volume representing the phosphor film, while Volume 1 is an absorbing volume representing the rest of the silicone matrix. For the wedge-shaped LSC, Volume 0 and Volume 2 are absorbing volumes that combine to represent the silicone matrix without phosphor particles. Volume 0 is used to enable a mirror gap near the solar cell. Volume 1 represents the phosphor film.
θi and φi are depicted in Figure 22, showing how the initial bundle direction is applied for a generic surface. θi is defined relative to the normal of the top surface of an LSC or solar panel. φi represents the "twist" of the LSC relative to the sun and is important for asymmetrical LSCs. Figure 21. General configuration of wedge-shaped and planar LSCs with volume objects labeled. Boundary objects also make up individual volume objects but are not shown for simplicity. Figure 22. Polar and azimuthal incidence angle, θi and ϕi, as defined in [22]. The global coordinate system used in the model is depicted. β is the tilt angle up from the ground, and the yellow globe represents the sun.
Opaque boundaries were used to represent the mirrored surfaces in the LSC, while PV boundaries were used to represent the facets representing edge solar cells. Transparent boundaries were used for all other boundaries, defining the top surface of the LSCs and the interfaces between volumes. The input characteristics of the objects defined in the model are discussed below: • Bundle: The initial position (xi, yi, zi) and direction (θi, ϕi) of the light vector are supplied, where xi is randomly determined between 0 and L, and yi is randomly determined between 0 and W. The starting volume number and particle object used for the simulation are also given. Lastly, λ is randomly sampled from the data shown in Figure 3.  (2)) is used to define index of refraction, and the boundaries that make up a particular volume are also supplied. • Particle Volumes: All inputs to absorbing volumes are similar for particle volumes. In addition to these, particle volumes are also given an associated particle object. • Opaque Boundaries: A set of points is input to form each boundary and the particular volume to which the boundaries belong is also indicated. All opaque boundaries Figure 22. Polar and azimuthal incidence angle, θ i and φ i , as defined in [22]. The global coordinate system used in the model is depicted. β is the tilt angle up from the ground, and the yellow globe represents the sun.
Opaque boundaries were used to represent the mirrored surfaces in the LSC, while PV boundaries were used to represent the facets representing edge solar cells. Transparent boundaries were used for all other boundaries, defining the top surface of the LSCs and the interfaces between volumes. The input characteristics of the objects defined in the model are discussed below: • Bundle: The initial position (x i , y i , z i ) and direction (θ i, φ i ) of the light vector are supplied, where x i is randomly determined between 0 and L, and y i is randomly determined between 0 and W. The starting volume number and particle object used for the simulation are also given. Lastly, λ is randomly sampled from the data shown in Figure 3.  (2)) is used to define index of refraction, and the boundaries that make up a particular volume are also supplied. • Particle Volumes: All inputs to absorbing volumes are similar for particle volumes. In addition to these, particle volumes are also given an associated particle object. • Opaque Boundaries: A set of points is input to form each boundary and the particular volume to which the boundaries belong is also indicated. All opaque boundaries are given a 5% likelihood of absorption (independent of λ), and reflection is handled specularly to represent the mirrors used (3M enhanced specular reflector). • Transparent Boundaries: Only the points making up a transparent boundary and the parent volume object are input. • PV Boundaries: PV boundaries are given a similar set of characteristics to opaque boundaries, but the EQE of the solar cells used in this paper is also provided as seen in Figure 9. If an IQE was known, this would have also been specified and reflection would be handled diffusely. With IQE unknown, reflected bundles are assumed to be lost at the solar cell to be conservative and EQE is used in place of IQE. • Particle: P a = 0.2 and Γ = 4240 m −1 as experimentally defined for the phosphor particles used (HTG540 green phosphor [47]) are input to a particle object. Additionally, the absorption and emission spectra of the particle are supplied, as seen in Figure 10.

Discussion of Validation Study Results
Although the experimental data are taken from the literature, a brief description is provided here on how angular dependence for LSC performance was obtained. For performance measurements, LSCs were placed below a full spectrum solar simulator (model 92193 from Newport [38]), where a rotating stage was used to adjust the relative Energies 2021, 14, 455 21 of 28 position of the LSCs to the simulator. The relative position of the simulator was described as a function of polar and azimuthal incidence angle, θ i and φ i . Figure 22 shows how these angles were defined. Details regarding the experimental setup of the planar LSCs can be found in [22], and the wedge-shaped LSCs in [17].
In the validation studies completed, the experimental and modeled performance of LSCs is frequently described in the literature by the flux gain. The flux gain, G f ,SC , is defined in this paper as the ratio of the short circuit current of the PV cell [48] within the LSC, J SC, cell , and the short circuit current of a bare PV cell of the same size that is parallel to the top surface of the LSC, J SC,i . G f ,SC is often cited in the literature relating to LSCs [20] and is the primary parameter used in the validation studies performed. G f ,SC was also found using modeled data by determining J SC,i and J SC,cell using the process described in Section 3.3.4 when defining the behavior of PV boundaries. Three validation studies were completed for both planar and wedge-shaped LSCs for differing configurations using results from experiment and simulation.
where J SC, cell is the short circuit current density of the PV cell at the edge, and J SC,i is the short circuit current density of a similar PV cell if it were placed on the top surface of the LSC, facing the simulator. The validation studies performed using the flux gain and PV spectra on the edge are summarized below and are discussed in the next sections.
Validation study results for planar LSCs: • G f ,SC , as a function of length, L; • G f ,SC as a function of polar incidence angle, θ i and L; • PV edge spectra as a function of L.
Validation study results for wedge-shaped LSCs: • G f ,SC as a function of L; • G f ,SC as a function of θ i and L; • G f ,SC as a function of polar and azimuthal incidence angle, θ i and φ i.

Discussion of Validation Study Results for Planar LSCs
The first validation study for planar LSCs compares experimental and modeled data as a function of length under normally incident light. To determine an appropriate number of bundles per simulation, 50 simulations of 100,000 bundles were run to evaluate the distribution of G f ,SC for a 3-cm LSC. Figure   After establishing a relatively low margin of error at 100,000 bundles per simulation, predictions were produced for the three planar cases mentioned in Table 1 and shown in Figure 21. Figure 24 demonstrates good agreement between experimental and predicted , as a function of L. While the model increasingly under-predicts the experimental data over the lengths tested, the largest discrepancy is a 4.8% difference. As length in- After establishing a relatively low margin of error at 100,000 bundles per simulation, predictions were produced for the three planar cases mentioned in Table 1 and shown in Figure 21. Figure 24 demonstrates good agreement between experimental and predicted G f ,SC as a function of L. While the model increasingly under-predicts the experimental data over the lengths tested, the largest discrepancy is a 4.8% difference. As length increases, there is a noticeable improvement in the flux gain. The model predicts an increase in flux gain by a factor of 1.14 for 5 cm relative to 3 cm. Experimental data show an increase by a factor of 1.16. Using only the provided EQE was a conservative assumption, as discussed previously, which may explain the more conservative results. It should also be noted that the 5-cm LSC was modeled at H = 4.5 mm instead of 7 mm (the height of the solar cell), because it was observed not to be filled completely with silicone. After establishing a relatively low margin of error at 100,000 bundles per simulation, predictions were produced for the three planar cases mentioned in Table 1 and shown in Figure 21. Figure 24 demonstrates good agreement between experimental and predicted , as a function of L. While the model increasingly under-predicts the experimental data over the lengths tested, the largest discrepancy is a 4.8% difference. As length increases, there is a noticeable improvement in the flux gain. The model predicts an increase in flux gain by a factor of 1.14 for 5 cm relative to 3 cm. Experimental data show an increase by a factor of 1.16. Using only the provided EQE was a conservative assumption, as discussed previously, which may explain the more conservative results. It should also be noted that the 5-cm LSC was modeled at H = 4.5 mm instead of 7 mm (the height of the solar cell), because it was observed not to be filled completely with silicone.  Figure 25 shows predictions and experimental data as a function of θi and L, for all three different LSC lengths. As seen in Figure 25, , is steadily increasing until θi = 70°, before beginning to drop. This trend is observed in both experimental and simulation data. The absolute values of the predicted and measured , agree as well. Median percent difference is 4.5, 4.5, and 5.0% for L=3, 4, and 5 cm, respectively. For the 3-and 5-cm LSCs, there were relatively high differences of 56% and 28% for θi = 80°. The potential source for these large differences is discussed next.  Figure 25 shows predictions and experimental data as a function of θ i and L, for all three different LSC lengths. As seen in Figure 25, G f ,SC is steadily increasing until θ i = 70 • , before beginning to drop. This trend is observed in both experimental and simulation data. The absolute values of the predicted and measured G f ,SC agree as well. Median percent difference is 4.5, 4.5, and 5.0% for L=3, 4, and 5 cm, respectively. For the 3-and 5-cm LSCs, there were relatively high differences of 56% and 28% for θ i = 80 • . The potential source for these large differences is discussed next. For high θi, Fresnel's equations for reflectivity dictate that reflection losses on the top surface of the LSC begin to dominate and increase exponentially. The higher differences at a high angle of incidence indicate that differences in the texture of the top surfaces of the prototypes and relatively small discrepancies in the alignment of the LSCs beneath the simulator can be amplified for high θi. Additionally, the angular convergence of the light beam of the simulator was not confirmed independently, which could also explain a part of the error. Otherwise, the experimental fit is remarkable given the handcrafted nature of the prototypes, particularly for the 3-and 4-cm LSCs. With experimental alignment demonstrated as a function of L and θi, the next validation explores experimental vs. modeled edge spectra, shown in Figure 26 as a function of L.
Experimental edge spectra were found using the process outlined in [22]. Incident For high θ i , Fresnel's equations for reflectivity dictate that reflection losses on the top surface of the LSC begin to dominate and increase exponentially. The higher differences at a high angle of incidence indicate that differences in the texture of the top surfaces of the prototypes and relatively small discrepancies in the alignment of the LSCs beneath the simulator can be amplified for high θi. Additionally, the angular convergence of the light beam of the simulator was not confirmed independently, which could also explain a part of the error. Otherwise, the experimental fit is remarkable given the handcrafted nature of the prototypes, particularly for the 3-and 4-cm LSCs. With experimental alignment demonstrated as a function of L and θi, the next validation explores experimental vs. modeled edge spectra, shown in Figure 26 as a function of L.
simulator can be amplified for high θi. Additionally, the angular convergence of the light beam of the simulator was not confirmed independently, which could also explain a part of the error. Otherwise, the experimental fit is remarkable given the handcrafted nature of the prototypes, particularly for the 3-and 4-cm LSCs. With experimental alignment demonstrated as a function of L and θi, the next validation explores experimental vs. modeled edge spectra, shown in Figure 26 as a function of L.
Experimental edge spectra were found using the process outlined in [22]. Incident bundle wavelengths on the solar cell in the simulation were binned to plot the normalized intensity. For all edge spectra simulations, 2.5 million bundles were run for each length. The predicted spectra closely resemble the experimental spectra, as the dual peaks shown in the experimental data are found in the modeled data.  Experimental edge spectra were found using the process outlined in [22]. Incident bundle wavelengths on the solar cell in the simulation were binned to plot the normalized intensity. For all edge spectra simulations, 2.5 million bundles were run for each length. The predicted spectra closely resemble the experimental spectra, as the dual peaks shown in the experimental data are found in the modeled data.
From the data presented thus far, the model shows good agreement between predicted and experimentally measured G f ,SC and edge spectra. Observed, non-negligible differences are most likely due to imperfections in the experimental setup as they appear over a certain range of parameters when experimental imperfections are expected to have an increasingly important effect. Additionally, application of both an IQE and EQE could improve the experimental fit for the studies shown in Figures 24 and 25.

Discussion of Validation Study Results for Wedge-Shaped LSCs
The first validation study for wedge-shaped LSCs compares experimental and modeled data as a function of length under normally incident light. To determine an appropriate number of bundles per simulation, 50 simulations of 100,000 bundles were run to evaluate the distribution of G f ,SC for a 3-cm LSC. Similar to the planar LSC analysis, the variability in flux gain is sufficiently low at 100,000 bundles, as seen in Figure 27. On average, bundles fall 0.60% outside of the mean of all simulations, with a maximum error of 2.27%.
Predictions were produced for the three wedge-shaped cases mentioned in Table 1 and shown in Figure 21. Figure 28 shows the experimental and predicted G f ,SC as a function of L. The trends seen are similar between theoretical and experimental data. However, the model does over-predict the experimental data over the lengths tested, with a maximum difference of 23%. Additionally, while the model forecasts a decrease in G f ,SC with increasing length (3 cm outperforms 5 cm by a factor of 1.04), the decrease is less substantial in the experimental data (3 cm outperforms 5 cm by a factor of 1.02). Given the promising alignment of both the planar LSC data and the data seen next, it is likely that the discrepancy seen here is due to the handcrafted nature of the prototypes (more discussion to follow).
improve the experimental fit for the studies shown in Figures 24 and 25.

Discussion of Validation Study Results for Wedge-Shaped LSCs
The first validation study for wedge-shaped LSCs compares experimental and modeled data as a function of length under normally incident light. To determine an appropriate number of bundles per simulation, 50 simulations of 100,000 bundles were run to evaluate the distribution of , for a 3-cm LSC. Similar to the planar LSC analysis, the variability in flux gain is sufficiently low at 100,000 bundles, as seen in Figure 27. On average, bundles fall 0.60% outside of the mean of all simulations, with a maximum error of 2.27%. Predictions were produced for the three wedge-shaped cases mentioned in Table 1 and shown in Figure 21. Figure 28 shows the experimental and predicted , as a function of L. The trends seen are similar between theoretical and experimental data. However, the model does over-predict the experimental data over the lengths tested, with a maximum difference of 23%. Additionally, while the model forecasts a decrease in , with increasing length (3 cm outperforms 5 cm by a factor of 1.04), the decrease is less substantial in the experimental data (3 cm outperforms 5 cm by a factor of 1.02). Given the promising alignment of both the planar LSC data and the data seen next, it is likely that the discrepancy seen here is due to the handcrafted nature of the prototypes (more discussion to follow).   Predictions were produced for the three wedge-shaped cases mentioned in Table 1 and shown in Figure 21. Figure 28 shows the experimental and predicted , as a function of L. The trends seen are similar between theoretical and experimental data. However, the model does over-predict the experimental data over the lengths tested, with a maximum difference of 23%. Additionally, while the model forecasts a decrease in , with increasing length (3 cm outperforms 5 cm by a factor of 1.04), the decrease is less substantial in the experimental data (3 cm outperforms 5 cm by a factor of 1.02). Given the promising alignment of both the planar LSC data and the data seen next, it is likely that the discrepancy seen here is due to the handcrafted nature of the prototypes (more discussion to follow).   Figure 29 compares experimental and modeled data for wedge-shaped LSCs as a function of length and θ i . As seen in Figure 29, G f ,SC rapidly increases for θ i = 0-30 • before dropping off around θ i = 60-80 • . This trend is observed in both experimental and simulated data. The absolute values of the predicted and measured G f ,SC agree as well to an extent, though the alignment is not as accurate as it was for the planar studies. The model fits the data well for the majority of cases for the 3-and 4-cm wedge-shaped LSCs, with a median percent difference of 7.3 and 6.7%, respectively. However, for the 5-cm LSC, the median difference increases to 21.5%, indicating discrepancies in the model and the fabricated prototype. The differences found for low θ i and in the 5-cm LSC are discussed next.  Figure 29, , rapidly increases for θi = 0-30° before dropping off around θi = 60-80°. This trend is observed in both experimental and simulated data. The absolute values of the predicted and measured , agree as well to an extent, though the alignment is not as accurate as it was for the planar studies. The model fits the data well for the majority of cases for the 3-and 4-cm wedge-shaped LSCs, with a median percent difference of 7.3 and 6.7%, respectively. However, for the 5-cm LSC, the median difference increases to 21.5%, indicating discrepancies in the model and the fabricated prototype. The differences found for low θi and in the 5-cm LSC are discussed next. Each wedge-shaped prototype had a mirror gap to take advantage of direct reflection nearest the solar cell, and slight differences in the modeled and actual slope of the angled surface of the LSC appeared to have an outsized impact on , for low θi. The largest discrepancies exist in the modeled results for the 3-and 4-cm wedge-shaped LSCs for θi = 0°, as has been detailed in the previous study. The magnitude of the discrepancies continues to reduce through θi = 50°, where the percent difference drops to 1.8 and 0.7% for the Each wedge-shaped prototype had a mirror gap to take advantage of direct reflection nearest the solar cell, and slight differences in the modeled and actual slope of the angled surface of the LSC appeared to have an outsized impact on G f ,SC for low θ i . The largest discrepancies exist in the modeled results for the 3-and 4-cm wedge-shaped LSCs for θ i = 0 • , as has been detailed in the previous study. The magnitude of the discrepancies continues to reduce through θ i = 50 • , where the percent difference drops to 1.8 and 0.7% for the 3-and 4-cm wedge-shaped LSCs, respectively. Bundles are less likely to immediately interact with the mirror gap at higher θ i , which downplays the influence of the angle of the bottom surface in these cases. In the planar case, the deposition of a phosphor film across the entire bottom surface minimizes the influence of discrepancies in the texture and efficiency of the mirror as well.
At low values of θ i , the 5-cm LSC experiences similar differences relative to the other devices, indicating that the causes of the additional discrepancies at increasing θ i are distinct. Visual inspection of this prototype revealed that it was only partially filled with silicone, and the phosphor film protruded slightly towards the short edge of the LSC. This was the same reason that the 5-cm planar LSC was modeled at a lower height, but precisely modeling the wedge-shaped dimensions would not be as straightforward. Therefore, the modeled height remained at 7 mm and the full length of the LSC was used. This clearly had a significant impact upon performance as, in fact, the model for the 4-cm LSC is a better fit for the 5-cm experimental data for θ i > 10 • . This makes sense, as partial filling of silicone reduces the effective length of a wedge-shaped LSC.
The final validation study compares the 3-cm wedge-shaped LSC as a function of both θ i and φ i , as shown in Figure 30. This is an important study, because if an LSC were mounted outdoors, it would be a rare case that φ i or θ i would truly be zero, as discussed in [17]. Using the experimental setup described in [17], θ i and φ i were incremented in steps of 15 • with φ i up to 90 • , and θ i up to 75 • . While this setup does not achieve the same level of fidelity as the previous validation studies shown, it is apparent that the overall trends are similar, with the flux gain peaking at moderate θ i and steadily reducing for increasing φ i . As described in [17], slight discrepancies in the positioning of the rotating stage used to produce θ i and φ i impacted the consistency of these results relative to the data taken as a function of θ i alone. This could also explain the less accurate alignment seen in Figure 30 relative to prior simulations.

Conclusions
An open-source model for LSCs has been described in detail in this paper. The associated code is available on Github [24] and the journal supplementary material section. While there are many successful MC models that have shown experimental alignment for a variety of LSCs, the architecture of this model is distinct, providing capabilities not currently achieved by other models. Specifically, this model can be used to investigate a variety of 3-D geometries and incorporate the scattering effects of luminescent species. In order to accomplish seamless investigation of 3-D geometries, the code has been separated into four main classes of objects. A bundle tracks bundle position (x, y, z), direction (θ, ϕ), wavelength (λ), number of photons ( ), and distances ( , , , , , ) as it moves from

Conclusions
An open-source model for LSCs has been described in detail in this paper. The associated code is available on Github [24] and the journal supplementary material section. While there are many successful MC models that have shown experimental alignment for a variety of LSCs, the architecture of this model is distinct, providing capabilities not currently achieved by other models. Specifically, this model can be used to investigate a variety of 3-D geometries and incorporate the scattering effects of luminescent species. In order to accomplish seamless investigation of 3-D geometries, the code has been separated into four main classes of objects. A bundle tracks bundle position (x, y, z), direction (θ, φ), wavelength (λ), number of photons (N λ ), and distances (l m , l m,t , l p , l p,t ) as it moves from volume to volume, interacting with boundary and particle objects. A volume specifies the attributes of a particular region in space, housing a set of boundary objects. A boundary specifies the attributes of the facets of a volume and constitutes a set of coordinates on a plane. A particle object is assigned to a particle volume and enables bundle interaction with a luminescent species. These base classes represent a simple framework that can be easily built upon by other researchers and engineers to model their own unique LSCs. Additionally, unlike many other MC models, this model incorporates the novel approach described in [39] to effectively model the scattering effect of luminescent phosphors alongside absorption and emission effects.
To assess the validity of this model, three experimental validation studies were performed for both planar and wedge-shaped LSCs. These studies explored the breadth of applicability of this model to the experimental results presented in [17] and [22]. For planar LSCs, G f ,SC was first studied as a function of length only, and the model achieved experimental alignment within 4.8% difference. Exploring G f ,SC as a function of both θ i and L, 19/27 cases achieved alignment within 5.1%, and 24/27 cases achieved alignment within 7.8%, with three discrepancies where θ i > 60 • . Following this, the third planar study showed that the modeled edge spectra closely resembled the experimental edge spectra for all cases.
For wedge-shaped LSCs, G f ,SC was first studied as a function of length only, and the model continued to predict the experimental data, although the discrepancy increased to 23% for L = 3 cm. Exploring G f ,SC as a function of both θ i and L, 8/27 cases achieved alignment within 4.2%, and 16/27 cases achieved alignment within 14.9% difference. Of the eleven cases with G f ,SC discrepancy larger than 14.9%, seven cases were found for the 5-cm LSC. Upon further examination, the 5-cm wedge-shaped LSC was only partially filled with silicone, which is most likely the source of the discrepancy. It should be noted that while the 5-cm planar LSC was not filled completely either, the 5-cm planar LSC was effectively modeled at H = 4.5 mm, which improved the alignment of experimental data and prediction. Last, G f ,SC was studied as a function of θ i and φ i to evaluate the broad range of possible incidence angles that could be found in a realistic environment. The theoretical trends agreed with the experimental trends, although there were discrepancies, most likely due to challenges in aligning the setup for varying azimuth angle measurements.
In conclusion, the model presented adequately aligns with the experimental data over a variety of studies, indicating its applicability for phosphor-based LSCs in a variety of orientations and geometric configurations. The versatility of this model and the opensource code provided are envisioned to enable more vigorous design studies for LSC-based BIPV.