<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<htlm lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <link rel="stylesheet" href="style/manual.css" type="text/css">
  <title>KUCRS-User's Guide</title>
</head>
<body>

<div class="sign">
 (c) 2002&ndash;2025 by <a href="../index.html.en">A.
  Miyoshi</a><br> All rights reserved.
</div>
<div class="title">KUCRS</div>
<div class="subttl">&ndash; Knowledge-basing Utilities for Complex Reaction
 Systems &ndash;<br clear="right"></div>

<hr> <!-- ------------------------------------------------------------ -->
<div class="lang"><a href="userguid.htm.ja">Japanese</a></div>
<table cellspacing="0"><tr align="center">
 <td class="fold"><a href="index.htm.en">What is<br>KUCRS?</a></td>                 <td class="sm"></td>
 <td class="fold"><a href="overview.htm.en">Overview</a></td>                       <td class="sm"></td>
 <td class="fold"><a href="license.htm.en">Licensing</a></td>                       <td class="sm"></td>
 <td class="fold"><a href="distrib.htm.en">Distribution</a></td>                    <td class="sm"></td>
 <td class="fold"><a href="getstrtd.htm.en">Getting<br>Started</a></td>             <td class="sm"></td>
 <td class="fold"><a href="building.htm.en">Build</a></td>                          <td class="sm"></td>
 <td class="fold"><a href="manual.htm.en">Input<br>Manual</a></td>                  <td class="sm"></td>
 <td class="sel">User's<br>Guide</td>                                               <td class="sm"></td>
 <td class="fold"><a href="refman.htm.en">Reference<br>Manual</a></td>              <td class="sm"></td>
 <td class="fold"><a href="verhist.htm.en">Version<br>History</a><br clear="right"></td>
</tr></table>
<hr> <!-- ------------------------------------------------------------ -->

<h1>KUCRS User's Guide</h1>

<div class="main"> <!-- ---------------------------------------------- -->

<div class="ind1mgn">
 &nbsp; The KUCRS <code>run_comb</code> is a command-prompt batch file which
 invokes several programs during its execution. &nbsp;
 Here, these programs and related programs are introduced.
</div>

<h2>List of the Components</h2>

