I was working on Prof. S. Datta's code (https://nanohub.org/resources/19564) for 1D diode. I find the convergence rate is highly sensitive to the initial guess, although Newton-Rapson method is used to solve the non-linear Poisson. Prof. Datta used initial guess for potential in the self-consistent loop to be
U=[zeros(Ns,1);.2*ones(Nc,1);zeros(Ns,1)]; which gives very fast convergence.
But if I change it the convergence rate gets extremely poor. In fact when uniform potential everywhere is taken as initial guess (for example U=[zeros(Ns,1); zeros(Nc,1);zeros(Ns,1)]; or U=[ones(Ns,1); ones(Nc,1); ones(Ns,1)]; the code does not converge at all!
Can someone tell me what is the reason for that? Before I go to different device structure how can I get the generalized criteria to ensure fast convergence?