This document describes the overview and the usage of the
Chemkin-II minimal package.
How to install
Installation
Windows executables
- Following files will be found in the subfolder
named CKmExLarge (or CKmExSmall) by extracting the downloaded CKmExLarge.zip
(or CKmExSmall.zip).
- Executable files
chem.exe senk.exe sb2c.exe findth.exe rxnc.exe shock.exe
equil.exe tran.exe premix.exe pb2c.exe psr.exe
sbdump.exe sbgen.exe sbhmix.exe sbliq.exe sbrest.exe sbmod.exe
- Sample input / output files
chem.inp therm.dat senk.inp sb2c.inp sb2c2.inp rxnc.inp
shk_chem.inp shock.inp eq_chm.inp equil.inp pm_chem.inp pm_chem2.inp
premix.inp premix2.inp pb2c.inp pb2c2.inp tran.dat ps_chem.inp psr.inp
- The executables can be used only on the Windows running on
PCs with Intel x86/x64 processor(s) or compatible(s).
They have been tested on Windows 7/8/8.1/10.
Compiling source files
*
Not required for execution on Windows by using executables described above.
Executing samples (Windows)
- On the Command Prompt, change to the directory where the
package was decompressed.
- Type the followings in this order, and check they have been
executed successfully.
$ chem < chem.inp > chem.out
$ senk < senk.inp > senk.out
$ sb2c < sb2c.inp > sb2c.out
$ sb2c < sb2c2.inp > sb2c2.out
$ rxnc < rxnc.inp > rxnc.out
- Open the output files (.out) by using, for example,
the Notepad, and check for the error messages.
- Followings execute samples for shock, equil, premix and psr.
* This test is not necessary for users who want to use senkin only.
$ chem < shk_chem.inp > shk_chem.out
$ shock < shock.inp > shock.out
$ chem < eq_chm.inp > eq_chm.out
$ equil < equil.inp > equil.out
$ chem < pm_chem.inp > pm_chem.out
$ tran < tran.dat > tran.out
$ premix < premix.inp > premix.out
$ pb2c < pb2c.inp > pb2c.out
$ chem < pm_chem2.inp > pm_chem2.out
$ tran < tran.dat > tran.out
$ premix < premix2.inp > premix2.out
$ pb2c < pb2c2.inp > pb2c2.out
$ chem < ps_chem2.inp > ps_chem2.out
$ psr < psr.inp > psr.out
Programs overview
Minimal package
Chemkin minimal package contains
senkin (0-dimensional kinetic modeling / sensitivity analysis),
equil (equilibrium calculation), shock (shock waves), and premix
(1-dimensional laminar premixed flame) in Chemkin.
It also contains extended utilities sb2c (readout of senkin binaries),
pb2c (readout of premix binaries), rxnc (senkin contribution analysis),
and findth (search for thermodynamic data).
The senkin has been extended with ICEN (Internal Combustion Engine)
and CRCM (Chemical Rapid Compression Machines) codes.
The package is based on the CHEMKIN-II v. 4.5 (Release: Jan. 1995) source code.
Overview of each program
- chem
Often referred as the "Chemkin Interpreter".
It reads in the informations on the chemical species, reaction mechanism,
and thermodynamic data described in text files and interprets them into a
binary file which is used by the senkin program (senk) or other programs
below.
- senk
This is an executable of senkin. It reads in the informations on the species,
reactions, and thermodynamics from the binary file generated by chem,
reads in initial conditions, integration time, and etc. from a
text file, and execute the kinetic calculation.
Output is generated into a text file for a part of the resuls.
All the results are stored into a binary file.
- sb2c – senkin binary
to(2) csv converter
Converts the information in a binary file generated by senkin into
CSV (comma separated values) file(s) which can be read by spread sheet
programs such as the Excel. This is not a program included in the original
Chemkin package.
- sbrest, sbhmix, sbliq,
sbdump, sbgen, sbmod
These are tools to manipulate SENKIN binary, to mix gases after or during
the course of reaction, or to mix liquid under vaporization adiabatic
condition with gases.
sbrest reads SENKIN binary (save.bin), extract the first and
last time-datasets, and store in the RESTART format.
(save1st.bin and savelast.bin).
sbmix mixes two RESTART-format files (save1.bin and save2.bin)
under constant-pressure adiabatic (isoenthalpic) condition with 1:1 ratio
and store it in a RESTART format file (smix.bin).
sbliq mixes liquid fuel into gas given by savegas.bin,
under constant-pressure adiabatic (HCON) or constant-volume adiabatic
(UCON) condition and sotres into a file (sliqmix.bin).
The program reads following information from the standard input:
! addition of liquid n-heptane (50degC) by 0.1 as stoichiometry
HCON
STOI 0.1
TLIQ 323.15
LIQU nC7H16(L) nC7H16 1
END
LIQU specifies the names of the liquid and corresponding gaseous
species in the mechanism and their mole fractions
(that is, the liquid mixture can be specified).
TLIQ is a temperature of the liquid, and the quantity of mixing
can be specified by as stoichiometory value (STOI) or by the
mass fraction (MASF).
sbdump dumps contents of a binary file out to an ascii text format
file (.asc) or a csv format file (.csv). type
sbdump --help
for the available command-line options.
sbgen generates a binary file from an ascii text format file (.asc)
or a csv format file (.csv).
sbmod modifies a part of a binary file according to the instructions
written in a text-format file.
These programs have not been included in the original Chemkin distribution.
- findth
Searches a Chemkin-format thermodynamic data file by a chemical formula.
Not required for the execution of Chemkin / senkin.
(Not included in the original Chemkin package.)
- rxnc – reaction (rxn)
contribution
Calculates the contribution of reactions to the increase / decrease of the
specified species at specified time from the senkin binary output.
(Not included in the original Chemkin package.)
- shock
Shock wave code in Chemkin.
- equil
Equilibrium calculation code in Chemkin.
- premix
PREMIX (one-dimensional laminar premixed flame propagation)
program.
- pb2c
Converts a binary file generated by PREMIX to CSV format.
- tran
Binary transport coefficients file generator.
- psr
PSR (Perfectly Stirred Reactor)
Overview of input / output files
Relation of senkin input / output files
Figure 1 shows the relation of input/output files of senkin.
A user should prepare three input files (chem.inp, senk.inp, and
ab2c.inp) before the start of calculation.
A thermodynamic database file, therm.dat, should also present in the
current directory.
At the first step, no attention is needed to the contents of this file.
The "STDIN" and "STDOUT" correspond to the
input from the keyboard and the output to the console, respectively.
They can be redirected to any file as follows.
$ program_name < input_file > output_file
Names of other files (therm.dat, chem.bin, tign.out, save.bin, skcn???.csv, and
sXXXX???.csv) are hardwired in the program and cannot be changed without
changing the source codes.
Overview of input / output
Below, the overview of each input / output files is described.
See
Chemkin input for the details of the
input format.
- chem.inp
A text-format file of a reaction mechanism for the Chemkin Interpreter.
A part of the sample file is shown below.
ELEMENTS H O N END
SPECIES H2 H O2 O OH HO2 H2O2 H2O N2 END
REACTIONS
H+O2+M=HO2+M 3.61E17 -0.72 0.
H2O/18.6/ H2/2.86/
H+H+M=H2+M 1.0E18 -1.0 0.
...(snip)...
H2O2+OH=H2O+HO2 1.0E13 0.0 1800.
END
The interpreter input should contain at least three input blocks,
'ELMENTS'~'END', 'SPECIES'~'END', and 'REACTIONS'~'END'
which are the list of the elements in the system, the list of the chemical
species to be considered, and the list of reactions to be considered,
respectively. Usually, the comprehensive names such as
H2-O2.inp or CH4-Air.inp are preferred.
- therm.dat
A text-format file containing 14 coefficients (per each species) for
the NASA polynomial, which is the formulae for the thermodynamic
functions. In order to consider the chemical species not listed in
this file, users should provide this data.
In this case, usually, give them in the chem.inp instead of editing
the therm.dat file.
- chem.out
A text-format output of the Chemkin Interpreter while interpreting the
chem.inp.
- chem.bin
A binary file used by senkin etc. containing the information on
the chemcal species, reactions, and thermodynamic data extracted from
the chem.inp and therm.dat.
- senk.inp
A text-format file to specify the initial conditions
etc. for
senkin. Below is the content of the sample file.
SENS
CONP
PRES 1.0
TEMP 1000.
TIME 2.E-4
DELT 1.E-4
REAC H2 2
REAC O2 1
REAC N2 4
END
'SENS' is a keyword to specify the execution of the sensitivity analysis.
'COMP' specifies the constant-pressure constraint.
'PRES' and 'TEMP' specify the initial pressure and temperature, respectively,
and 'REAC' specifies the initial chemical composition.
'TIME' and 'DELT' are the end-of-integration time and out-interval time,
respectively. Similarly to the chem.inp, arbitrary name can be used
and comprehensive name is preferred.
- senk.out
An output containing the parsing status of senk.inp and calculation status.
- tign.out
An output of pressure, temperature, and concentration of each species
with the interval of 'DELT' specified in the senk.inp.
Though being a printer or console friendly output, it is not suitable
nor recommended to use with the spread-sheet or graphing softwares for
post-processing.
- rest.bin
A binary file necessary to restart the senkin quitted for some reason.
The file also remains (with size of zero) after normal termination of the
calculation, and it can be removed safely.
- save.bin
A binary file containing all the resolts of senkin. Irrespective of the
'DELT' in senk.inp, results are stored for each integration time step for
all the variables (concentrations). When 'SENS' (sensitivity analysis)
is specified, the whole sensitivity coefficient matrix is stored for
each time integration step.
- sb2c.inp
A file to control the behavior of the converter from the save.bin to CSV
file(s). Below is the sample input.
===== sb2c (sbin2csv.f) Control file =====
[ TIME OUTPUT CONTROL: (s ms us) atol=# rtol=# mind=# maxd=# sent=# ]
us mind=1e-6 maxd=1e-5 atol=1e-15 rtol=.05
[ CONC OUTPUT CONTROL: all selonly none molecules/cc molefrac ]
molecules/cc selonly
H O OH HO2 H2 O2
[ SENS OUTPUT CONTROL: all none (or species name list) ]
H O TEMP
They are control variables for the unit of time output, frequency of the
output, unit of concentration and species to be output, and sensitivity
output.
- sb2c.out
An output containing the parsing result of sb2c.inp and header information
of save.bin and chem.bin files.
- skcn???.csv
A CSV format file containing the time-integration results of pressure,
temperature, and concentrations (or mole fractions) extracted from the
save.bin.
The file can be opened by double-clicking it provided that a spread-sheet
software such as the Excel is installed.
When the number of variables are large, the output is separated to multiple
files named as "???" = "001", "002", "003", ... so that a file does not
contain more than 50 variables.
- sXXXX???.csv
CSV files containing the sensitivity coefficients extracted from the
save.bin. In many cases, sensitivity coefficients are needed for some
specific variables only, and the output is separated for each variables.
The part of the file name "XXXX" is the serial number of the
variable. The corresponding variable (species) name can be found in the
sb2c.out. When the number of reaction is large, the output is further
separated with "???" = "000", "001", ... so that a file does not contain
the coefficients for more than 50 reactions.
In the title of the column in each file 'Siiii', 'iiii' indicate the serial
number of the reaction, and the corresponding reaction can be found in the
chem.out.
sXXXXsel.csv and sXXXXall.csv contain the values of the absolute-maximum
sensitivity coefficients during the time integration.
sXXXXsel.csv contains the sorted largest ones, while sXXXXall.csv contains
ones for all reactions.
- rxnc.inp
A text-format file controlling the behavior of the rxnc.
Below is the sample.
===== rxnc (rxncntrb.f) Control Input File =====
[ (Time points to be investigated in s) time1, time2, ... ]
2.5e-4 1.78e-4 5e-5 1.e-6
[ (species to be investigated) name1, name2, ... ]
H O HO2
[ options (atol, min%, top#, sbin, ocsv) ]
atol=1e-20 min%=0.1 sbin=save.bin
This file species the time or chemical species for the evaluation and
other options.
- rxnc.out
An outpu of rxnc. Below is an example.
------ rxncntrb -------------------------------
Calculate contributions of reactions for the
:
: Header - echo of rxnc.inp and information on the sankin binary.
:
CHEM BIN file contains 9 species
and 20 reactions.
-----------------------------------------------
----- species [H] ----------------------------- (results for H)
TIME = 9.8545E-07 (at ~1 micro seccond)
<creation> net = 8.2200E-09 (app = 8.2200E-09)
rxn 10 95.69 Fwd OH+H2<=>H2O+H
rxn 17 2.76 Rev H+HO2<=>H2+O2
rxn 12 1.56 Fwd O+H2<=>OH+H
<destruction> net = 9.6809E-10 (app = 9.6809E-10)
<1st-ord dst> net = 1.6328E+05 (app = 1.6328E+05)
rxn 11 50.30 Rev O+OH<=>O2+H
rxn 1 49.70 Fwd H+O2+M<=>HO2+M
TIME = 4.9795E-05 (at ~50 micro second)
:
:
-----------------------------------------------
----- species [O] ----------------------------- (results for O)
TIME = 9.8545E-07
:
: