The REGRID/ADAPT line

Syntax

  REGRid  location i/o variable criterion control interpolation
  ADapt   location i/o variable criterion control interpolation

Description

The REGRID and ADAPT lines allows refinement or coarsening (unrefining) of a mesh. Any element across which the chosen variable changes by more than a specified tolerance, or in which the chosen variable exceeds a given value, is refined subject to some additional constraints. Conversely coarsening (unrefinement) takes place when a chosen variable changes by less than a specified tolerance or a chosen variable is below a given value. The REGRID line performs the specified grid modification only once whereas the ADAPT line automatically attempts grid adaption at any newly acquired operating point after its occurence, repeating the associated calculation until an adequate grid is achieved.

Parameters

location
  X.MIn       =  real
  X.MAx       =  real
  Y.MIn       =  real
  Y.MAx       =  real
  Z.MIn       =  real
  Z.MAx       =  real
  REGion      =  integer  (default:all)
  IGnore      =  integer  (default:none)
  BOX.refine  =  logical  (default is false)

The bounds *.MIN and *.MAX are used to limit the regrid; only elements which have nodes which fall inside the box are considered for refinement or coarsening. The REGION parameter has a similar use; only regions specified are adjusted according to the user criterion. (Others may be refined/coarsened as a side effect, to maintain well-shaped elements). The default is to regrid all regions for potential and electric field types, and all semiconductor regions for regrids which depend on the other variables. The parameter IGNORE is similar to REGION, but opposite in effect. Ignored regions are not regrided either according to the user criterion or according to the "obtuse criterion" (see below); nor are they smoothed after regrid. The default is not to ignore any region. BOX.REFINE specifies that regrids should take place inside purely rectangular regions as generated by tri; typically one does not want to regrid these regions as they can have highly anisotropic elements.

i/o

  OUTFile    =  filename
  OUT.green  =  filename
  IN.green   =  filename
  NO.green   =  logical   (default is false)
  DOPFile    =  filename
  AScii      =  logical   (default is true)
  STats      =  logical   (default is false)

OUTFILE is the binary output mesh file, and is necessary if the mesh is to be used for subsequent runs. A history of the triangle tree is always generated to assist further regriding steps. Its name can be specified by OUT.GREEN, and its default is generated from OUTFILE by concatenating the letters "tt" to the end. No such file will be created if NO.GREEN is specified. Additionally, a triangle tree for the previous mesh (if a tree exists) is used for this regrid. By default, PADRE will look for a file with the same name as the current mesh plus "tt" at the end as above. Alternatively, IN.GREEN can be used to implement a different file name. DOPFILE is the name of a file (up to 20 characters) which contains the doping for the device (see DOPING line). Specifying DOPFILE avoids interpolating doping values at any newly created grid points (the default), by using the initial doping specification to redope the structure. ASCII specifies that all mesh files and triangle trees (not DOPFILE) for this line should be done in ascii rather than the default - binary. STATS prints some refinement statistics in the standard PADRE output file.

variable is one of:

  Potential  =  logical   Mid-gap potential (V)
  QFN        =  logical   Electron quasi-fermi level (V)
  QFP        =  logical   Hole quasi-fermi level (V)
  N.temp     =  logical   Electron temperature (eV)
  P.temp     =  logical   Hole temperature (eV)
  DOping     =  logical   Total net impurity concentration (/cm**3)
  IOn.imp    =  logical   Net ionized impurity concentration (/cm**3)
  ELEctron   =  logical   Electron concentration (/cm**3)
  Hole       =  logical   Hole concentration (/cm**3)
  NET.CHrg   =  logical   Net charge (/cm**3)
  NET.CArr   =  logical   Net carrier concentration (/cm**3)
  MIn.carr   =  logical   Minority carrier concentration (/cm**3)
  P.track    =  logical   Carrier density from particle tracks (/cm**3)
  HEtero     =  logical   Material interfaces (unitless)
  ERror      =  logical   Potential error estimate (V)

This parameter selects the discriminatory variable. For ADAPT input lines only the default is ERROR.

