1.4. Structure and Use of Gas-phase Kinetics Utilities

The Gas-phase Kinetics utilities are composed of the following:

  • Gas-phase Kinetics Pre-processor (a program)

  • Gas-phase Kinetics Subroutine Library (a set of FORTRAN subroutines)

The Gas-phase Kinetics Pre-processor is included as part of the Pre-processor utility accessed from the Ansys Chemkin interface and described in Chemkin Getting Started Guide . However, the Gas-phase Kinetics Pre-processor can also be run independently, through the command-line, as described in Chemkin Getting Started Guide . In either case, the Pre-processor must be run in order to produce a gas-phase Linking File, which contains all of the chemistry-specific information for the gas-phase−kinetics portion of the particular Chemistry Set identified for the problem. This Linking File must be available to any Chemkin application program that makes calls to the Gas-phase Kinetics Subroutine Library. The Pre-processor program must therefore be run prior to running a Chemkin application program or Reactor Model.

The general structure of the Gas-phase Kinetics utilities and the relationship between the utilities and an Ansys Chemkin application program are shown in Figure 1.1: Schematic representing the relationship of Gas-phase Kinetics and the Application. . The Gas-phase Kinetics Pre-processor is a program that reads a symbolic description of a gas-phase reaction mechanism and then extracts the needed thermodynamic data for each species involved in that mechanism from a Thermodynamic Database file. The primary output from the Pre-processor is the Gas-phase Kinetics Linking File. This file contains information that contains all required information about the elements, species, and reactions in the user's mechanism. However, users should not attempt to read this file directly, as the structure changes from version to version of Chemkin utilities. Instead, calls to initialization routines within the Gas-phase Kinetics Library facilitate extraction of the data stored.


Note:  If any errors occur during pre-processing, the error state will be reflected in the Linking File and when called, the CKINIT will print a diagnostic message and execution will stop.


The Linking File is read by an initialization subroutine, CKINIT. The purpose of the initialization is to populate three data arrays (one integer, one floating point, and one character data type) in stored memory within your program. These arrays are then passed into other subroutines in the Gas-phase Kinetics Subroutine Library, for internal use within the subroutines. These arrays should not be modified within your program once they have been initialized. Before the initialization routine is called, your application program must first allocate the memory for the three arrays. A call into the subroutine library can be made to retrieve the needed dimensions for this purpose. The Gas-phase Kinetics subroutine to perform derived calculations or extract chemistry-specific information during the simulation.


Note:  Although the Linking File is a formatted file (for example, chem.asc), user programs should not attempt to read this file directly; instead, always use the Ansys Chemkin initialization routine CKINIT to extract information from it. The format of the file will change from version to version, but the subroutine library calling lists are static.


If you are writing your own application that describes a particular set of governing equations, the programming required is highly leveraged by the Ansys Chemkin subroutine libraries. For example, through a simple call to Gas-phase Kinetics subroutines the program can obtain chemistry-specific terms in the governing equations that relate to equations of state, chemical production, and thermodynamics. You can then focus on the form of the equations and the solver methodology, letting Chemkin subroutines handle all of the chemistry-specific part of the problem definition.

The Gas-phase Kinetics Subroutine Library has over 150 subroutines that return information on elements, species, reactions, equations of state, thermodynamic properties, and chemical production rates. Generally, the input to these routines will be the state of the gas—pressure or density, temperature(s), and species composition.

Figure 1.1: Schematic representing the relationship of Gas-phase Kinetics and the Application.

Schematic representing the relationship of Gas-phase Kinetics and the Application.