Skip to content

Consider changes in depletion state after reconverging the electric potential, e.g. when calculating capacitances #657

Open

Description

@fhagemann

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?

Originally posted by @claudiaalvgar in #623

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

Originally posted by @claudiaalvgar in #644

Activity

  1. added
    convenience
    enhancement
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    convenienceenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions