Transfer matrix model
In general the transfer matrix method is good for simulating sandwich type structures where light is incident normal to the surface of a device. Examples of such devices are solar cells, optical filters or sensors. This method is good for understanding optical absorption, reflection and transition in these structures. There are other more complex methods which can accomplish the same task such as FDTD, however general speaking the transfer matrix model will be orders of magnitude faster than these methods.
The user interface
The transfer matrix simulation tool can be reached from the Optical ribbon in the main window by selecting Transfer matrix. If you click Run optical simulation (see ??) the distribution of light within the structure will be calculated as a function of position and wavelength. You can see from the top of the figure that there are various simulation modes. The full transfer matrix method is selected by selecting Transfer matrix, this will do full optical simulation. The other buttons represent other simplified approximations to the transfer matrix method that allow the user to explore more simple charge carrier generation profiles. From the left the push buttons in Figure ?? represent the following optical models:




- Transfer matrix: A full transfer matrix simulation that accounts for multiple reflections at interfaces and optical losses within the structure. In effect, this solves the 1D wave equation and provides an accurate (and recommended) optical model. See Section ??. If you are unsure which model to use, choose this one.
- Exponential profile: A simple model where light intensity decays exponentially according to: \[I = I_{0} e^{-\alpha x} \label{efield2}\] Transmission between layers is given by: \[T = 1 - \frac{n_1 - n_0}{n_1 + n_0} \label{equ:transfermatrixreflection}\] Reflections are not included.
- Flat profile: Assumes uniform light intensity within each layer, decreasing only at material interfaces according to Equation ??. Useful when exploring charge-carrier dynamics without the complication of a non-uniform generation profile.
- From file: Allows you to import generation profiles from an external file, typically produced by more advanced optical solvers such as FDTD.
- Constant value: Lets you manually set the charge-carrier generation rate for each layer (via the menu next to the simulation button). This is often used to study device physics or performance trends without applying a realistic optical profile — for example, to plot generation rate versus \(V_{oc}\).
The optical simulation window has various tabs which can be used to explore how light interacts with the device. These can be seen in figure ??. The the top left image shows the photon density within the device, the image on the right shows the total photon density within the layers of the device. Notice how the reflection of the light of various layers causes interference patterns. The image on the bottom left shows the configuration of the optical model. A key parameter that can be seen in this window is the Photon efficiency, this parameter determines how many electron-hole pairs each photon that is absorbed within the active layer generates. In organic devices it accounts for geminate recombination, in other types of devices it should be set close to 1.0. Bottom right shows the same figure as in the top right of the figure, except by right clicking and playing with the menu options the figure has been converted into band diagram. This can be useful for generating band diagram figures for papers.

Running the transfer matrix simulation
As described above, the transfer matrix simulation can be run by directly clicking on the play button. However when running an electrical simulation the optical model is run automaticity without any user interaction. The only difference between the two ways of calling the optical simulation is that when the user directly calls the optical model more output files are written to disk, however when the optical simulation is run as part of an electrical simulation the number of files and output are limited as to not slow the electrical simulation.
Output files
After having run an optical simulation an overview of the results can be seen in the optical simulation window (Figure ??) as described above. However more in depth information can be obtained from the Output tab of the main window as shown in Figure ??.

optical_output
and optical_snapshots
are usually only generated when the optical simulation is run directly,
and are not written when the optical solver is called as part of a coupled electrical simulation.
In Figure ?? you can see two icons one called Optical output and the other called optical_snapshots (in the figure it reads "ptica_output" due to the text being hidden). If you double click on Optical output it will bring up figure ??. If you double click on optical_snapshots it will bring up Figure ??. The optical snapshot window allows the user to view photon density, absorbed photons and electric field of the light. The information is displayed per wavelength so a detailed overview of device performance can be gained.

The optical_snapshots directory in depth
The optical_snapshots folder was described above and when accessed through the graphical interface allows the user to access photon density, absorbed photons and electric field of the light as a function of wavelength. However, it is simply a normal directory and the user can access it through a file explorer. If you open the directory using a tool such as windows explorer you will see something comparable to what is shown on the left of Figure ??. You can see folders numbered from 0 to 12 each folder represents a simulated wavelength. If you open a directory, say number 0, you will be presented with the files shown in the right hand of figure ??. These files contain the following information:
File name | Description |
---|---|
alpha.csv |
y-position vs. absorption at a given wavelength |
data.json |
JSON file containing the wavelength value |
En.csv |
y-position (m) vs. electric field, negative component (V/m) at a given wavelength |
Ep.csv |
y-position (m) vs. electric field, positive component (V/m) at a given wavelength |
G.csv |
y-position (m) vs. generation rate (\(m^{-3}s^{-1}\)) |
n.csv |
y-position (m) vs. real part of the refractive index n (au) at a given wavelength |
photons.csv |
y-position (m) vs. photon density (\(m^{-3}\)) at a given wavelength |
photons_abs.csv |
y-position (m) vs. photons absorbed (\(m^{-3}s^{-1}\)) at a given wavelength |
![]() |
![]() |
These files are simply plain text, if you open one it will look like ??. The first line of this file contains some information about the content of the file to help with plotting. The second line tells the user what the x and y axis contain then the following lines contain the data.

