3.3. Surface Kinetics Sample Program (SKSAMPLE)

SKSAMPLE is an example FORTRAN program for directly accessing the Surface Kinetics Subroutine Library. The problem that we have chosen for the example involves the time-dependent deposition of a solid film on the surfaces of a fixed-volume, fixed-temperature container that was initially filled with a gas mixture.

One of the first tasks is to derive a system of equations that describes the process to be simulated. Here, the first equation involves the conservation of mass in the container:

(3–3)

where is time, is the mass of gas-phase species in the container, is the container volume, is the molar production (destruction) rate of gas-phase species by gas-phase chemical reactions, are the species molecular weights, is the container-wall surface area, and is the molar production rate of gas-phase species by surface reactions. After introducing the gas-phase mass density (where is the total gas-phase mass) and the gas-phase species mass fractions , some manipulation leads to the following equation:

(3–4)

The total mass in the gas phase depends on the production (destruction) of gas-phase species by surface reaction, as stated by

(3–5)

We rewrite this equation slightly to make a dependent variable and use the area-to-volume as a parameter:

(3–6)

On the surface, the number of moles of species is given by

(3–7)

where is the site fraction of species on surface site (fraction of sites occupied by species in phase ), is the density of sites in phase (in mole/cm2), and is the number of sites that species occupies. The molar production (destruction) rate of surface species by surface reaction is stated as

(3–8)

In terms of site fractions , the equation governing the surface species is given as

(3–9)

where the last term can be dropped if the number of surface sites if fixed. When surface reactions create or destroy sites, then a conservation equation is included for the site densities of each phase :

(3–10)

However, our sample mechanism conserves sites, so the time derivative in Equation 3–10 is trivially zero.

The governing system of ordinary differential equations and accompanying initial conditions form an initial value problem. The equations will be solved using the software VODE.Equation 3–1 We find this software to be reliable for the solution of a wide range of stiff initial-value problems.

The FORTRAN program sksample.f for the solution of the sample problem is provided in the Ansys Chemkin user area subdirectory samples<release_number>\sample_apps_f77\sksample (PC), samples<release_number>/sample_apps_f77/sksample (UNIX). After initializing the Gas-phase Kinetics Subroutine Library and the Surface Kinetics Subroutine Library, the program reads the initial nonzero moles from input. It then repeatedly calls subroutine VODE to obtain the solution at uniform print intervals. The governing equation formulation is found in SUBROUTINE FUN, which is called by VODE.


Note:  When using this example, you must (i) ensure FLEXLM_ARCH is set (see Recompiling and Linking a User Subroutine ) and (ii) edit the .inc makefile so that the CKROOT variable is set to the location of your Ansys Chemkin installation (see Compile and Link ).


The sections below presents the Gas-phase Kinetics Pre-processor input and output, Surface Kinetics Pre-processor input and output, and the sample program input and output.