<div class="ind1mgn">
 &nbsp; The <code>run_comb</code> invokes the following programs.
 <div class="ind1smgn"><table border="1" cellspacing="0">
  <tr><td><code>combust</code></td>
    <td>Main program of <code>run_comb</code> autogenerator</td></tr>
  <tr><td><code>thermgen</code></td>
    <td>Batch version of the THERM [<a href="#ref1">#1</a>] program</td></tr>
  <tr><td><code>thermpac</code></td>
    <td>Program to extrapolate thermodynamic functions up to 5000 K
     by fitting to HOE</td></tr>
  <tr><td><code>pac99m</code></td>
    <td>Thermodata generator included in NASA-CEA2 [<a href="#ref2">#2</a>]<br>
     <small>(modified for batch processing)</small></td></tr>
  <tr><td><code>c97to7m</code></td>
    <td>Program to covert formats of thermodata</td></tr>
  <tr><td><code>chemgen</code></td>
    <td>Processor of macro reaction inputs</td></tr>
  <tr><td><code>trangen</code></td>
    <td>Generator of transport data for Chemkin</td></tr>
 </table></div>

 &nbsp; The followings are utility programs.
 <div class="ind1smgn"><table border="1" cellspacing="0">
  <tr><td><code>mollib</code></td>
    <td>Molecular library maintainance program</td></tr>
  <tr><td><code>mol2smiles</code></td>
    <td>Internal format to SMILES converter</td></tr>
  <tr><td><code>smiles2mol</code></td>
    <td>SMILES to internal format converter</td></tr>
 </table></div>
</div>

<h2>Example of Using KUCRS components with sample input files</h2>

<div class="ind1mgn">
  &nbsp; Below is an example of the usage of KUCRS components with sample
  input files provided in KUCRS\work\sample.
</div>

<div class="ind1mgn">
 <h3>1. Preparation</h3>
 <div class="ind1smgn">
  &nbsp; Prepare the environment according to the
  <a href="getstrtd.htm.en">Getting Started with KUCRS</a>,
  execute <code>envKUCRS</code> in KUCRS\work, and change directory to
  KUCRS\work\sample.
 </div>
</div>

<div class="ind1mgn">
 <h3>2. Generating additivity group data from SMILES</h3>
 <div class="ind1smgn">
  &nbsp; Below is the contents of the file KUCRS\work\sample\samp.inp.
  <pre>
iC4H9OO             [O]OCC(C)C
C4H8OOHit           OOC[C](C)C
C4H8OOHii           OOCC(C)[CH2]</pre>
  Each line contains a name of the chemical species and its SIMLES
  representation. &nbsp; By typing,
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">smiles2mol samp.inp samp_mol.dat -t</font>
  </div>
  the program <code>smiles2mol</code> converts the SMILES chemical structures
  in samp.inp to KUCRS's unique internal representations and stores them into
  samp_mol.dat. &nbsp; It also print out human readable chemical structures
  and additivity groups for the thermodynamic data estimation to console.
  <pre>
KUCRS rev. 2021.08.23a
...
-----------------------------------------------------------
 name:    iC4H9OO
 formula: C4H9O2
 SMILES:  [O]OCC(C)C
 struct:
 O.- O - C - C - C 
             |_- C 
 groups:  iC4H9OO R C 4 H 9 O 2 $ C/C/H2/O 1 C/C/H3 2 C/C3/H 1 O/C/O 1 O/H/O 1 $ ALPEROX 4 9
 code:    a0008066 (ROO)
-----------------------------------------------------------
...</pre>
  The option <code>&quot;-t&quot;</code> to <code>smiles2mol</code> may be
  used to store the &quot;groups:&quot; information in another file,
  named samp_thg.inp. &nbsp; Below is the contents of samp_thg.inp.
  <pre>
Thermodata generated by smiles2mol (Feb 04, 2011)
 iC4H9OO R C 4 H 9 O 2 $ C/C/H2/O 1 C/C/H3 2 C/C3/H 1 O/C/O 1 O/H/O 1 $ ALPEROX 4 9
 C4H8OOHit R C 4 H 9 O 2 $ C/C/H2/O 1 C/C/H3 2 C/C3/H 1 O/C/O 1 O/H/O 1 $ T 5 18
 C4H8OOHii R C 4 H 9 O 2 $ C/C/H2/O 1 C/C/H3 2 C/C3/H 1 O/C/O 1 O/H/O 1 $ P 5 6</pre>
 </div>
</div>

<div class="ind1mgn">
 <h3>3. Generating thermodynamic data from additivity group data</h3>
 <div class="ind1smgn">
  &nbsp; To generate the thermodynamic data, type as follows.
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">thermgen samp_thg.inp samp_thg.lst</font>
  </div>
  Below is the contents of the samp_thg.lst file created here.
  <pre>
  UNITS:KJ
 Thermodata generated by smiles2mol (Feb 04, 2011)
 SPECIES       Hf       S    Cp 300     400     500     600     800     1000     1500     DATE        ELEMENTS
 iC4H9OO     -67.36   379.80   121.21  149.45  173.59  194.43  226.81  252.55                 thgen    C   4 H   9 O   2     0 G 4
 C4H8OOHit   -32.64   395.04   126.52  150.96  173.59  194.18  226.69  252.34                 thgen    C   4 H   9 O   2     0 G 5
 C4H8OOHii   -13.39   393.17   126.57  155.64  180.46  201.50  233.34  257.69                 thgen    C   4 H   9 O   2     0 G 5</pre>
  These data in the <i>list format</i> of the THERM program can be coverted
  to the NASA polynomial format by using the <code>thermpac</code> and
  <code>pac99m</code>.&nbsp; To execute <code>thermpac</code>, type,
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">thermpac samp_thg.lst samp_thg.i97</font>
  </div>
  then a file named samp_thg.i97 containing the following input for <code>pac99m</code>
   will be created.
  <pre>
NAME  iC4H9OO         
C4H9O2                  HF298     -67.3600KJOULE
DATE  thgen 
LSTS  OLD
OUTP  MFIG              LSQS              ATM
METH  READIN            JOULES            ATM
      T         200.0000CP/R       11.5533H-H0RT     10.8142S/R        40.5599
      T         298.1500CP/R       14.5122H-H0RT     11.5077S/R        45.6795
      T         300.0000CP/R       14.5769H-H0RT     11.5265S/R        45.7694
      T         400.0000CP/R       17.9773H-H0RT     12.7212S/R        50.4367
      T         500.0000CP/R       20.8915H-H0RT     14.0726S/R        54.7711
 :
      T        4600.0000CP/R       40.2119H-H0RT     34.0938S/R       128.7897
      T        5000.0000CP/R       40.3301H-H0RT     34.5882S/R       132.1477
FINISH
NAME  C4H8OOHit       
 :</pre>
  &quot;LSTS  OLD&quot; specifies 'old' 7-coefficients type of temperature exponents.
  Delete this line if you need new 9-coefficients type of thermodata.
  Execute <code>pac99m</code> by typing,
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">pac99m samp_thg</font>
  </div>
  The thermodynamic data formed in samp_thg.c97 should be reformatted.&nbsp;
  Type as below,
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">c97to7m &lt; samp_thg.c97 &gt; samp_thg.dat</font>
  </div>

  The reformatted file (samp_thg.dat) will look like:
  <pre>
THERMO
   200.000  1000.000  5000.000
iC4H9OO           thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.01467873E+01 3.05538270E-02-1.24407750E-05 2.30628955E-09-1.59891993E-13    2
-1.32467955E+04-2.26594992E+01 7.47214966E+00 6.10466106E-03 9.24718413E-05    3
-1.29154051E-07 5.35116356E-11-1.11876674E+04-1.78866742E+00                   4
C4H8OOHit         thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.03491111E+01 3.03505002E-02-1.24974449E-05 2.33498675E-09-1.62788316E-13    2
-9.12155685E+03-2.18765280E+01 1.18358510E+01-1.49152863E-02 1.28251416E-04    3
-1.54673866E-07 5.98762503E-11-7.64728496E+03-1.99286829E+01                   4
C4H8OOHii         thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.22743731E+01 2.84317160E-02-1.17144065E-05 2.18973048E-09-1.52718166E-13    2
-7.49654463E+03-3.30242364E+01 8.22486738E+00 3.40269298E-03 1.04442186E-04    3
-1.44956105E-07 5.99150535E-11-4.87848708E+03-4.06884648E+00                   4
END</pre>
 </div>
</div>

<div class="ind1mgn">
 <h3>4. Generating transport data from additivity group data</h3>
 <div class="ind1smgn">
  &nbsp; The program <code>trangen</code> generates transport data from
  additivity group data. &nbsp;
  Type as follows,
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">trangen samp_thg.inp --no_append</font>
  </div>
  and then a file samp_trn.dat containing the following will be generated.
  <pre>
!
! generated by KUCRS rev. 2021.08.23a (c) 2002-2021 by A. Miyoshi
!  on Aug 25, 2021.
!
! Transport data generated by trangen (Aug 25, 2021)
iC4H9OO            2   453.6     5.358     0.0       0.0      1.0
C4H8OOHit          2   453.6     5.358     0.0       0.0      1.0
C4H8OOHii          2   453.6     5.358     0.0       0.0      1.0</pre>
 </div>
</div>

<div class="ind1mgn">
 <h3>5. Generating the reaction mechanism in Chemkin format</h3>
 <div class="ind1smgn">
  &nbsp; The <code>chemgen</code> processes a reaction list in macro
  representation
  and generates a reaction mechanism in Chemkin format.&nbsp;
  The macro's should be defined in <code>KUCRS\libdata\rxn_macr.dat</code>. &nbsp;
  Below is a part of macro definitions in the
  <code>KUCRS\libdata\rxn_macr.dat</code>.
  <pre>
 Isom/RO2/5pt         6.95E+11    0.     27150.
 Isom/RO2/6pp         3.07E+11    0.     22960.</pre>
  The first line above defines a macro named <code>&quot;Isom/RO2/5pt&quot;</code>,
  which means the intramolecular <u>t</u>ertiary hydrogen abstraction reaction
  of a <u>p</u>rimary RO<sub>2</sub> radical via a five-membered ring
  transition state, with the parameters for the modified Arrhenius expression,
  <i>A</i> = 6.95E+11, <i>n</i> = 0., and <i>E</i><sub>a</sub> = 27150. &nbsp;
  The reaction list in macro representation written in
  KUCRS\work\sample\samp_chg.inp is shown below.
  <pre>
 iC4H9OO = C4H8OOHit $ Isom/RO2/5pt 0 1 Y
 iC4H9OO = C4H8OOHii $ Isom/RO2/6pp 0 2 Y</pre>
  One reaction is written in one line. &nbsp;
  The part until <code>&quot;$&quot;</code> is a reaction equation and list
  reactants to the left of <code>&quot;=&quot;</code> and products to the right.&nbsp;
  In the right to <code>&quot;$&quot;</code>, write a macro name,
  a shift value of the activation energy, a multiplication of an preexponential
  factor, and a flag to indicate whether the reverse reaction is taken into
  account or not.&nbsp;
  For the second reaction in the above example,
  two times of the rate constant defined by
  <code>&quot;Isom/RO2/6pp&quot;</code> (for a single methyl group)
  is assigned since i-butylperoxy has two equivalent methyl groups.
  &nbsp; To process this input by the <code>chemgen</code>,
  Type as follows.
  <div class="cmdl">
   c:\KUCRS\work\sample&gt; <font color="brown">chemgen samp_chg.inp samp_thg.dat --no_append</font><br>
   c:\KUCRS\work\sample&gt; <font color="brown">mol2smiles samp_mol.dat samp.smiles -l</font><br>
   c:\KUCRS\work\sample&gt; <font color="brown">bsmiles samp_thm.dat samp_sp_.csv samp_the.dat</font><br>
   c:\KUCRS\work\sample&gt; <font color="brown">copy /b samp_spc.inp + samp_the.dat + samp_rxn.inp samp_chm.inp</font>
  </div>
  The file samp_chm.inp contains the full reaction mechanism
  needed for Chemkin as shown below. (The other files are the temporary files
  during the generation of this file, and may be deleted.)
  <pre>
!
! generated by KUCRS rev. 2021.08.23a (c) 2002-2021 by A. Miyoshi
!  on Aug 25, 2021.
!
elements
 H HE C N O AR
end
species
 iC4H9OO C4H8OOHit C4H8OOHii
end
thermo all
   300.000  1000.000  5000.000
!
! [_ SMILES="[O]OCC(C)C" _]
iC4H9OO           thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.01467873E+01 3.05538270E-02-1.24407750E-05 2.30628955E-09-1.59891993E-13    2
-1.32467955E+04-2.26594992E+01 7.47214966E+00 6.10466106E-03 9.24718413E-05    3
-1.29154051E-07 5.35116356E-11-1.11876674E+04-1.78866742E+00                   4
!
! [_ SMILES="OOC[C](C)C" _]
C4H8OOHit         thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.03491111E+01 3.03505002E-02-1.24974449E-05 2.33498675E-09-1.62788316E-13    2
-9.12155685E+03-2.18765280E+01 1.18358510E+01-1.49152863E-02 1.28251416E-04    3
-1.54673866E-07 5.98762503E-11-7.64728496E+03-1.99286829E+01                   4
!
! [_ SMILES="OOCC(C)[CH2]" _]
C4H8OOHii         thgen C   4H   9O   2     G   200.00   5000.00  1000.00      1
 1.22743731E+01 2.84317160E-02-1.17144065E-05 2.18973048E-09-1.52718166E-13    2
-7.49654463E+03-3.30242364E+01 8.22486738E+00 3.40269298E-03 1.04442186E-04    3
-1.44956105E-07 5.99150535E-11-4.87848708E+03-4.06884648E+00                   4
end
reactions      cal/mole  moles
 iC4H9OO=C4H8OOHit                                6.950e+11   0.000   27150.0
                                           rev /  3.884e+10   0.123   18626.1 /
 iC4H9OO=C4H8OOHii                                6.140e+11   0.000   22960.0
                                           rev /  1.094e+12  -0.375   10050.0 /
end</pre>
 </div>
  For the execution of the <code>chemgen</code>, one should prepare
  a table of thermodynamic data,
  as well as the macro representation input (samp_chg.inp
  in the example above). &nbsp;
  The samp_thg.dat generated by the preceeding processes are used
  in this example. &nbsp;
  The thermodynamic data are required to calculate the rate parameters for
  the reverse reactions.
</div>

</div> <!-- ---------------------------------------------------------- -->
<hr> <!-- ------------------------------------------------------------ -->

<div class="ref">
 <a name="ref1"></a>[#1] E. R. Ritter and J. W. Bozzelli,
 &quot;THERM: Thermodynamic Property Estimation for Gas Phase Radicals and
 Molecules,&quot; <I>Int. J. Chem. Kinet.</I>, <B>23</B>, 767-778 (1991).<br>
 <a name="ref2"></a>[#2] S. Gordon and B. J. McBride,
 &quot;Computer Program for Calculation of Complex Chemical Equilibrium Compositions
 and Applications,&quot; NASA Reference Publication 1311 (1996).
</div>

<hr> <!-- ------------------------------------------------------------ -->
</body>
</html>
