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

Shape database

All physical objects within a simulation are shapes. For example the following things are all shapes; a layer of a solar cell; a layer of an OLED; a lens; a complex photonic crystal structure; contact stripe on an OFET; the complex hexagonal contact on a large area device (see figure 1.1 for more examples). These shapes are defined using triangular meshes for example a box which is used to define layers of solar cells, and layers of LEDs is defined using 12 triangles, two for each side. This box structure can be seen in figure 15.11.

the box shape.

Shapes are stored in the shape database, this can be accessed via the database ribbon and clicking on the Shapes icon, see figure 15.12. By clicking on the shape database icon the shape database window can be brought up see figure 15.13.

Opening the shape database
The shape database window

Try opening some of the shapes and have a look at them. You will get a window much like that shown in figure 15.14. Figure 15.14 shows a honeycomb contact structure of a solar cell. On the left of the window is the 3D shape, and on the right of the window is the 2D image which was used to generate it. Overlaid on the 2D image is a zx projection of the 3D mesh. The process of generating a shape involves first defining a 2D png image which you want to turn into a shape, in this case the 2D image is a series of hexagons and a bar at the top. This image is then converted into a triangular mesh using a discretization algorithm.

An example of a shape generated from a 2D png image. The 3D shape representing a hexagonal contact from a solar cell is on the left of the figure while the original 2D image is on the right.

Now try opening the shape morphology/1 and you should see a window such as the one shown in figure 15.16, in the file ribbon find the icon which says show mesh. Try toggling it of and on, you will see the 2D mesh become hidden and then visible again. This example is a simulated bulk heterojunction morphology, but you can turn any 2D image into a shape by using the load new image button in the file ribbon. Try opening the mesh editor by clicking on Edit Mesh the file ribbon, you should get a window looking like figure 15.17. This configure window has three main options x-triangles, y-triangles and method. The values in x-triangles, y-triangles determine the maximum number of triangles used to discretize the image on the x and y axis. Try reducing the numbers to 40 then click on Build mesh in the file ribbon.

Clockwise from the top left; The imported absorption sepctrum; The basic material parameters; The electrical parameters; and the Thermal parameters. Clockwise from the top left; The imported absorption sepctrum; The basic material parameters; The electrical parameters; and the Thermal parameters.

You will see that the number of triangles used to describe the image reduce. The more triangles that are used to describe the shape the more accurately the shape can be reproduced, however the more triangles are used the more memory a shape will take up and the slower simulations will run. There is always a trade off between number of triangles used to discretize a shape. Try going back to the Edit Mesh window and set method to no reduce and then click on Build mesh from the file menu again. You will see that the complex triangular mesh as been replaced by a periodic triangular mesh, which is more accurate but requires the full 70x70 triangles. The difference between the no reduce and Node reduce options are that no reduce simply uses a regular mesh to describe and object and Node reduce starts off with a regular mesh then uses a node reduction algorithm to minimize the number of triangles used in the mesh.

The mesh editor window, accessed via the file ribbon.

As well as loading images from file, the shape editor can generate it’s own images for standard objects used in science, the 2D image ribbon is visible in the right hand panel of figure 15.16. There are options to generate lenses, honeycomb structures and photonic crystals. Each button has a drop down menu to the right of it which can be used to configure exactly what shape is generated.

The final ribbon to be discussed is the Filters ribbon. This is used to change loaded images, try turning on and off the threshold function. This applies a threshold to an image so that RGB values above a given value are set to white and those below are set to black. There are also other functions such as Blur, and Boundary which can be used to blur and image and apply boundaries to an image.

The shape database

The shape file format

A shape has to be a fully enclosed volume, if you use the built in shape discretizer this will be done for you automaticity. However if you are building shapes by hand you will have to enforce this condition. Each shape directory contains the following files

The files within a shape directory
File name Description
\(data.json\) Holds the configuration for the shape file
\(image\_original.png\) backup of the imported image
\(image\_out.png\) The final processed image
\(image.png\) The imported image which may be modified.
\(shape.inp\) The discretized 3D structure.

The png files are of images in various states of modification. The data.json file stores the configuration of the shape editor and the shape.inp file contains the 3D structure of the object. An example of a shape.inp file is shown below in 15.19. The file format has been written so that gnuplot can open it using the splot command without any modification. As such each triangle is comprised of four z,x,y points (lines 21-24), the first three lines define the triangle, and the forth line is a repeat of the first line so that gnuplot can plot the triangle nicely. The number of triangles in the file is defined on line 18 using the #y command. The exact magnitudes of the z,x,y values do not matter because as soon as the shape is loaded all values are normalized so that the minimum point of the shape sits at 0,0,0 and the maximum point from the origin sits at 1,1,1. When being inserted into a scene, the shape is then again renormalized to the desired size of the object in the device.

An example of the shape.inp file.