criterion

  R.STep       =  real
  C.STep       =  real
  CHange       =  logical
  RELAtive     =  logical  (default is false)
  DV.min       =  real     (default is Poisson x.tol)
  R.Threshold  =  real     (default is r.step)
  N.Threshold  =  real     (default is 200)
  F.Threshold  =  real     (default is 0.1)
  REfine       =  logical  (default is false)
  COarsen      =  logical  (default is false)
  LOCaldop     =  logical  (default is false)
  LOGarithm    =  logical  (default is false)
  ABsolute     =  logical  (default is false)

R.STEP is the actual numerical criterion for performing a element refinement while C.STEP is for coarsening (unrefining). If either the magnitude or change (as specified by CHANGE, which defaults to true unless LOCALDOP is set) in a variable exceeds R.STEP, refinement will take place subject to constraints on element size and level as discussed below; conversely, if the value for this element and its brothers is below C.STEP, coarsening (unrefinement) takes place. RELATIVE specifies that the tolerance be applied in a relative sense; e.g. with a voltage-based criteria, the values of R.STEP and C.STEP are taken as fractions of the maximum potential difference inside the device. To avoid overflow for RELATIVE comparisons to flat potential solutions, a minimum voltage differential is defined by DV.MIN; the default is the Poisson solution tolerance (see METHOD line), as the nonlinear solution is only accurate to this value. Unitless variables (HETERO) do not require criteria, and only refinement can take place there, subject to level and element size control.

The first set of constraints, particularly useful for the ADAPT line, are R.THRESHOLD, F.THRESHOLD and N.THRESHOLD which prohibit any grid modification regardless of R.STEP/C.STEP unless either (1) the largest deviation exceeds the value given by R.THRESHOLD or (2) the number of elements to be coarsened exceeds the absolute quantity N.THRESHOLD or the fraction F.THRESHOLD of the starting number of elements. If only R.STEP is given (typical for a REGRID line), R.THRESHOLD defaults to the same value as R.STEP while if only R.THRESHOLD is given (typical for ADAPT), R.STEP defaults to the 0.95*R.THRESHOLD. N.THRESHOLD defaults to 200 or 10% of the total number of elements in the grid, which ever is larger.

If neither R.STEP, R.THRESHOLD or C.STEP is specified, PADRE looks at the REFINE and COARSEN flags to determine which operation is to take place; in this case, the grid will be refined or coarsened until the level and size limits below are met. The parameter LOCALDOP compares the magnitude (default) or difference of a variable against the local doping values; this might for instance be used in conjunction with MIN.CARR to refine in areas within the device that are in high-level injection. LOGARITHM and ABSOLUTE specify that the logarithm and absolute value of the variable be used respectively (with LOGARITHM set, R.STEP/C.STEP will be interpreted as the step in the logarithm). Since many of the quantities may become negative, PADRE actually uses

to avoid overflow. To get the true logarithm of a quantity, specify ABSOLUTE and LOGARITHM (absolute is taken first).

control

  MAx.level    =  integer    (default is dynamic)
  REL.level    =  integer    (default is 1)
  LEv.ignore   =  logical    (default is false)
  HMin         =  real       (default is 0)
  HDir         =  logical    (default is true)
  DEbye        =  real       (default is 0)
  FReeze       =  logical    (default is false)
  SMooth.k     =  integer    (default is 1)
  IT.Smooth    =  integer    (default is 30)
  COs.ang      =  real       (default is 2.0)      [Expert]
  BOUnd.green  =  logical    (default is true)     [Expert]
  G.Semi       =  integer    (default is 1)        [Expert]
  G.Ins        =  integer    (default is 1)        [Expert]
  COndense     =  character  (default is "all")
  REOrder      =  character  (default is false)
  3d.refine    =  logical    (default is false)
  DZ.level     =  integer    (default is 1)
  OFf          =  logical    (default is false)
  IT.Resolve   =  integer    (default is 2)
  N.Resolve    =  integer    (default is 1.0e-3)

