Advanced Morphology¶
This tutorial illustrates the process of specifying complex morphologies using the Python API.
Create Materials¶
For this tutorial, we will explore dual-dye gradients. We start by defining the necessary materials.
dye1 = resources.Material()
dye1.name = "Irppy3"
dye1.homo = -5.27
dye1.lumo = -1.86
dye1.singlet_binding_energy = 0.75
dye1.triplet_binding_energy = 1.0
dye1.singlet = dye1.homo - dye1.lumo + dye1.singlet_binding_energy
dye1.triplet = dye1.homo - dye1.lumo + dye1.triplet_binding_energy
dye1.st_ratio = 0
dye1.tta_ratio = 0
dye1.isc_rate = 1e10
dye1.triplet_rad_decay = 6.1e5
dye1.triplet_nonrad_decay = 1.9e4
dye2 = resources.Material()
dye2.name = "Irdmp3"
dye2.homo = -5.0
dye2.lumo = -1.7
dye2.singlet_binding_energy = 0.7
dye2.triplet_binding_energy = 1.0
dye2.singlet = dye2.homo - dye2.lumo + dye2.singlet_binding_energy
dye2.triplet = dye2.homo - dye2.lumo + dye2.triplet_binding_energy
dye2.st_ratio = 0
dye2.tta_ratio = 0
dye2.isc_rate = 1e10
dye2.triplet_rad_decay = 5.9e5
dye2.triplet_nonrad_decay = 2.2e4
host = resources.Material()
host.name = "CBP"
host.homo = -6.08
host.lumo = -1.75
host.singlet_binding_energy = 1.0
host.triplet_binding_energy = 1.7
host.singlet = host.homo - host.lumo + host.singlet_binding_energy
host.triplet = host.homo - host.lumo + host.triplet_binding_energy
host.dexter_prefactor_singlet = 0.95
host.dexter_prefactor_triplet = 0.95
host.singlet_nonrad_decay = 1e5
host.triplet_nonrad_decay = 1e4
Create a Composition¶
The add_morphology method is used to specify advanced layer compositions.
# Create a new composition
composition = resources.Composition()
# Add the materials to the composition
composition.add_fraction(1, host)
composition.add_fraction(0, dye1)
composition.add_fraction(0, dye2)
# Always define a background material
composition.add_background(material_id=0)
# We use a linear profile for dye1
composition.add_linear_gradient(material_id=1, p_start=0.1, p_end=0.2)
# We use a trapezoidal profile to add dye2 at the layer boundaries
composition.add_trapezoid_gradient(material_id=2,
trapezoid=[[0, 0.35], [0.25, 0.0], [0.75, 0.0], [1.0, 0.35]])
Create a Stack¶
We use this composition to create a stack. The procedure is the same as for basic composition types.
stack = resources.Stack()
stack.name = "Dual-Dye"
stack.add_layer("EMI", 60, composition)
Create a Parameter Set¶
We configure the parameter set for a 5V simulation.
parameter_set = resources.Parameters()
parameter_set.name = "SingleVoltage-Dual-Dye"
parameter_set.add_stack(stack)
parameter_set.voltage = 5
Starting the Simulation¶
We configure and submit a single-voltage simulation with 5 separate trajectories.
simulation = resources.Simulation()
simulation.name = "5V-Dual-Dye"
simulation.add_sweep(parameter_set, first_disorder=1, final_disorder=5)
simulation.run()
Simulation Output¶
Once the simulation has completed, we can use the Report methods to analyse the output. An overview of the available reports is available through the list method.
# Wait for simulation to finish
simulation.wait()
# Load simulation output
report = resources.Report(simulation.folder)
# Print overview of analysis methods
print(report.list())
When then morphologies have successfully been generated, cross-sectional profiles may be visualized using e.g. the Trajectory/cross_section method. Morphologies for the different trajectories can then be compared to investigate correlations between the OLED nanostructure and the device efficiency.
# Store the morphology for each trajectory at the first (and only) voltage
material_cross_sections = []
for trajectory in range(0, 5):
cross_section = report.get(report_name="Trajectory/cross_section", sweep=5, box=trajectory, dataframe=True)
material_cross_sections.append(cross_section)