Mesh Control in ATHENA
Avoiding Problems and What to do If they Occur


Mesh control in process simulators is one of the major issues tackled by any user. Over the years the meshing algorithms with SSuprem4 and ATHENA have been improved to the stage where most arbitrary structures can be solved. New approaches such as automated ADAPTIVEMESH algorithms or standalone programs such as DevEdit exist to help users. However there is often no substitute for a firm grasp of the basic methods of mesh control within ATHENA. This article discusses six basic principles that can be used to both avoid meshing problems, and correct problems when they occur. These principles are also relevant for ATLAS.

Sometimes a small change in a previously working ATHENA input file can suddenly have a mesh-related error, and cause the simulation to fail. Typically, ATHENA will state that it failed an internal self-test check and it recommends that you change the mesh. The small change probably did not cause the mesh error, rather, problems with the mesh existed beforehand, but were not serious enough to cause ATHENA to fail.

1. Avoid Discontinuities of Mesh Size

Initial Mesh Formation

Having large triangles next to small triangles can cause rounding problems and interpolation problems during the calculation. Transition of mesh size should be gradual.

The mesh syntax in ATHENA lends itself towards a gradual change in mesh size when constructing the initial mesh in the silicon. For example,the commands below would have a relatively course x mesh on the left side at x=0 of about 0.1 micron, gradually decreasing in size to 0.005 microns at x=0.3, and a constant 0.005 micron mesh spacing to x=0.4, and gradually less dense on the right side of the structure at x=0.6. The y mesh becomes gradually less dense with increasing depth.

# ATHENA syntax
line x loc=0.0 spac=0.1 
line x loc=0.3 spac=0.005
line x loc=0.4 spac=0.005
line x loc=0.6 spac=0.01 
line y loc=0.0 spac=0.002 
line y loc=0.5 spac=0.05
line y loc=0.8 spac=0.15

For reference, a similar syntax using locations and spacing can also be used in ATLAS. However, the older mesh syntax in ATLAS had neither the simplicity or flexibility of mesh construction and tuning.

# old ATLAS syntax, taken from
mesh        nx=31 ny=31    
x.m        n=1   l=0.0   r=1.0
x.m        n=31  l=3.0   r=1.0
y.m        n=1   l=0.0   r=1.0
y.m        n=7   l=0.15  r=1.0
y.m        n=20  l=0.5   r=1.0
y.m        n=31  l=1.5   r=1.0

This older ATLAS syntax is prone to create discontinuities in the mesh size. In this example, for instance, at y=0.5, the mesh size above is 0.026, and below 0.5 the mesh size is 0.09.

Epitaxy, Growth and Deposit

Often, the problem is with the mesh in grown oxide or a deposited material. The x mesh remains continuous into the layers above silicon, but the y.mesh is arbitrary.

For deposits, thoughtful use of the DIVISIONS option in the DEPOSIT statement will prevent discontinuous mesh size.

The mesh in epitaxial layers uses the same syntax as the DEPOSIT statement. Users should consider the existing y.mesh in the substrate before deciding upon a mesh in the EPITAXY.

For grown oxides, use METHOD GRID.OX= <value> to control the thickness of the mesh in the oxide layer. The METHOD statement must precede the oxidation step (DIFFUSE) for the mesh to be affected. The default value of GRID.OX is 0.1 microns, which is too large for some applications. The y.mesh in grown oxides will then have a maximum thickness of this value. Once the value for GRID.OX is assigned, it will determine the mesh in all oxidation steps until re-assigned.

2. Include an x.mesh Statement at a Mask Edge

In very early versions of SSuprem4 it was almost compulsory for the user to define an x.mesh statement at every mask edge. Improvements in ATHENA have relaxed this requirement but it is still recommended. This procedure inserts a mesh point at the mask edge, which avoids obtuse and irregularly shaped triangles. Such triangles can cause convergence problems in both ATHENA and ATLAS.

In Figure 1 the left plot shows an x.mesh at every 0.10 microns, but the poly has been etched at x=0.35. The resulting mesh in both the oxide and poly is less than ideal.


Figure 1. Effects on the Mesh due to Mask Edge. Left - misalignment of poly
mask edge and mesh creates awkward mesh in oxide and poly.
Right - minor adjustment of mesh aligns mask edge with substrate mesh.



A small change of the mesh statements in ATHENA can easily rectify the problem. The right plot shows the same region after an x.mesh statement at the location of the poly etch.

3. Avoid Thin Triangles

The ratio of the shortest and longest edge of any mesh triangle should ideally be on the order of 10, but not 100. For example, in the meshing program DevEdit, the user has explicit control on this ratio (the "maximum triangle ratio"). Note that in TonyPlot, the default display setting scales the X and Y distances to the window. In this mode, the X andY scale are independent, hence mesh triangle ratios cannot be easily visually determined. To change this setting, Properties... Plot Options...X/Y plot ratio: To data, which will scale the X and Y axes with the same scale.


4. Use Several Mesh Layers in a Material Layer

As a general principle, use more than one mesh layer in a material layer. Users often neglect this principle when forming thin oxides. Even very thin material layers might require three or four mesh layers, despite the potential conflicts with principles 1 and 3 above. A single mesh layer in a grown oxide layer, for example, is inadequate to calculate diffusion of dopants and segregation may also be inaccurate. Partial etching of the material layer will force the mesh to conform to new material boundaries, hence a finer mesh can better accommodate such changes.

This principle is also valid for ATLAS materials and regions.

There is one minor exception to this rule. The idealized BARRIER layer, through which no implanted ion can penetrate, and does not diffuse any dopant. Gridding in this material can be arbitrary.


5. Avoid Cases of Several Mesh Triangles with a Common Vertex

In a rectangular base mesh, each vertex is shared by six mesh triangles. In some situations, such as corners, edges, and regions of discontinuous mesh size, the mesh may become deformed and have many triangles intersecting at a single point.

Figure 2 shows a case that, due to discontinuous mesh size between materials, and having a single mesh layer in the top material, the mesh has become deformed in this manner.This situation can lead to problems with subsequent process steps in ATHENA.


Figure 2. Mesh triangles sharing a common vertex. Due to discontinuous
size mesh between materials, the mesh in the top layer is distorted.



6. 1000 - 3000 Mesh Points is Adequate For Most Simulations

For a fixed set of models, the simulation time is approximately proportional to the number of points to a power ~ 2.5. Doubling the number of mesh points would generally mean more than a factor of four increase of simulation time.

Increasing the number of mesh points will increase simulation run times, but does not guarantee more accurate results. Obviously too coarse a mesh will definitely lead to inaccurate results. The objective is to place the mesh points in the most strategic locations - material boundaries, implant ranges, diffusion ranges and pn junctions.

Sometimes it is necessary to have a fine x.mesh near or at the surface, but due to the mesh construction, an undesirably large number of x.mesh points will be present in the lower part of the structure. The RELAX statement is a useful command to reduce the mesh density in substrate areas. The grid can be relaxed independently in the x and y directions. For example:

RELAX x.min=0.0 x.max=1.0 y.min=3 y.max=6 dir.x=true dir.y=false

will the x.mesh density, but not the y.mesh, and only in the specified location. Note that RELAX works only with rectangular base grids and will not eliminate grid lines next to a material boundary. Typically, each second mesh line is removed.



These principles will correct most mesh-related problems in ATHENA. Increasing the density of the mesh will not fix all problems. Sometimes, decreasing mesh density, or more often, changing the location of the fine mesh area will correct the "internal self check failed" mesh related error.