MAX.LEVEL is the maximum level any element can reach for a given REGRID line relative to the initial, unrefined mesh; The default is to allow MAX.LEVEL to increase to one more than the maximum level in the preceding grid, but can be set to a smaller value to limit refinement. Separately, the relative change in each element's level vis a vis the preceding mesh can be specified using REL.LEVEL. Alternatively, LEV.IGNORE ignores the level limits and proceeds until the criteria are met; LEV.IGNORE can thus be viewed as setting MAX.LEVEL and REL.LEVEL to infinity. Regardless of the discriminatory variable's value, a refinement will not take place if an edge is created that is smaller than HMIN or the product of DEBYE and the local Debye length; a coarsening will not take place beyond level 0. If HDIR=true, only element edges which meet the refinement criteria are checked for length against HMIN and/or DEBYE. FREEZE is a parameter which will prohibit unrefining from the current level. SMOOTH.K and IT.SMOOTH are mesh smoothing options, and CONDENSE is the condense region key, both as described for the MESH line. REORDER reorders the grid nodes and elements after adaption.

COS.ANGLE defines the "obtuse criterion" to limit the creation of obtuse angles in the mesh. If regrid would create a element with an angle whose cos is less than -COS.ANGLE, nodes are added so that this does not occur. The test can be turned off locally by using the ignore parameter; it can be turned off everywhere by using a value of COS.ANG greater than 1. The default is to turn it off everywhere. Similarly, the BOUND.GREEN parameter prevents obtuse elements from being created at a boundary or material interface. G.SEMI and G.INS define the maximum levels of green refinement.

In addition to refinement of triangle faces in each xy-grid plane, 3D.REFINE permits refinement of prisms (adding grid planes) in the z direction. DZ.LEVEL is the maximum number of levels of z-refinement that can be performed relative to the initial state.

IT.RESOLVE, N.RESOLVE and OFF are parameters specific to the ADAPT line. IT.RESOLVE is the maximum number of resolve (readapt) attempts per bias point. N.RESOLVE is the minimum fraction of elements that must be refined in order for a subsequent resolve to be attempted. OFF turns off the effect of a previous ADAPT line; no more adaptive refinement will be attempted after the occurence of a line with OFF specified as true.

interpolation

  FEm        =  logical  (default is true)
  DOp.int    =  logical  (default is false)  [Expert]
  1d.integ   =  logical  (default is false)  [Expert]
  DI.Degree  =  real     (default is 3)      [Expert]
  DI.Level   =  integer  (default is 0)      [Expert]

The FEM parameter specifies that basis functions equivalents be used to interpolate concentration at new nodes, rather than simple exponents. The parameters DOP.INT, 1D.INTEG, DI.DEGREE and DI.LEVEL refer to doping integration control; see the MESH input line documentation.

Examples

Starting with an initial grid, we refine twice, requesting that all elements with large doping steps be refined:

  REGRID  LOG DOPING R.STEP=6 OUTF=grid1 DOPF=dopxx1
  REGRID  LOG DOPING R.STEP=6 OUTF=grid2 DOPF=dopxx1

A similar effect could be obtained with just one REGRID line below. In both cases two levels of refinement are done. The first choice is preferable because new doping information is introduced at each level.

  REGRID  LOG DOPING R.STEP=6 OUTF=grid2 DOPF=dopxx1 MAX.LEVEL=2

A better strategy is to use the LEVEL and HMIN parameters, repeating the refinement over and over until on each element either (1) the change in doping is less than 6 orders of magnitude or (2) another refinement will produce a grid spacing less than 0.01mm.

  REGRID  LOG DOPING R.STEP=6 OUTF=grid2 DOPF=dopxx1 
  +       LEV.IGN HMIN=.01

A dynamic grid is set up by supplying an ADAPT line. At every bias point solved after this line, the discretization error on the grid will be tested. The refine/unrefine criteria are 9.5mV (from R.THRESHOLD) and 1mV, and the process will be initiated if (1) the potential error exceeds 10mV or (2) the number of unrefinable elements exceeds 500. The process is repeated until these criteria are met, and the final grid is saved as "rmesha" where the terminating "a" is incremented for subsequent meshes.

  ADAPT  ERROR R.THRESH=0.01 C.STEP=.001 N.THRESH=500 OUTF=rmesha

Regrid on generated carrier density from a particle track. The refinement is performed in all three dimensions if the density changes by more than 1.0e17/cm**3 over any edge in an element.

  REGRID   3D P.TR R.STEP=1e17 OUTF=rgrid DOPF=dopfile LEV.IGN