Hi Juan,
I am writing to request assistance with a challenging issue I’m experiencing in the dynamic simulation of a 1D diode. Static simulations with the DC Ramp function work seamlessly, but I’m encountering a significant problem during dynamic simulations in the time domain.
The diode is connected in series to a voltage source and a 1.23 Ohm*cm^2 resistor. After switching the driving voltage from 5 V to -5 V the diode voltage decreases smoothly, but an issue occurs when the diode voltage falls to approx. 0.2 V.
At this point, as the simulation approaches the reverse-bias region, it consistently results in a Convergence Error. This happens regardless of the approach I take with voltage ranges, whether it’s transitioning from 5V to -5V or simulating directly within the reverse-bias region from -4.9V to -5V or from -1.0V to -0.5V. The error occurs regardless of the speed of the driving voltage transient.
Why is the simulation in my case unable to smoothly navigate through the reverse-bias region dynamically. Is this a limitation inherent in the software, or is there a possibility that I am missing a crucial step or setting in the simulation setup?
In the following is my example code (can be executed when added to examples/diode
):
import devsim
from devsim.python_packages.simple_physics import *
import diode_common
def print_circuit_solution():
for node in get_circuit_node_list():
r = get_circuit_node_value(solution='dcop', node=node)
print("%s\t%1.15e" % (node, r))
def CreateMesh(device, region):
'''
Meshing
'''
create_1d_mesh(mesh="dio")
# 1e-7 cm = 1 nm, 1e-4 cm = 1 um
add_1d_mesh_line(mesh="dio", pos=0, ps=0.5e-4, tag="top")
add_1d_mesh_line(mesh="dio", pos=10e-4, ps=1e-7, tag="mid")
add_1d_mesh_line(mesh="dio", pos=20e-4, ps=0.5e-4, tag="bot")
add_1d_contact(mesh="dio", name="top", tag="top", material="metal")
add_1d_contact(mesh="dio", name="bot", tag="bot", material="metal")
add_1d_region(mesh="dio", material="Si", region=region, tag1="top", tag2="bot")
finalize_mesh(mesh="dio")
create_device(mesh="dio", device=device)
def SetParameters(device, region):
'''
Set parameters for 300 K
'''
SetSiliconParameters(device, region, 300)
set_parameter(device=device, region=region, name="taun", value=1.0e-8)
set_parameter(device=device, region=region, name="taup", value=1.0e-8)
# Electron-mobility
set_parameter(device=device, region=region, name="mu_n", value="400")
# Hole-mobility
set_parameter(device=device, region=region, name="mu_p", value="200")
def SetNetDoping(device, region):
'''
NetDoping
'''
CreateNodeModel(device, region, "Acceptors", "1.0e17*step(10e-4-x)")
CreateNodeModel(device, region, "Donors", "4.0e17*step(x-10e-4)")
CreateNodeModel(device, region, "NetDoping", "Donors-Acceptors")
device = "MyDevice"
region = "MyRegion"
# Set extended parameters
set_parameter(name="extended_solver", value=True)
set_parameter(name="extended_model", value=True)
set_parameter(name="extended_equation", value=True)
# Definition of V1(t)
start_voltage = 5.0
initial_step_voltage = 0.7
end_voltage = -5.0
ramp_time = 500e-9
start_time = 0.0
end_time = 450e-9
time_step = 2.0e-9
# Circuit
resistor = 1.23 # ohm/cm^2
circuit_element(name="V1", n1=1, n2=0, value=initial_step_voltage)
circuit_element(name="R1", n1=1, n2=GetContactBiasName("top"), value=resistor)
CreateMesh(device=device, region=region)
SetParameters(device=device, region=region)
SetNetDoping(device=device, region=region)
diode_common.InitialSolution(device, region, circuit_contacts="top")
# Initial DC solution (Poisson)
devsim.solve(type="dc", absolute_error=1.0, relative_error=1e-9, maximum_iterations=30)
diode_common.DriftDiffusionInitialSolution(device, region, circuit_contacts=["top"])
devsim.solve(type="transient_dc", absolute_error=1.0, relative_error=1e-9, maximum_iterations=30)
# Now Set the start voltage
circuit_alter(name="V1", value = start_voltage)
devsim.solve(type="transient_dc", absolute_error=1.0, relative_error=1e-14, maximum_iterations=30)
# ramp up
current_time = start_time
while current_time < end_time:
if current_time <= ramp_time:
output_voltage = start_voltage - ((start_voltage - end_voltage) / ramp_time) * current_time
circuit_alter(name="V1", value=output_voltage)
devsim.solve(type="transient_bdf1", absolute_error=1e10, relative_error=1e-9, maximum_iterations=100, tdelta=time_step, charge_error=1)
print_circuit_solution()
current_time += time_step
I would greatly appreciate your insights or suggestions on how to resolve these issues.
Thanks a ton for any help or insights you can provide!
Viviana