Commit caf65844 authored by Rafael Laboissiere's avatar Rafael Laboissiere

Imported Upstream version 0.0.9

parent 34e2a397
This diff is collapsed.
Name: SECS1D
Version: 0.0.8
Date: 2008-08-23
Version: 0.0.9
Date: 2012-03-30
Author: Carlo de Falco
Maintainer: Carlo de Falco
Title: SEmi Conductor Simulator in 1D
Description: A Drift-Diffusion simulator for 1d semiconductor devices
Categories: Electrical Engineering
Depends: octave (>= 2.9.17)
Depends: octave (>= 3.0), bim
Autoload: no
License: GPL version 2 or later
Url: http://www.comson.org/dem
secs1D >> SEmiConductor Simulator in 1D
DDG
DDGelectron_driftdiffusion
DDGgummelmap
DDGhole_driftdiffusion
DDGn2phin
DDGnlpoisson
DDGp2phip
DDGphin2n
DDGphip2p
DDGplotresults
DDN
DDNnewtonmap
Utilities
constants
Ubern
Ubernoulli
Ucompconst
Ucomplap
Ucompmass
Udriftdiffusion
Umediaarmonica
Uscharfettergummel
secs1d
Drift-Diffusion solvers
secs1d_dd_gummel_map
secs1d_dd_newton
non-linear Poisson solver
secs1d_nlpoisson_newton
Physical constants and material data
secs1d_physical_constants.m
secs1d_silicon_material_properties.m
\ No newline at end of file
## Generic Makefile to allow the octave-forge packages to be build and
## installed using "configure; make all; make install". This Makefile
## includes the capability to install to a temporary location, and install
## an on_uninstall.m file that prevents the user removing this package
## with Octave's package manager. This is useful for for the distribution's
## various package managers and is forced by defining DESTDIR and DISTPKG.
PKGDIR := $(shell pwd | sed -e 's|^.*/||')
TMPDIR ?= /tmp
PACKAGE ?= $(TMPDIR)/$(PKGDIR).tar.gz
PKG := $(shell echo $(PKGDIR) | sed -e 's|^\(.*\)-.*|\1|')
all: build package
build:
@if [ -e src/Makefile ]; then \
$(MAKE) -C src all; \
fi
package: build
@if [ -e src/Makefile ]; then \
mv src/Makefile src/Makefile.disable; \
fi; \
if [ -e src/configure ]; then \
mv src/configure src/configure.disable; \
fi; \
cd ..; tar -czf $(PACKAGE) $(PKGDIR); \
install:
@cd ../; \
if [ "X${DISTPKG}X" != "XX" ]; then \
stripcmd="unlink(pkg('local_list'));unlink(pkg('global_list'));"; \
fi; \
if [ "X$(DESTDIR)X" = "XX" ]; then \
pkgdir=`octave -H -q --no-site-file --eval "warning('off','all');pkg('install','$(PACKAGE)');l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);$$stripcmd;"`; \
else \
shareprefix=$(DESTDIR)/`octave -H -q --no-site-file --eval "disp(fullfile(OCTAVE_HOME(),'share','octave'));"`; \
libexecprefix=$(DESTDIR)/`octave -H -q --no-site-file --eval "disp(fullfile(octave_config_info('libexecdir'),'octave'));"`; \
octprefix=$$shareprefix/packages; \
archprefix=$$libexecprefix/packages; \
if [ ! -e $$octprefix ]; then \
mkdir -p $$octprefix; \
fi; \
if [ ! -e $$archprefix ]; then \
mkdir -p $$archprefix; \
fi; \
octave -H -q --no-site-file --eval "warning('off','all');pkg('prefix','$$octprefix','$$archprefix');pkg('global_list',fullfile('$$shareprefix','octave_packages'));pkg('local_list',fullfile('$$shareprefix','octave_packages'));pkg('install','-nodeps','-verbose','$(PACKAGE)');"; \
pkgdir=`octave -H -q --no-site-file --eval "warning('off','all');pkg('prefix','$$octprefix','$$archprefix');pkg('global_list',fullfile('$$shareprefix','octave_packages'));pkg('local_list',fullfile('$$shareprefix','octave_packages'));l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);$$stripcmd;"`; \
fi; \
if [ "X${DISTPKG}X" != "XX" ]; then \
if [ -e $$pkgdir/packinfo/on_uninstall.m ]; then \
mv $$pkgdir/packinfo/on_uninstall.m \
$$pkgdir/packinfo/on_uninstall.m.orig; \
fi; \
echo "function on_uninstall (desc)" > $$pkgdir/packinfo/on_uninstall.m; \
echo " error ('Can not uninstall %s installed by the $(DISTPKG) package manager', desc.name);" >> $$pkgdir/packinfo/on_uninstall.m; \
echo "endfunction" >> $$pkgdir/packinfo/on_uninstall.m; \
echo "#! /bin/sh -f" > $$pkgdir/packinfo/dist_admin; \
echo "if [ \"\$$1\" == \"install\" ]; then" >> $$pkgdir/packinfo/dist_admin; \
echo " octave -H -q --no-site-file --eval \"pkg('rebuild');\"" >> $$pkgdir/packinfo/dist_admin; \
echo "else" >> $$pkgdir/packinfo/dist_admin; \
echo " pkgdir=\`octave -H -q --no-site-file --eval \"pkg('rebuild');l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);\"\`" >> $$pkgdir/packinfo/dist_admin; \
echo " rm \$$pkgdir/packinfo/on_uninstall.m" >> $$pkgdir/packinfo/dist_admin; \
echo " if [ -e \$$pkgdir/packinfo/on_uninstall.m.orig ]; then" >> $$pkgdir/packinfo/dist_admin; \
echo " mv \$$pkgdir/packinfo/on_uninstall.m.orig \$$pkgdir/packinfo/on_uninstall.m" >> $$pkgdir/packinfo/dist_admin; \
echo " cd \$$pkgdir/packinfo" >> $$pkgdir/packinfo/dist_admin; \
echo " octave -q -H --no-site-file --eval \"l=pkg('list');on_uninstall(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)});\"" >> $$pkgdir/packinfo/dist_admin; \
echo " fi" >> $$pkgdir/packinfo/dist_admin; \
echo "fi" >> $$pkgdir/packinfo/dist_admin; \
chmod a+x $$pkgdir/packinfo/dist_admin; \
fi;
clean:
rm $(PACKAGE)
$(MAKE) -C src clean
function n=DDGelectron_driftdiffusion(psi,x,ng,p,ni,tn,tp,un)
% n=DDGelectron_driftdiffusion(psi,x,ng,p)
% Solves the continuity equation for electrons
% input: psi electric potential
% x integration domain
% ng initial guess and BCs for electron density
% p hole density (for SRH recombination)
% output: n updated electron density
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -28,7 +14,32 @@ function n=DDGelectron_driftdiffusion(psi,x,ng,p,ni,tn,tp,un)
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{n}} = DDGelectron_driftdiffusion(@var{psi},@var{x},@var{ng},@var{p},@var{ni},@var{tn},@var{tp},@var{un})
##
## Solve the continuity equation for electrons
##
## Input:
## @itemize @minus
## @item psi: electric potential
## @item x: integration domain
## @item ng: initial guess and BCs for electron density
## @item p: hole density (for SRH recombination)
## @end itemize
##
## Output:
## @itemize @minus
## @item n: updated electron density
## @end itemize
##
## @end deftypefn
function n = DDGelectron_driftdiffusion(psi,x,ng,p,ni,tn,tp,un)
nodes = x;
Nnodes =length(nodes);
......@@ -40,7 +51,6 @@ Bcnodes = [1;Nnodes];
nl = ng(1);
nr = ng(Nnodes);
h=nodes(elements(:,2))-nodes(elements(:,1));
c=1./h;
......@@ -55,7 +65,7 @@ dm1 = [-c.* Bneg;1000];
A = spdiags([dm1 d0 d1],-1:1,Nnodes,Nnodes);
b = zeros(Nnodes,1);%- A * ng;
% SRH Recombination term
## SRH Recombination term
SRHD = tp * (ng + ni) + tn * (p + ni);
SRHL = p ./ SRHD;
SRHR = ni.^2 ./ SRHD;
......@@ -66,7 +76,7 @@ bSRH = Ucompconst (nodes,Nnodes,elements,Nelements,SRHR,ones(Nelements,1));
A = A + ASRH;
b = b + bSRH;
% Boundary conditions
## Boundary conditions
b(Bcnodes) = [];
b(1) = - A(2,1) * nl;
b(end) = - A(end-1,end) * nr;
......@@ -75,8 +85,5 @@ A(:,Bcnodes) = [];
n = [nl; A\b ;nr];
% Last Revision:
% $Author: adb014 $
% $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
endfunction
function [odata,it,res] =...
DDGgummelmap (x,idata,toll,maxit,ptoll,pmaxit,verbose)
%
% [odata,it,res] =...
% DDGgummelmap (x,idata,toll,maxit,ptoll,pmaxit,verbose)
%
% Solves the scaled stationary bipolar DD equation system
% using Gummel algorithm
%
% input: x spatial grid
% idata.D doping profile
% idata.p initial guess for hole concentration
% idata.n initial guess for electron concentration
% idata.V initial guess for electrostatic potential
% idata.Fn initial guess for electron Fermi potential
% idata.Fp initial guess for hole Fermi potential
% idata.l2 scaled electric permittivity (diffusion coefficient in Poisson equation)
% idata.un scaled electron mobility
% idata.up scaled electron mobility
% idata.nis scaled intrinsic carrier density
% idata.tn scaled electron lifetime
% idata.tp scaled hole lifetime
% toll tolerance for Gummel iterarion convergence test
% maxit maximum number of Gummel iterarions
% ptoll tolerance for Newton iterarion convergence test for non linear Poisson
% pmaxit maximum number of Newton iterarions
% verbose verbosity level: 0,1,2
%
% output: odata.n electron concentration
% odata.p hole concentration
% odata.V electrostatic potential
% odata.Fn electron Fermi potential
% odata.Fp hole Fermi potential
% it number of Gummel iterations performed
% res total potential increment at each step
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -56,14 +14,60 @@ function [odata,it,res] =...
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{odata},@var{it},@var{res}} = DDGgummelmap(@var{x},@var{idata},@var{toll},@var{maxit},@var{ptoll},@var{pmaxit},@var{verbose})
##
## Solve the scaled stationary bipolar DD equation system using Gummel
## algorithm
##
## Input:
## @itemize @minus
## @item x: spatial grid
## @item idata.D: doping profile
## @item idata.p: initial guess for hole concentration
## @item idata.n: initial guess for electron concentration
## @item idata.V: initial guess for electrostatic potential
## @item idata.Fn: initial guess for electron Fermi potential
## @item idata.Fp: initial guess for hole Fermi potential
## @item idata.l2: scaled electric permittivity (diffusion coefficient in Poisson equation)
## @item idata.un: scaled electron mobility
## @item idata.up: scaled electron mobility
## @item idata.nis: scaled intrinsic carrier density
## @item idata.tn: scaled electron lifetime
## @item idata.tp: scaled hole lifetime
## @item toll: tolerance for Gummel iterarion convergence test
## @item maxit: maximum number of Gummel iterarions
## @item ptoll: tolerance for Newton iterarion convergence test for non linear Poisson
## @item pmaxit: maximum number of Newton iterarions
## @item verbose: verbosity level (0,1,2)
## @end itemize
##
## Output:
## @itemize @minus
## @item odata.n: electron concentration
## @item odata.p: hole concentration
## @item odata.V: electrostatic potential
## @item odata.Fn: electron Fermi potential
## @item odata.Fp: hole Fermi potential
## @item it: number of Gummel iterations performed
## @item res: total potential increment at each step
## @end itemize
##
## @end deftypefn
odata = idata;
function [odata,it,res] = DDGgummelmap (x,idata,toll,maxit,ptoll,pmaxit,verbose)
odata = idata;
Nnodes=rows(x);
D = idata.D;
vout(:,1) = idata.V;
hole_density (:,1) = idata.p;
electron_density (:,1)= idata.n;
fermin (:,1)=idata.Fn;
......@@ -71,22 +75,22 @@ fermip (:,1)=idata.Fp;
for i=1:1:maxit
if (verbose>1)
fprintf(1,'*****************************************************************\n');
fprintf(1,'**** start of gummel iteration number: %d\n',i);
fprintf(1,'*****************************************************************\n');
end
fprintf(1,"*****************************************************************\n");
fprintf(1,"**** start of gummel iteration number: %d\n",i);
fprintf(1,"*****************************************************************\n");
endif
if (verbose>1)
fprintf(1,"solving non linear poisson equation\n\n");
endif
if (verbose>1)
fprintf(1,'solving non linear poisson equation\n\n');
end
[vout(:,2),electron_density(:,2),hole_density(:,2)] =...
DDGnlpoisson (x,[1:Nnodes],vout (:,1),electron_density(:,1),hole_density(:,1),...
fermin(:,1),fermip(:,1),D,idata.l2,ptoll,pmaxit,verbose);
[vout(:,2),electron_density(:,2),hole_density(:,2)] =\
DDGnlpoisson (x,[1:Nnodes],vout(:,1),electron_density(:,1),hole_density(:,1),fermin(:,1),fermip(:,1),D,idata.l2,ptoll,pmaxit,verbose);
if (verbose>1)
fprintf (1,'\n\nupdating electron qfl\n\n');
end
electron_density(:,3)=...
if (verbose>1)
fprintf (1,"\n\nupdating electron qfl\n\n");
endif
electron_density(:,3)=\
DDGelectron_driftdiffusion(vout(:,2), x, electron_density(:,2),hole_density(:,2),idata.nis,idata.tn,idata.tp,idata.un);
fermin(:,2) = DDGn2phin(vout(:,2),electron_density(:,3));
......@@ -94,29 +98,32 @@ for i=1:1:maxit
fermin(end:2) = idata.Fn(end);
if (verbose>1)
fprintf(1,'updating hole qfl\n\n');
end
fprintf(1,"updating hole qfl\n\n");
endif
hole_density(:,3)=...
hole_density(:,3) = \
DDGhole_driftdiffusion(vout(:,2), x, hole_density(:,2),electron_density(:,2),idata.nis,idata.tn,idata.tp,idata.up);
fermip(:,2) = DDGp2phip(vout(:,2),hole_density(:,3));
fermip(1,2) = idata.Fp(1);
fermip(end,2) = idata.Fp(end);
if (verbose>1)
fprintf(1,'checking for convergence\n\n');
end
fprintf(1,"checking for convergence\n\n");
endif
nrfn= norm(fermin(:,2)-fermin(:,1),inf);
nrfp= norm (fermip(:,2)-fermip(:,1),inf);
nrv = norm (vout(:,2)-vout(:,1),inf);
nrm(i) = max([nrfn;nrfp;nrv]);
if (verbose>1)
fprintf (1,' max(|phin_(k+1)-phinn_(k)| , |phip_(k+1)-phip_(k)| , |v_(k+1)- v_(k)| )= %d\n',nrm(i));
end
fprintf (1," max(|phin_(k+1)-phinn_(k)| , |phip_(k+1)-phip_(k)| , |v_(k+1)- v_(k)| )= %d\n",nrm(i));
endif
if (nrm(i)<toll)
break
end
endif
vout(:,1) = vout(:,end);
hole_density (:,1) = hole_density (:,end) ;
......@@ -127,15 +134,15 @@ for i=1:1:maxit
if(verbose)
DDGplotresults(x,electron_density,hole_density,vout,fermin,fermip);
end
end
endif
endfor
it = i;
res = nrm;
if (verbose>0)
fprintf(1,'\n\nInitial guess computed by DD: # of Gummel iterations = %d\n\n',it);
end
fprintf(1,"\n\nInitial guess computed by DD: # of Gummel iterations = %d\n\n",it);
endif
odata.n = electron_density(:,end);
odata.p = hole_density(:,end);
......@@ -143,5 +150,4 @@ odata.V = vout(:,end);
odata.Fn = fermin(:,end);
odata.Fp = fermip(:,end);
endfunction
\ No newline at end of file
function p=DDGhole_driftdiffusion(psi,x,pg,n,ni,tn,tp,up)
% p=DDGhole_driftdiffusion(psi,x,pg,n)
% Solves the continuity equation for holes
% input: psi electric potential
% x spatial grid
% pg initial guess and BCs for hole density
% n electron density (to compute SRH recombination)
% output: p updated hole density
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -29,21 +14,42 @@ function p=DDGhole_driftdiffusion(psi,x,pg,n,ni,tn,tp,up)
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{p}} = DDGhole_driftdiffusio(@var{psi},@var{x},@var{pg},@var{n},@var{ni},@var{tn},@var{tp},@var{up})
##
## Solve the continuity equation for holes
##
## Input:
## @itemize @minus
## @item psi: electric potential
## @item x: spatial grid
## @item ng: initial guess and BCs for electron density
## @item n: electron density (for SRH recombination)
## @end itemize
##
## Output:
## @itemize @minus
## @item p: updated hole density
## @end itemize
##
## @end deftypefn
function p = DDGhole_driftdiffusion(psi,x,pg,n,ni,tn,tp,up)
nodes = x;
Nnodes =length(nodes);
elements = [[1:Nnodes-1]' [2:Nnodes]'];
Nelements=size(elements,1);
Bcnodes = [1;Nnodes];
pl = pg(1);
pr = pg(Nnodes);
h=nodes(elements(:,2))-nodes(elements(:,1));
c=up./h;
Bneg=Ubernoulli(-(psi(2:Nnodes)-psi(1:Nnodes-1)),1);
Bpos=Ubernoulli( (psi(2:Nnodes)-psi(1:Nnodes-1)),1);
......@@ -54,9 +60,9 @@ d1 = [1000;-c.* Bneg];
dm1 = [-c.* Bpos;1000];
A = spdiags([dm1 d0 d1],-1:1,Nnodes,Nnodes);
b = zeros(Nnodes,1);% - A * pg;
b = zeros(Nnodes,1);## - A * pg;
% SRH Recombination term
## SRH Recombination term
SRHD = tp * (n + ni) + tn * (pg + ni);
SRHL = n ./ SRHD;
SRHR = ni.^2 ./ SRHD;
......@@ -67,7 +73,7 @@ bSRH = Ucompconst (nodes,Nnodes,elements,Nelements,SRHR,ones(Nelements,1));
A = A + ASRH;
b = b + bSRH;
% Boundary conditions
## Boundary conditions
b(Bcnodes) = [];
b(1) = - A(2,1) * pl;
b(end) = - A(end-1,end) * pr;
......@@ -76,8 +82,6 @@ A(:,Bcnodes) = [];
p = [pl; A\b ;pr];
% Last Revision:
% $Author: adb014 $
% $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
endfunction
function phin = DDGn2phin (V,n);
% phin = DDGn2phin (V,n);
% computes the qfl for electrons using Maxwell-Boltzmann
% statistics.
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -24,15 +14,23 @@ function phin = DDGn2phin (V,n);
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{phin}} = DDGn2phin(@var{V},@var{n})
##
## Compute the qfl for electrons using Maxwell-Boltzmann statistics.
##
## @end deftypefn
% load constants
nmin = 0;
function phin = DDGn2phin (V,n);
## Load constants
nmin = 0;
n = n .* (n>nmin) + nmin * (n<=nmin);
phin = V - log(n) ;
% Last Revision:
% $Author: adb014 $
% $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
endfunction
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## SECS1D is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{phip}} = DDGn2phin(@var{V},@var{p})
##
## Compute the qfl for holes using Maxwell-Boltzmann statistics
##
## @end deftypefn
function phip = DDGp2phip (V,p);
## Load constants
pmin = 0;
p = p .* (p>pmin) + pmin * (p<=pmin);
phip = V + log(p) ;
endfunction
function n = DDGphin2n (V,phin);
% n = DDGphin2n (V,phin);
% computes the electron density using Maxwell-Boltzmann
% statistics.
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -25,12 +14,22 @@ function n = DDGphin2n (V,phin);
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{n}} = DDGphin2n(@var{V},@var{phin})
##
## Compute the electron density using Maxwell-Boltzmann statistics
##
## @end deftypefn
function n = DDGphin2n (V,phin);
nmin = 0;
n = exp ((V-phin));
n = n .* (n>nmin) + nmin * (n<=nmin);
% Last Revision:
% $Author: adb014 $
% $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
endfunction
function p = DDGphip2p (V,phip);
% p = DDGphip2p (V,phip);
% computes the hole density using Maxwell-Boltzmann
% statistics.
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -24,16 +14,23 @@ function p = DDGphip2p (V,phip);
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##
## author: Carlo de Falco <cdf _AT_ users.sourceforge.net>
## -*- texinfo -*-
##
## @deftypefn {Function File}@
## {@var{p}} = DDGphip2p(@var{V},@var{phip})
##
## Compute the hole density using Maxwell-Boltzmann statistic
##
## @end deftypefn
% load constants
function p = DDGphip2p (V,phip);
## Load constants
pmin = 0;
p = exp ((phip-V));
p = p .* (p>pmin) + pmin * (p<=pmin);
% Last Revision:
% $Author: adb014 $
% $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
endfunction
function DDGplotresults(x,n,p,V,Fn,Fp);
% DDGplotresults(x,n,p,V,Fn,Fp);
## This file is part of
## Copyright (C) 2004-2008 Carlo de Falco
##
## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
## -------------------------------------------------------------------
## Copyright (C) 2004-2007 Carlo de Falco
##
##
##
## SECS1D is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
......@@ -22,32 +14,39 @@ function DDGplotresults(x,n,p,V,Fn,Fp);
##
## You should have received a copy of the GNU General Public License
## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
##