OLCHEM Chemical-Rate-Equation Integrator

The OLCHEM program came to SRI's Molecular Physics Laboratory from Dave Golden and Alan Baldwin of the Chemical Kinetics Department, who got it from G. Z. Whitten of SAI. The various parties have made additions and deletions. The write-up "CHEMK: A Computer Modeling Scheme for Chemical Kinetics" by G. Z. Whitten and J. P. Meyer, of SAI, is the primary reference.

Description

This program integrates (versus time) the rate equations established by a list of chemical reactions provided by the user (in an input file named OLCHEM.DAT). Three types of output are provided: an output listing file (named OLCHEM.LST), a concentrations file (named OLCHEM.CON), and a reaction-rates file (named OLCHEM.RXR). The listing file is normally PRInted or deleted by the user, while the concentrations file can be PRInted or GRAphed. If these three output files are not deleted (or renamed) after use, a subsequent OLCHEM will write on top of them.

Input Data

The user must create a file named OLCHEM.DAT either with an editor, or by creating a file of some other name and copying it. The input data consists of several types of records, which are summarized below and in Table 1. Since the program originally was designed to read cards, alphabetic data fields occupy specific columns. However, numeric fields may be terminated by commas as usual.

Record Type 1: General Data

To control the reading of the chemical reaction scheme, we enter the number of the last reaction to be read (this is not necessarily the number of reactions, merely the last one given). If this is part of a "MORE" modification of the reaction scheme, enter here the last reaction number being modified or added. If all species are being diluted or pumped out, the dilution factor will be used as a first-order rate coefficient.

Record Type 2: Reactions

Each reaction is entered indvidually. The reaction must be numbered (1 to 200), the reactants and products specified alphabetically, and the rate coefficient specified by its Arrhenius parameters (ai, bi):

    ki = ai exp(-bi/T)

Each reaction can have up to three reactants and four products. Steady sources or "flow-in" can be indicated by a reactions with products and no reactants. Unrecorded products or "flow-out" can be specified by a reaction with no products.

Up to 60 species be used (the program counts them). Each species name consists of a combination of any four characters or numbers (blanks are significant), except that the letter M (followed by three blanks) is reserved to designate the total concentration (which the program computes by adding the concentrations of the individual species). If a species participates more than once as a reactant or product it must be repeated the proper number of times (i. e. 2OH is a new species, not two OHs).

The time and concentration units can be chosen by the user, but be sure that the Arrhenius preexponential factor (ai) is consistent with the order of the reaction. An additional point to remember is that the largest number the computer can represent may be as small as 1.7E38, so that the user must choose scaled concentration units such that the largest product of reactant concentrations is smaller than this value. The activation energy (bi) must be specified in units of temperature (usually K).

Record Type 3: Title/Options

The title of the first calculation and the restart options for subsequent calculations are given in columns 1-28. The first four columns are tested for special meanings as follows:
        all blank     terminate the calculations

        CONT          use previous concentrations as new initial 
                      conditions (go to Record Type 7).

        MORE          read new reactions (go to Record Type 1).

        any others    this is a new problem, with the old reaction 
                      sequence, if any (go to Record Type 4).

Record Type 4: Output Specification

The first entry in this record specifies the number of species with nonzero initial concentrations, and controls the number of entries expected in Record Types 5 and 6. The program has two modes of deciding when to print in the listing file and record the concentrations. We normally ignore the "auto print" mode in which the program writes every N integration steps. We enter a large number (say 10000) to suppress this printing altogether. For user controlled printing, we enter the initial print time (which must be nonzero) and then either a fixed time increment or a fixed time multiple between subsequent printings. For example nir,nap,10,10,0 will produce output at 10, 20, 30, 40, etc. time units, while nir,nap,10,0,10 will produce output at 10, 100, 1000, etc.

Record Type 5: Initial Reactant Identification

The alphabetic designations of all reactants with nonzero initial concentrations are given here. Be sure that they match the spelling used in Record Type 2 (include blanks as required). If there are more than seven, put the first seven in the first record, and continue with seven per record until the list is complete.

Record Type 6: Initial Reactant Concentrations

The initial reactant concentrations are provided here, in the appropriate user units, in the same order as used in Record Type 5.

Record Type 7: Time Specification

The simulation starting time and ending time are the first two entries in this record. There values are usually 0.0 and the time of the last print desired, respectively. The absolute temperatures and error tolerance can also be entered. The default values are 300K and 1.0E-5, respectively. The error tolerance is usually ignored.

Record Type 8: Options

This is really Record Type 3. It is put here to remind us where it goes.

GRAPHING THE RESULTS

The output file OLCHEM.CON contains a list of the concentrations of the species at each of the print times you specified. To prepare for graphing several steps are required. First you may wish rename the concentrations file to some other file name with a file type .DAT Next, you need to identify the total number of species and the order in which they are displayed in both OLCHEM.LST and OLCHEM.CON (print the former). OLCHEM.CON consists of several "data groups" of the form
	blank-line
	time c1  c2  c3  c4  c5
	 c6  c7  c8  c9  c10 c11
	 c12 etc
The first line of each group is blank. This has been done so that a printed OLCHEM.CON will be easier to read. The first non-blank entry is the print time. The species concentrations then follow in the same order as in OLCHEM.LST (in the latter, the second line has the "time-interval" which you must ignore in counting species).




                   Table 1.  Input Records for OLCHEM

Type            Argument        Columns Orient  Format  Comments
------------------------------------------------------------------------
1. General      Last Reaction   1-3     right   I3
                blank           4-7             A4      MUST BE BLANK
                Dilute Fact.    8-17    right   F10.0

2. Reactions    Reaction Number 1-3     right   I3
                Reactants       4-15    left    3A4     max of 3
                Products        16-31   left    4A4     max of 4
                Arrhen. Const.  32-43   right   E12.5
                Activ. Energy   44-55   right   E12.5

3. Title        Title           1-28            20A4
                Option          1-4             A4

4. Out. Spec.   N Initial React 1-3     right   I3
                N Auto Print    4-9     right   I6      use 10000
                T Initial Print 10-19   right   F10.0   first print time
                Time interval   20-29   right   F10.0   linear time steps
                Time multiple   30-39   right   F10.0   log time steps

5. Initial      Reactants       1-28    left    7A4     7 species/record

6. Init. Conc.  Init. Conc.     1-70    right   7E10.3  7 conc./record

7. Time Spec.   Start Time      1-10    right   F10.0
                Stop Time       11-20   right   F10.0
                Temperature     21-30   right   F10.0   0=300K
                Error Tolerance 31-40   right   F10.0   0=1.E-5

8. Options      Option          1-4     left    A4
------------------------------------------------------------------------


Related Web Pages


Send comments and suggestions to huestis@mplvax.sri.com

Copyright (c) 1998 SRI International. All rights reserved. (05/23/98)

URL: "http://www-mpl.sri.com/software/olchem/olchem-man.html"