Esempio n. 1
0
### Drift diffusion simulation at equilibrium
###
currs = []
volts = []
bias_contact = "top_n1"
for volt in range(-20, 20, 1):
    volt = volt / 10
    volts.append(volt)
    ds.set_parameter(device=device,
                     name=f"{bias_contact}_bias",
                     value=float(volt))
    ds.solve(type="dc",
             absolute_error=1e1,
             relative_error=1e-10,
             maximum_iterations=30)
    e_current = ds.get_contact_current(device=device,
                                       contact=bias_contact,
                                       equation="ElectronContinuityEquation")
    h_current = ds.get_contact_current(device=device,
                                       contact=bias_contact,
                                       equation="HoleContinuityEquation")
    current = e_current + h_current
    currs.append(current)
print(volts, currs)
plt.plot(volts, currs)
####
#### Ramp the bias to 0.5 Volts
####

ds.write_devices(file="nBn_ugly.dat", type="devsim")
plt.show()
Esempio n. 2
0
 def export(self, filename, format='devsim_data'):
     write_devices(file=filename, type=format)
Esempio n. 3
0
                               equation=ECE_NAME))
    e_current += abs(
        ds.get_contact_current(device=device,
                               contact='bot_n2',
                               equation=HCE_NAME))
    current.append(e_current)
    volts.append(v)
    pydevsim.plot_potential(regions=regions)
    # v += 0.1
plt.figure()
plt.plot(volts, current)
# pydevsim.plot_charge(regions=regions)
# pydevsim.plot_current(regions=regions)
plt.show()

ds.write_devices(file="diode_1d.tec", type="tecplot")
plt.clf()
# edge_average_model(device=device, region=region, node_model="x", edge_model="xmid")
# xmid=get_edge_model_values(device=device, region=region, name="xmid")
#efields = ("Jn_arora_lf", "Jp_arora_lf" )
#efields = ("Jn", "Jp", "Jn_arora_lf", "Jp_arora_lf" )

efields = ("Jn", "Jp")
pydevsim.plot_current(regions=regions, current_names=efields)
# y=get_edge_model_values(device=device, region=region, name=efields[0])
# ymin=min(y)
# ymax=max(y)
# for i in efields:
#   y=get_edge_model_values(device=device, region=region, name=i)
#   if min(y) < ymin:
#     ymin = min(y)