1 # Created by Octave 3.6.1, Sun Mar 25 18:44:37 2012 UTC <root@t61>
13 # name: <cell-element>
18 UDXappend2Ddata(filename,p,t,u,attr_name,attr_rank,attr_shape)
20 Apends data to a file in DX form.
21 Only one variable can be written to the file
22 variable must be a scalar, vector or tensor of doubles
23 mesh data in the file must be consistent with this variable
26 attr_name = name of the variable (type string)
27 attr_rank = rank of variable data (0 for scalar, 1 for vector, etc.)
28 attr_shape = number of components of variable data (assumed 1 for scalar)
33 # name: <cell-element>
38 UDXappend2Ddata(filename,p,t,u,attr_name,attr_rank,attr_shape)
43 # name: <cell-element>
50 # name: <cell-element>
55 UDXoutput2Ddata(filename,p,t,u,attr_name,attr_rank,attr_shape,endfile)
57 Outputs data in DX form.
58 Only one variable can be written to the file
59 variable must be a scalar, vector or tensor of doubles
62 attr_name = name of the variable (type string)
63 attr_rank = rank of variable data (0 for scalar, 1 for vector, etc.)
64 attr_shape = number of components of variable data (assumed 1 for scalar)
69 # name: <cell-element>
74 UDXoutput2Ddata(filename,p,t,u,attr_name,attr_rank,attr_shape,endfile)
79 # name: <cell-element>
86 # name: <cell-element>
91 UDXoutput2Dtimeseries(filename,p,t,u,attr_name,attr_rank,attr_shape,time)
93 Outputs data in DX form.
94 Only one variable can be written to the file
95 variable must be a scalar, vector or tensor of doubles
97 attr_name = name of the variable (type string)
98 attr_rank = rank of variable data (0 for scalar, 1 for vector, etc.)
99 attr_shape = number of components of variable data (assumed 1 for scalar)
104 # name: <cell-element>
109 UDXoutput2Dtimeseries(filename,p,t,u,attr_name,attr_rank,attr_shape,time)
114 # name: <cell-element>
121 # name: <cell-element>
125 prcomputes cycling pattern for RRE extrapolation:
131 RREpattern = URREcyclingpattern(RREnnit,RRErank,toll);
136 # name: <cell-element>
140 prcomputes cycling pattern for RRE extrapolation:
145 # name: <cell-element>
152 # name: <cell-element>
159 calcola la funzione di Bernoulli
160 B(x)=x/(exp(x)-1) in corrispondenza dei
161 due argomenti Z e -Z, ricordando che risulta
167 # name: <cell-element>
177 # name: <cell-element>
184 # name: <cell-element>
189 function r=columns(m)
191 Note: octave already has this function,
192 this is here only for matlab compatibility
196 # name: <cell-element>
201 function r=columns(m)
206 # name: <cell-element>
213 # name: <cell-element>
217 C = Ucompconst (imesh,coeffn,coeffe)
221 # name: <cell-element>
225 C = Ucompconst (imesh,coeffn,coeffe)
230 # name: <cell-element>
237 # name: <cell-element>
241 L = Ufastcomplap (mesh,coeff)
245 # name: <cell-element>
249 L = Ufastcomplap (mesh,coeff)
254 # name: <cell-element>
261 # name: <cell-element>
265 Bmat = Ucompmass2 (imesh,Bvect,Cvect);
269 # name: <cell-element>
273 Bmat = Ucompmass2 (imesh,Bvect,Cvect);
278 # name: <cell-element>
285 # name: <cell-element>
289 [odata,omesh] = Udescaling(imesh,idata);
293 # name: <cell-element>
297 [odata,omesh] = Udescaling(imesh,idata);
302 # name: <cell-element>
309 # name: <cell-element>
313 Udopdepmob (mu,par,D);
317 # name: <cell-element>
321 Udopdepmob (mu,par,D);
326 # name: <cell-element>
333 # name: <cell-element>
341 # name: <cell-element>
350 # name: <cell-element>
357 # name: <cell-element>
361 mob = Ufielddepmob(imesh,u0,F,vsat,b)
362 Computes field dependent mobility
366 # name: <cell-element>
370 mob = Ufielddepmob(imesh,u0,F,vsat,b)
371 Computes field dependent mobility
376 # name: <cell-element>
383 # name: <cell-element>
388 c=Udriftdiffusion(mesh,Dsides,guess,M,U,V,u)
389 solves the drift diffusion equation
390 $ -div ( u ( \nabla n - n \nabla V)) + M = U $
395 # name: <cell-element>
400 c=Udriftdiffusion(mesh,Dsides,guess,M,U,V,u)
401 solves the drift diffusion equa
405 # name: <cell-element>
412 # name: <cell-element>
417 c=Udriftdiffusion(mesh,Dsides,guess,M,U,V,Vth,u)
418 solves the drift diffusion equation
419 $ -div ( u ( \nabla (n Vth) - n \nabla V)) + M = U $
424 # name: <cell-element>
429 c=Udriftdiffusion(mesh,Dsides,guess,M,U,V,Vth,u)
430 solves the drift diffusion
434 # name: <cell-element>
441 # name: <cell-element>
445 mob = Ufielddepmob(imesh,u0,F,vsat,b)
446 Computes field dependent mobility
450 # name: <cell-element>
454 mob = Ufielddepmob(imesh,u0,F,vsat,b)
455 Computes field dependent mobility
460 # name: <cell-element>
467 # name: <cell-element>
471 [jx,jy]=Udrawcurrent(omesh,n,psi,psith,coeffe);
475 # name: <cell-element>
479 [jx,jy]=Udrawcurrent(omesh,n,psi,psith,coeffe);
484 # name: <cell-element>
491 # name: <cell-element>
495 [jx,jy]=Udrawcurrent2(omesh,n,psi,psith,coeffe);
499 # name: <cell-element>
503 [jx,jy]=Udrawcurrent2(omesh,n,psi,psith,coeffe);
508 # name: <cell-element>
515 # name: <cell-element>
519 -- Function File: [JX,JY] = Ufvsgcurrent3 (MESH, U, ALPHA, GAMMA, ETA,
521 Builds the Scharfetter-Gummel approximation of the vector field
523 J(U) = ALPHA* GAMMA * (ETA * grad U - BETA * U))
526 - ALPHA is an element-wise constant scalar function
528 - ETA, U, GAMMA are piecewise linear conforming scalar functions
530 - BETA is an element-wise constant vector function
532 J(U) is an element-wise constant vector function
534 Instead of passing the vector field BETA directly one can pass a
535 piecewise linear conforming scalar function PHI as the last input.
536 In such case BETA = grad PHI is assumed. If PHI is a single
537 scalar value BETA is assumed to be 0 in the whole domain.
539 See also: Uscharfettergummel3
545 # name: <cell-element>
549 Builds the Scharfetter-Gummel approximation of the vector field
554 # name: <cell-element>
561 # name: <cell-element>
565 [fd]=Uinvfermidirac(eta,par);
569 # name: <cell-element>
573 [fd]=Uinvfermidirac(eta,par);
578 # name: <cell-element>
585 # name: <cell-element>
589 [mesh,data]=ise2pde3(grid_file,pref,data_file,load_data,out_file)
591 estrae dati dal formato DF-ISE di ISE a pdetool di Matlab
592 grid_file contiene il nome del file di griglia da estrarre
593 pref un prefisso che verra' dato ai files temporanei creati da grep
594 data_file e' un cell array delle file da estrarre
595 load_data e' un cell array che contiene i nomi delle grandezze da estrarre
596 out_file e' il nome del file matlab opzionale per salvare i dati estratti
599 Marco Bellini marco_bellini_1@yahoo.it
601 Octave porting and bug fixes Carlo de Falco
605 # name: <cell-element>
609 [mesh,data]=ise2pde3(grid_file,pref,data_file,load_data,out_file)
615 # name: <cell-element>
622 # name: <cell-element>
626 mesh=Ujoinmeshes(mesh1,mesh2,side1,side2)
630 # name: <cell-element>
634 mesh=Ujoinmeshes(mesh1,mesh2,side1,side2)
639 # name: <cell-element>
646 # name: <cell-element>
651 mesh=Umeshproperties(mesh)
652 precomputes some useful mesh properties
657 # name: <cell-element>
662 mesh=Umeshproperties(mesh)
663 precomputes some useful mesh properties
668 # name: <cell-element>
675 # name: <cell-element>
681 loadgmshmesh(filename);
687 # name: <cell-element>
696 # name: <cell-element>
703 # name: <cell-element>
709 omesh=Umshcreatemesh(geometry,scalefactor);
715 # name: <cell-element>
724 # name: <cell-element>
731 # name: <cell-element>
735 Dnodes=Unodesonside(mesh,Dsides);
739 # name: <cell-element>
743 Dnodes=Unodesonside(mesh,Dsides);
748 # name: <cell-element>
755 # name: <cell-element>
759 [Fx,Fy]=Updegrad(mesh,F);
761 computes piecewise constant
762 gradient of a piecewise linear
763 scalar function F defined on
764 the mesh structure described by mesh
768 # name: <cell-element>
772 [Fx,Fy]=Updegrad(mesh,F);
777 # name: <cell-element>
784 # name: <cell-element>
792 # name: <cell-element>
801 # name: <cell-element>
808 # name: <cell-element>
816 # name: <cell-element>
825 # name: <cell-element>
832 # name: <cell-element>
842 # name: <cell-element>
852 # name: <cell-element>
859 # name: <cell-element>
863 s = Urrextrapolation(X)
864 RRE vector extrapolation see
865 Smith, Ford & Sidi SIREV 29 II 06/1987
869 # name: <cell-element>
873 s = Urrextrapolation(X)
874 RRE vector extrapolation see
879 # name: <cell-element>
886 # name: <cell-element>
890 [odata,omesh] = Uscaling(imesh,idata);
894 # name: <cell-element>
898 [odata,omesh] = Uscaling(imesh,idata);
903 # name: <cell-element>
910 # name: <cell-element>
915 SG=Ufastscharfettergummel2(mesh,v,acoeff,bcoeff)
918 Builds the Scharfetter-Gummel matrix for the
919 the discretization of the LHS
920 of the Drift-Diffusion equation:
922 $ -\div (a(x) (\grad (b(x) u) - b(x) u \grad v'(x) ))= f $
924 where a(x) is piecewise constant
925 and v(x),b(x) is piecewise linear, so that
926 v'(x) is still piecewise constant
932 # name: <cell-element>
937 SG=Ufastscharfettergummel2(mesh,v,acoeff,bcoeff)
943 # name: <cell-element>
950 # name: <cell-element>
954 -- Function File: S = Uscharfettergummel3 (MESH, ALPHA, GAMMA, ETA,
956 Builds the Scharfetter-Gummel matrix for the discretization of the
959 -div (ALPHA * GAMMA (ETA grad u - BETA u )) = f
962 - ALPHA is an element-wise constant scalar function
964 - ETA, GAMMA are piecewise linear conforming scalar functions
966 - BETA is an element-wise constant vector function
968 Instead of passing the vector field BETA directly one can pass a
969 piecewise linear conforming scalar function PHI as the last input.
970 In such case BETA = grad PHI is assumed. If PHI is a single
971 scalar value BETA is assumed to be 0 in the whole domain.
974 [mesh.p,mesh.e,mesh.t] = Ustructmesh([0:1/3:1],[0:1/3:1],1,1:4);
975 mesh = Umeshproperties(mesh);
977 Dnodes = Unodesonside(mesh,[2,4]);
978 Nnodes = columns(mesh.p); Nelements = columns(mesh.t);
979 Varnodes = setdiff(1:Nnodes,Dnodes);
980 alpha = ones(Nelements,1); eta = .1*ones(Nnodes,1);
981 beta = [ones(1,Nelements);zeros(1,Nelements)];
982 gamma = ones(Nnodes,1);
983 f = Ucompconst(mesh,ones(Nnodes,1),ones(Nelements,1));
984 S = Uscharfettergummel3(mesh,alpha,gamma,eta,beta);
986 u(Varnodes) = S(Varnodes,Varnodes)\f(Varnodes);
987 uex = x - (exp(10*x)-1)/(exp(10)-1);
990 See also: Ucomplap, Ucompconst, Ucompmass2, Uscharfettergummel
996 # name: <cell-element>
1000 Builds the Scharfetter-Gummel matrix for the discretization of the LHS
1005 # name: <cell-element>
1012 # name: <cell-element>
1016 guess = Usmoothguess(mesh,new,old,Dsides);
1020 # name: <cell-element>
1024 guess = Usmoothguess(mesh,new,old,Dsides);
1029 # name: <cell-element>
1036 # name: <cell-element>
1040 [p,e,t]=Ustructmesh(x,y,region,sides,varargin)
1044 # name: <cell-element>
1048 [p,e,t]=Ustructmesh(x,y,region,sides,varargin)
1053 # name: <cell-element>
1060 # name: <cell-element>
1064 [p,e,t]=Ustructmesh(x,y,region,sides)
1068 # name: <cell-element>
1072 [p,e,t]=Ustructmesh(x,y,region,sides)
1077 # name: <cell-element>
1084 # name: <cell-element>
1088 [p,e,t]=Ustructmesh(x,y,region,sides)
1092 # name: <cell-element>
1096 [p,e,t]=Ustructmesh(x,y,region,sides)
1101 # name: <cell-element>
1108 # name: <cell-element>
1112 [p,e,t]=Ustructmesh(x,y,region,sides)
1116 # name: <cell-element>
1120 [p,e,t]=Ustructmesh(x,y,region,sides)
1125 # name: <cell-element>
1132 # name: <cell-element>
1136 [e,t]=Usubdomains(p,t,rcts,sidelist);
1140 # name: <cell-element>
1144 [e,t]=Usubdomains(p,t,rcts,sidelist);
1149 # name: <cell-element>
1156 # name: <cell-element>
1161 [omesh,onodes,oelements]=Usubmesh(imesh,intrfc,sdl,short)
1163 builds the mesh structure for
1167 NOTE: the intrfc parameter is unused and only kept
1172 # name: <cell-element>
1177 [omesh,onodes,oelements]=Usubmesh(imesh,intrfc,sdl,short)
1182 # name: <cell-element>
1189 # name: <cell-element>
1193 This file is part of
1195 SECS2D - A 2-D Drift--Diffusion Semiconductor Device Simulator
1196 -------------------------------------------------------------------
1197 Copyright (C) 2004-2006 Carlo de Falco
1201 SECS2D is free software; you can redistribute it and/or modify
1202 it under the terms of the GNU General Public License as published by
1203 the Free Software Foundation; either version 2 of the License, or
1204 (at your option) any later version.
1206 SECS2D is distributed in the hope that it will be useful,
1207 but WITHOUT ANY WARRANTY; without even the implied warranty of
1208 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1209 GNU General Public License for more details.
1211 You should have received a copy of the GNU General Public License
1212 along with SECS2D; If not, see <http://www.gnu.org/licenses/>.
1216 # name: <cell-element>
1220 This file is part of