1 function n=DDGOXTelectron_driftdiffusion(mesh,Dsides,nin,pin,V,un,tn,tp,n0,p0,weight)
4 % n=DDGelectron_driftdiffusion(mesh,Dsides,nin,pin,V,un,tn,tp,n0,p0,weight)
7 % V = electric potential
8 % mesh = integration domain
9 % nin = electron density in the past + initial guess
10 % pin = hole density in the past
11 % n0,p0 = equilibrium densities
12 % tn,tp = carrier lifetimes
13 % weight = BDF weights
17 % n = updated electron density
21 % This file is part of
23 % SECS2D - A 2-D Drift--Diffusion Semiconductor Device Simulator
24 % -------------------------------------------------------------------
25 % Copyright (C) 2004-2006 Carlo de Falco
29 % SECS2D is free software; you can redistribute it and/or modify
30 % it under the terms of the GNU General Public License as published by
31 % the Free Software Foundation; either version 2 of the License, or
32 % (at your option) any later version.
34 % SECS2D is distributed in the hope that it will be useful,
35 % but WITHOUT ANY WARRANTY; without even the implied warranty of
36 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 % GNU General Public License for more details.
39 % You should have received a copy of the GNU General Public License
40 % along with SECS2D; If not, see <http://www.gnu.org/licenses/>.
43 BDForder = length(weight)-1;
47 denom = (tp*(nin(:,end)+sqrt(n0.*p0))+tn*(pin(:,end)+sqrt(n0.*p0)));
48 M = weight(1) + pin(:,end)./denom;
54 U += -nin(:,end-ii)*weight(ii+1);
58 n = Udriftdiffusion(mesh,Dsides,guess,M,U,V,u);