SIMsalabim
A 1D drift-diffusion simulator for semiconductor devices (LEDs, solar cells, diodes, organics, perovskites)
Install / Use
/learn @kostergroup/SIMsalabimREADME
SIMsalabim Project
SIMsalabim: A 1D drift-diffusion simulator for semiconductor devices (LEDs, solar cells, diodes, organics, perovskites). It consists of two programs that share most of their code: SimSS (simulates steady-state), and ZimT (zimulates transients).
Table of Contents
- Introduction
- Updating to latest version
- Quickstart guide
- Instructional videos
- Running SIMsalabim
- How to cite
- Copyright and license
- How to contribute
- Scientific publications based on SIMsalabim
Introduction
SimSS and ZimT can be used to simulate current-voltage (JV) characteristics of semiconductor devices. This includes the effects of generation, recombination and trapping of electrons and holes, the effect of ions and dopants, and self-consistently solves the electric field that results from all charged species. It is up to the user to make sure that the physical model that underlies SIMsalabim is applicable (see Manual for more details).
The routines that make up this project are used in two different guises: SimSS and ZimT. The former is a steady-state version and is the 'main' code. The latter, ZimT, can be used to simulate transients. The project folder is structured as follows:
- Docs: this folder contains the manual, developer guidelines, and a log of all changes to the code
- SimSS: contains the steady-state version of this software
- Tests: contains a number of tests to assess the functioning of the codes (SimSS and ZimT)
- Units: this is where the heart of the code resides. These units are shared between SimSS and ZimT
- ZimT: the transient equivalent of SimSS
SIMsalabim is also available with a user interface at www.simsalabim-online.com.
Updating to latest version
We strongly recommend you always update to the latest available version as updates typically include bug fixes, improved stability, and/or features. Updating to another version requires that the input files be changed. To facilitate this, we provide an updater in the Tools folder (see Updater). The Updater takes the parameter files of version 4.19 or newer and generates the input files for the latest version. By default, the parameter files for 4.xx versions are called device_parameters.txt, while those of version 5.xx are called simulation_setup.txt. To use it, simply ensure that the Updater and the input files are in the same folder. Then, run (on Linux)
./Updater simulation_setup.txt
or
Updater.exe simulation_setup.txt
on Windows. The Updater will prompt you to ensure it has all the necessary information to update the parameter files such that they work with the latest version. When using the Updater on a 4.xx parameter file, the Updater will rename the file as simulation_setup.txt. The Updater has a couple of options for advanced users or scripting. In order to access those, simply run the Updater with the -h option.
Quickstart guide
There are two ways to get SimSS or ZimT running on your machine:
While using the pre-compiled binaries is easiest, they will not work on every machine. If they do not work follow the instructions for compiling SIMsalabim.
Pre-compiled binaries
SimSS and ZimT come as pre-compiled binaries for WIN or Linux (64 bits), see releases. This avoids having to download and install the FPC compiler and compiling the code which is described below. There is no guarantee that these will work, but it is worth a try. Simply copy the binary to the main SimSS/ZimT folder. The Linux one might require a change of permissions to run, something like:
<pre><code> chmod +x simss </code></pre>Compiling SIMsalabim
There are 3 steps to complete to run SimSS or ZimT for the first time:
- Install the "Free Pascal" compiler.
- Compile SimSS (or ZimT).
- Run SimSS (or ZimT).
SimSS and ZimT should compile and run on any platform supported by the "Free Pascal" compiler. We provide detailed instructions for installing both the compiler and running the code for Windows and Linux (Ubuntu). For any other platform, please install the compiler (version 3.2.0 or newer) following the instructions from https://www.freepascal.org/. Steps 2 and 3 (compile and run) should be similar to the Ubuntu and Windows steps outlined below.
Below are the instructions for performing these steps on Ubuntu (or any other Debian based Linux distribution) and Windows.
Ubuntu (Linux) guide
Navigate to the SimSS or ZimT folder, where you can find simss.pas or zimt.pas. This example assumes you want to compile SimSS, but you can replace simss with zimt in the commands and run from the ZimT folder to compile and run ZimT.
Ubuntu 20.10 or newer: Steps:
- Open a terminal in the SimSS folder
- run the following commands to perform step 1, 2, and 3 (install, compile, run):
sudo apt install fpc
fpc simss
./simss
Ubuntu 20.04 or older: We need a relatively recent version of the Pascal compiler (v 3.2.0 or higher). Therefore, manual installation of the compiler is required on Ubuntu 20.04 or older. Steps:
- Download the relevant version of the compiler from https://www.freepascal.org/
- Install the compiler. This is done by running the installation script that can be found in the downloaded archive. While it can be installed without root privilege, the compiler should be manually added to path making installation a bit more tricky. To install as root run the command:
sudo ./install.sh. - Open a terminal in the SimSS folder
- run the following commands to perform step 2 and 3 (compile and run):
fpc simss
./simss
Installing on other Linux distributions: Most package managers for other Linux distributions ship the compiler package in a recent enough version (version 3.2.0 or newer of package fpc), so it suffices to exchange the apt install command with another package manager's equivalent.
Windows guide
Navigate to the SimSS or ZimT folder, where you can find simss.pas or zimt.pas. This example assumes you want to compile SimSS, but you can replace simss with zimt in the commands and run from the ZimT folder to compile and run ZimT.
Steps:
- Download and install fpc from https://www.freepascal.org/ (SimSS and ZimT require version 3.2.0 or newer)
- Open a command prompt or powershell instance in the SimSS folder (for example by opening the folder in explorer, pressing <kbd>alt</kbd>+<kbd>D</kbd> to select the location bar, typing 'cmd' and pressing <kbd>enter</kbd>).
- run the following commands to perform step 2 and 3 (compile, run):
fpc simss
simss.exe
Alternative:
- Install Windows subsystem for Linux.
- Follow the Ubuntu instructions above.
Miscellaneous
Warning message You may see this warning message when compiling the codes: /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? Just ignore this.
Editing the code You'll probably want to use (install?) some form of integrated development environment (IDE). Most modern IDE's include syntax highlighting for the Pascal language. Popular IDEs include Lazarus, Geany, and Visual studio code (requires extension to perform syntax highlighting for pascal). Some guidelines for extending the code can be found in Docs/Developer_guidelines.md.
Instructional videos
In order to help new users to get the most out of SimSS/ZimT, we have recorded a few instructional videos:
Please note that at the time of recording SimSS was called SIMsalabim, so the project name and the name of one of the programs was the same.
Running SimSS or ZimT
- all parameters are specified in separate file (by default: simulation_setup.txt) (in ZimT an additional time-voltage-generation (tVG) file is present to indicate what time, generation, and voltage at every simulation step).
- on Linux run SimSS/ZimT by entering in the terminal from the folder where the compiled program is located and run using
or
<pre><code> ./zimt </code></pre>on windows:
<pre><code> simss.exe </code></pre>or
<pre><code> zimt.exe </code></pre>Alternatively, the programs can be double clicked in the file manager on both Windows and Linux to run.
- all parameters listed in simulation_setup.txt can also be changed via the command line. This will override the respective parameter value in simulation_setup.txt. Simply add the parameter name and value to the command line after a dash (-). Example: change of surface recombination of electrons at the left electrode (S_n_L) and JV output file (JV_file):
- any parameters specific to a layer can also be changed via the command line (again overriding the value in the file). For example, if you want to change the electron mobility (mu_n) of the second layer (l2), then use:
- multiple output files will be generated (see simulation_setup.txt) and log file.
- Other remarks
- in general, input files and the log file have extension .txt, whereas output files that can be used for plotting (J-V curves, for example) have extension .dat.
- all changes are shown and commented on in the file Docs/Change_log.txt. Here we document not just the changes, but also explain and motivate some of the choices in naming, physical models, etc.
How to cite
The open-sour
