# In this example, we're going to enter all parameters manually. The situation # we're going to describe corresponds to one where there are not enough # charge carriers to cause the potential to deviate significantly from a # lineair one (interpolated between the values at the contacts). We'll also # assume that there is no generation or recombination, and that the Einstein # relation between mobility and diffusion constant holds. Analytic calculations # for this situation are possible, and the results are shown in [1]. # # [1] G. G. Malliaras, J. R. Salem, P. J. Brock and J. C. Scott, "Photovoltaic # measurement of the built-in potential in organic light emitting diodes # and photodiodes", J. Appl. Phys. 84, 1583 (1998) # http://scitation.aip.org/content/aip/journal/jap/84/3/10.1063/1.368227 # First, well assign some names to things we'll need further on, to keep # everything readable. All numbers specified are in SI units. # Temperature, and kB*T expressed in electron volts math/def T 300 math/def kT_ev T*kB/e # The built in voltage and the electron/hole number densities at the contacts math/def Vbi 0.8 math/def nc 1e19 math/def na nc*exp(-Vbi/kT_ev) math/def pa 1e19 math/def pc pa*exp(-Vbi/kT_ev) # Relative permittivity, mobilities and corresponding diffusion constants # (Einstein relation) math/def epsilon 3.4 math/def eMob 1e-7 math/def hMob 1e-7 math/def hDiff hMob*kT_ev math/def eDiff eMob*kT_ev # We'll use 'd' as the thickness of the device, here 200 nm math/def d 200e-9 # Now, we start defining the actual simulation grid. In the following command # we say that the 1D simulation will consist of 128 points, which correspond # to a distance of 'd', i.e. 200 nm sim1/new 128 d # We also set the temperature for the simulation. Although this is not present # in the drift-diffusion equations, this helps in setting correct scale factors sim1/temp/set T # Then, we're going to define regions for the contacts. The anode will # correspond to the left-most pixel (ranging from pixel 1 to pixel 1). reg1/new anode reg1/append/line anode 1 1 # The cathode will be the right-most pixel of the distretized device. Here, # we're using the special name 'NX1', the number of pixels of the 1D # simulation (so 128 in this example). reg1/new cathode reg1/append/line cathode NX1 NX1 # Set the values for electron and hole number densities at the contacts sim1/reg/set n cathode nc sim1/reg/set n anode na sim1/reg/set p cathode pc sim1/reg/set p anode pa # Set values of other properties on the entire grid ('ALL' is a special # name for this. Properties which are not defined (e.g. the generation # rate, the recombination pre-factor) will be zero. sim1/reg/set dn ALL eDiff sim1/reg/set dp ALL hDiff sim1/reg/set nmob ALL eMob sim1/reg/set pmob ALL hMob sim1/reg/set eps ALL epsilon # Some further setup of the simulation: setting the voltage across the # device. For a built-in voltage Vbi, and an applied voltage Vapp, the # total voltage drop between right and left contact will be Vbi-Vapp. # the 'yes' parameter makes sure that the voltage is not only set for # the pixels corresponding to the contacts, but will be set on all other # pixels as well using a linear interpolation. math/def Vapp 0.50 sim1/phi/set Vbi-Vapp yes # The values of electrons and holes were defined at the contacts, but not # yet on other pixels of the grid. Using these commands, these will be # initialized as well (simply interpolating the values at the contacts on a # logarithmic scale) sim1/grid/init n sim1/grid/init p # Now that we've defined everything we need, we're going to use the # sim1/rundirect command to search for the equilibrium situation. This method # does not use the time-step based solver, instead, the Newton-Raphson # method is employed. sim1/rundirect # After equilibrium has been reached, we'll save the values of all the # properties in a file sim1/grid/fplot densities_0.50.txt no # And starting from this equilibrium situation, we'll also look for the JV # curve between 0 and 1.6V (applied voltage). The resulting curve will be # saved in the file 'jv.txt' sim1/iv Vbi 0 1.6 100 jv.txt no