photons_abs.csv
.
The optical_output folder in depth
While the optical_snapshots directory allows data to be plotted per simulated wavelength, the optical_output gives 2D maps of wavelength v.s. position for various simulation parameters. The content of the directory is shown in figure ??.

optical_output
directory.
The files shown in Figure ?? are described in table ??.
File name | Description | Plot type |
---|---|---|
data.json |
Miscellaneous simulation information in JSON format | 1D |
G_y.csv |
y-position (m) vs. charge generation rate (\(m^{-3} s^{-1}\)) | 2D |
G_zxy.csv |
zxy-position (m) vs. charge generation rate (\(m^{-3} s^{-1}\)) | 2D |
Htot_zxy.csv |
zxy-position (m) vs. optical heat generation (\(W m^{-3}\)) | 2D |
light_src_id_xxx.csv |
wavelength (m) vs. light intensity from a source (\(W/m\)) | 2D |
photons_abs_yl.csv |
wavelength (m) vs. y-position (m) vs. photons absorbed (\(m^{-3} s^{-1}\)) | 2D |
photons_yl.csv |
wavelength (m) vs. y-position (m) vs. photon density (\(m^{-3} s^{-1}\)) | 2D |
photons_yl_norm.csv |
wavelength (m) vs. y-position (m) vs. normalized photon density (au) | 2D |
reflect.csv |
wavelength (m) vs. reflected light from the stack | 1D |
transmit.csv |
wavelength (m) vs. transmitted light through the stack | 1D |
Simulating optically thick layers (incoherent layers)
Typical optoelectronic devices have layer thicknesses between 10 nm and 100 nm. However often these devices are deposited on top of substrates that are between 10 mm and 1 cm thick and often one wants to not only simulate the device but also the impact of the substrate. Thus to perform this type of simulation one will need a simulation tool that covers length scales from the nm top the meter scale. There are three problems with doing this:
- Problem 1: Simulating different length scales – Computers struggle with numbers that are simultaneously very large and very small. This often leads to rounding or numerical errors. See Section ?? for more details.
- Problem 2: The wavelength of light – Since the wavelength of light is far smaller than 1 cm, simulating a centimetre-thick layer requires an impractically large number of mesh points to correctly capture constructive and destructive interference.
- Problem 3: Loss of coherence – The transfer matrix model assumes light enters from a single direction at normal incidence, and that materials are defect-free. In thick layers these assumptions break down, and the light field is no longer coherent.
To get around these issues OghmaNano uses two strategies. The first is to give the user the option to only consider absorption and neglect phase changes within a layer, to form a so called incoherent layer (this solves problem 2 and 3). This can be selected from the layer editor in the main window see Figure ??. Notice in the column entitled Solve optical problem, the first two layers (air and glass) have Yes - k selected, and the other layers have Yes - n/k selected. This means that in layers with Yes - n/k phase changes of the light will be considered but in the layers marked Yes - k only attenuation losses will be accounted for and thus it can be thought of as an incoherent layer.

To get around the problem of having to simulate different length scales (problem 1) OghmaNano allows the user to set an effective optical depth for any layer. So one can for example setup a layer in the layer editor of width 100 nm, but set it’s effective depth to a much larger value such as 1 m. This works by multiplying the absorption coefficient of the layer by the ratio:
\[\alpha_{effective}(\lambda)=\alpha(\lambda) \frac{L_{effective}}{L_{simulation}} \label{effective_depth}\]
Where \(\alpha_{effective}\) is the effective absorption used in the simulation, \(\alpha\) is the true value of absorption for the material, \(L_{effective}\) is the effective layer thickness (say 1 m or 1 km), and \(L_{simulation}\) is the thickness of the layer in the simulation window. Not only does this approach reduce numerical issues (problem 1) but it also allows the user to plot meaningful graphs of the simulation results, without most of the plot taken up by the substrate and the device only appearing as a tiny slither on the edge of the graph.
If you want to use this feature, then set up a device structure as shown in ?? then in the transfer matrix window click the Optical Thickness button (top right of Figure ??). Then the window ?? will appear. In this window you can set the effective optical thickness of any layer. In this case we have set the glass to be 1 meter thick.

