1 /*****************************************************************************/
2 /* 8888888 88888888 88888888 */
5 /* 8 88888888 88888888 */
8 /* 888888 888888888 888888888 */
10 /* A Two-Dimensional General Purpose Semiconductor Simulator. */
13 /* Last update: Jan 19, 2006 */
17 /* NINT, No.69 P.O.Box, Xi'an City, China */
19 /*****************************************************************************/
29 //define cgns file type
30 const int MODEL
= 101;
34 const int N_Type
= 201;
35 const int P_Type
= 202;
36 const int PN_Both
= 203;
37 const int PN_None
= 204;
40 const int POISSON
= 300;
42 const int DDML1
= 310;
43 const int DDML1E
= 311;
44 const int DDML1AC
= 312;
45 const int DDML1MIX
= 313;
46 const int QDDML1E
= 315;
48 const int DDML2
= 320;
49 const int DDML2E
= 321;
50 const int DDML2MIX
= 322;
52 const int EBML3E
= 331;
54 const int EMFEM
= 391;
57 const int DDM_Gummel
= 501;
58 const int DDM_Newton
= 502;
61 const int EQUILIBRIUM
= 601;
62 const int STEADYSTATE
= 602;
63 const int DCSWEEP
= 603;
64 const int DCSWEEP_VSCAN
= 604;
65 const int DCSWEEP_ISCAN
= 605;
66 const int TRANSIENT
= 606;
67 const int ACSWEEP
= 607;
68 const int TRACE
= 608;
70 //define parameter index
71 const int MeshObject
= 700;
72 const int ElecDensity
= 701;
73 const int HoleDensity
= 702;
74 const int EFieldX
= 703;
75 const int EFieldY
= 704;
76 const int EField
= 705;
77 const int Potential
= 706;
78 const int Phi_Intrinsic
= 707;
81 const int ValenceBand
= 710;
82 const int ConductionBand
= 711;
83 const int QuantumEc
= 712;
84 const int QuantumEv
= 713;
85 const int Doping
= 720;
86 const int DopingNa
= 721;
87 const int DopingNd
= 722;
89 const int Temperature
= 730;
90 const int ElecTemp
= 731;
91 const int HoleTemp
= 732;
93 const int OpticalEx
= 750;//```
94 const int OpticalEy
= 751;
95 const int OpticalEz
= 752;
96 const int OpticalHx
= 753;
97 const int OpticalHy
= 754;
98 const int OpticalHz
= 755;
99 const int OpticalG
= 756;
101 //define order for ODE solver
105 const int Linear
= 851;
106 const int SignedLog
= 852;
108 //define Newton's method
109 const int Basic
= 915;
110 const int LineSearch
= 917;
111 const int TrustRegion
= 910;
113 //define Newton damping
114 const int DampingNo
= 930;
115 const int DampingBankRose
= 931;
116 const int DampingPotential
= 932;
118 //define Impact Ionization Type
120 const int GradQf
= 1;
121 const int EVector
= 2;
123 const int SoftII
= 4;
124 const int HardII
= 5;
125 const int TempII
= 6;
130 int Solver
; //DDM model level 1,2...
131 int Scheme
; //solver scheme: DDM_Newton, DDM_Gummel...
132 int Type
; //solver type: transient , steadystate...
133 int NS
; //nonlinear solver scheme: basic, line search, trust region...
134 int Damping
; //Newton damping
135 string LS
; //linear solver scheme: LU, BCGS, GMRES ...
136 int MaxIteration
; //Max Iteration number
137 int port
; //the net port used for mix simulation
138 int BDF_Type
; //transient solver: ODE formula
139 // semiconductor region advanced model specification
140 bool HighFieldMobility
;
141 bool BandBandTunneling
;
142 bool ImpactIonization
;
144 bool IncompleteIonization
;
145 bool QuantumMechanical
;
150 // nonlinear solver convergence criteria
152 double relative_toler
;
154 double possion_abs_toler
;
155 double elec_continuty_abs_toler
;
156 double hole_continuty_abs_toler
;
157 double heat_equation_abs_toler
;
158 double elec_energy_abs_toler
;
159 double hole_energy_abs_toler
;
160 double elec_quantum_abs_toler
;
161 double hole_quantum_abs_toler
;
162 double electrode_abs_toler
;
164 // parameters for DC, TRAN, TRACE etc.
166 vector
<string
> Electrode_VScan_Name
;
168 string Electrode_IScan_Name
;
169 int Electrode_ACScan
;
170 string Electrode_ACScan_Name
;
171 vector
<int> Electrode_Record
;
172 vector
<int> Electrode_Record_Index
;
173 vector
<string
> Electrode_Record_Name
;
176 double VStart
,VStep
,VStepMax
,VStop
;
177 double IStart
,IStep
,IStop
;
178 double TStart
,TStep
,TStop
;
182 double FStart
,FMultiple
,FStop
;
191 IncompleteIonization
=false;
192 ImpactIonization
= false;
194 BandBandTunneling
= false;
204 vector
<string
> Region
;
205 vector
<string
> Material
;
206 vector
<string
> Mobility
;
207 vector
<string
> IIModel
;
208 vector
<string
> OpticalModel
;
219 PetscScalar dt_last_last
;
228 double DivisionRatio
;
257 vector
<string
> vsrc_name
;
258 vector
<int> vsrc_index
;
259 vector
<string
> isrc_name
;
260 vector
<int> isrc_index
;
266 int MeshOnly
; // draw mesh only (2D)
267 int Variable
; // which Variable to plot
268 string VariableName
; // the name of the variable to plot.
269 int Resolution
; // x window resolution
270 int Measure
; // log or linear plot
271 int GeneratePS
; // generate postscript file
272 int GenerateTIFF
; // generate TIFF file
275 int NoMesh
; // do not plot the mesh
278 int Style
; // STYLE_BW | STYLE_WIREFRAME | STYLE_COLOR | (default) | STYLE_GRAYLEVEL
279 int ztick
; // # of z axis ticks
280 int Persp
; // Perspective distance
282 int Con
; // contour plot
283 int NumCon
; // # of contours
285 double az
; // azimuthal angle
286 double el
; // elevation angle
302 int Variable
; // which Variable to probe
303 string VariableName
; // the name of the variable to probe.