# Interface equation for tunneling current

Dear Juan,

If we treat a tunnel barrier as an interface, how do we properly set the interface equation for a continuous current (determined by the tunneling current) across the interface?

I’m also a little puzzled by the interface equation command,
devsim.interface_equation(device , interface , name, name0 , name1 , interface_model , type )

Does the model in individual regions, name0 or name1, have to be a node model? How do we set an interfacial boundary condition about current, which is described by an edge model? In this case, what does “fluxterm” or “continuous” in “type” mean?

Best wishes
Zhi-Gang

Thanks for your interest in the software. An explanation of the interface equation types is here
Could the more information can be offered about fluxterm in interface_equation

For tunneling current, the `fluxterm` or the equivalent `hybrid` model would be the best.

An example in the distribution is here in `testing/test_common.py`

``````def SetupElectronSRVAtInterface(device, interface):
'''
Surface Recombination Velocity At Interface
'''
devsim.set_parameter(device=device, name="alpha_n", value=1e-7)
iexp="(alpha_n@r0)*(Electrons@r0-Electrons@r1)"
for name, equation in (
("srvElectrons", iexp),
("srvElectrons2", "srvElectrons"),
("srvElectrons:Electrons@r0", "diff(%s,Electrons@r0)" % iexp),
("srvElectrons:Electrons@r1", "diff(%s,Electrons@r1)" % iexp),
("srvElectrons2:Electrons@r0", "srvElectrons:Electrons@r0"),
("srvElectrons2:Electrons@r1", "srvElectrons:Electrons@r1"),
):
devsim.interface_model(device=device, interface=interface, name=name, equation=equation)

devsim.interface_equation(device=device, interface=interface, name="ElectronContinuityEquation", interface_model="srvElectrons2", type="fluxterm")
``````

and it is run from the `testing/res3.py` example.

The interface node model references the node model electrons using the “Electrons@r0” and “Electrons@r1” notation.

The interface node model `srvElectrons` is defined in terms of the `Electrons` in the interfaced regions. The `srvElectrons:Electrons@r0` and `srvElectrons:Electrons@r1` are the derivatives of the model with respect to the `Electrons` in each region, and are used to aid in the convergence of the simulation.

The model `srvElectons2` model is used as part of the test to make sure that the interface model equation system is working correctly.