1.In the p-n junction tutorial ,
the doping for
n region is taken as ,doping and for
p-region it is -1*doping. why is it opposite?
2.Secondly the length of only right electrode is considered for both p and n regions. [ len(right_electrode_elements) ]. Has it been assumed that right and left electrodes are identicle and symetric??
3. The doping script should come before or after
device_configuration = DeviceConfiguration(
central_region,
[left_electrode, right_electrode]
)
?
# -------------------------------------------------------------
# Add Doping
# -------------------------------------------------------------
doping_density = 2e+19
# Calculate the volume and convert it to cm^-3
# Note: right and left electrodes have the same volume,
volume = right_electrode_lattice.unitCellVolume()
volume = float(volume/(0.01*Meter)**3)
# Calculate charge per atom
doping = doping_density * volume / len(right_electrode_elements)
# Add p- and n-type doping to the central region
external_potential = AtomicCompensationCharge([
('p_doping', -1*doping), ('n_doping',doping)
])
central_region.setExternalPotential(external_potential)
# Add doping to left and right electrodes
left_electrode.setExternalPotential(
AtomicCompensationCharge([(Silicon, -1*doping)]))
right_electrode.setExternalPotential(
AtomicCompensationCharge([(Silicon, doping)]))