1  Introduction

IMPETUS II is a Fortran code that has been developed to simulate the atomic mixing and particle emission that takes place when a material is bombarded with energetic particles, as in secondary ion mass spectrometry (SIMS) or secondary neural mass spectrometry (SNMS). In the code, the physical process is taken to be governed by the model of references [1-3]. The purpose of this paper along with the companion paper [4], is to describe and demonstrate the computational methods employed in the code. Ref [5] is a user manual for the resulting software.
To begin, a brief outline of the atomic mixing model is given. Let there be n distinct materials in the material system (the materials of the structure with the bombarding species). The governing equations for the concentration of each i-material is as follows:
qi(x,f)

f
= (q(x,f)+u(f)) qi(x,f)

x
+ q(x,f)

x
qi(x,f) - qi(x,f)

x
(1)
for i=1,2,..,n, 0 £ x < ¥, 0 £ f < ¥, where x is the depth below the receding surface and f is the dose.
At any dose f the material distribution is determined by the functions qi(x,f) for i=1,2, ..,n, the fraction by volume of i-atoms at depth x. The functions qi satisfy the constraints Si=1n qi(x,f) = 1, qi(x,f) ³ 0 for all x, f. The surface recession speed is denoted by u(f). If X0(f) denotes the depth of erosion at dose f then X0(f) = ò0f u(f¢) d f¢. The relationship between the fixed and moving coordinate system is such that X=X0(f) + x.
The scaled current of i-atoms crossing the point at depth x below the surface in the direction of increasing depth is denoted qi(x,f) and the collective current by q(x,f) where q(x,f)=Si=1n qi(x,f). The qi are given by the following equation
qi(x,f) = -

x
{ Di(x,f) qi(x,f) } ,
(2)
for i=2,3,..,n and
q1(x,f) = -

x
{D1(x,f) q1(x,f) }+ t1 ó
õ
¥

x 
fR(x¢,f) dx¢
(3)
in the domain (x,f) Î [0,¥) ×[0,¥), where fR(x,f) is the probability density functions (with respect to depth x) for the range of the individual primary particle in the material structure at dose f, Di(x,f) is the diffusivity of the i-atoms at depth x and dose f in the material structure and t1 is the effective volume of a primary particle.
The model relates the nuclear and ionisation energy functions and the range deposition functions of the primary particles to to composition of the material. The sputter yield and surface recession speed are determined by the surface concentrations and the experimental conditions. The given initial material structure and the conservation of material condition at the surface layer determines the solution. A detailed description of the methods employed to compute the energy and range functions, the sputter yield and the recession speed are given in reference [4].
The partial differential equations given above form the true atomic mixing model. The finite difference method (described in [4]) provides us with a consistent method for their solution and hence this method should be applied as widely as possible. However, the FDM is generally only applied in a section of the domain [0,xP] since it would be computationally expensive to apply it over the full depth and the material may contain sharp interfaces (dicontinuities) which would lead to oscillations in the progressive solutions. Furthermore, the nature of the problem is such that most of the action is concentrated within the surface region; the equations may be simplified at depth without significant loss of accuracy. Modification of the solution returned by the FDM is also necessary to ensure that the concentrations are non-negative and sum to one throughout the domain and materials are conserved.
IMPETUS II is a general purpose code for simulating the SIMS or SNMS profiles of a range of material structures within a set of material systems and under a range of conditions. Facilities have therefore been included in the code to ensure that IMPETUS is able to respond effectively to the form of the particular form of the material structure in hand. For example, if the material structure contains thin layers (say less than 20 angstroms) or there is a sharp interface in the domain of the FDM then the computational model must adapt by decreasing the mesh size to ensure a satisfactory solution. The methods for adapting the finite difference mesh to the problem in hand are described in section 2.
If the diffusion term is linearised then the original model can be replaced by the following approximations:
qi(x,f)

f
» u(f) qi(x,f)

x
+Di(x,f) 2 qi(x,f)

x2
(4)
for i=1,2,...,n. The approximation (4) tends to provide a satisfactory approximation to (1) at greater depths where it models the minimal diffusion and translation due to surface recession. A computational model based on (4) is used in IMPETUS II in the remaining region [xp,¥) and this is described in section 3.
If the material structure contains wide homogeneous layers (that is of at least of the order of a micron wide) then the solution tends to a steady state. In IMPETUS II a method for carrying out the transition to the steady state is employed and this is described in section 4.
The atomic mixing process must obey the natural laws that materials must be conserved and the concentrations of each material must be non-negative and sum to unity. The underlying mathematical model does satisfy these natural laws (see reference [6]). However, as we have noted earlier, the finite different method is prone to numerical error. In practice the computed solutions transgress these natural laws. Moreover, if the problem was left unmanaged, the breach in the physical laws could increase from dose step to dose step. Hence in IMPETUS II the solution is examined at every dose step and the concentrations must also be corrected so that they are non-negative and they sum to unity and a material conservation method is enforced. Details on these techniques are given in section 5.
In the final section of this paper an algorithm outlining the framework for the method selection within the code is given.