You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider changes in depletion state after reconverging the electric potential, e.g. when calculating capacitances #657
One thing that can happen here is that reconverge_electric_potential=true can change the depletion state, and hence sim.ϵ_r but sim.weighting_potentials are never updated here. A later calculate_capacitance_matrix call will silently mix the new ϵ_r with stale weighting potentials, since it only checks !ismissing, not consistency. Is this something we want to take into account?
My proposal here would be to detect and fix this automatically rather than only a warning. update_till_convergence! would record, per contact, the undepleted mask of sim.point_types each weighting potential was calculated with. After update_till_convergence!(sim, ElectricPotential) and mark_bits!, both adjust_* functions would compare this mask with the current one and reconverge any outdated weighting potential on its current grid, starting from the old solution. Comparing the mask rather than imp_scale avoids false updates from convergence noise. On :IVCIlayer, a bias change shifts the weighting potentials because of the undepleted n+ layer points, which previously went unnoticed into calculate_capacitance_matrix. This is narrower than the generation-counter idea, but it keeps the weighting potentials consistent instead of just warning. I have this implemented locally and depending on your thoughts this could be added after this PR
Activity