Home Examples Screenshots User manual Bluesky logo
OghmaNano Simulate organic/Perovskite Solar Cells, OFETs, and OLEDs DOWNLOAD

The parameter scan window

The most straightforward way to systematically vary a simulation parameter is to use the scan window. In this example we are going to systematically change the mobility of the active layer of a PM6:Y6 solar cell, you can find this example in the example simulations under Scripting and fitting/Scan demo (PM6:Y6 OPV). Once you have located this simulation and opened it, you then need to bring up the parameter scan window, this can be done by clicking on the Parameter scan icon in the Automation ribbon (see ??). Then make a new scan by clicking on the new scan button (1) (In the example simulation this has already been done for you). Open the new scan by double clicking on the icon representing the scan (2), see ??. This will bring up the scan window, see ??.

OghmaNano parameter scan icon
Parameter scan tool icon in OghmaNano.

Changing one material parameter

Once the scan window has opened, make a new scan line by clicking on the the plus icon (1) in figure 17.1, then select this line so that it is highlighted (2), then click on the three dots (3) to select which parameter you want to scan. Again if you are using the example simulation this will already have been done for you.

OghmaNano new parameter scan window
The new parameter scan window in OghmaNano.
OghmaNano add scan line window
Step 3: Add a scan line to the scan.

In this example we will be selecting the electron mobility of a PM6:Y6 solar cell. Do this by navigating to epitaxy\(\rightarrow\) PM6:Y6\(\rightarrow\) Drift diffusion\(\rightarrow\) Electron mobility y. Highlight the parameter and then click OK. This should then appear in the scan line. The meaning of epitaxy\(\rightarrow\) PM6:Y6\(\rightarrow\) Drift diffusion\(\rightarrow\)Electron mobility y will now be explained below:

OghmaNano parameter scan selection window
Parameter scan selection window in OghmaNano.

Next enter the values of mobility which you want to scan over in this case we will be entering 1e-5 1-6 1e-7 1e-8 1e-9 (see figure 17.2 1) then click run scan (see figure 17.2 2). OghmaNano will run one simulation on each core of your computer until all the simulations are finished.

OghmaNano parameter scan input values window
Step 6: Enter the input values of mobility (or other parameters) you want to scan over, then run the simulations.

To view the simulation results click on the output tab this will bring up the simulation outputs, see figure 17.3. You can see that a directory has been created for each variable that we scanned over so 1e-5, 1e-6, 1e-7, 1e-8 and 1e-9. If you look inside each directory it will be an exact copy of the base simulation directory. If you double click on the files with multi-colored JV curves, see the red box in figure 17.3. OghmaNano will automaticity plot all the curves from each simulation in one graph, see figure 17.4.

OghmaNano parameter scan output tab
Step 7: The Output tab showing the five simulation directories and the multicolored plot files.
OghmaNano JV curve from mobility scan
Step 8: The result of the mobility scan.

Duplicating parameters - changing the thickness of the active layer

Very often one wants to change a parameter, then set another parameter equal to the parameter which was changed. An example of this is one may want to change electron and hole mobilities together when simulating a device with symmetric mobilities. This can be done using the duplicate function of the scan window as seen in figure 17.5. In this example we tackle a slightly more tricky problem than changing mobilities together we are going to change the physical width of the active layer and at the same time adjust the electrical mesh to make it match. As discussed in section 8 the width of the active layer must always match the width of the electrical mesh. When you change the layer width by hand in the layer editor OghmaNano updates the width of the electrical mesh for you. But when scripting the model it won’t do this update for you. Therefore in the example below we are going to set the width of the active layer by scanning over:

epitaxy\(\rightarrow\)PM6:Y6\(\rightarrow\)dy of the object

Then we are going to add another line under and under parameter to scan select

mesh\(\rightarrow\)mesh_y\(\rightarrow\)segment0\(\rightarrow\)len

and set it to

epitaxy\(\rightarrow\)PM6:Y6\(\rightarrow\)dy of the object

under the operation dropdown box. You will see the word duplicate appear under values.

If you now run the simulation "epitaxy\(\rightarrow\)PM6:Y6\(\rightarrow\)dy of the object" will be changed and "mesh\(\rightarrow\)mesh_y\(\rightarrow\)segment0\(\rightarrow\)len" will follow it.

OghmaNano duplicating material parameters
Duplicating material parameters.

Side note: Device with multiple active layers

The sum of the active layer thickness (as defined in the layer editor) MUST equal the electrical mesh thickness (more about the mesh in section 8). If for example one had three active layers TiO2 (100 nm)/Perovskite (200 nm)/Spiro (100 nm) with a total width of 400 nm. The total mesh length must be 400 nm as well. Therefore were one want to change the thickness of the perovskite layer as in 17.5 one would have to break the electrical mesh up into three sections and make sure you were updating the mesh segment referring to the perovskite layer alone.

Setting constants

Often when running a parameter scan one wants to set a constant value, this can be done using the "constant" option in the Operations dropdown menu. See figure ??

OghmaNano constant mobility scan result
The result of the mobility scan.

The equivalent of loops

Often when scanning over a parameter range one may want to simulate so many parameters that it is not practical to type them in. In this case OghmaNano has the equivalent of a loop. So for example if one wanted to change a value from 100 to 400 in steps of 1, one could type


[100 400 1]

Limitations of the scan window

Although the scan window is convenient in that it provides a quick way to scan simulation parameters, it is by nature rather limited in terms of flexibility. If you want to do complex scans were multiple parameters are changed or to programmatically collect data from each simulation then you can use the or matlab interfaces to OghmaNano. These are described in the latter sections.

πŸ‘‰ Next step: Now continue to Multiparameter Optimization, where you can learn how to optimize several device parameters simultaneously.