[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PIN diode newton sec1d problem
From: |
Carlo De Falco |
Subject: |
Re: PIN diode newton sec1d problem |
Date: |
Thu, 2 Nov 2017 09:44:00 +0000 |
> On 1 Nov 2017, at 15:17, Tijmen Kroezen <address@hidden> wrote:
>
> Hello everyone,
>
> There is some trouble I am having concerning the modeling of a PIN diode
> (code in the attachments), that would be nice if someone with some more
> knowledge could help.
>
> My approach has been to alter the PN diode code included in the example and
> let a Newton secs1d solver solve this (I have also tried Gummel, but I was
> advised that Newton works better for PIN), but unfortunately this hasn't
> produced any results yet. The PIN diode is supposed to be 180 um long with
> three segments of 60 um. I don't have a specific doping strength in mind so I
> took the values 1e16 for both the P and N parts as a start.
>
> Unfortunately my code still produces the following errors:
>
> >> newtonPIN
> warning: matrix singular to machine precision
> warning: called from
> secs1d_dd_newton at line 69 column 11
> newtonPIN at line 121 column 28
> error: bimu_bernoulli: invalid conversion from NaN to logical
> error: called from
> bimu_bernoulli at line 45 column 11
> bim1a_advection_diffusion at line 99 column 13
> secs1d_dd_newton>residual_jacobian at line 129 column 7
> secs1d_dd_newton at line 83 column 22
> newtonPIN at line 121 column 28
>
> I have tried using a finer mesh, I am starting from zero bias, so I guess the
> only thing that might be the problem is my initial guess but I don't know
> what other guess to use. Does anyone have suggestions?
>
> Thanks so much in advance,
>
> Best regards,
>
Hi, Indeed your initial guess is inconsistent.
You are imposing a weak p-type doping in the i region, therefore p = n = ni is
not correct.
I didn't have time yet to check whether this is the reason for the simulation
failure.
I also at first sight see some errors in the postprocessing:
you are de-scaling nout, pout, etc. but your simulation output are called p, n,
etc.
Finally, if you use secs1d_dd_newton you do not need to compute the current
densities
by the difference formulas as the simulation already provides them as output
(you do need to de-scale them though).
Finally hoping to get solutions within a tolerance of 1e-12 sounds a bit
optimistic in this case,
I'd rather use something in the order of 1e-4 ~ 1e-6. That is expressed in
multiples of Vth so that
means hundreds of microvolts to nanovolts.
HTH,
c.