[MAP Logo]

Materials Algorithms Project
Program Library


  1. Provenance of code.
  2. Purpose of code.
  3. Specification.
  4. Description of program's operation.
  5. References.
  6. Parameter descriptions.
  7. Error indicators.
  8. Accuracy estimate.
  9. Any additional information.
  10. Example of code
  11. Auxiliary routines required.
  12. Keywords.
  13. Download source code.
  14. Links.

Provenance of Source Code

T.C. Illingworth, I.O. Golosnoy, T.W. Clyne
The Gordon Laboratory,
Department of Materials Science and Metallurgy,
University of Cambridge,
CB2 3QZ,

E-mail: tci20@cam.ac.uk

Added to MAP: April 2004.

Top | Next


A one-dimensional model which describes the changing concentration profiles in two-phase systems where diffusion across the interface causes the phase boundary to move (at a constant temperature). In particular, this model has been used to study transient liquid phase bonding.

Top | Next | Prev


Language: C/C++
Product form: Source Code

Top | Next | Prev


The evolution of two-phase moving boundary problems cannot be described by closed-form analytical equations. Under the assumtion that fluxes are adequately described by Fick's second law (with a constant diffusion coefficient in each phase) and that local equilibrium exists at the phase boundary, this program calculates a numerical solution to a set of differential equations which model such a problem. Full details are presented in an accompanying paper (see the reference below; the paper can be downloaded here).

Essentially, a 'Front Fixing' co-ordinate transformation is used to introduce a co-ordinate system in which the interface is stationary. It is then possible to ensure that solute is conserved and to introduce optimised meshes so that the accuracy of predictions can be improved. In order to generate a numerically stable solution for any discretisation scheme, a fully implicit algorithm is solved at each timestep. Such an approach is inherently non-linear; by iteratively solving a linearised version of the problem at each timestep, the efficiency of the algorithm is improved without any sacrifice in accuracy.

The code availble here describes a one-dimensional planar geometry in which the boundary conditions at both ends are set to ensure zero flux. In addition, the mathematical formulation assumes that the diffusion is substitutional in nature. In this way, the algorithm can be used to model the TLP bonding process for certain alloy systems.

Top | Next | Prev


  1. T.C. Illingworth, I.O. Golosnoy, V.G. Gergely, T.W. Clyne, 2004, Interface Science, Submitted

Top | Next | Prev


Input parameters

Input data are read from a separate file 'Input.txt'. The input file corresponds to the concentration profile at time zero. This requires the following variables to be defined:
dt - double
Timestep (sec).

n_t - int
Numer of timesteps (-).

s - double
Width of phase A (cm (or micron)).

L - double
Total width of two phase couple (cm (or micron)).

n - int
Number of points into which phase A is discretised (-).

c_A - double
Concentration of phase A at the interface (atomic fraction).

D_A - double
Diffusion coefficient in phase A (cm2 sec-1 (or micron2 sec-1)).

u[i] - double
Position of discretisation point [i], expressed as a fraction of the total width of phase A (-).

p[i] - double
Concentration at u[i] (atomic fraction).

m - int
Number of points into which phase B is discretised (-).

c_B - double
Concentration of phase B at the interface (atomic fraction).

D_B - double
Diffusion coefficient in phase B (cm2 sec-1 (or micron2 sec-1)).

v[i] - double
Position of discretisation point [i], expressed as a fraction of the total width of phase B (-).

q[i] - double
Concentration at v[i] (atomic fraction).

The input file then has the following structure:
dt n_t
s L
n c_A D_A
u[0] u[1] u[2] ... u[n-2] u[n-1]
p[0] p[1] p[2] ... p[n-2] p[n-1]
m c_B D_B
v[0] v[1] v[2] ... v[m-2] v[m-1]
q[0] q[1] q[2] ... q[m-2] q[m-1]
An example input file is attatched: Input.txt

Output parameters

Output data are written to a seperate file, "Results.txt". As is, the algorithm creates a text file describing how the interface position varies as a function of time (two columns of doubles). It is possible to print out the complete concentration profiles instead - just comment in or out the relevant commands in the source code (but be aware that this tends to produces large amounts of data which are difficult to handle).

As an example, the interface motion predicted by the algorithm when the parameters and initial conditions of the attached Input.txt are used is presented in the attached file Results.txt

Top | Next | Prev

Error Indicators

The error depends not only on the way in which space and time are discretised; the velocity of the interface veocity is also important. The magnitude of any error therefore depends on the initial profile as well as the physical properties of the system being modelled.

Top | Next | Prev


Experiments indicate that numerical solutions for the interface position are:
first order accurate in space (for spatial discretisations which divide each phase uniformly); and
first order accurate in time (for timesteps which are constant throughout each simulation).

Top | Next | Prev

Further Comments

More information, including an animation showing how composition profiles are calculated to vary in a particular case, can be found on the project website.

Top | Next | Prev


Supplied with the source code is an example input file and the corresponding expected output values.

Top | Next | Prev

Auxiliary Routines

subroutines.cpp and .h
InOut.cpp and .h
trimatrix.cpp and .h

Top | Next | Prev


diffusion, moving boundary, transient liquid phase

Top | Next | Prev


Download source code

Top | Prev

MAP originated from a joint project of the National Physical Laboratory and the University of Cambridge.

Top | Program Index | MAP Homepage Valid HTML 3.2!