Convergence failure with gmsh_mos2d.py when applying bias

I want to apply a bias to the gate in the gmsh_mos2d.py example.

I added one line (line 76), which results in a “…Convergence Failure”.
set_parameter(device=device, name='gate_bias', value=5)

How do I fix this?

### Set up contacts
contacts = get_contact_list(device=device)
for i in contacts:
    tmp = get_region_list(device=device, contact=i)
    r = tmp[0]
    #print("%s %s" % (r, i))
    CreateSiliconPotentialOnlyContact(device, r, i)
    print(GetContactBiasName(i))
    set_parameter(device=device, name=GetContactBiasName(i), value=0.0)

**set_parameter(device=device, name='gate_bias', value=5)**

Hello @crak

Thank you for your question. You would need to ramp the bias from a solution at a lower bias.

for i in numpy.linspace(0, 5, num=20):
    set_parameter(device=device, name='gate_bias', value=i)
    solve(type="dc", absolute_error=1.0e30, relative_error=1e-5, maximum_iterations=30)

Please note at this point in the script, that you are still doing an equilibrium solution with now current flow.

1 Like