I am new to using DEVSIM, and I was wondering if anyone has encountered a similar issue. My goal is to model a photodetector, and for that, I started by modifying the code from diode_1D.py and simple_physics.py. I haven’t yet implemented radiative generation, but I have already found discussions on the forum about how to add it. Right now, my main interest is adding Trap-Assisted Tunneling and band-to-band generation.
The issue I encountered while implementing them is that they require the electric field, but as far as I can see in the code that defines generation, we use a node_model, whereas the electric field is defined in an edge_model.
I see two possible solutions:
Rewrite the entire generation code using an edge_model, but I suspect this might introduce issues that I may not anticipate due to my limited experience with the package.
Define the electric field in a node_model using something like “-diff(Potential, x)”. However, when I differentiate with respect to x, I get a zero field.
What variable should I differentiate the potential with to obtain the electric field (if this is possible at all)? Is there a way to compute the potential gradient in a node_model?
While this example handles the case of a constant parameters being multiplied by an edge quantity. It can be extended to your more general case of nodal quanties.
Which involves:
keep your existing generation terms as nodal, excluding the field dependent term, gmodel
convert the nodal generation along the edge using devsim.edge_from_node_model, which will create gmodel@n0, gmodel@n1
If this generation is constant along the edge, you can create an edge model using gmodel_edge = 0.5*(gmodel@n0 + gmodel@n1)
Use the same process to get nodal derivatives with respect to these models. For example if this depends on Electrons. gmodel_edge:Electrons@n0, gmodel_edge:Electrons@n1.
create a combined edge expression using these models, with your field dependent term, BTBmodel = gmodel_edge * fmodel, where fmodel is your field dependent model
also include those derivatives
add this term to the edge_volume_model option of the equation command.
Please let me know if you think this is a valid approach, or if you have any questions.