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 = bb_client.new("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 = bb_client.new("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 = bb_client.new("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 = bb_client.new("composition")
# Always define a background material
composition.add_morphology("background", host.id)
# We use a linear profile for dye1
composition.add_morphology("linear_gradient", dye1.id, p_start=0.1, p_end=0.2)
# We use a trapezoidal profile to add dye2 at the layer boundaries
composition.add_morphology("trapezoid_gradient", dye2.id,
trapezoid=[[0, 0.35], [0.25, 0.0], [0.75, 0.0], [1.0, 0.35]])
# Submit the composition
composition.create()
Create a Stack¶
We use this composition to create a stack. The procedure is the same as for basic composition types.
stack = bb_client.new("stack")
stack.name = "Dual-Dye"
stack.add_layer("EMI", 60, composition.id)
stack.create()
Create a Parameter Set¶
We configure the parameter set for a 5V simulation.
parameter_set = bb_client.new("param_set")
parameter_set.name = "SingleVoltage-Dual-Dye"
parameter_set.stack_id = stack.id
parameter_set.fermi_level_left = host.homo + 0.2
parameter_set.fermi_level_right = host.lumo - 0.2
parameter_set.voltage = 5
parameter_set.create()
Starting the Simulation¶
We configure and submit a single-voltage simulation with 5 separate trajectories.
simulation = bb_client.new("simulation")
simulation.name = "5V-Dual-Dye"
simulation.add_sweep(parameter_set.id, first_disorder=1, final_disorder=5)
simulation.create()
Simulation Output¶
Once the simulation has completed, the available output can be listed using the available
method. When then morphologies have successfully been generated, cross-sectional profiles may be visualized using e.g. the morphology_slice_box
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(1, 5+1):
cross_section = simulation.results.morphology_slice_box(sweeppoint=5, box=trajectory)
material_cross_sections.append(cross_section)