Impact ionization example

Juan,
where is the example to have this?

Hi @sharkjune

There are a few discussions in the category for impact-ionization in this forum. Please also search for Avalanche Generation in this forum.
Impact Avalanche Generation in Diode Example
Avalanche Breakdown

Hi Juan,

I got problem.
I trie to combine the velocity saturation and impact ionization models.
The velocity saturation model i copied from an example used ‘element_model’ instead of ‘edge_model’ for the current. See the code below.
The impact ionization model used ‘edge_volume_model’ (based on the example you posted to me).

def CreateElementElectronContinuityEquation(device, region, current_model):
    '''
      Uses element current model for equation
    '''
    equation(device=device, region=region, name="ElectronContinuityEquation", variable_name="Electrons",
             time_node_model="NCharge", node_model="ElectronGeneration",
             edge_volume_model="qGn_imp",  #ii, I added this.
             element_model=current_model, variable_update="positive")

I found these two models are not compatible. I got the following error:
equation(device=device, region=region, name=“ElectronContinuityEquation”, variable_name=“Electrons”,
devsim_py3.error: -edge_model “qGn_imp” on Region “bulk” on Device “mydevice” does not exist.

Clearly i have qGn_imp well defined. I have qGp_imp defined in parallel. I have no problem to add qGp_imp to the hole equation which does not include the velocity saturation model, as shown below:

def CreateHCE(device, region, mu_p):
    CreateHoleCurrent(device, region, mu_p)
    PCharge = "ElectronCharge * Holes"
    CreateNodeModel(device, region, "PCharge", PCharge)
    CreateNodeModelDerivative(device, region, "PCharge", PCharge, "Holes")

    equation(device=device, region=region, name="HoleContinuityEquation", variable_name="Holes",
             time_node_model = "PCharge",
             edge_volume_model="qGp_imp",  #ii
             edge_model="HoleCurrent", variable_update="positive", node_model="HoleGeneration")

Could you please help?

Hi @sharkjune ,

Please confirm the model exists as you expect by using these commands:
devsim.get_edge_model_list
devsim.get_element_model_list

For the equation command:

If it is an edge model, use edge_volume_model
If it is an element model, use the same model for:

volume_node0_model
volume_node1_model 

Please let me know if this helps resolve the issue.

Hi Juan,
I modified the order of variables. The original problem is gone but I got a new issue.
The code is shown at the bottom.
When I comment out the impact ionization (ii) line in the hole equation

             #edge_volume_model="qGp_imp",  #ii

everything is working. That means ii can be included to electron equation.
But when I add this back for holes, i got fatal error:

while evaluating model qGp_imp: expression ((-q * ((Ion_coeff_n * abs(ElementElectronCurrent)) + (Ion_coeff_p * abs(HoleCurrent)))) * pow(q,(-1))) evaluates to triangleedgedata
Traceback (most recent call last):
File “test.py”, line 228, in
solve(type=“dc”, absolute_error=1e30, relative_error=1e-9, maximum_iterations=100)
devsim_py3.error: DEVSIM FATAL

Electron has no problem, that means qGn_imp can be evaluated. qGp_imp is just the negative of it and should be fine.
Could you help me? What’s wrong here?

qGn_imp is an edge model, then edge_volume_model should be used in equation() as you commented earlier.

The code:

    #impact ionization
    CreateEdgeModel(device,r,"dummy_edge","0")
    CreateEdgeModel(device,r,"Fava_n",Fava_n)
    CreateEdgeModel(device,r,"Fava_p",Fava_p)
    CreateEdgeModel(device,r,"Ion_coeff_n",Ion_coeff_n)
    CreateEdgeModel(device,r,"Ion_coeff_p",Ion_coeff_p)
    CreateEdgeModel(device,r,"qGn_imp","q * %s" % Imp_rate)
    CreateEdgeModel(device,r,"qGp_imp","-q * %s" % Imp_rate)

    for v in ('Potential','Electrons','Holes'):
        CreateEdgeModelDerivatives(device,r,"Fava_n",Fava_n,v)
        CreateEdgeModelDerivatives(device,r,"Fava_p",Fava_p,v)
        CreateEdgeModelDerivatives(device,r,"Ion_coeff_n",Ion_coeff_n,v)
        CreateEdgeModelDerivatives(device,r,"Ion_coeff_p",Ion_coeff_p,v)
        CreateEdgeModelDerivatives(device,r,"qGn_imp","q * %s" % Imp_rate,v)
        edge_model(device=device,region=r,name="qGp_imp:%s" % v,equation="-qGn_imp:%s" % v)

    #Hole eqn with ii (redefine here, already defined in CreateHCE)
    equation(device=device, region=r, name="HoleContinuityEquation", variable_name="Holes",
             time_node_model = "PCharge",
             edge_volume_model="qGp_imp",  #ii <--this one has issue, need your help
             edge_model="HoleCurrent", variable_update="positive", node_model="HoleGeneration")
   
    #Electron eqn with ii (modified CreateElementElectronContinuityEquation)
    equation(device=device, region=r, name="ElectronContinuityEquation", variable_name="Electrons",
             time_node_model="NCharge", node_model="ElectronGeneration",
             edge_volume_model="qGn_imp",  #ii
             element_model="ElementElectronCurrent", variable_update="positive")

The solve command stops on the first error, and there may be a problem with both models.

The way to tell if an edge model is working is to use:
devsim.get_edge_model_values

or an element model using:
get_element_model_values

This error:

while evaluating model qGp_imp: expression ((-q * ((Ion_coeff_n * abs(ElementElectronCurrent)) + (Ion_coeff_p * abs(HoleCurrent)))) * pow(q,(-1))) evaluates to triangleedgedata
Traceback (most recent call last):
File “test.py”, line 228, in
solve(type=“dc”, absolute_error=1e30, relative_error=1e-9, maximum_iterations=100)
devsim_py3.error: DEVSIM FATAL

Means that your edge model was defined in terms of an element model. Internally, we refer to element model data as triangleedgedata in 2D.

You cannot use an element model in an edge model expression. You can use edge models in element model expressions.

If your model needs to be defined in terms of an element model, ElementElectronCurrent, instead of an edge model, ElectronCurrent, you need to define it as an element model.

If it can be an edge model, use:

equation_model(edge_volume_model="qGp_imp" . . .

It it should be an element model, use:

equation(
volume_node0_model="qGp_imp"
volume_node1_model="qGp_imp"
. . .

Please note that usage of an element model for the volume_node0_model and volume_node_1 model is relatively recent. Please let me know if you encounter any further issues.

Juan,
thank you for your input. Now i understand the issue now.
In my code above, variable Imp_rate is defined as

Imp_rate = "(Ion_coeff_n*(abs(ElementElectronCurrent))+Ion_coeff_p*(abs(HoleCurrent)))/q"

So this is a mixture of element model ‘ElementElectronCurrent’ and edge model ‘HoleCurrent’ in the same expression.
Therefore, the following two lines failed:

    CreateEdgeModel(device,r,"qGn_imp","q * %s" % Imp_rate)
    CreateEdgeModel(device,r,"qGp_imp","-q * %s" % Imp_rate)

here is the problem to me now. Based on your example, to capture the mobility dependence on E-field for electron, element model ‘ElementElectronCurrent’ is used. For hole, such dependence is not captured, so edge model ‘HoleCurrent’ is used. I have the mix.
is it possible then, convert the ElementElectronCurrent to an intermediate edge model first?
Then Imp_rate will just use edge models. Hence qGp_imp and qGn_imp will both be edge models.

If this can be done, then my next question:
is it correct to use edge_volume_model=‘qGn_imp’ together with an element_model=“ElementElectronCurrent” in the following equation?

equation(device=device, region=r, name="ElectronContinuityEquation", variable_name="Electrons",
             time_node_model="NCharge", node_model="ElectronGeneration",
             edge_volume_model="qGn_imp",  #ii
             element_model="ElementElectronCurrent", variable_update="positive")

The Imp_rate expression is valid for an element model, since they can be mixed…

This should work

CreateElementEdgeModel(device,r,"qGn_imp","q * %s" % Imp_rate)
CreateElementEdgeModel(device,r,"qGp_imp","-q * %s" % Imp_rate)

It is not currently possible to use an an an element model in an edge model expression, unless you use the custom matrix assembly functionality and implement the matrix assembly yourself.

Two options I suggest

  1. Create element edge models for dGn_Imp, dGp_Imp and use the options in my previous reply.
    volume_node0_model and volume_node_1
  2. Use a different estimate for electron current in the edge_volume_model expression. You can still use the element_model=ElementElectronCurrent. For example, consider using constant electron mobility for the impact ionization model.

Juan,
now the simulation run through with Element model. Thank you.
But i do not see current change with and without impact ionization.
I will look into this.

Kejun

Hi Kejun,

You are welcome.

Thanks for the update. You may try get_element_model_values and scale the impact ionization term with the values of ElementNodeVolume. Then check to see if these values are on the order of ElementElectronCurrent scaled by ElementEdgeCouple.

Please note that the parameter values in the provided physics scripts are based on cm as the length quantity. So make sure that your Ionization parameters are scaled appropriately.

Regards,

Juan

Juan,
Thank you for the information. I checked with your method. The impaction ionization is of orders lower than Js*Edge. When i increases it, it failed the convergence in a strange way - related to divide by zero error of pow(mu_sr_e,2) in Klaassen model.
I will email you the case for further discussion.

Kejun

Hi @sharkjune
While you are debugging your impact ionization model, you may want to consider just using the constant mobility model, without any field dependent terms in it.

In addition to the impact ionization terms, it is also important to supply their derivatives. For an edge model:

dGn_imp:Electrons@n0
dGn_imp:Electrons@n1
dGn_imp:Potential@n0
.
.
.

or for an element model in 2d:

dGn_imp:Electrons@en0
dGn_imp:Electrons@en1
dGn_imp:Electrons@en2