User Guide
User Guide
Version 0.2
OpenSMOKE++ is a general framework for numerical simulations of reacting systems with detailed kinetic
mechanisms, including thousands of chemical species and reactions. The framework is entirely written in object-
oriented C++ and can be easily extended and customized by the user for specic systems, without having to
modify the core functionality of the program. The OpenSMOKE++ framework can handle simulations of ideal
chemical reactors (plug-ow, batch, and jet stirred reactors), shock-tubes, rapid compression machines, and
can be easily incorporated into multi-dimensional CFD codes for the modeling of reacting ows. OpenSMOKE++
provides useful numerical tools such as the sensitivity and rate of production analyses, needed to recognize the
main chemical paths and to interpret the numerical results from a kinetic point of view. Since simulations in-
volving large kinetic mechanisms are very time consuming, OpenSMOKE++ adopts advanced numerical techniques
able to reduce the computational cost, without sacricing the accuracy and the robustness of the calculations.
1
2
Copyrights
OpenSMOKE++ Suite Copyright 2006-2015 by Alberto Cuoci
All rights reserved
This software is subject to the terms of the license agreement hereinafter. This software may be used or copied
only in accordance with the terms of this agreement. The software is and remains the sole property of Al-
berto Cuoci. Whenever the OpenSMOKE++ Suite is used to produce any publication, a detailed reference to the
OpenSMOKE++ Suite should be reported.
The OpenSMOKE++ Suite can be used for non-commercial purposes only and cannot be freely distributed. The
user is not allowed to use the OpenSMOKE++ Suite for commercial purposes. For any commercial use please
contact the author at the following email address: [email protected]
License agreement
Using this software implies the following terms and conditions acceptance. Any publication written using the
OpenSMOKE++ Suite must report the following references:
1. Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi E., OpenSMOKE++: An object-oriented frame-
work for the numerical modeling of reactive systems with detailed kinetic mechanisms, Computer Physics
Communications, 192, p. 237-264 (2015), DOI: 10.1016/j.cpc.2015.02.014
2. Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi E., A computational tool for the detailed kinetic
modeling of laminar ames: Application to C2H4/CH4 coow ames, Combustion and Flame, 160(5), p.
870-887 (2013), DOI: 10.1016/j.combustame.2013.01.011
Limited warranty
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE
OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.
BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS
LIBRARY MAY BE INSTALLED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS
OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE LIBRARY.
Main developers
Alberto Cuoci: kernel and core functions, ideal reactors, ODE solvers, CHEMKIN interpreter, graphical
post-processor
Mattia Bissoli: interfaces with third-party ODE and DAE solvers, internal combustion enegines, sensi-
tivity analysis
Alessandro Stagni: analysis and reduction of kinetic mechansims, portability to Mac OSX and Linux
Acknowledgments
We thank the members of CRECK Modeling Group at Politecnico di Milano for their many suggestions, bug
reports, valuable comments on the source code, functionality, and documentation.
Contents
Contents 3
1 Introduction 6
1.1 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 How the OpenSMOKE++ Solvers work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Installation 9
2.1 List of supported operating systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Installation of solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2 Installation of license le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.3 Notes about the OpenSMOKE++ Graphical Post-Processor . . . . . . . . . . . . . . . . . 10
2.3 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.1 Installation of solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.2 Installation of license le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3.3 Notes about the OpenSMOKE++ Graphical Post-Processor . . . . . . . . . . . . . . . . . 12
2.3.4 Check your installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.5 Notes about shared libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.1 Installation of solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.2 Installation of license le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4.3 Notes about the OpenSMOKE++ Graphical Post-Processor . . . . . . . . . . . . . . . . . 14
2.4.4 Check your installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Quick start 16
3.1 Selection of thermodynamic data and kinetic mechanism . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Pre-processing of kinetic mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Preparation of batch reactor simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4 Analysis of results (without graphical post-processor) . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5 Analysis of results with OpenSMOKE++ graphical post-processor . . . . . . . . . . . . . . . . . 18
3.6 Sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Kinetic pre-processor 23
5 Ideal reactors 24
6 Main dictionaries 25
6.1 Dictionary: CHEMKIN-PreProcessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.1.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.2 Dictionary: Batch Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.2.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.3 Dictionary: Perfectly Stirred Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.3.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.4 Dictionary: Shock Tube Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.4.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.5 Dictionary: Plug Flow Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3
CONTENTS 4
7 Sub-Dictionaries 41
7.1 Sub-Dictionary: Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.1.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2 Sub-Dictionary: ODE-Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.3 Sub-Dictionary: Output-Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.4 Sub-Dictionary: Sensitivity-Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.4.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.4.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.5 Sub-Dictionary: Gas-Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.5.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.5.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.6 Sub-Dictionary: Rapid-Kinetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.6.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.6.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.7 Sub-Dictionary: XY-Prole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.7.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.7.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.8 Sub-Dictionary: Parametric-Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.8.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.8.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.9 Sub-Dictionary: Adaptive-Grid1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.9.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.9.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.10 Sub-Dictionary: DAE-TridiagonalBlock-Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.10.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.10.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.11 Sub-Dictionary: NLS-TridiagonalBlock-Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.11.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.11.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.12 Sub-Dictionary: FalseTransient-Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.12.1 Additional comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7.12.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8 Tutorials 66
8.1 Autoignition of a mixture of hydrogen and air . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1.3 Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.2 Ignition delay times for propane autoignition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.2.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.2.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.2.3 Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.3 Simulating a Shock-Tube experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.3.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.3.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.3.3 Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.4 Perfectly Stirred Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
CONTENTS 5
8.4.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Introduction
The OpenSMOKE++ Suite is a collection of "standard solvers" for performing kinetic analyses with detailed
kinetic mechanisms, with hundreds of species and thousands of reactions. The word "solver" has to be intended
as an independent program, built with the aim to perform a specic task (for example to simulate a batch reactor,
or to model a shock-wave, etc. ). Thus, in the following, the OpenSMOKE++ Suite denition will be used to refer
to the collection of OpenSMOKE++ standard solvers. The list of available solvers (which is continuously growing)
includes:
1. a kinetic pre-processor, a utility which is able to read, pre-process and analyze kinetic mechanisms written
in the CHEMKIN format [3, 4, 2]. Its main purpose is to rewrite the kinetic scheme in a XML format
which can be eciently used by the OpenSMOKE++ Suite solvers;
2. a collection of solvers (i.e. independent executable les), one for each system to simulate. In other words,
the OpenSMOKE++ Suite provides the solver dedicated to the simulation of plug ow reactors, the solver
dedicated to the simulation of batch reactors, and so on. These solvers are completely independent from
each other, but need the same pre-processed kinetic mechanism in XML format generated by the kinetic
pre-processor described above;
3. a graphical post-processor, to easily post-process the simulation results. It is able not only to plot the
usual proles of temperature, pressure, composition, etc. along the time or space coordinate, but it is
extremely useful to rapidly perform sensitivity analyses, rate of production analyses, and to draw ux
diagrams. The gure below show a schematic diagram of the OpenSMOKE++ Suite.
6
CHAPTER 1. INTRODUCTION 7
1.1 Organization
The OpenSMOKE++ Suite consists of several executable les, libraries and utilities which are organized in several
folders, as reported in the following:
bin
docs
examples
kinetic-mechanisms
lib
quick-start
tutorials
bin
The bin folder contains the executable les to pre-process kinetic schemes in CHEMKIN format, to simulate
ideal reactors (batch, perfectly stirred, plug-ow reactors, and shock tubes) and to graphically post-process the
results.Together with the executables, the bin folder includes the needed dll libraries (for Microsoft Windows
users) or the needed shared libraries (for Linux users) are available. We recommend to leave these libraries in
the same bin folder containing the executable les.
docs
The docs folder contains documentation les.
examples
The examples folder, as suggested by the name, contains several examples to learn how to run the simulation
for the ideal reactors available in the OpenSMOKE++ Suite. We strongly recommend to look at the examples
reported in this folder to have more information about the most advanced options. All the examples can be
simulated by simply double-clicking on the Run.bat le (for Microsoft Windows users) or running the Run.sh
le (for Linux users).
kinetic-mechanisms
The kinetic-mechanisms folder contains several kinetic schemes in CHEMKIN format freely available from
the web. Most of them are from the CRECK Modeling Group at Politecnico di Milano and can be downloaded
at the following address: http://creckmodeling.chem.polimi.it/. For each kinetic scheme, at least the
thermodynamic and the kinetic les are provided.
lib
The lib folder (available only for Linux platforms) contains the shared libraries needed to run the solvers and
the graphical post-processor. In particular, the current version of OpenSMOKE++ Suite includes shared libraries
for Boost C++, Intel MKL, and Sundials Suite.
quick-start
The quick-start folder contains the examples described in the Quick-Start Section (Chapter 3) of this User's
Guide.
tutorials
The Tutorial folder contains the examples described in the Tutorials Section (Chapter 8)of this User's Guide.
CHAPTER 1. INTRODUCTION 8
The main rules to write the input les are listed below:
1. The comments must be preceded by the // keyword. A comment can be inserted at the beginning or in
the middle of a line. Every word or number reported after the // keyword is considered as a comment
and ignored.
2. The input data must be organized in Dictionaries, i.e. homogeneous input data have to be collected
together in the same structure (see the example above).
3. Each dictionary is dened by the Dictionary word, followed by the name of the dictionary. The options
belonging to this dictionary have to be reported between the { and the } symbols.
4. Each keyword begins with the @ symbol, usually requires one or more options (bool variables, number,
strings, etc.)
In the example reported above, which refers to a steady-state, perfectly stirred reactor, two dierent dictionaries
were dened, with names equal to PerfectlyStirredReactor and Inlet-Composition, respectively. In each of
these two dictionaries, several input data are specied through dierent keywords. The available options depend
on the solver you are using. Please, look at Chapters 6 and 7, where the complete list of options available for
each kind of reactor are reported and explained.
Chapter 2
Installation
This section describes in details the procedure to install the OpenSMOKE++ Suite on your machine.
Linux family
OpenSuse 13 (64 bit)
Mac OS X
Mac OS X 10.7 (64 bit) and higher
If your operating system does not appear in the list reported above, we suggest to install an Oracle VirtualBox
(https://www.virtualbox.org/) running Ubuntu 14.04 or 15.04 (http://www.ubuntu.com/).
Graphiviz: http://www.graphviz.org
9
CHAPTER 2. INSTALLATION 10
1. From the Start button, select Computer, right-click on it and select Properties
3. In the System Properties window, click on the Environment Variables button near the bottom of that
tab.
4. In the Environment Variables window, create a new variable with name OPENSMOKEPP_EXE_FOLDER in
the User variables section and click the Edit button. This variable has to point to the bin folder of
your OpenSMOKE++ Suite installation. Of course the path depends on your system (i.e. on the location
where you installed the OpenSMOKE++ Suite). As an example, if you installed the OpenSMOKE++ Suite in
C:\OpenSMOKE++ Suite folder, the following string should be assigned to the OPENSMOKEPP_EXE_FOLDER:
"C : \ OpenSMOKE++ S u i t e \ b i n "
1. From the Start button, select Computer, right-click on it and select Properties
3. In the System Properties window, click on the Environment Variables button near the bottom of that
tab.
4. In the Environment Variables window, highlight the PATH variable in the User variables section and
click the Edit button. Add or modify the path lines with the paths you want the computer to access.
Each dierent directory is separated with a semicolon. In particular, modify the PATH variable by adding
the path to the bin folder contained in the main Graphviz folder. Of course the path depends on your
system (i.e. on the location where you installed the Graphviz library). As an example, if you installed
the GraphViz library in C:\Program Files (x86)\Graphviz2.38 folder, the following string should be
appended to the PATH variable:
"C : \ Program F i l e s ( x86 ) \ G r a p h v i z 2 . 3 8 \ b i n " ;
1. From the Start button, select Computer, right-click on it and select Properties
CHAPTER 2. INSTALLATION 11
3. In the System Properties window, click on the Environment Variables button near the bottom of that
tab.
4. In the Environment Variables window, highlight the PATH variable in the User variables section and
click the Edit button. Add or modify the path lines with the paths you want the computer to access.
Each dierent directory is separated with a semicolon. In particular, modify the PATH variable by adding
the path to the main Irfanview folder. Of course the path depends on your system (i.e. on the loca-
tion where you installed IrfanView). As an example, if you installed Irfanview in C:\Program Files
(x86)\IrfanView folder, the following string should be appended to the PATH variable:
"C : \ Program F i l e s ( x86 ) \ I r f a n V i e w " ;
2.3 Linux
Pre-requisites for OpenSMOKE++ Suite Solvers:
gfortran libraries: https://gcc.gnu.org/wiki/GFortran
Graphiviz: http://www.graphviz.org/
2. Unpack the opensmoke++suite-0.2.tar.gz le in the location you prefer using the following command:
t a r x z f opensmoke++s u i t e 0 . 2 . t a r . gz
As an example, if you unpacked the opensmoke++suite-0.2.tar.gz le directly in your home folder
($HOME), the following lines have to be added (in case of bash):
e x p o r t PATH=$PATH :$HOME/ opensmoke++s u i t e 0.2/ b i n
e x p o r t LD_LIBRARY_PATH=$LD_LIBRARY_PATH :$HOME/ opensmoke++s u i t e 0.2/ l i b
4. Close the terminal and open a new terminal (or source the updated $HOME/.bashrc or $HOME/.cshrc).
CHAPTER 2. INSTALLATION 12
OpenSuse
Use the Yast utility to install GraphViz.
Ubuntu and Xubuntu
Type the following command in a terminal:
sudo apt g e t i n s t a l l g r a p h v i z
2. Check if installation of graphical post-processor was done properly: from the same folder, type
OpenSMOKE_PostProcessor . s h
If error messages about missing shared libraries appear, have a look at the Notes reported below.
Fedora
Error message: error while loading shared libraries: libgfortran.so.x
Solution: su -c 'yum install gcc-gfortran'
OpenSuse
Error message: error while loading shared libraries: libQtGui.so.x
Solution: install libqt4 using Yast
Xubuntu
Error message: error while loading shared libraries: libaudio.so.x
Solution: sudo apt-get install libaudio2
2.4 Mac OS X
Pre-requisites for OpenSMOKE++ Suite Solvers:
gfortran libraries: https://gcc.gnu.org/wiki/GFortranBinaries#MacOS
As an example, if you installed OpenSMOKE++ in your home directory ($HOME), you can type:
$HOME/opensmoke++suite-0.2-macos/bin/OpenSMOKE_PostProcessor.sh.app
Chapter 3
Quick start
In this section we describe how to setup and run a typical OpenSMOKE++ simulation. As a rst example, the
attion will be focused on an adiabatic batch reactor, whose initial composition is a stoichiometric mixture of
syngas (40% H2, 60% CO) and air (21% O2, 79% N2) at 10 atm and 600 K.
16
CHAPTER 3. QUICK START 17
Please, look at the CHEMKIN user's guide [2]to nd the syntax rules to correctly write and modify the les
describing the kinetic mechanism and the thermodynamic and transport properties.
In this example we will use the POLIMI_H2CO_NOX_1412 kinetic mechanism of CRECK Modeling group
at Politecnico di Milano. This is a detailed kinetic mechanism describing the combustion of mixtures of hy-
drogen and carbon monoxide, consisting of 32 species involved in more than 170 reactions. It is available in
the kinetic-mechanisms\POLIMI_1412\Kinetics folder or, alternatively, it can be freely downloaded from
the following page: (http://creckmodeling.chem.polimi.it/). The thermodynamic data are available in
the kinetic-mechanisms\POLIMI_1412\Thermodynamics folder. In particular, for the purposes of this rst
example, we need only the thermodynamic data (POLIMI_TOT_NOX_1412.CKT le) and the kinetic mechanism
(POLIMI_H2CO_NOX_1412.CKI le). The transport data are not needed for the simulation of a batch reactor.
3. Run the kinetic pre-processor using the following command (in Microsoft Windows):
%OPENSMOKEPP_EXE_FOLDER%\OpenSMOKE_CHEMKIN_PreProcessor . e x e i n p u t k i n e t i c s . d i c
4. If everything works properly, you will nd the result of this pre-processing operation in the folder you
specied through the @Output option in the kinetics.dic le.
8 }
9
10 D i c t i o n a r y i n i t i a l m i x t u r e
11 {
12 @Temperature 1000. K ;
13 @Pressure 1 0 1 3 2 5 . Pa ;
14 @EquivalenceRatio 1.;
15 @FuelMoles H2 4 0 . CO 6 0 . ;
16 @OxidizerMoles O2 21 N2 7 9 ;
17 }
18
19 D i c t i o n a r y o u t p u t o p t i o n s
20 {
21 @StepsFile 2;
22 }
For the meaning of each option and additional/alternative options, please look at Chapters 6 and 7.
2. Run the OpenSMOKE++ Suite solver for batch reactors (OpenSMOKE_BatchReactor) using the following
command (in Microsoft Windows):
%OPENSMOKEPP_EXE_FOLDER%\OpenSMOKE_BatchReactor . e x e i n p u t b a t c h . d i c
3. If everything works properly, you will nd the result of this pre-processing operation in the Output folder.
FinalSummary.out: this le reports the initial and nal status of the reacting mixture (temperature,
pressure, density, composition, etc.)
Output.out: it is organized in columns and the rst row reports the meaning of each column, together
with a number which refers to the column number. Both the mole and mass fractions of species are
reported: the mole fractions have the x sux, while the mass fractions the w sux. You can easily import
this le in Microsoft Excel, Matlab, etc. or you can use Gnuplot to directly plot (also on the y) the
results.
Output.xml: XML output le to be used by the OpenSMOKE++ graphical post-processor (see next Section)
The proles reported in the Output.out le can be easily plotted using Gnuplot, Microsoft Excel, Matlab, etc.
In particular, we recommend to use Gnuplot. As an example, if you want to plot the mole fraction proles of
H2 versus time, in Gnuplot you can type:
p ' Output / Output . o u t ' u 1 : 2 2 w l t ' H2 '
1. In order to graphically post-process the results you have to run the OpenSMOKE_PostProcessor le
(contained in the bin folder of OpenSMOKE++ Suite).
CHAPTER 3. QUICK START 19
3 0.18
temperature H2
3000 pressure 0.16 CO
H2O
CO2
0.14
2.5
2500 0.12
temperature [K]
pressure [atm]
mole fractions
0.1
2
2000 0.08
0.06
1.5
1500 0.04
0.02
1000 1 0
0 0.0001 0.0002 0.0003 0.0004 0.0005 0 0.0001 0.0002 0.0003 0.0004 0.0005
time [s] time [s]
Figure 3.1: Adiabatic batch reactor: proles of temperature and pressure (left) and main species (right). The
plots have been obtained from the Output.out le, using gnuplot.
0, 175
CO 0, 021 OH
0, 15 CO2 NO
H2 0, 0175
0, 125 H2O
0, 014
0, 1
0, 0105
0, 075
0, 007
0, 05
0, 025 0, 0035
0 0
0 810 -5 0, 00016 0, 00024 0, 00032 0, 0004 0, 00048 0 810 -5 0, 00016 0, 00024 0, 00032 0, 0004 0, 00048
time [s] time [s]
Figure 3.2: Adiabatic batch reactor: proles of main species (left) and OH radical and NO (right). The proles
have been obtained directly using the OpenSMOKE++ PostProcessor.
2. Select the folder containing the Output.xml le generated by the simulation by clicking on the Select
Results... button. The Profiles button becomes now available. If you click on it, you have the
possibility to plot the calculated proles of species, temperature, pressure, etc. As an example, in Figure
3.2 proles of selected species are reported.
3. If you want to perform more interesting post-processing analyses, you have to load also the pre-processed
kinetic scheme. In order to do this, you should close the Profiles window and click on the Select
Mechanism... button. Then, select the folder containing the kinetics.xml le generated by the kinetic
pre-processor. The Rate of Production button becomes available. If you click on this button, a new
window will be available. Here you have the possibility to plot formation rates for all the species and
reaction rates for all the reactions (see Figure 3.3). You can analyze the distribution of characteristic
times by looking at the eigenvalues of the Jacobian matrix, by clicking on the Analyze Characteristic
Times button.
4. More interestingly, you can perform rate of production analysis for each species in the kinetic scheme
through the Plot ROPA bars button (see Figure 3.4).
5. Eventually, you can also draw path diagrams through the Flux Analysis button (this feature is only
available if you correctly installed Graphviz and Irfanview, as described in the previous Chapter). As an
example, in the Type panel select the Local radio button and write 0.022 in the corresponding window
(this is the time in seconds at which you want to perform the ux analysis). Select NO from the Species
list, N element from the Element list, and Production from the Type panel. If you click on the Flux
Analysis button, you should get the ux diagram reported in Figure 3.5.
CHAPTER 3. QUICK START 20
18 R 5: H+ HO2= 2OH H2
90
R 7: 2OH= H2O+ O H2O
12
0
0
-45
-6
-12 -90
-18
-135
0 810 -5 0, 00016 0, 00024 0, 00032 0, 0004 0, 00048 0 810 -5 0, 00016 0, 00024 0, 00032 0, 0004 0, 00048
time [s] time [s]
Figure 3.3: Adiabatic batch reactor: proles of reaction rates (left) and formation rates of selected species
(right). The proles have been obtained directly using the OpenSMOKE++ PostProcessor.
Figure 3.4: Adiabatic batch reactor: rate of production analyses for H2O and NO as calculated by suing the
OpenSMOKE++ PostProcessor.
CHAPTER 3. QUICK START 21
Figure 3.5: Adiabatic batch reactor: ux analysis (NO production, Element N, Depth 1, Width 4)
and by enabling the sensitivity analysis calculation in the main BatchReactor dictionary, through the
addition of the following command:
@SensitivityAnalysis s e n s i t i v i t y o p t i o n s ;
Now you can run the batch reactor simulation using the following command (in Microsoft Windows):
%OPENSMOKEPP_EXE_FOLDER%\OpenSMOKE_BatchReactor . e x e i n p u t b a t c h . d i c
0, 00015
R 4 5 : NO + NH 2 = NNH + O H
R 4 6 : NO + NH 2 = N2 + H 2 O
0, 000125
R 5 6 : 2 NH = N2 + 2 H
R 5 7 : N+ NH = N2 + H
0, 0001
7, 510 -5
510 -5
2, 510 -5
0
0 810 -5 0, 00016 0, 00024 0, 00032 0, 0004 0, 00048
If everything worked properly, you can now look at the results of sensitivity analysis using the OpenSMOKE++
PostProcessor. In particular, after selecting the folders containing the Output.xml le and the pre-processed
kinetic mechanism, the third button, Sensitivity Analysis, will be available. You can now plot the specic
sensitivity coecient proles for each species and reaction or a bar chart for every species. An example is
reported in Figure 3.6.
Chapter 4
Kinetic pre-processor
In order to preprocess a kinetic scheme, the OpenSMOKE++ Suite provides the OpenSMOKE_CHEMKIN_PreProcessor
utility. The user has to supply the les containing the thermodynamic data, the kinetic mechanism, and (op-
tionally) the transport data. For the simulation of ideal reactors, usually the transport data are not needed and
therefore the user could choose to preprocess only the thermodynamic and the kinetic data. This is useful, since
in many cases the transport data are not available. In order to run the OpenSMOKE_CHEMKIN_PreProcessor
utility, the user has to write an input le containing the instructions (i.e. the dictionary) to perform the pre-
processing and/or additional useful operations (checking of the thermodynamic properties, post-processing of
reaction rates, etc.). The rules to write the dictionary are reported in Section 6.1. Please look at the tutorials
to have more details. The OpenSMOKE_CHEMKIN_PreProcessor utility can be run from the command line using
the following instructions, where it is assumed that the le containing the dictionary is called myinput.dic and
the dictionary mydictionary:
1. in Microsoft Windows
%OPENSMOKEPP_EXE_FOLDER%\OpenSMOKE_CHEMKIN_PreProcessor . e x e i n p u t myi nput . d i c
d i c t i o n a r y m y d i c t i o n a r y
Please, consider that the instruction reported above must be written in a single line. You can use multiple
lines using the ^ symbol.
2. in Linux
OpenSMOKE_CHEMKIN_PreProcessor . s h i n p u t myi nput . d i c d i c t i o n a r y m y d i c t i o n a r y
Notes
1. The --input option can be omitted. In this case the OpenSMOKE_CHEMKIN_PreProcessor assumes that
the input le is called input.dic
2. The --dictionary option can be omitted. In this case the OpenSMOKE_CHEMKIN_PreProcessor assumes
that the dictionary is called CHEMKIN_PreProcessor
3. In addition to several ASCII les (depending on the options specied in the dictionary), a kinetics.xml
le will be generated by the OpenSMOKE_CHEMKIN_PreProcessor. This is the only le needed by the
OpenSMOKE++ Suite solvers.
23
Chapter 5
Ideal reactors
The ideal reactor simulations can be performed using the same approach used for pre-processing the kinetic
mechanism, as described in Chapter 4. Thus, the user has to supply a proper dictionary containing the instruc-
tions and the options for running the simulation under investigation. As usual, the solver can be run using the
following instruction from the command line (where it is assumed that the dictionary is called mydictionary,
contained in myinput.dic le):
1. in Microsoft Windows
%OPENSMOKEPP_EXE_FOLDER%\OpenSMOKE_SolverName . e x e i n p u t myin put . d i c
d i c t i o n a r y m y d i c t i o n a r y
Please, consider that the instruction reported above must be written in a single line. You can use multiple
lines using the ^ symbol.
2. in Linux
OpenSMOKE_SolverName . s h i n p u t myin put . d i c d i c t i o n a r y m y d i c t i o n a r y
Notes
1. The input option can be omitted. In this case the OpenSMOKE_SolverName assumes that the input le
is called input.dic The rules to write the dictionary for several ideal reactors are reported in Chapter 6.
Please look at the tutorials to have more details.
a) If a pre-processed version of the kinetic scheme is already available (i.e. the kinetics.xml le was
already generated as described in Chapter4), the user can use directly this le, by providing the
folder where it is contained (through the @KineticsFolder option)
b) The user can choose to pre-process the kinetic mechanism on the y, by providing the paths to the
kinetic les (usually through the @KineticsPreProcessor option)
3. At the end of the simulation, an Output.xml le will be written in the Output folder, together with
additional les in ASCII format.
24
Chapter 6
Main dictionaries
As better explained in the previous Chapters, the input data have to be provided through proper dictionaries,
depending on the type of solver the user wants to run. In the current version of OpenSMOKE++ Suite six dierent
solvers are available:
1. CHEMKIN-PreProcessor
2. Batch-Reactor
3. Perfectly-Stirred-Reactor
4. Shock-Tube-Reactor
5. Plug-Flow-Reactor
Each of the dictionaries reported below usually need additional options, which are based on sub-dictionaries,
described in Chapter 7.
@Kinetics
This option requires the name of the le (ASCII) containing the kinetic mechanism (in CHEMKIN format). Both
local and global paths can be accepted. The Kinetics_Summary.out le reports the whole kinetic mechanism
written in a more readable format.
25
Option Type Meaning
@Thermodynamics PATH Name of the le (ASCII) containing the thermodynamic data (CHEMKIN format)
@Output PATH Name of the folder where the pre-processed data are written
@Transport PATH Name of the le (ASCII) containing the transport data (CHEMKIN format)
@Kinetics PATH Name of the le (ASCII) containing the kinetic mechanism (CHEMKIN format)
CHAPTER 6. MAIN DICTIONARIES
@CheckThermodynamics BOOL The thermodynamic data are checked and additional les are written in output (together
with a consistent reformulation of thermodynamic data)
@OutputOldStyle BOOL The output le are written also using the old format used by the OpenSMOKE framework
(before 2013)
@TransportFittingCoecients BOOL The tting coecients for the transport properties are written on a le. Please consider
that this operation is very slow for large kinetic mechanisms (more than 1000 species) and
produces huge les
@ReactionTables BOOL For each reaction detailed information is reported on a le (kinetic constants, change of
moles, etc.)
@ReverseFitting BOOL For each reversible reaction the reverse kinetic constants are estimated assuming the
Arrhenius' law
@Comments SUBDICTIONARY Additional data (author name, comments, etc.) can be added to the pre-processed kinetic
[Comments] mechanism
@SparsityPatternAnalysis BOOL Additional analyses about the sparsity pattern of stoichiometric matrix and associated
Jacobian matrix
Table 6.1: CHEMKIN-PreProcessor dictionary
26
CHAPTER 6. MAIN DICTIONARIES 27
@Transport
This option requires the name of the le (ASCII) containing the transport data (in CHEMKIN format). Both
local and global paths can be accepted.
@Output
This can specify the name of the folder where the results of the simulation will be written. Both local and
global paths can be accepted.
@CheckThermodynamics
This option allows to perform a detailed check of the thermodynamic data, to nd possible inconsistent or un-
physical data. The Thermodynamics_Status.out le reports a summary of the analysis of the thermodynamic
data. In addition, a new le, containing new thermodynamic data, called Thermodynamics_Reformulated.out,
will be provided. This new thermodynamic le is generated on the basis of the original thermodynamic data,
which are made perfectly consistent at the transition temperature between low and high temperature correla-
tions.
@TransportFittingCoecients
The tting coecients for the transport properties (viscosity, thermal conductivity, mixture-averaged mass
diusion, and mixture-averaged thermal diusion) for each species in the kinetic le are written on a le. Please
consider that this operation is very slow for large kinetic mechanisms (more than 1000 species) and produces
huge les (dimensions of Gb).
@ReactionTables
For each reaction detailed information is reported on the Reaction_Tables.out le (kinetic constants, change
of moles, etc.). The Reaction_Tables.out le is self-explanatory.
@ReverseFitting
For each reversible reaction the reverse kinetic constants are estimated assuming the Arrhenius' law. The kinetic
parameters of the reverse reactions are then written on the Reaction_FittedKinetics.out le.
@SparsityPatternAnalysis
Additional analyses about the sparsity pattern of stoichiometric matrix and associated Jacobian matrix
@KineticsPreProcessor
The user can pre-process a kinetic scheme available in CHEMKIN format on the y, when the reactor simulation
is performed (instead of pre-processing the kinetics in a previous step). This option is very useful when the
kinetic mechanism is under construction and/or tuning and the user has the need to change often the reactions
and the kinetic parameters. Please consider that the pre-processing operation can be quite long for very detailed
kinetic schemes (thousands of species). The @KineticsPreProcessor option requires that the user specify the
name of the sub-dictionary containing all the information needed to pre-process kinetic mechanisms on the y.
Please look at Section 7.6 to have more details.
@Type
This option is used to specify the type of reactor to simulate. Four dierent combinations are possible:
Isothermal-ConstantVolume, NonIsothermal-ConstantVolume, Isothermal-ConstantPressure, NonIsothermal-ConstantPr
@InitialStatus
This option is used to specify the features (temperature, pressure and composition) of the initial mixture (i.e.
at time 0) in the batch reactor. The @InitialStatus option requires that the user specify the name of the
corresponding sub-dictionary. Please look at Section 7.5 to have more details.
@EndTime
This is the residence time of the batch reactor.
@StartTime
Start time for transient simulation (default 0).
@Volume
This is the volume of the batch reactor. Please look at Section 7.7 to have more details.
@GlobalThermalExchangeCoecient
Global thermal exchange coecient U : Q = U A(T Tenv )
@EnvironmentTemperature
EnvironmentTemperature Tenv : Q = U A(T Tenv )
@ExchangeArea
Exchange area A: Q = U A(T Tenv )
@VolumeProle
Dictionary dening the volume prole.
@PressureCoecien
Coecient for pressure increase (example: 1e5 Pa/s)
@SensitivityAnalysis
The user has to specify the name of the sub-dictionary in which the options for performing the sensitivity
analysis are reported. Please look at Section 7.4 to have more details.
CHAPTER 6. MAIN DICTIONARIES 30
@Options
The user has to specify the name of the sub-dictionary in which the options devoted to the output operations
are reported. Please look at Section 7.3 to have more details.
@OdeParameters
The user has to specify the name of the sub-dictionary in which the options about the ODE solver adopted for
the solution of the reactor equations. Please look at Section 7.2 to have more details.
@ParametricAnalysis
Dictionary containing additional options for performing a parametric analysis. Please look at Section 7.8 to
have more details.
@KineticsPreProcessor
The user can pre-process a kinetic scheme available in CHEMKIN format on the y, when the reactor simulation
is performed (instead of pre-processing the kinetics in a previous step). This option is very useful when the
kinetic mechanism is under construction and/or tuning and the user has the need to change often the reactions
and the kinetic parameters. Please consider that the pre-processing operation can be quite long for very detailed
kinetic schemes (thousands of species). The @KineticsPreProcessor option requires that the user specify the
name of the sub-dictionary containing all the information needed to pre-process kinetic mechanisms on the y.
Please look at Section 7.6 to have more details.
@Type
This option is used to specify the type of reactor to simulate. Two dierent combinations are possible:
Isothermal-ConstantPressure, NonIsothermal-ConstantPressure.
@InletStatus
This option is used to specify the features (temperature, pressure and composition) of the inlet mixture in the
perfectly stirred reactor. The @InletStatus option requires that the user specify the name of the corresponding
sub-dictionary. Please look at Section 7.5 to have more details.
@InitialStatus
This option is used to specify the features (temperature, pressure and composition) of the initial mixture (i.e.
at time 0) in the perfectly stirred reactor. This information is used only as a rst guess solution to nd the
steady-state solution. The @InitialStatus option requires that the user specify the name of the corresponding
sub-dictionary. Please look at Section 7.5 to have more details.
Option Type Meaning
@KineticsFolder PATH Name of the folder containing the kinetic scheme (XML Version)
@KineticsPreProcessor SUBDICT Dictionary containing the list of kinetic les to be interpreted (see Section 7.6)
[Rapid-Kinetics]
@Type STRING Perfectly Stirred Reactor type: Isothermal-ConstantPressure |
NonIsothermal-ConstantPressure
@InletStatus SUBDICT Dictionary dening the inlet gas composition, temperature, and pressure (see
[Gas-Status] Section 7.5)
CHAPTER 6. MAIN DICTIONARIES
@InitialStatus SUBDICT Dictionary dening the initial gas composition, temperature and pressure inside the
[Gas-Status] reactor (see Section 7.5)
@ResidenceTime MEASURE Residence time
@EndTime MEASURE Integration time for the ODE solution
@Volume MEASURE Initial volume of reactor
@MassFlowRate MEASURE Inlet mass ow rate
@GlobalThermalExchangeCoecient MEASURE Global thermal exchange coecient U : Q = U A(T Tenv )
@EnvironmentTemperature MEASURE EnvironmentTemperature Tenv : Q = U A(T Tenv )
@ExchangeArea MEASURE Exchange area A: Q = U A(T Tenv )
@SensitivityAnalysis SUBDICT Dictionary containing additional options for sensitivity analysis (see Section 7.4)
[Sensitivity-Analysis]
@Options SUBDICT Dictionary containing additional options for solving the perfectly stirred reactor (see
[Output-Options] Section 7.3)
@OdeParameters SUBDICT Dictionary containing the numerical parameters for solving the ODE system (see
[ODE-Solver] Section 7.2)
@ParametricAnalysis SUBDICT Dictionary containing additional options for performing a parametric analysis (see
[Parametric-Analysis] Section 7.8)
Table 6.3: Perfectly Stirred Reactor options
31
CHAPTER 6. MAIN DICTIONARIES 32
@ResidenceTime
This is the residence time of the perfectly stirred reactor.
@EndTime
This is the integration time for the solution of the ODE system. Since the user is interested in steady-state
conditions, this number must be extremely large. The default value is 106 s.
@Volume
This is the volume of the perfectly stirred reactor.
@MassFlowRate
This is the mass ow rate of the inlet mixture.
@GlobalThermalExchangeCoecient
Global thermal exchange coecient U : Q = U A(T Tenv )
@EnvironmentTemperature
EnvironmentTemperature Tenv : Q = U A(T Tenv )
@ExchangeArea
Exchange area A: Q = U A(T Tenv )
@SensitivityAnalysis
The user has to specify the name of the sub-dictionary in which the options for performing the sensitivity
analysis are reported. Please look at Section 7.4 to have more details.
@Options
The user has to specify the name of the sub-dictionary in which the options devoted to the output operations
are reported. Please look at Section 7.3 to have more details.
@OdeParameters
The user has to specify the name of the sub-dictionary in which the options about the ODE solver adopted for
the solution of the reactor equations. Please look at Section 7.2 to have more details.
@ParametricAnalysis
Dictionary containing additional options for performing a parametric analysis. Please look at Section 7.8 to
have more details.
@AfterShockStatus SUBDICT Dictionary dening the gas composition, temperature and pressure after the shock (see
[Gas-Status] Section 7.5)
@ReectedShockStatus SUBDICT Dictionary dening the gas composition, temperature and pressure of the reected shock
[Gas-Status] (see Section 7.5)
@IncidentShockVelocity MEASURE Incident shock velocity
@ReectedShockVelocity MEASURE Reected shock velocity
@EndTime MEASURE Time for transient simulation
@BoundaryLayerCorrection BOOL Boundary layer correction
@Diameter MEASURE Diameter of the shock tube
@Viscosity MEASURE Viscosity of the carrier gas at 300 K
@SensitivityAnalysis SUBDICT Dictionary containing additional options for sensitivity analysis (see Section 7.4)
[Sensitivity-Analysis]
@Options SUBDICT Dictionary containing additional options for solving the shock tube reactor (see Section 7.3)
[Output-Options]
@OdeParameters SUBDICT Dictionary containing the numerical parameters for solving the ODE system (see Section
[ODE-Solver] 7.2)
Table 6.4: Shock Tube Reactor dictionary
33
CHAPTER 6. MAIN DICTIONARIES 34
@KineticsPreProcessor
The user can pre-process a kinetic scheme available in CHEMKIN format on the y, when the reactor simulation
is performed (instead of pre-processing the kinetics in a previous step). This option is very useful when the
kinetic mechanism is under construction and/or tuning and the user has the need to change often the reactions
and the kinetic parameters. Please consider that the pre-processing operation can be quite long for very detailed
kinetic schemes (thousands of species). The @KineticsPreProcessor option requires that the user specify the
name of the sub-dictionary containing all the information needed to pre-process kinetic mechanisms on the y.
Please look at Section 7.6 to have more details.
@Type
This option is used to specify the type of reactor to simulate. Two dierent combinations are possible:
IncidentShock, ReflectedShock.
@IncidentShockVelocity @ReectedShockVelocity
These options are used to specify the velocity of the incident or the reected shocks.
@EndTime
Integration time.
@BoundaryLayerCorrection
Boundary layer correction.
@Diameter
Internal diameter of the shock-tube.
@Viscosity
Viscosity of the carrier gas at ambient temperature.
@SensitivityAnalysis
The user has to specify the name of the sub-dictionary in which the options for performing the sensitivity
analysis are reported. Please look at Section 7.4 to have more details.
@Options
The user has to specify the name of the sub-dictionary in which the options devoted to the output operations
are reported. Please look at Section 7.3 to have more details.
CHAPTER 6. MAIN DICTIONARIES 35
@OdeParameters
The user has to specify the name of the sub-dictionary in which the options about the ODE solver adopted for
the solution of the reactor equations. Please look at Section 7.2 to have more details.
@KineticsPreProcessor
The user can pre-process a kinetic scheme available in CHEMKIN format on the y, when the reactor simulation
is performed (instead of pre-processing the kinetics in a previous step). This option is very useful when the
kinetic mechanism is under construction and/or tuning and the user has the need to change often the reactions
and the kinetic parameters. Please consider that the pre-processing operation can be quite long for very detailed
kinetic schemes (thousands of species). The @KineticsPreProcessor option requires that the user specify the
name of the sub-dictionary containing all the information needed to pre-process kinetic mechanisms on the y.
Please look at Section 7.6 to have more details.
@Type
This option is used to specify the type of reactor to simulate. Two dierent types are possible: Isothermal or
NonIsothermal.
@ConstantPressure
When this option is true, a constant pressure simulation will be performed. If this option is false, the simulation
will be performed under the assumption of constant velocity.
@InletStatus
This option is used to specify the features (temperature, pressure and composition) of the inlet mixture in
the plug ow reactor. The @InletStatus option requires that the user specify the name of the corresponding
sub-dictionary. Please look at Section 7.5 to have more details.
@ResidenceTime
This is the residence time for the plug ow reactor.
@Length
This is the length of the plug ow reactor.
@Velocity
This is the velocity of the inlet mixture.
Option Type Meaning
@KineticsFolder PATH Name of the folder containing the kinetic scheme (XML Version)
@KineticsPreProcessor SUBDICT Dictionary containing the list of kinetic les to be interpreted (see Section 7.6)
[Rapid-Kinetics]
@Type STRING Plug ow reactor type: Isothermal, NonIsothermal
@ResidenceTime MEASURE Total residence time
@Length MEASURE Total length
@ConstantPressure BOOL Constant pressure vs Constant velocity simulation
@InletStatus SUBDICT Name of the dictionary dening the inlet gas composition, temperature and pressure
[Gas-Status] (see Section 7.5)
CHAPTER 6. MAIN DICTIONARIES
@MassFlowRate
This is the mass ow rate of the inlet mixture.
@MoleFlowRate
This is the mole ow rate of the inlet mixture.
@VolumetricFlowRate
This is the volumetric ow rate of the inlet mixture.
@Diameter
This is the internal diameter of the plug ow reactor.
@TemperatureProle
The user has the possibility to impose a temperature prole along the plug ow reactor. This temperature
prole can be imposed by providing a proper sub-dictionary. Please look at Section 7.7 to have more details.
@GlobalThermalExchangeCoecient
Global thermal exchange coecient U : Q = U A(T Tenv )
@EnvironmentTemperature
EnvironmentTemperature Tenv : Q = U A(T Tenv )
@CrossSectionOverPerimeter
Ratio between the cross section and the perimeter (for a circular section it is equal to D/4)
@SensitivityAnalysis
The user has to specify the name of the sub-dictionary in which the options for performing the sensitivity
analysis are reported. Please look at Section 7.4 to have more details.
@Options
The user has to specify the name of the sub-dictionary in which the options devoted to the output operations
are reported. Please look at Section 7.3 to have more details.
@OdeParameters
The user has to specify the name of the sub-dictionary in which the options about the ODE solver adopted for
the solution of the reactor equations. Please look at Section 7.2 to have more details.
@ParametricAnalysis
Dictionary containing additional options for performing a parametric analysis. Please look at Section 7.8 to
have more details.
@OutletStream SUBDICT Dictionary dening the outlet stream (gas composition, temperature and pressure).
[Gas-Status] This information is used only as a rst guess solution. See Section 7.5
@InletVelocity MEASURE Laminar ame speed: rst guess value
@Output PATH Folder where to write the results of the simulation
@SensitivityAnalysis SUBDICT Dictionary containing additional options for sensitivity analysis (see Section 7.4)
[Sensitivity-Analysis]
@DaeParameters SUBDICT [DAE- Dictionary containing the numerical parameters for solving the Triadiagonal Block
TridiagonalBlock- DAE system (see Section 7.10)
Solver]
@NlsParameters SUBDICT [NLS- Dictionary containing the numerical parameters for solving the Triadiagonal Block
TridiagonalBlock- non-linear system (see Section 7.11)
Solver]
@FalseTransientParameters SUBDICT Dictionary containing the numerical parameters governing the false-transient
[FalseTransient-Solver] approach (see Section 7.12)
@CheckMassFractions BOOL Force non-negative mass fractions (default: false)
@UseDaeSolver BOOL Use DAE solver (instead of NL solver) to solve the steady-state problems (default:
true)
Table 6.6: PremixedLaminarFlame1D options
38
CHAPTER 6. MAIN DICTIONARIES 39
@KineticsPreProcessor
The user can pre-process a kinetic scheme available in CHEMKIN format on the y, when the reactor simulation
is performed (instead of pre-processing the kinetics in a previous step). This option is very useful when the
kinetic mechanism is under construction and/or tuning and the user has the need to change often the reactions
and the kinetic parameters. Please consider that the pre-processing operation can be quite long for very detailed
kinetic schemes (thousands of species). The @KineticsPreProcessor option requires that the user specify the
name of the sub-dictionary containing all the information needed to pre-process kinetic mechanisms on the y.
Please look at Section 7.6 to have more details.
@Grid
Dictionary dening the computational 1D grid (see Section 7.9)
@InletStream
This option is used to specify the features (temperature, pressure and composition) of the inlet stream. The
@InletStatus option requires that the user specify the name of the corresponding sub-dictionary. Please look
at Section 7.5 to have more details.
@OutletStream
Dictionary dening the inlet gas composition, temperature, and pressure (see Section 7.5).
@OutletStream
Dictionary dening the outlet stream (gas composition, temperature and pressure). This information is used
only as a rst guess solution. See Section 7.5
@InletVelocity
First guess laminar ame speed. This value is used only to start the calculations. Obviously, if data are
available, it is more convenient to provide a rst-guess laminar ame speed close to the real value.
@Output
Folder where to write the results of the simulation
@SensitivityAnalysis
The user has to specify the name of the sub-dictionary in which the options for performing the sensitivity
analysis are reported. Please look at Section 7.4 to have more details.
@DaeParameters
The user has to specify the name of the sub-dictionary in which the options about the tridiagonal-block DAE
solver adopted for the solution of transport equations. Please look at Section 7.10 to have more details.
CHAPTER 6. MAIN DICTIONARIES 40
@NlsParameters
The user has to specify the name of the sub-dictionary in which the options about the tridiagonal-block non-
linear (NL) solver adopted for the solution of transport equations. Please look at Section 7.11 to have more
details.
@FalseTransientParameters
The user has to specify the name of the sub-dictionary in which the options about the false-transient method
adopted for the solution of transport equations. Please look at Section 7.12 to have more details.
@CheckMassFractions
Force non-negative mass fractions (default: false).
@UseDaeSolver
Use DAE solver (instead of NL solver) to solve the steady-state problems (default: true)
Chapter 7
Sub-Dictionaries
This Chapter reports the sub-dictionaries which are used by the dierent solvers (as explained in Chapter 6):
1. Comments
2. ODE-Solver
3. Output-Options
4. Sensitivity-Analysis
5. Gas-Status
6. Rapid-Kinetics
7. XY-Prole
8. Parametric Analysis
9. Adaptive-Grid1D
10. Dae-TridiagonalBlock-Parameters
11. Nls-TridiagonalBlock-Parameters
12. FalseTransient-Parameters
@Place
The place where the kinetic mechanism was developed.
@Comments
Any useful comment to be attached to the kinetic mechanism (i.e. details about modied kinetic parameters,
warnings about missing reactions, status of the mechanism, etc.)
41
CHAPTER 7. SUB-DICTIONARIES
7.1.2 Example
1 D i c t i o n a r y CRECK S i g n a t u r e
2 {
3 @Author CRECK M o d e l i n g Group ;
4 @Place P o l i t e c n i c o d i Milano ( I t a l y ) ;
5 @Comments T h i s k i n e t i c mechanism can be downloaded a t :
6 www. c r e c k m o d e l i n g . chem . p o l i m i . i t ;
7 }
@RelativeTolerance
Relative tolerance (default 1.2e-5).
@AbsoluteTolerance
Absolute tolerance (default 1.2e-5). For CVODE solver we suggest to use stricter bsolute tolerance (i.e. at least
1e-14).
@MaximumNumberOfSteps
Maximum number of steps (default 500000)
@MaximumStep
Maximum step (default: automatically chosen by the solver)
@MinimumStep
Minimum step (default: automatically chosen by the solver)
@InitialStep
Initial step (default: automatically chosen by the solver)
7.2.2 Example
1 D i c t i o n a r y ode p a r a m e t e r s
2 {
3 @OdeSolver OpenSMOKE ;
4 @ A b s o l u t e T o l e r a n c e 1 e 14;
5 @ R e l a t i v e T o l e r a n c e 1 e 7;
CHAPTER 7. SUB-DICTIONARIES
6 }
@StepsVideo
Parameter governing the frequency of output on video (default: 50).
@StepsFile
Parameter governing the frequency of output on video (default: 5).
@OutputSpecies
List of species which will be written on ASCII le (default: all the species).
@Verbose
If false, it means that video info and output les will not be written (default: true)
@VerboseASCIIFile
If false, it means that output ASCII le will not be written (default: true).
@VerboseXMLFile
If false, it means that output XML le will not be written (default: true).
7.3.2 Example
1 D i c t i o n a r y o u t p u t o p t i o n s
2 {
3 @OutputFolder MyOutput ;
4 @OutputSpecies H2 O2 CH4 ;
5 @StepsFile 1;
6 @StepsVideo 10;
7 }
@DenseFullPivoting
Full pivoting vs Partial pivoting (LU decomposition). The solution of linear systems is the most expensive
operation of sensitivity analysis. In order to speed-up the calculations, a partial pivoting strategy can be
applied when the LU factorization is applied.
@DenseSolver
Linear algebra package. In the current version only the Eigen solver is available.
@SubSteps
Number of sub-steps when performing sensitivity analysis (default: 2)
@Species
List of species for which the sensitivity coecients will be written. Please consider that for large kinetic
mechanism the overall output resulting from the sensitivity analysis can be huge. We suggest to write senstiity
coecients only for species in which the user is really interested.
7.4.2 Example
1 D i c t i o n a r y s e n s i t i v i t y o p t i o n s
2 {
3 @Type a r r h e n i u s p a r a m e t e r s ;
4 @DenseSolver Eigen ;
5 @DenseFullPivoting false ;
6 @SubSteps 5;
7 @Species H2 O2 NO;
8 }
@Pressure
Pressure of the mixture (must be used together with @Temperature or @Density).
@Density
Density of the mixture (must be used together with @Temperature or @Pressure).
@MoleFractions
Mole fractions of the mixture (the sum must be exactly equal to 1). It is enough to completely characterize the
mixture composition (i.e. no additional data are needed).
@MassFractions
Mass fractions of the mixture (the sum must be exactly equal to 1). It is enough to completely characterize the
mixture composition (i.e. no additional data are needed).
Option Type Meaning
@Temperature MEASURE Temperature of the mixture
@Pressure MEASURE Pressure of the mixture
@Density MEASURE Density of the mixture
@MoleFractions STRINGS + Mole fractions of the mixture (the sum must be equal to 1)
DOUBLES
@MassFractions STRINGS + Mass fractions of the mixture (the sum must be equal to 1)
DOUBLES
@Moles STRINGS + Molar composition of the mixture (the values will be automatically normalized)
CHAPTER 7. SUB-DICTIONARIES
DOUBLES
@Masses STRINGS + Mass composition of the mixture (the values will be automatically normalized)
DOUBLES
@EquivalenceRatio DOUBLE Equivalence ratio
@FuelMoleFractions STRINGS + Mole fractions of the fuel mixture (the sum must be equal to 1)
DOUBLES
@FuelMassFractions STRINGS + Mass fractions of the fuel mixture (the sum must be equal to 1)
DOUBLES
@FuelMoles STRINGS + Molar composition of the fuel mixture (the values will be automatically normalized)
DOUBLES
@FuelMasses STRINGS + Mass composition of the fuel mixture (the values will be automatically normalized)
DOUBLES
@OxidizerMoleFractions STRINGS + Mole fractions of the oxidizer mixture (the sum must be equal to 1)
DOUBLES
@OxidizerMassFractions STRINGS + Mass fractions of the oxidizer mixture (the sum must be equal to 1)
DOUBLES
@OxidizerMoles STRINGS + Molar composition of the oxidizer mixture (the values will be automatically normalized)
DOUBLES
@OxidizerMasses STRINGS + Mass composition of the oxidizer mixture (the values will be automatically normalized)
DOUBLES
Table 7.5: Gas-Status dictionary
49
CHAPTER 7. SUB-DICTIONARIES 50
@Moles
Molar composition of the mixture. The values will be automatically normalized, i.e. converted in mole fractions.
It is enough to completely characterize the mixture composition (i.e. no additional data are needed).
@Masses
Mass composition of the mixture. The values will be automatically normalized, i.e. converted in mass fractions.
It is enough to completely characterize the mixture composition (i.e. no additional data are needed).
@EquivalenceRatio
Equivalence ratio of the mixture. It requires the compostion of fuel mixture (dened through one of the
following: @FuelMoleFractions | @FuelMassFractions | @FuelMoles | @FuelMasses) and the compostion of
oxidizer mixture (dened through one of the following: @OxidizerMoleFractions | @OxidizerMassFractions
| @OxidizerMoles | @OxidizerMasses).
@FuelMoleFractions
Mole fractions of the fuel mixture (the sum must be exactly equal to 1). It can be used only in conjuction with
@EquivalenceRatio.
@FuelMassFractions
Mass fractions of the fuel mixture (the sum must be exactly equal to 1). It can be used only in conjuction with
@EquivalenceRatio.
@FuelMoles
Molar composition of the fuel mixture. The values will be automatically normalized, i.e. converted in mole
fractions. It can be used only in conjuction with @EquivalenceRatio.
@FuelMasses
Mass composition of the fuel mixture. The values will be automatically normalized, i.e. converted in mass
fractions. It can be used only in conjuction with @EquivalenceRatio.
@OxidizerMoleFractions
Mole fractions of the oxidizer mixture (the sum must be exactly equal to 1). It can be used only in conjuction
with @EquivalenceRatio.
@OxidizerMassFractions
Mass fractions of the oxidizer mixture (the sum must be exactly equal to 1). It can be used only in conjuction
with @EquivalenceRatio.
@OxidizerMoles
Molar composition of the oxidizer mixture. The values will be automatically normalized, i.e. converted in mole
fractions. It can be used only in conjuction with @EquivalenceRatio.
@OxidizerMasses
Mass composition of the oxidizer mixture. The values will be automatically normalized, i.e. converted in mass
fractions. It can be used only in conjuction with @EquivalenceRatio.
CHAPTER 7. SUB-DICTIONARIES 51
7.5.2 Examples
1 D i c t i o n a r y i n l e t m i x t u r e
2 {
3 @Temperature 1000. K ;
4 @Pressure 101325 Pa ;
5 @Moles H2 2
6 O2 1
7 N2 3 . 7 6 ;
8 }
1 D i c t i o n a r y i n l e t m i x t u r e
2 {
3 @Temperature 1000. K ;
4 @Pressure 1 0 1 3 2 5 . Pa ;
5 @EquivalenceRatio 1.;
6 @FuelMasses H2 1 0 . ;
7 @OxidizerMoles O2 21
8 N2 7 9 ;
9 }
@Transport
Name of the le containing the transport data (CHEMKIN format)
@Kinetics
Name of the le containing the kinetic mechanism (CHEMKIN format)
@Output
Name of the folder where to write the interpreted kinetic mechanism (XML format) (default: kinetics)
7.6.2 Example
1 D i c t i o n a r y POLIMI_PRF_PAH_HT_1412
2 {
3 @Kinetics . . / POLIMI_1412/ K i n e t i c s /POLIMI_PRF_PAH_HT_1412 . CKI ;
4 @Thermodynamics . . / POLIMI_1412/ Thermodynamics /POLIMI_TOT_NOX_1412 . CKT ;
5 @Output mykinetics ;
6 }
@YVariable
Type of variable on the y axis: temperature | pressure | volume.
@XUnits
Units of measure of the x variable.
@YUnits
Units of measure of the y variable.
@Prole
XY Prole: pairs of x and y values (look at the example).
7.7.2 Example
1 D i c t i o n a r y volume p r o f i l e
2 {
3 @XVariable time ;
4 @XUnits s;
5 @YVariable volume ;
6 @YUnits cm3 ;
7 @Profile 0.0 1.00
8 0.1 1.15
9 0.2 1.35
10 0.4 1.60 ;
11 }
@ListOfValues
List of values (together with units of measure, if any). Though this option the user denes explicitly the list
of parameter values to be simulated. The alternative is to specify the interval through the following key-words:
@MinimumValue, @MaximumValue, and @NumberOfPoints
@MinimumValue
Minimum value of parameter. It must be used in conjuction with @MaximumValue and @NumberOfPoints to
specify the interval and the number of points for parametric analysis.
CHAPTER 7. SUB-DICTIONARIES
@MaximumValue
Maximum value of parameter. It must be used in conjuction with @MinimumValue and @NumberOfPoints to
specify the interval and the number of points for parametric analysis.
@NumberOfPoints
Number of points. It must be used in conjuction with @MinimumValue and @MaximumValue to specify the interval
and the number of points for parametric analysis.
@NumberOfThreads
Number of threads. If a multicore architecture is available, the user can distribute the parameteric analysis no
more than one core, in order to speed-up the calculation.
7.8.2 Examples
1 D i c t i o n a r y p a r a m e t r i c a n a l y s i s
2 {
3 @Type temperature ;
4 @ListOfValues 1000 1100 1200 1300 1400 K ;
5 @NumberOfThreads 2;
6 }
1 D i c t i o n a r y p a r a m e t r i c a n a l y s i s
2 {
3 @Type temperature ;
4 @NumberOfPoints 10;
5 @MinimumValue 1000 K ;
6 @MaximumValue 1200 K ;
7 @NumberOfThreads 5;
8 }
@Lenght
Length of computational domain
@InitialPoints
Initial number of points (must be between 7 and 15)
@Center
Center position (default: middle point)
@Width
Estimated (rst guess) width of ame (default: 0.2*length)
Option Type Meaning
@Type STRING Type of grid: centered | database
CHAPTER 7. SUB-DICTIONARIES
@FixedPoint
Coordinate of xed point (default: center of the grid)
@MaxPoints
Maximum number of allowed points (default 300)
@MaxAdaptivePoints
Maximum number of points that can be added per grid adaptation (default 10)
@GradientCoecient
Controls the maximum gradient allowed between two points (default 0.1)
@CurvatureCoecient
Controls the maximum curvature allowed between two points (default 0.5)
@Threshold
Controls the minimum amount of each species to be considered active in the adaptive process (default: 1e-7)
@RegridPoints
Points used for regrid operation (default: 20)
7.9.2 Example
1 Dictionary grid
2 {
3 @Length 3 cm ;
4 @InitialPoints 12;
5 @Type database ;
6 @MaxPoints 1000;
7 @MaxAdaptivePoints 15;
8 @GradientCoefficient 0.05;
9 @CurvatureCoefficient 0.25;
10 @Threshold 1 e 5;
11 @RegridPoints 20;
12 }
@RelativeTolerance
Relative tolerance (default 1.e-6).
Option Type Meaning
@DaeSolver STRING DAE Solver: BzzDae | IDA
CHAPTER 7. SUB-DICTIONARIES
@AbsoluteTolerance
Absolute tolerance (default 1.e-10). For IDA solver we suggest to use stricter absolute tolerance (i.e. at least
1e-12).
@MaximumNumberOfSteps
Maximum number of steps (default 500000)
@MaximumStep
Maximum step (default: automatically chosen by the solver)
@MinimumStep
Minimum step (default: automatically chosen by the solver)
@InitialStep
Initial step (default: automatically chosen by the solver)
@MaximumOrder
Maximum order of the method (default 5)
@LinearAlgebra
Linear algebra package to solve the tridiagonal-block (or banded) linear system: native | Lapack
@MeanResidualThreshold
Stop the integration when the mean residual is below this threshold (default: 0.)
@VerbosityLevel
Verbosity level: 0=no output, 3 maximum level of output
7.10.2 Example
1 D i c t i o n a r y dae p a r a m e t e r s
2 {
3 @DaeSolver BzzDae ;
4 @LinearAlgebra Lapack ;
5 @RelativeTolerance 1 e 6;
6 @AbsoluteTolerance 1 e 10;
7 @MaximumNumberOfSteps 100000;
8 @MaximumStep 1 e3 ;
9 @MinimumStep 1 e 9;
10 @InitialStep 1 e 9;
11 @MaximumOrder 5;
12 @MeanResidualThreshold 1 e 5;
13 @VerbosityLevel 0;
14 }
@Tolerance
Function tolerance (default 6.e-6)
@StepTolerance
Step tolerance (default 3.6e-11)
@RelativeError
Relative error (default 1.5e-8)
@MaximumNumberOfIterations
Maximum number of iterations (default 200)
@MaximumSetupCalls
Maximum number of setup calls (default 10)
@MinimumSubSetupCalls
Maximum number of setup sub-calls (default 5)
@Scaling
Scaling strategy for evaluation of residuals (default 1)
@Strategy
Numerical methodology: NewtonBasic | NewtonGlobalization (default)
@LinearAlgebra
Linear algebra package to solve the tridiagonal-block (or banded) linear system: native | Lapack
@VerbosityLevel
Verbosity level: 0=no output, 3 maximum level of output
7.11.2 Example
1 D i c t i o n a r y n l s p a r a m e t e r s
2 {
3 @NlsSolver BzzNls ;
4 @LinearAlgebra Lapack ;
5 @Tolerance 1 e 7;
6 @ToleranceStep 3 e 11;
7 @RelativeError 1 . 5 e 8;
8 @MaximumNumberOfIterations 200;
9 @MaximumSetupCalls 10;
10 @MaximumSubSetupCalls 5;
11 @Scaling 1;
CHAPTER 7. SUB-DICTIONARIES 63
12 @VerbosityLevel 0;
13 @Strategy NewtonGlobalization ;
14 }
@Tolerance
Function tolerance (default 6.e-6)
@StepTolerance
Step tolerance (default 3.6e-11)
@RelativeError
Relative error (default 1.5e-8)
@MaximumNumberOfIterations
Maximum number of iterations (default 200)
@MaximumSetupCalls
Maximum number of setup calls (default 10)
@MinimumSubSetupCalls
Maximum number of setup sub-calls (default 5)
@Scaling
Scaling strategy for evaluation of residuals (default 1)
@Strategy
Numerical methodology: NewtonBasic | NewtonGlobalization (default)
@LinearAlgebra
Linear algebra package to solve the tridiagonal-block (or banded) linear system: native | Lapack
@VerbosityLevel
Verbosity level: 0=no output, 3 maximum level of output
@InitialStep
Initial step (default: 1e-6)
Option Type Meaning
@FalseTransientSolver STRING NLS Solver: KinSol
@Tolerance DOUBLE Function tolerance (default 6.e-6)
@StepTolerance DOUBLE Step tolerance (default 3.6e-11)
@RelativeError DOUBLE Relative error (default 1.5e-8)
@MaximumNumberOfIterations INT Maximum number of iterations (default 200)
CHAPTER 7. SUB-DICTIONARIES
@IncrementFactor
Increment factor (default: 10.)
@MaximumStep
Maximum step (default: 0.1)
@DecrementFactor
Decrement factor (default: 2.)
@MinimumStep
Minimum step (default: 1e-9)
@MinimumNumberSteps
Minimum number of steps (default: 100)
@StepsBeforeIncreasing
Steps to be performed before increasing the step (default: 20)
@StepsReusingJacobian
Steps for which the Jacobian is kept xed (default: 20)
7.12.2 Example
1 D i c t i o n a r y f a l s e t r a n s i e n t p a r a m e t e r s
2 {
3 @FalseTransientSolver KinSol ;
4 @LinearAlgebra Lapack ;
5 @Tolerance 1 e 8;
6 @ToleranceStep 3 e 11;
7 @RelativeError 1 . 5 e 8;
8 @MaximumNumberOfIterations 200;
9 @MaximumSetupCalls 10;
10 @MaximumSubSetupCalls 5;
11 @Scaling 1;
12 @VerbosityLevel 0;
13 @Strategy NewtonGlobalization ;
14 @StepsReusingJacobian 20;
15 @StepsBeforeIncreasing 25;
16 @MinimumNumberSteps 80;
17 @InitialStep 1 e 6;
18 @IncrementFactor 10.;
19 @MaximumStep 0.01;
20 @DecrementFactor 2.;
21 @MinimumStep 1 e 9;
22 }
Chapter 8
Tutorials
8.1 Autoignition of a mixture of hydrogen and air
This tutorial presents a transient simulation of the spontaneous ignition of a stoichiometric hydrogen/air mixture
at constant pressure. This tutorial uses the POLIMI_H2CO_1412 kinetic mechanism developed by CRECK
Modeling Group at Politecnico di Milano. The POLIMI_H2CO_1412 mechanism is distributed with the current
version of OpenSMOKE++ Suite or can be downloaded directly from the web site (http://creckmodeling.chem.
polimi.it/). Here we are interested in determining the ignition time under a specied set of initial pressure
and temperature conditions, assuming no heat loss to the environment (adiabatic conditions). In addition, we
would like to determine which reactions contribute most to the autoignition process, using sensitivity analysis.
The system is a closed or batch process, which means there is no ow of mass into or out of the reactor.
8.1.1 Setup
This tutorial project is located in the examples\autoignition-h2-air directory. A single, batch reactor at
constant pressure will be simulated. The input data are provided though the input.dic le (see Figure 8.1).
In paticular, the end time of the simulation is set to 0.25 ms. The initial temperature is equal to 1000 K and
the pressure is kept equal to 1 atm (constant pressure). The volume is not important for the results of this
simulation, so the default value of 1 cm3 will be used for the initial volume. Since this is a closed homogeneous
system, the results in terms of species fraction and temperature will be the same, regardless of the volume value.
If surface chemistry were included, the volume-to-surface ratio would be important, but in this case it is gas
only.
The starting gas mixture is given in relative moles as 2.0 H2, 1.0 O2, and 3.76 N2. Writing it this way makes
it easy to see that the O2/N2 ratio matches the composition of air, and that the fuel/air ratio is stoichiometric
(two H2 per one O2). The normalization will occur automatically. The sensitivity analysis is enabled and this
results in sensitivity coecients being calculated for all species and all reactions and saved in the proper XML
les. As already reported in the previous sections, this option should be used with care, as the computation
time and solution-le sizes increase as a higher power of the size of the reaction mechanism. Except in the case
of a very small reaction mechanism, such as the one being used in the sample problem, it is better to use the
@Species option to request that sensitivity coecients be output only for a few species of highest interest.
8.1.2 Results
Output results are located in the Output folder. The OpenSMOKE++ PostProcessor can be conveniently used to
post process the results. Alternatively, the Output.out le can be post-processed using dierent tools, such as
Gnuplot, Matlab, etc. Plots reported in the following were obtained using the OpenSMOKE++ PostProcessor.
Figure 8.2 (left) shows the temperature prole as a function of time for this problem. At the end of this
simulation, the temperature is still rising; if it is run much longer, the temperature increases another ~300 K,
nearing the adiabatic ame temperature. Although not shown, the volume in this constant-pressure system
shows a corresponding increase at ignition. The calculated ignition time, dened as the time at which the gas
reaches a temperature of 1400 K (i.e. corresponding to an increase of 400 K), is equal to 0.186 ms. Figure 8.2
(right) shows a close-up of species mole fractions as a function of time. Note that zooming in on the x-axis
66
1 D i c t i o n a r y BatchReactor
2 {
3 @KineticsPreProcessor POLIMI_H2CO_1412 ;
4 @Type N o n I s o t h e r m a l C o n s t a n t P r e s s u r e ;
5 @InitialStatus i n i t i a l m i x t u r e ;
6 @EndTime 0 . 2 5 ms ;
CHAPTER 8. TUTORIALS
7 @SensitivityAnalysis s e n s i t i v i t y o p t i o n s ;
8 }
9
10 D i c t i o n a r y POLIMI_H2CO_1412
11 {
12 @Kinetics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ K i n e t i c s /POLIMI_H2CO_1412 . CKI ;
13 @Thermodynamics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ Thermodynamics /POLIMI_TOT_NOX_1412 . CKT ;
14 @Output kinetics ;
15 }
16
17 D i c t i o n a r y i n i t i a l m i x t u r e
18 {
19 @Temperature 1000. K ;
20 @Pressure 1 0 1 3 2 5 . Pa ;
21 @Moles H2 2 . O2 1 . N2 3 . 7 6 ;
22 }
23
24 D i c t i o n a r y s e n s i t i v i t y o p t i o n s
25 {
26 @Type a r r h e n i u s p a r a m e t e r s ;
27 @DenseSolver Eigen ;
28 @DenseFullPivoting f a l s e ;
29 @SubSteps 2;
30 @Species H2 O2 H2O ;
31 }
Figure 8.1: Input le for adiabatic, constant pressure batch reactor simulation
67
CHAPTER 8. TUTORIALS 68
Figure 8.2: Temperature (left) and mole fraction proles of main species (right) for the adiabatic, constant-
pressure batch reactor
Figure 8.3: Sensitivity analysis for the adiabatic, constant-pressure batch reactor
shows the expected increase in radical species and the products at ignition, along with a decrease in hydrogen
and oxygen reactants.
Figure 8.3 shows normalized sensitivity coecients as a function of time for the four reactions that have
the largest eect on the gas temperature. As one might expect, the largest sensitivity occurs near the time of
ignition, when the most rapid change in temperature is taking place. The results also show that the dominant
reaction for determining the temperature during ignition is the exothermic radical-recombination reaction #1:
O2 + H = O + OH . The sensitivity coecient for this reaction is positive, indicating that increasing the rate
of this reaction will lead to a higher temperature (more heat production). In contrast, the sensitivity coecient
for reaction #3 is large and negative, indicating that increasing the rate of this reaction will lead to a lower
temperature (less heat production).
8.1.3 Note
This tutorial was adapted from the Tutorials Manual (CK-TUT-15082-0809-UG-1) distributed with the CHEMKIN-
PRO Software [2].
reported experimental data can vary greatly, depending on which denition was used in the experiments. Thus,
it is often useful to select which ignition-delay time denition should be used in numerical computations. In
this particular example, the ignition times are computed using two distinct denitions:
as the time during which the maximum amount of heat is released (as indicated by the inection point in
the temperature prole)
as the time corresponding to the maximum of a certain species (OH in this case) concentration
8.2.1 Setup
This tutorial project is located in the examples\autoignition_propane directory. A single, batch reactor at
constant pressure will be simulated. The input data are provided though the input.dic le (see Figure 8.4).
The initial temperature is equal to 1200 K, while the pressure is kept constant and equal to 1 atm. The volume is
not important for the results of this simulation, so the default value of 1 cm3 will be used for the initial volume.
Since this is an isobaric closed homogeneous system, the results in terms of species fraction and temperature
will be the same, regardless of the volume value. If surface chemistry were included, the volume-tosurface ratio
would be important, but in this case only gas-phase chemistry is present. The starting gas mixture is given as
0.02 C3H8, 0.05 O2, and 0.93 Ar. These rather dilute conditions are representative of shock-tube experimental
conditions. The end time is specied on through the @EndTime option. It is important to check the resulting
output le after the run is complete to make sure that the @EndTime is large enough to allow for ignition to
occur. If no ignition time is provided at the end of the output le, ignition has not yet occurred and the
@EndTime of the simulation should be adjusted.
8.2.2 Results
Output results are located in the Output folder. The OpenSMOKE++ PostProcessor can be conveniently used to
post process the results. Alternatively, the Output.out le can be post-processed using dierent tools, such as
Gnuplot, Matlab, etc. Plots reported in the following were obtained using the OpenSMOKE++ PostProcessor.
Figure 8.5 shows the temperature (left) and OH mole fraction (right) proles as a function of time. The
calculated ignition times, according to the dentiions reported above, are very similar: in particular, the tem-
peraturre inection point is located at 13.29 ms, while the peak in the OH mole fraction prole is located at
13.34 ms.
However, this result, is not necessarily true for every operating condition. Some discrepancies can be
observed between the two proposed criteria. As an example, we can repeat our calculations using a higher
initial temperature, equal to 2600 K. The new results are reported in Figure 8.6. In this case, as evident from
the Figure, the calculated ignition times are very dierent: in particular, the temperaturre inection point is
located at 0.8 s, while the peak in the OH mole fraction prole is located at 4.1 s.
8.2.3 Note
This tutorial was adapted from the Tutorials Manual (CK-TUT-15082-0809-UG-1) distributed with the CHEMKIN-
PRO Software [2].
2 {
3 @KineticsPreProcessor POLIMI_C1C3HT_1412 ;
4 @Type N o n I s o t h e r m a l C o n s t a n t P r e s s u r e ;
5 @InitialStatus i n i t i a l m i x t u r e ;
6 @EndTime 0.30 s ;
7 }
8
9 D i c t i o n a r y POLIMI_C1C3HT_1412
10 {
11 @Kinetics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ K i n e t i c s /POLIMI_C1C3HT_1412 . CKI ;
12 @Thermodynamics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ Thermodynamics /POLIMI_TOT_NOX_1412 . CKT ;
13 @Output kinetics ;
14 }
15
16 D i c t i o n a r y i n i t i a l m i x t u r e
17 {
18 @Temperature 1200. K ;
19 @Pressure 1 0 1 3 2 5 . Pa ;
20 @Moles C3H8 0 . 0 2 O2 0 . 0 5 AR 0 . 9 3 ;
21 }
Figure 8.4: Input le for adiabatic, constant pressure batch reactor simulation fed with propane and air
70
CHAPTER 8. TUTORIALS 71
Figure 8.5: Temperature (left) and OH mole fraction (right) proles for the adiabatic, constant-pressure batch
reactor fed with propane and air (initial temperature equal to 1200 K)
Figure 8.6: Temperature (left) and OH mole fraction (right) proles for the adiabatic, constant-pressure batch
reactor fed with propane and air (initial temperature equal to 2600 K)
bodies, we exclude N from participating as a third body in the original reaction, i.e., the eective third body
eciency for N is set to zero. And we add a new reaction N 2 + N = N + N to explicitly address the dierent
temperature dependence of nitrogen atom as the third body.
8.3.1 Setup
Setting up a shock tube model requires information from the corresponding experiment. In addition to the
conditions of the initial (unshocked) gas mixture, we will need to provide information on the diameter of the
shock tube, the viscosity of the gas at 300 K, and the velocity of the incident shock. If we do not know the
shock velocity from the experiment, we can estimate it by using the Chapmen-Jouguet detonation model. The
shock tube diameter and the gas viscosity at 300 K are only required when the boundary-layer correction is
used in the shock simulation.
This tutorial project is located in the projects\shock_tube_experiment directory. The input data are
provided though the input.dic le (see Figure 8.7). In this example, we are considering an incident shock
problem with boundary layer corrections. The unshocked temperature is 296K, the pressure is 6.58E-3 atm,
and the shock velocity is 2.8E5 cm/sec. The initial mole fractions are 0.78118 N2, 0.20948 O2, and 0.00934 Ar.
The problem will terminate at 200 microseconds. The shock tube diameter is 3.81 cm, and the viscosity of the
gas at 300K is 1.777E-4 gm/cm/s; these parameters are used for the boundary layer corrections.
8.3.2 Results
The NO mole fraction behind the incident shock is shown in Figure 8.8 as a function of time. The NO mole
fraction prole rapidly rises to a peak value then gradually falls back to its equilibrium level. Reasons for
CHAPTER 8. TUTORIALS 72
1 D i c t i o n a r y ShockTubeReactor
2 {
3 @KineticsPreProcessor Camac F e i n b e r g ;
4 @Type IncidentShock ;
5 @IncidentShockVelocity 2800 m/ s ;
6 @BeforeShockStatus i n i t i a l m i x t u r e ;
7 @EndTime 2 ms ;
8 @Options o u t p u t o p t i o n s ;
9
10 @BoundaryLayerCorrection true ;
11 @Diameter 3 . 8 1 cm ;
12 @Viscosity 1 . 7 7 7 e 5 kg /m/ s ;
13 }
14
15 D i c t i o n a r y Camac F e i n b e r g
16 {
17 @Kinetics . . / . . / k i n e t i c mechanisms /Camac F e i n b e r g / k i n e t i c s . CKI ;
18 @Thermodynamics . . / . . / k i n e t i c mechanisms /Camac F e i n b e r g / thermo . CKT ;
19 @Output kinetics ;
20 }
21
22 D i c t i o n a r y i n i t i a l m i x t u r e
23 {
24 @Temperature 296. K;
25 @Pressure 6 . 5 8 E3 atm ;
26 @MoleFractions AR 0 . 0 0 9 3 4 N2 0 . 7 8 1 1 8 O2 0 . 2 0 9 4 8 ;
27 }
28
29 D i c t i o n a r y o u t p u t o p t i o n s
30 {
31 @StepsFile 1;
32 }
the greater-than-equilibrium peak NO concentration can be found in the paper by Camac and Feinberg and
references therein. The predicted peak NO mole fraction is 0.046 and is in good agreement with the measured
and the computed data by Camac and Feinberg.
8.3.3 Note
This tutorial was adapted from the Tutorials Manual (CK-TUT-15082-0809-UG-1) distributed with the CHEMKIN-
PRO Software [2].
8.4.1 Setup
This tutorial project is located in the tutorials\perfectly-stirred-reactor directory. The input data are
provided though the input.dic le (see Figure 8.9). The residence time of the gas in the PSR is assumed to
be 0.03 ms, the volume equal to 67.4 cm3, and the pressure is kept constant. The inlet temperature is equal to
298 K and the initial gas temperature in the PSR is equal to 1800 K. No heat loss is taken into account, so the
CHAPTER 8. TUTORIALS 73
system will be treated as adiabatic. No estimate of the gas composition is needed to help the solver converge
on a solution. The fuel stream is composed of 60% H2 and 40% N2. The oxidizer is dened as 79% N2 and
21% O2 (air). An equivalence ratio of 1 is assumed.
A parametric analysis is performed, by studying the eects of pressure on the reactor's performances. In
particular, the pressure was gradually increased from 1 atm to 10 atm.
8.4.2 Results
Output results are located in the Output folder. Since a parametric analysis was performed, the Ouptut folder
contains several subfolders with names Case0, Case1, Case2, and so on, for each reactor which was simulated
(10 in this specic example). In addition, the ParametricAnalysis.out le summarizes the output results for
all the reactors simulated. Figure 8.10 shows the temperature (left) and H2O mole fraction (right) of outlet
mixture as a function of the reactor pressure (according to the results reported in ParametricAnalysis.out
le).
1 D i c t i o n a r y POLIMI_H2CO_1412
2 {
3 @Kinetics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ K i n e t i c s /POLIMI_H2CO_1412 . CKI ;
4 @Thermodynamics . . / . . / k i n e t i c mechanisms /POLIMI_1412/ Thermodynamics /POLIMI_TOT_NOX_1412 . CKT ;
5 @Output kinetics ;
6 }
7
8 Dictionary PerfectlyStirredReactor
9 {
10 @ K i n e t i c s P r e P r o c e s s o r POLIMI_H2CO_1412 ;
11 @Type N o n I s o t h e r m a l C o n s t a n t P r e s s u r e ;
CHAPTER 8. TUTORIALS
12 @InletStatus i n l e t m i x t u r e ;
13 @InitialStatus i n i t i a l m i x t u r e ;
14 @Re sidenc eTime 0 . 0 3 ms ;
15 @Volume 6 7 . 4 cm3 ;
16 @Options o u t p u t o p t i o n s ;
17 @ParametricAnalysis p a r a m e t r i c a n a l y s i s ;
18 }
19
20 D i c t i o n a r y i n l e t m i x t u r e
21 {
22 @Temperature 298. K ;
23 @Pressure 1 . atm ;
24 @EquivalenceRatio 1.;
25 @FuelMoles H2 60 N2 4 0 ;
26 @OxidizerMoles O2 21 N2 7 9 ;
27 }
28
29 D i c t i o n a r y p a r a m e t r i c a n a l y s i s
30 {
31 @Type pressure ;
32 @ListOfValues 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 . 1 0 . atm ;
33 }
34
35 D i c t i o n a r y o u t p u t o p t i o n s
36 {
37 @StepsFile 1000;
38 @StepsVideo 5000;
39 @VerboseASCIIFile true ;
40 @VerboseVideo false ;
41 }
Figure 8.9: Input le for simulation of perfectly stirred reactors through parametric analysis
74
CHAPTER 8. TUTORIALS 75
Figure 8.10: Temperature (left) and H2O mole fraction (right) of outlet mixture as a function of reactor pressure
Chapter 9
76
CHAPTER 9. PUBLICATIONS USING OPENSMOKE++ 77
Ranzi, E., Frassoldati, A., Stagni, A., Pelucchi, M., Cuoci, A., Faravelli, T., Reduced kinetic
schemes of complex reaction systems: Fossil and biomass-derived transportation fuels (2014) International
Journal of Chemical Kinetics, 46 (9), pp. 512-542, DOI: 10.1002/kin.20867
Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi, E., Numerical modeling of laminar ames with
detailed kinetics based on the operator-splitting method (2013) Energy and Fuels, 27 (12), pp. 7730-7753,
DOI: 10.1021/ef4016334
Bissoli, M., Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi, E., Lucchini, T., D'Errico, G.,
Contino, F., Detailed Kinetic Analysis of HCCI Combustion Using a New Multi-Zone Model and CFD
Simulations (2013) SAE International Journal of Engines, 6 (3), pp. 1594-1609, DOI: 10.4271/2013-24-
0021
Saggese, C., Frassoldati, A., Cuoci, A., Faravelli, T., Ranzi, E., A wide range kinetic modeling
study of pyrolysis and oxidation of benzene (2013) Combustion and Flame, 160 (7), pp. 1168-1190, DOI:
10.1016/j.combustame.2013.02.013
Maestri, M., Cuoci, A., Coupling CFD with detailed microkinetic modeling in heterogeneous catalysis
(2013) Chemical Engineering Science, 96, pp. 106-117, DOI: 10.1016/j.ces.2013.03.048
Cuoci, A., Frassoldati, A., Faravelli, T., Jin, H., Wang, Y., Zhang, K., Glarborg, P., Qi, F.,
Experimental and detailed kinetic modeling study of PAH formation in laminar co-ow methane diusion
ames (2013) Proceedings of the Combustion Institute, 34 (1), pp. 1811-1818, DOI: 10.1016/j.proci.2012.05.085
Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi, E., A computational tool for the detailed kinetic
modeling of laminar ames: Application to C2H4/CH4 coow ames (2013) Combustion and Flame, 160
(5), pp. 870-886, DOI: 10.1016/j.combustame.2013.01.011
Cuoci, A., Frassoldati, A., Faravelli, T., Ranzi, E., Extinction of laminar, premixed, counter-
ow methane/air ames under unsteady conditions: Eect of H2 addition (2013) Chemical Engineering
Science, 93, pp. 266-276, DOI: 10.1016/j.ces.2013.02.009
Cuoci, A., Frassoldati, A., Stagni, A., Faravelli, T., Ranzi, E., Buzzi-Ferraris, G., Numerical
modeling of NOx formation in turbulent ames using a kinetic post-processing techniqu e (2013) Energy
and Fuels, 27 (2), pp. 1104-1122, DOI: 10.1021/ef3016987
Saggese, C., Frassoldati, A., Cuoci, A., Faravelli, T., Ranzi, E., A lumped approach to the kinetic
modeling of pyrolysis and combustion of biodiesel fuels (2013) Proceedings of the Combustion Institute,
34 (1), pp. 427-434, DOI: 10.1016/j.proci.2012.05.020
Bibliography
[1] M. Camac and R.M. Feinberg. Formation of {NO} in shock-heated air. Symposium (International) on
Combustion, 11(1):137145, 1967.
[2] Reaction Design. Reaction workbench 15082, san diego. Technical report, 2008.
[3] R.J. Kee, F. Rupley, and J.A. Miller. Chemkin ii: A fortran chemical kinetics package for the analysis of
gas-phase chemical kinetics. Sandia Report SAND89-8009 - Sandia National Laboratories, 1989.
[4] R.J. Kee, F.M. Rupley, E. Meeks, and J.A. Miller. Chemkin-iii: A fortran chemical kinetics package for the
analysis of gas phase chemical and plasma kinetics. Technical report, 1996.
78