 
  ---------------------------------------------------------------------
  2.  INPUT for LARKIN
  ---------------------------------------------------------------------
 
     There are two input files for the chemical interpreter of LARKIN
     -  CHEMIN : description of actual model
     -  THERMO : general thermodynamic data
 
 
 
  ---------------------------------------------------------------------
  2.1 General description of input file CHEMIN
  ---------------------------------------------------------------------
 
     The input file CHEMIN should be a file which looks like a stream
     of lines with at least 80 columns per line.
     A valid input file consists of 13 blocks, containing all chemical
     and numerical information neccessary to define the actual model.
     Each block must start with the so-called keyword line "*block-
     name" but some may contain no further lines. All blocks must appear
     in the input file and must be given in the following order:
 
 
     No.  Keyword                   Contents
 
      1   *HEAD                     Text to identify actual model
      2   *MODEL PARAMETER          Integer value to select type of
                                    thermodynamic modelling
      3   *ELEMENTS                 Names and weights of elements which
                                    compose the species
      4   *SPECIES                  Names and element composition of
                                    species
      5   *NAME OF THIRD BODIES     Names and definition of third bodies
      6   *UNIT SYSTEM              Integer value to select unit system
      7   *TEMPERATURE              Initial temperature of system
      8   *PRESSURE                 Initial pressure of system
      9   *DENSITY                  Initial density of system
     10   *REACTION SYSTEM          Reaction equations and associated
                                    kinetic parameters
     11   *INITIAL CONCENTRATION    Initial concentrations of species
     12   *ENTALPIE COEFFICIENTS    Coefficients for NASA-fits of
                                    thermodynamic data
     13   *NUMERICAL INPUT          Integration interval, required
                                    accuracy, solution method, print
                                    parameter
 
 
     The following general rules should be observed in creating an
     input file:
     1)  All blocks must contain at least their keyword line
     2)  A keyword line must start in column 1. The space after the
         keyword may be filled by any characters.
     3)  Within some blocks so-called comment lines are allowed. They
         must start with "*C" in column 1 and may contain any text.
     4)  Only comment lines and keyword lines may start with a * in
         column 1
     5)  No blank lines are allowed in the input file
     6)  The first 72 columns of each input line are read. Further
         information is ignored. There is an exeption for block
         *ENTHALPY COEFFICIENTS: the first 75 columns are read with
         fixed format.(see 2.2.12)
 
 
 
  ---------------------------------------------------------------------
  2.2  Description of blocks
  ---------------------------------------------------------------------
 
  ---------------------------------------------------------------------
  2.2.1 *HEAD
  ---------------------------------------------------------------------
 
     Comment lines allowed
     Block may consist only of its keyword line
 
     The lines of this block may contain any text to identify the
     actual input file during the whole LARKIN session.
     There is no special syntax rule for these input lines.
     Maximum number of lines for this block:  5 lines  (comments
     not counted)
 
 
 
  ---------------------------------------------------------------------
  2.2.2 *MODEL
  ---------------------------------------------------------------------
 
     No comment lines allowed
     Block must consist of exactly one line besides the keyword line
 
     Syntax rule:
 
     One integer number anywhere in the line
 
     The given number sets the value of the variable MODEL. This
     variable specifies the type of thermodydamic modelling
     which will be used for the actual chemical problem.
     Valid values for MODEL and the associated models are:
 
     value            model
     1                constant temperature
     2                prescribed time-dependent temperature
     3                constant density
     4                prescribed time-dependent density
     5                constant pressure
     6                prescribed time-dependent pressure
 
     see x.y for detailed description of the thermodynamic modelling
     For MODEL=2,4,6 user supplied subroutines are required - see x.y
 
 
 
  ---------------------------------------------------------------------
  2.2.3 *ELEMENTS
  ---------------------------------------------------------------------
 
     Comment lines allowed
     Block may consist only of its keyword line
 
     This block is used to define the elements of which
     the species are composed (an element must not necessarily
     be a chemical element). The definition of elements (and the
     associated species composition in block *SPECIES) allows
     to make a stoichiometric balance check in each
     chemical equation defined in block *REACTION SYSTEM. If,
     in addition, the atomic weight of each element is given,
     species molecular weights are computed and can be used to
     compute the initial density of the actual system internally.
     (See 2.2.9.)
 
 
     Syntax rules:
 
     1) A maximum number of MAXEL=10 elements can be declared
 
     2) Element names may be composed of up to ELEML=5 alphanumeric
        digits (but no blanks), and may not start with a *
 
     3) Each line of this block may contain only one element declaration
 
     4) Each element name may be followed by its atomic weight (as a
        real number) separated by at least one blank.
 
     5) Each ELEMENT may be declared only once.
 
     6) The ELEMENT declaration may appear anywhere in the line
 
     7) No blank may appear within the ELEMENT name
 
 
 
  ---------------------------------------------------------------------
  2.2.4 *SPECIES
  ---------------------------------------------------------------------
 
     Comment lines allowed
     Block may consist only of its keyword line
 
     This block can be used to define a list of species names which
     will appear in the reaction mechanism.
     If the stoichiometric balance check has to be made
     all chemical species appearing in the reaction mechanism
     must be declared line by line in this block and their
     the composition of ELEMENTS must be
     given in this line. The order of appearance of SPECIES specify
     the internal ordering of the species and therefore also the output
     ordering.
     If no stoichiometric check has to be performed the actual species
     list can be a subset of all species appearing in the reaction
     mechanism. If information of the blocks *ELEMENT and *SPECIES
     has to be used for internal computation of the initial density
     see 2.2.9 .
 
 
 
     Remark:
     It is strongly suggest to give the necessary information
     for the stoichiometric check to detect possible input errors
     in reactions especially for large mechanismns.
 
     Syntax rules:
 
     1) A species name may be composed of up to NAMEL=10 arbitrary
        alphanumeric digits (but no blank space), but may not start
        with a * or (
 
     2) Each line of this block may contain only one species declaration
 
     3) Each SPECIES name can be followed by its ELEMENT composition
 
     4) An element composition consists of a sequence of element names
        each of it followed by an iteger number which indicates how
        much elements of this type compose this species
 
     5) Each SPECIES may be declared only once.
 
     6) The SPECIES declaration may appear anywhere on the card
 
     7) A maximum number of MAXSP=999 species can be declared
        (The implemented standard value for MAXSP can easily be changed)
 
 
  ---------------------------------------------------------------------
  2.2.5 *NAME OF THIRD BODIES
  ---------------------------------------------------------------------
 
     Comment lines allowed, but they may not seperate a continuation
     Block may consist only of its keyword line
 
     This block can be used to define a list of third body species
     which will appear in the reaction mechanism.
     See xx.xxx.xx for general information on third bodies.
 
     Syntax rules:
 
     1) A third body name may be composed of up to NAMEL=10 arbitrary
        alphanumeric digits (but no blank space), and may not start
        with a * or (
 
     2) Each line of this block may contain only one third body
        declaration
 
     3) Each third body name can be followed by its species composition
 
     4) A species composition starts with = and then
                              consists of a sequence of species names
        each of it preceeded by a real number which indicates the weight
        and  followed by a + (exept the last species). If the line
        ends with a real number or a + then the next line of input will
        be used also for the definition of the composition of the actual
        third body. "=",  "real number", "species name" and "+" must be
        seperated by at least one blank
 
     5) If no species composition of the third body is given, this
        third body will be regarded as the unweighted sum of all species
 
     5) Each third body may be declared only once.
 
     6) The third body declaration may appear anywhere on the card
 
     7) A maximum number of 5 third bodies can be declared
 
 
 
  ---------------------------------------------------------------------
  2.2.6 *UNIT SYSTEM
  ---------------------------------------------------------------------
 
     No comment lines allowed
     Block must consist of exactly one line besides the keyword line
 
     Syntax rule:
 
     One integer number anywhere in the line
 
     The given number sets the value of the variable IUNIT. This
     variable specifies the unit system for the actual system. All
     input values given in CHEMIN are assumed to be in this units.
     All output values will be also in units of this unit system.
     Valid values for IUNIT and the associated unit systems are:
 
     value                  unit system
                C          T      P        S           A           E
     1     (mole,m**3)    (K)   (PA)  (g,m**3)  (mole,m**3,sec)   (J)
     2         ..         ...    ..       ..          ..          (KJ)
     3     (mole,cm**3)   ...   (atm) (g,cm**3) (mole,cm**3,sec)  (J)
     4         ..         ...    ..       ..          ..          (KJ)
     5     (mole,l)       ...  (cal,l)  (g,l)    (mole,l,sec)    (cal)
     6         ..         ...    ..       ..          ..        (kcal)
 
     Remark: initial concentrations may be given in mole fraction
     instead of the units above (see 2.2.13)
 
 
 
  ---------------------------------------------------------------------
  2.2.7 *TEMPERATURE
  ---------------------------------------------------------------------
 
     No comment lines allowed
     Block may consist of at most one line besides the keyword line
 
     Syntax rule:
 
     One positive real number anywhere in the line
 
     The given number sets the initial value of temperature. If no
     value for temperature is needed for the simulation this block may
     consist only of the keyword line.
     No temperature is needed, if MODEL=1 or MODEL=2 (see 2.2.2) and
     no Arrhenius law is used for kinetic parameters (see 2.2.10) and
     initial concentrations are not given in mole fractions (see
     2.2.13)
 
 
 
  ---------------------------------------------------------------------
  2.2.8 *PRESSURE
  ---------------------------------------------------------------------
 
     No comment lines allowed
     Block may consist of at most one line besides the keyword line
 
     Syntax rule:
 
     One positive real number anywhere in the line
 
     The given number sets the initial value of pressure. If no
     value for pressure is needed for the simulation this block may
     consist only of the keyword line.
     No pressure is needed, if MODEL=1 or MODEL=2 (see 2.2.2) and
     initial concentrations are not given in mole fractions (see
     2.2.13)
     If initial concentrations are not given in mole fractions and
     temperature is positive then the initial pressure is internally
     computed by means of the ideal gas law. In this case this block
     may consist also only of its keyword line. In cases where the
     initial pressure can be computed internally and is given in
     this block also, the value given here will be used for simulation.
     Both values will be compared and different values will cause a
     warning message.
 
 
 
  ---------------------------------------------------------------------
  2.2.9 *DENSITY
  ---------------------------------------------------------------------
 
     No comment lines allowed
     Block may consist of at most one line besides the keyword line
 
     Syntax rule:
 
     One positive real number anywhere in the line
 
     The given number sets the initial value of density. If no
     value for density is needed for the simulation this block may
     consist only of the keyword line.
     No density is needed, if MODEL<=4 (see 2.2.2)
     A value for density is computed internally using the information
     from blocks *SPECIES and *ELEMENTS (to get species weights).
     Therefore this information should be complete and correct.
     If a value for density is given
     in this block, the value given here will be used for
     simulation.
 
  2.2.10 *REACTION SYSTEM
  -----------------------
 
     Comment lines allowed
     Block must consist of at least one line besides the keyword line
 
     In this block the whole reaction mechanism has to be defined
     The reactions may be reversible or irreversible,
     where reversible equations count as two.
     The number of reactants (and products) of any equation is
     arbitrary to allow the modelling of special effects. But only one
     third body per equation is allowed.
     A species name must not neccessariliy be defined in block *SPECIES,
     But it should, to allow the identification of typing errors.
     New species names found in the reaction system are added
     to the actual species list in the order they appear in the
     mechanism.
 
     Syntax rules:
  1) A correct reaction equation may be composed of the following
     components:
 
     - species symbols
     - delimiters
     - kinetic parameter fields
 
     where the composition is format free and all blank spaces are
     ignored (except the blanks of the delimiters).
 
  2) The species symbol is a unique sequence of (up to 10) alphanumeric
     digits (but no blank space) and may not start with a * or ( .
     A species symbol is either a species name or a third body name
     No stoichiometric coefficient can be given, i.e. a coefficient
     greater than 1 must be resolved as a sum.
 
  3) There are 6 types of valid delimiters:
     ( the b marks a necessary blank space )
     b+b   delimiter between two species symbols (reactants,products)
     b=>b  delimiter between reactants and products for an irrever-
           sible equation
     b<=>b delimiter between reactants and products for an rever-
           sible equation
     b(    delimiter to idetify the beginnig of the kinetic parameter
           field
      )    delimiter to identify the end of the kinetic parameter
           field
      ,    delimiter to seperate the the kinetic parameters in the
           kinetic parameter field (if more than one parameter is given)
 
 
  4) The kinetic parameter field consists of 1 up to 3 numbers.
     (seperated by commas and enclosed in paranthesis). If only
     one number is given this values is assumed to be the rate
     constant. If 2 (or 3) numbers are given the rate constant
     is computed internally according to the (modified) Arrhenius
     law:
 
        RC := A * exp(-E/(R*TEMP)) * TEMP**ALFA
 
     where the first kinetic parameter is assumed to be A,
     the second to be E (and the third to be ALFA).
     To define the rate constants for a reversible equation there
     are two alternatives:
     a) the reversible equation is followed by two kinetic parameter
     fields where the first is assigned to the direction => and
     the second field to <= .
     b) if there is only one kinetic parameter field after a reversible
     equation then the reverse rate constant is computed via the
     equilibrium constant. (Only possible if thermodynamic data is
     available for all species appearing in this equation)
     The type of the kinetic parameter field may be mixed within an
     reaction model even within one equation.
 
  5) The use of  "reaction inequalities" is possible,
     i.e. an equation may have no reactants or no
     products, to allow the modelling of addition (substraction)
     of substance during the reaction. But this violates the assumptions
     used for the thermodynamic modelling in LARKIN.
 
  6) To write up an reaction equation an arbitrary number of lines
     may be used, i.e. the input is
     regarded as a stream and the seperation of the equations
     is not indicated by the end of the line, but by the end of the
     associated kinetic parameter field.
 
  7) Comment lines are not allowed between lines describing the
     same equation.
 
     Summary of Syntax rules:
 
     A.) A chemical reaction is composed of species names, delimiters
         and kinetic parameter fields
     B.) A reversible equation must be followed by one or two kinetic
         parameter fields where the first is used for the reaction in
         direction =>
     C.) One reaction may be written on several consecutive lines
         which must not be seperated by a comment line
 
 
  2.2.11 *INITIAL CONCENTRATIONS (I)
  -----------------------------------
 
     No comment lines allowed
     Block must consist of at least one line besides the keyword line
 
     Syntax rule for keyword line:
 
     to indicate that the unit for the initial concentrations are
     mole fractions the keyword *INITIAL CONCENTRATION (1) must be
     used.
     to indicate that the unit for the initial concentrations are molar
     concentrations (according to the value of IUNIT (see 2.2.6)) the
     keyword *INITIAL CONCENTRATION (0) must be used.
 
 
     This block is used to define the initial concentrations
     of the species (involved in the reaction mechanism)
     at the very beginning of the simulation (i.e. concentrations
     of species at starting point of simulation). Only non-zero
     values are required because the concentrations of all species
     appearing in the mechanism but not defined in this block
     are set to zero internally.
 
     Syntax rules:
 
     1)  Each line of this block may contain only one initial
         concentration definition
     2.) An initial concentration definition is composed of one species
         name and one number for the associated initial concentration
     2.) A species may appear only once
     3.) Species symbol and associated value may appear anywhere in
         the line sparated by at least one blank space
     4.) Only non-zero initial concentrations must be defined (but at
         least one)
 
 
 
  2.2.12 *ENTHALPY COEFFICIENTS
  -----------------------------
 
     No comment lines allowed
     Block may consist only of its keyword line
 
 
     This block is used to define the coefficients for the NASA-fits
     of thermodynamic data (see ccc.ccc) . The block may consist only
     of its keyword line if
     a) MODEL <= 2 and no equilibrium constant is needed (to compute
        reverse kinetic parameters)
        or
     b) all thermodynamic data needed can be found in file THERMO
 
     Data given here overwrite data from file THERMO
     If MODEL >= 3 , there should be thermodynamic data available for
     all species appearing in the reaction system, missing coefficients
     are set to zero internally
     Data for species not appearing in the reaction system is ignored
 
     Syntax rules (same as for file THERMO)
 
     1)  The total block consists of its keyword line and an arbitrary
         number of subblocks
     2.) A subblock is defined by:
         one line containing the species name followed by 3 lines
         containing the coefficients for this species. The data must
         be in a form to allow a read with the formats:
         5E15.8
         5E15.8
         4E15.8
         (same form as in file THERMO)
 
 
  2.2.13 *NUMERICAL INPUT
  -----------------------
 
     No comment lines allowed
     Block must consist of at least 10 lines besides the keyword line
 
     This block is build up by 4 subblocks which must be identified
     by additional keyword lines:
 
     - 1     *DISCRETIZATION METHOD
     - 2     *ACCURACY
     - 3     *OUTPUT
     - 4     *PRINT
 
     The first subblock consists of one line (besides the keyword
     line) on which the integration method is selected.
     Syntax rule:
     one integer value anywhere in the line
     value             method
     0                 semi-implicit Euler method
     1                 semi-implicit Mid-point rule
 
     The second subblock consists of one line (besides the keyword
     card) on which the required relative accuracy for the solution is
     defined.
     Syntax rule:
     one value anywhere in the line
     Remark:
     Should be chosen in the range 1.E-2 -- 1.E-6
 
     In the third subblock the first line defines the number of
     output points (an integer number may be given anywhere in the
     line. The following lines are used to define the values
     of the output points. One line may be used to define one value.
     At least 2 output points are necessary (T-START, T-FINAL), so
     this block consists of 3 lines at least.
     The fourth subblock consists of one line to define the print-
     parameter for additional chemical simulation output (onto data-
     base 'OUT').
     Syntax rule:
     one integer value anywhere in the line
     value             additional output
 
      1       kinetik parameters , at all prescribed output points
      2       rates,  del(h(j)) ,  at all prescribed output points
      3       makes 1 and 2
      4       makes 1 at all integrator selected output points
      5       makes 2 at all integrator selected output points
      6       makes 4 and 5
 
 
