2D device Convergence failure

Sorry to bother you!
I am simulating a lgad device,but when the voltage comes to about 10v,it always shows me convergence failure.Do I build wrong mesh or set the wrong doping?

This is my mesh:

def Create2DMesh(device,region):
     devsim.create_2d_mesh  (mesh="Sicar")
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=0     , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=0.01  , ps=1e-5)

    devsim.add_2d_mesh_line(mesh="Sicar", dir="y", pos=0     , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="y", pos=1e-4 , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=0.3e-4     , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=1.3e-4  , ps=1e-5)

    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=51.3e-4  , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=56.3e-4  , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=-1e-4   , ps=1e-5)
    devsim.add_2d_mesh_line(mesh="Sicar", dir="x", pos=1.01e-2, ps=1e-5)

    devsim.add_2d_region   (mesh="Sicar", material="SiliconCarbide", region=region)
    devsim.add_2d_region   (mesh="Sicar", material="air", region="air1", xl=-1e-4,  xh=0)
    devsim.add_2d_region   (mesh="Sicar", material="air", region="air2", xl=1.01e-2, xh=1e-2)

    devsim.add_2d_contact  (mesh="Sicar", name="top", region=region, xl=0, xh=0, bloat=1e-5, material="metal")
    devsim.add_2d_contact  (mesh="Sicar", name="bot", region=region, xl=1e-2,   xh=1e-2, bloat=1e-5, material="metal")

    devsim.finalize_mesh   (mesh="Sicar")
    devsim.create_device   (mesh="Sicar", device=device)

And this is my doping:

physics2D.CreateNodeModel(device, region, "Acceptors", "2.0e19*step(3e-5-x)")
physics2D.CreateNodeModel(device, region, "Donors",    "1.0e17*( step((1.3e-4)-x) -step((3e-5)-x) ) + 1.0e14*( step((51.3e-4)-x) - step((1.3e-4)-x) ) ")
physics2D.CreateNodeModel(device, region, "NetDoping", "Donors-Acceptors")

I also tried the 'variable_update=“log_damp” ’ option when calculate potential.But it doesn’t work.So I get confused about my mesh and doping.
Thank you!

DId you try reducing the voltage step when non convergence occurs? Each step is the initial guess for the other. There is a ramp script in the distribution

if you have a wide bandgap, extended precision may help:
devsim.set_parameter(name = “extended_solver”, value=True)
devsim.set_parameter(name = “extended_model”, value=True)
devsim.set_parameter(name = “extended_equation”, value=True)

Thank you for your reply.I have already set those extended precision.
I change the step from 1 to 0.5,the problem still happens:

Traceback (most recent call last):
File “/scratchfs/atlas/senzhao/raser/./python/solveCV2D.py”, line 56, in
devsim.solve(type=“dc”, absolute_error=1e30, relative_error=1e-3, maximum_iterations=1500)
devsim_py3.error: Convergence failure!
Should I change the step to 0.1?

I suggest finding a bias that converges close to the point of failure. Then save the output to a tecplot file and visualize the result. Check the results to see if they are too coarse for the bias conditions you are placing on it.

A good ramping strategy is to reduce the bias step close to where issues are occurring. Each successful simulation provides a good initial guess for the next bias point.

Thank you!I will try later.
The intresting thing is that the partial solution can still be correctly solved even after iteration failure.Like this:

Please check the files. The solve command will revert to the previous solution if convergence fails.

I check the file .Due to inf value,it can’t check in Tecplot or Paraview.So I check the file

I think this is the reason.How can I solve this inf value?
Thank you!

Interesting. In the file, if you do a search and replace for “-inf” and replace it with a number, you should be able to visualize the field.

I replace the inf with values,but it can’t wort .

But I change the line 181.


You can try splitting the line on whitespace if it is to long.

If I split the line,it comes to value’s name in first line can’t match values. :smiling_face_with_tear:

When I check the other files,I notice that the number of inf was different in different.
This is when reverse bias is 39v :

This is when reverse bias is 101v:

It seems like the number of inf control the convergence.How can I check which value’s name have inf values.I want delete them if it isn’t that important.
Thank you!

I am not sure. The values in the your screen shot are incredibly big. I think changes the -inf to 0 may work

Sorry to bother you again.
The problem about inf still happens.I think if we can check which name of value involves inf may be helpful.And delete them in code.So how can we find those names in .DD files?
Thank you!


I think it may be easier to understand the ‘devsim_data’ format instead of tecplot.

Other than that, this is possible:

for name in devsim.get_node_model_list(device=device, region=region):
    print(devsim.get_node_model_values(device=device, region=region, name=name)

for name in devsim.get_edge_model_list(device=device, region=region):
    print(devsim.get_edge_model_values(device=device, region=region, name=name)

for name in devsim.get_element_model_list(device=device, region=region):
    print(devsim.get_element_model_values(device=device, region=region, name=name)

Normally floating point errors are caught for all calculations, even in the solvers. But there is some strangeness on some platforms that led me to disable that.