OptiSim - Optical simulation: comprehensive and easy

What is OptiSim?

OptiSim is a scientific simulation tool with graphic user interface written in Python / PyQt. It allows calculation of the optical behavior of single or multiple layers of thin or thick films in one dimension. The definition of each layer consists of name, thickness, complex refractive index, and, if regarded, carrier collection function.

The calculation model accounts for multiple reflections, interference effects, roughness, scattering, and gradients in optical constants.

The simulations gives information about how much light is reflected, transmitted and also how much light is absorbed at any point within the structure.

OptiSim is particularly developed to investigate thin-film solar cells. Thus, it calculates quantum efficiency spectra, generation rate, layerwise absorption, and short circuit current and loss ratios.

However, OptiSim is designed to deal with any one-dimensional optical thin or thick layer stack issue. Its intuitive handling, fast calculation algorithms, extensive plotting options, and comprehensive structure and result treatment makes it the perfect tool for our research.



  • Generalized transfer matrix method for calculating coherent light propagation in thin films or incoherent light in optically thick layers.
  • Easy stack modification (move, delete, create layers).
  • Infinite number of layers.
  • Variable angle of incidence.
  • Choose between parallel or perpendicular polarization
  • Specify an illumination spectrum from list or user-defined.
  • Set complex refractive index as either:
    • From an editable material database
    • From specified dielectric function
    • From file
    • Constant
    • From file with absorption coefficient (set refractive index constant)
    • Graded with any number of sampling data from file with graded bandgap (two options for extrapolation). The grading function is defined by the user (constant, linear, analytical).
  • Optional calculation of optics according to Lambert-Beer attenuation law for simple calculation without interferences and multiple reflections (external reflection file could be accounted for).
  • Calculate the ellipsometric angles Ψ and Δ for coherent thin film stacks
  • Calculate layerwise optics to get individual absorption in each layer.
  • Calculate local field intensity (total and spectrally resolved) to see light enhancements or check for optical spacers.
  • Calculate local generation rate (total and spectrally resolved) to get minority carrier generation according to chosen spectrum (could be exported in SCAPS format).
  • Calculates the internal and external quantum efficiency spectra according to optical generation and electrical collection.
  • Definition of minority carrier collection probability as:
    • Constant
    • Linear
    • User defined function
    • Collection function according to M. Green (JAP 81 1997 and Prog. PV Res. Appl. 17 2009) including space charge region width, diffusion length, surface recombination velocity, effective field
  • Allows different kind of depth resolution (meshing) as either constant number, constant step or automatic (interface refinement).
  • Allows user-specified spectral range for calculations.
  • Roughness and interface layers could be considered by effective medium approximation with different EMA models (Bruggemann, Maxwel-Garnett, mean).
  • Roughness could be accounted by modified Fresnel-coefficients.
  • Scattering (due to roughness) and hence partially coherent, incoherent light propagation is treated by defining Haze values for reflection/transmission. The incoherent light is computed by raytracing approach (user-defined max. number of iterations/min. intensity).
  • Batch-simulation: easy performance of parameter variations (thickness, complex refractive index, angle, …)
  • Fitting: allows fitting of individual layer thickness or diffusion length to measured reflection, transmission or quantum efficiency spectra.
  • Color calculation of simulated reflection or transmission spectra at various illumination according to CIE standard.
  • From any complex refractive index (absorption coefficient) the bandgap can be determined by different Tauc-plots for (allowed, forbidden) direct, indirect semiconductors.
  • The definition of the dielectric function of a layer includes the following oscillator models: Gaussian, Drude, Lorentz, Tauc-Lorentz, Cody-Lorentz and ε∞.
  • Measured references can be included and plotted together with the simulation results.
  • Simulation results are listed in a table with user-defined view of scalar values (e.g., reflectance [%], transmission [mA/cm²], Jsc [mA/cm²], calculation time [s], collection layerwise [mA/cm²], …).
  • Easy workflow since each simulation result is listed and can be reopened or plotted with others.
  • Versatile plotting option: Each spectrum (R,T, QE, Psi) or profile (intensity, generation) can be overlaid with others and also with any previous simulation result (just select from result list).
  • Each plot is a window in the plot area and includes the curves as plot and as data list with option to save this as file.
  • Each plot can be modified (axis, titles, colors, symbols, …) and saved as figure in publication quality.
  • All layer, stack, and setup information can be saved in one file and later reopened.
  • Each simulation generates a log-file to check for definitions, calculations, exceptions, or errors.
  • Movable dock windows (definition window, result window) for efficient use of two monitors.
  • Movable tool bars.


How to get it

OptiSim is free and open source under GNU GENERAL PUBLIC LICENSE V3. Hence, the source code is available on Github ( To run this, the following python packages are required: PyQt5, PyQt, Numpy, Scipy, Matplotlib, Colorpy, all for Python 3

For an executable for running the program on Windows (.exe) please contact Michael Richter with providing information about your research field, institution, and country.

When publishing research results gained from or analyzed with help of OptiSim at conferences, in journal papers or in other type of contributions please cite a reference to one of the following publications:

M. Richter, M. S. Hammer, T. Sonnet, J. Parisi, Bandgap extraction from quantum efficiency spectra of Cu(In,Ga)Se2 solar cells with varied grading profile and diffusion length, Thin Solid Films in press (2016), DOI 10.1016/j.tsf.2016.08.022.

Webma9gsterhyk ( (Stand: 07.11.2019)