OpenSMOKE: NUMERICAL MODELING OF REACTING SYSTEMS WITH DETAILED KINETIC MECHANISMS

Similar documents
Numerical Modeling of Laminar, Reactive Flows with Detailed Kinetic Mechanisms

USE OF DETAILED KINETIC MODELS FOR MULTISCALE PROCESS SIMULATIONS OF SULFUR RECOVERY UNITS

Simplified kinetic schemes for oxy-fuel combustion

Soot formation in turbulent non premixed flames

Confirmation of paper submission

Numerical modeling of auto-ignition of isolated fuel droplets in microgravity

Gas Phase Kinetics of Volatiles from Biomass Pyrolysis. Note I: Ketene, Acetic Acid, and Acetaldehyde

THERMOCHEMICAL INSTABILITY OF HIGHLY DILUTED METHANE MILD COMBUSTION

A comparison between two different Flamelet reduced order manifolds for non-premixed turbulent flames

CFD and Kinetic Analysis of Bluff Body Stabilized Flame

A wide range kinetic modelling study of laminar flame speeds of reference fuels and their mixtures

Oxidation of C 3 and n-c 4 aldehydes at low temperatures

Continuation Analysis of Complex Chemical Mechanisms for Jet-Fuels Combustion in PSR

Application of Model Fuels to Engine Simulation

Best Practice Guidelines for Combustion Modeling. Raphael David A. Bacchi, ESSS

DARS overview, IISc Bangalore 18/03/2014

NUMERICAL INVESTIGATION OF IGNITION DELAY TIMES IN A PSR OF GASOLINE FUEL

Computer Aided Detailed Mechanism Generation for Large Hydrocarbons: n-decane

Coupling of ChemApp and OpenFOAM

Overview of Reacting Flow

Kinetic modelling of Biofuels: Pyrolysis and Auto-Ignition of Aldehydes


Which CHEMKIN is Right for You? Reaction Design

Advanced Turbulence Models for Emission Modeling in Gas Combustion

Department of Mechanical Engineering BM 7103 FUELS AND COMBUSTION QUESTION BANK UNIT-1-FUELS

Overview of Turbulent Reacting Flows

Hierarchical approach

HIGH PRESSURE METHANE-OXYGEN COMBUSTION KINETIC ANALYSIS

DARS Digital Analysis of Reactive Systems

NANO5 L. Quintieri (Art. 23)

Flamelet Analysis of Turbulent Combustion

Athena Visual Software, Inc. 1

A first investigation on using a species reaction mechanism for flame propagation and soot emissions in CFD of SI engines

C. Saggese, N. E. Sanchez, A. Callejas, A. Millera, R. Bilbao, M. U. Alzueta, A. Frassoldati, A. Cuoci, T. Faravelli, E. Ranzi

Laminar Premixed Flames: Flame Structure

Asymptotic Structure of Rich Methane-Air Flames

Fluid Dynamics and Balance Equations for Reacting Flows

Predicting NO Formation with Flamelet Generated Manifolds

How to use CHEMKIN. 1. To open a Chemkin Window. 1) logon Athena. 2) At the Athena prompt, type athena % add chemkin athena % chemkin

Thermoacoustic Instabilities Research

CHARACTERISTIC OF VORTEX IN A MIXING LAYER FORMED AT NOZZLE PITZDAILY USING OPENFOAM

ADVANCED DES SIMULATIONS OF OXY-GAS BURNER LOCATED INTO MODEL OF REAL MELTING CHAMBER

Combustion. Indian Institute of Science Bangalore

Structure, Extinction, and Ignition of Non-Premixed Flames in the Counterflow Configuration

Dynamic Simulation of the Lurgi-type Reactor for Methanol Synthesis

IMPLEMENTATION OF REDUCED MECHANISM IN COMPLEX CHEMICALLY REACTING FLOWS JATHAVEDA MAKTAL. Submitted in partial fulfillment of the requirements

THE ROLE OF SENSITIVITY ANALYSIS IN MODEL IMPROVEMENT

The Stoichiometry of Reactions Introduction Copyright c 2018 by Nob Hill Publishing, LLC

The Stoichiometry of Reactions Introduction

Lecture 6 Asymptotic Structure for Four-Step Premixed Stoichiometric Methane Flames

Towards Accommodating Comprehensive Chemical Reaction Mechanisms in Practical Internal Combustion Engine Simulations

Numerical Simulation of Hydrogen Gas Turbines using Flamelet Generated Manifolds technique on Open FOAM

Exercises in Combustion Technology

Opposed Flow Impact on Flame Spread Above Liquid Fuel Pools

UQ in Reacting Flows

Process Chemistry Toolbox - Mixing

A Comprehensive CFD Model for the Biomass Pyrolysis

The Combination of Detailed Kinetics and CFD in Automotive Applications

CH 4 /NO x Reduced Mechanisms Used for Modeling Premixed Combustion

Prediction of CO Burnout using a CHEMKIN based Network Tool

A Tutorial on Chemkin

Towards regime identification and appropriate chemistry tabulation for computation of autoigniting turbulent reacting flows

A kinetic generator of hydrocarbon pyrolysis mechanisms

A REDUCED-ORDER METHANE-AIR COMBUSTION MECHANISM THAT SATISFIES THE DIFFERENTIAL ENTROPY INEQUALITY

ON NUMERICAL RESOLUTION REQUIREMENTS IN COMBUSTION MODELING

Appendix A Course Syllabi Appendix A: Syllabi. Engineering Physics. Bachelor of Science in Engineering Physics. Self-Study Report

Continuation tools as a virtual test bench for chemical reaction mechanisms

Experimental study of the combustion properties of methane/hydrogen mixtures Gersen, Sander

Follow links Class Use and other Permissions. For more information, send to:

TAU Extensions for High Enthalpy Flows. Sebastian Karl AS-RF

A Systematic Investigation of In Situ Adaptive. Tabulation for Combustion Chemistry. Liuyan Lu, Stephen B. Pope

First-principles based catalytic reaction engineering Matteo Maestri

THE UTP SUITE YOUR ALL-IN-ONE SOLUTION FOR BUILDING MODERN TEST SYSTEM SOFTWARE

Computationally-Efficient Parallel Implementation of Combustion Chemistry in LES/PDF Computations

Numerical Investigation on 1,3-Butadiene/Propyne Co-pyrolysis and Insight into Synergistic Effect on Aromatic Hydrocarbon Formation

Investigation by Thermodynamic Properties of Methane Combustion Mechanisms under Harmonic Oscillations in Perfectly Stirred Reactor

Super-adiabatic flame temperatures in premixed methane-oxygen flames

ANSYS Advanced Solutions for Gas Turbine Combustion. Gilles Eggenspieler 2011 ANSYS, Inc.

EXTINCTION AND AUTOIGNITION OF n-heptane IN COUNTERFLOW CONFIGURATION

Reacting Flow Modeling in STAR-CCM+ Rajesh Rawat

Combustion Theory and Applications in CFD

Systematic Reduction of Large Chemical Mechanisms

Numerical Simulations of Hydrogen Auto-ignition in a Turbulent Co-flow of Heated Air with a Conditional Moment Closure

MUSCLES. Presented by: Frank Wetze University of Karlsruhe (TH) - EBI / VB month review, 21 September 2004, Karlsruhe

INTRODUCTION TO CATALYTIC COMBUSTION

Optimizing Time Integration of Chemical-Kinetic Networks for Speed and Accuracy

REDIM reduced modeling of quenching at a cold inert wall with detailed transport and different mechanisms

Strategies for Using Detailed Kinetics in Engine Simulations

CFD Analysis of Vented Lean Hydrogen Deflagrations in an ISO Container

Interactions between oxygen permeation and homogeneous-phase fuel conversion on the sweep side of an ion transport membrane

Reactive Flows using TransAT. June 2013 Jan van Rickenbach, Daniel Rakotonirina ASCOMP

Integrated Electricity Demand and Price Forecasting

CFD modeling of combustion of a natural gas Light-Duty Engine

arxiv: v1 [physics.chem-ph] 5 Jul 2016

Fundamentals of Combustion

Revised Kinetic Scheme for Thermal Furnace of Sulfur Recovery Units

Numerical investigation of flame propagation in small thermally-participating, adiabatic tubes

Validation of a sparse analytical Jacobian chemistry solver for heavyduty diesel engine simulations with comprehensive reaction mechanisms

Experimental and Modeling Study of Laminar Flame Speeds for Alkyl Aromatic Components Relevant to Diesel Fuels

EXPERIMENTAL AND KINETIC

Transcription:

OpenSMOKE: NUMERICAL MODELING OF REACTING SYSTEMS WITH DETAILED KINETIC MECHANISMS A. Cuoci, A. Frassoldati, T. Faravelli, E. Ranzi alberto.cuoci@polimi.it Department of Chemistry, Materials, and Chemical Engineering, Politecnico di Milano, P.zza Leonardo da Vinci 32, 20133, Milano, Italy Abstract Appropriate, numerical modeling of combustion systems needs an accurate treatment of the governing complex kinetic mechanisms (which usually grow in size with the complexity of the fuel being modeled). Since the associated computational cost increases with the size (species and reactions) of the kinetic model adopted, the coupling of multi-dimensional simulations and detailed kinetic schemes requires a very high computational effort. Therefore, the development of approaches for improving the computational efficiency in the management of detailed kinetics is today an important area of research. In this paper a collection of open-source, C++ libraries, called OpenSMOKE, specifically conceived to manage large, detailed kinetic schemes (with hundreds of species and thousands of reactions) in numerical simulations of reacting flows, is presented. Some details about its object-oriented nature are presented and the possibility of coupling the OpenSMOKE libraries with existing numerical codes is discussed. Some examples demonstrating the ability of the OpenSMOKE library to successfully manage large kinetic schemes are eventually presented. Introduction Today it is well recognized that realistic numerical simulations of combustion phenomena must necessarily require not only an accurate, detailed description of fluid dynamic aspects, but also a realistic characterization of the chemistry and the physical and chemical properties of the gas mixtures involved. In the last years the inaccuracy of simplistic descriptions assuming either equilibrium chemistry or global mechanisms in reacting flows has been clearly demonstrated. At the same time there has been an increasing effort to incorporate more complex reaction mechanisms in simulation of combustion processes and this has led to the development of reaction mechanisms with different levels of detail and comprehensiveness. Kinetic mechanisms sufficiently realistic and comprehensive usually consist of a large number of species and reactions. As a consequence the computational cost associated with such mechanisms is usually very high. Hence there is the need of computational tools to make computationally efficient the 1

management of large kinetic schemes and easy their integration in new and/or existing numerical codes. In this paper the OpenSMOKE framework is presented, a collection of C++ libraries specifically conceived to manage large, detailed kinetic schemes (with hundreds of species and thousands of reactions) in numerical simulations of reacting flows. The OpenSMOKE Framework Usually numerical codes for the simulation of reacting flows have been written in procedural languages [1]. The OpenSMOKE framework is based on a different, methodology, which is called Object-Oriented Programming (OOP), since it is generally recognized that OOP produces code that is easier to write, validate, and maintain than procedural techniques [2]. The OOP approach involves three main features: abstraction, inheritance, and polymorphism [2]. Abstraction is the ability to represent conceptual constructs in the program and to hide details behind an interface. Thus, as an example, it is possible to create data types representing chemical species, chemical reactions, a mixture of chemical species, etc., hiding the numerical details of the implementation by encapsulation. The class interface is designed to be as simple as possible, while the implementation is not relevant at this level. Inheritance enables relationships between the various classes to be expressed, representing commonality between different classes of objects by class extension. For example, the different kind of reactions have some elements in common (e.g. the functions to manage the stoichiometry) which can be inherited by a parent reaction class and specialized for the specific reactions (children) which the user wants to implement. Polymorphism is the ability to provide the same interface to objects with different implementations, thus representing a conceptual equivalence between classes that in practical terms have to be coded differently. Examples of this feature in OpenSMOKE include the implementation of the Mixture class, as better explained in the following. The OpenSMOKE library is written in C++, since this is a good programming language for scientific work. It is widely available on all platforms and, being based on C, is fast. Several studies [3] indicate no significant difference in performance between Fortran and the C group of languages. The OpenSMOKE library is based on template programming and strongly relies on the concept of policies and policy classes [4], an important class design technique that enable the creation of flexible, highly reusable libraries. In brief, policy-based class design fosters assembling a class with complex behavior out of many little classes (called policies), each of which takes care of only one behavioral or structural aspect. As the name suggests, a policy establishes an interface pertaining to a specific issue. The user can implement policies in various ways as long as the policy interface is respected. Since policies can be mixed and matched, a combinatorial set of behaviors can be achieved by using a small core of elementary components. 2

Implementation of main classes One of the main objective of OpenSMOKE library is to make easy the management of complex reacting mixtures in new and existing numerical codes. For this purpose the main classes are designed by exploiting policy design and inheritance techniques. The main, basic class is the Species class, which manages the properties of a single chemical species. The Species class is based on several policies concerning the sub-models used to evaluate the thermodynamic and transport properties. The user can easily choose the policies to be used which better fit his needs or can easily implement a new policy. The only requirement is that the new policy respects the policy interface. The main advantage of this approach is that, if a new policy is needed, no changes to the existing code are needed. As an example, if a new equation of state is needed for evaluating the thermodynamic properties, the new corresponding policy can be added to the OpenSMOKE library, but the source code of the original OpenSMOKE library does not have to be changed. The chemical species described by the Species classes can be collected together to create the Mixture class, whose main purpose is to allow the user to easily and efficiently evaluate thermodynamic and transport properties of a mixture. The Mixture class is built using a number of policies concerning the mixing rules for the evaluation of mixture properties. The Mixture class does not need to know the details behind the calculations of properties of every species, but only how to mix these properties to evaluate the corresponding mean mixture values. This is easily achieved because the different species involved in the mixture expose a common interface to the Mixture class. The chemical reactions are described through the Reaction class, which manages the data about the stoichiometry and the kinetic parameters of a single reaction. The Reaction class is designed as a virtual class, from which a large number of classes is derived, each of them describing a particular kind of reaction (fall-off reaction, chemically activated bimolecular reactions, etc.). The Chemistry class provides a collection of reactions involved in a kinetic scheme. This class does not have to know the details about the implementation of every derived Reaction class. The most important functions which have to be exposed to the Chemistry class are the evaluation of the reaction rate and the access to the stoichiometric coefficients. The Chemistry class provides all the functions to evaluate the formation rates of every chemical species, which are usually the most important data required in the simulation of reacting flows. The OpenSMOKE library can be extended and adapted to the needs of the user, by adding new thermodynamic and transport policies and by new classes of reactions. Efficiency According to [5], in typical reacting flow calculations with detailed kinetic schemes, more than 80% of CPU time is spent for the numerical evaluation of 3

Jacobian matrices. Since the construction of Jacobian usually involves the evaluation of thermodynamic and transport properties and the calculation of formation rates of every species a large number of times, the OpenSMOKE library tries to make the calculations of these properties as fast as possible. This goal is reached by exploiting the object oriented nature of C++. In particular, a new class, called MixtureMap, is specifically conceived for calculating thermodynamic, transport properties and kinetics data in a fast way, without using complex interfaces. The idea is quite simple: from every Mixture object (working as a sort of C++ Factory [4]) a number of independent MixtureMap objects can be created. Then, when some property is needed, the user has only to update the status of the MixtureMap object and ask for such specific property.efficiency is achieved by the MixtureMap using several techniques: caching: the code is written in order to cache as much as possible, which means storing items for future use in order to avoid retrieving or recalculating them; object pools: this is a technique for avoiding the creation and deletion of a large number of objects during the code execution; optimized functions: the numerical algorithms are often reformulated in order to exploit the Intel MKL Vector Mathematical Functions Library (VML), including a set of highly optimized functions; code reformulation: many parts of the numerical algorithms are reformulated in a less intuitive way in order to minimize the number of flops needed to perform some calculations or to avoid the usage of CPU-expensive functions. Integration with existing codes The object-oriented nature of OpenSMOKE library makes very easy its integration in new or existing numerical codes. Because of encapsulation of data, the interface for calling common functions is very simple. An example is reported below: 1 OpenSMOKE::Mixture *mix = new OpenSMOKE::Mixture(fileName); 2 OpenSMOKE::MixtureMap *map = mix->createmap<0>(); 3 map.updatestatus(t,p,y); // update status 4 cp = map->cp(); // specific heats 5 viscositymix = map->viscositymix(); // viscosity 6 R = map->formationrates(); // formation rates 7 r = map->reactionrates(); // reaction rates In the first line the kinetic scheme (together the thermodynamic data and the transport properties) is imported from an external file (e.g. in CHEMKIN format). Then a MixtureMap object is created and the status of such map is updated (in terms of temperature, pressure and mass fractions). The next lines (4-7) are used to calculate some specific data (constant-pressure specific heat of species, the viscosity of the mixture, the formation and the reaction rates). 4

Examples The OpenSMOKE library was coupled to the BzzMath libraries [11] (freely available at http://homes.chem.polimi.it/gbuzzi/) to solve typical systems of interest for the combustion community (ideal reactors, laminar opposed flames, laminar premixed flat flames, flamelets, etc.) and some results were already published [12, 13]. Only some examples are reported in the following. Figure 1 reports the numerical results obtained in a plug flow reactor, fed with methyl-butanoate and air at three different pressures. The simulations were performed using a kinetic scheme with 2878 species [6]. Despite the large number of species, the simulations required only ~2-3 minutes of CPU time. In Figure 2 the numerical results referring to a laminar counter flow diffusion flame of C 3 H 8 against air are reported for several different schemes. Such simulations are more time consuming with respect ideal reactors simulations, since the system under investigation is 1D and requires the construction of a proper grid on which the equations have to be discretized. The results reported in Figure 2 Figure 1. Adiabatic plug-flow reactor fed with methyl-decanoate and air at T=1000K and Φ=1 (2878 species, 8555 reactions [6]). Figure 2. Counter-flow diffusion flame fed with C 3 H 8 in air (P=1atm, T=300K). Kinetic schemes: Polimi (109 species) [7], Pitsch (158 species) [8], MIT (158 species) [9] and Livermore (155 species) [10]. Figure 3. Laminar flame speed of C 3 H 8 in air (P=1atm, T=300K). Kinetic schemes: Polimi (109 species) [7], Pitsch (158 species) [8] and MIT (158 species) [9]. 5

were done on a grid with ~160 points and required ~20-25 minutes of CPU time. The last example (reported in Figure 3) is about the evaluation of laminar flame speed of C 3 H 8 at atmospheric conditions and ambient temperature. The calculations (which were done using flat, premixed flames) are quite challenging, because the numerical model results in a DAE system with an eigenvalue. The OpenSMOKE library was also successfully integrated in the OpenFOAM [14] framework for the simulation of multi-dimensional, laminar reacting flows. Conclusions In this paper we briefly described the main features of the OpenSMOKE opensource, library, specifically conceived to manage large, detailed kinetic schemes (with hundreds of species and thousands of reactions) in numerical simulations of reacting flows. The advantages offered by the object-oriented nature of the library were discussed, together with the possibility to easily couple the OpenSMOKE library with new or existing numerical codes. Some examples, demonstrating the ability of OpenSMOKE library to work with large kinetic schemes, were presented. References [1] Weller H. G., Tabor G., Jasak H., Fureby C., Computers in Physics 12: 620-631 (1998) [2] Stroustrup B., The C++ Programming Language, 3rd Edition, Addison Wesley, Reading (MA), 1997 [3] Cary J. R., et al., Computational Physics Communications 105: 20-36 (1997) [4] Alexandrescu A., Modern C++ Design: Generic Programming and Design Patterns Applied, 1 st Edition, Addison-Wesley Professional, 2001 [5] Smooke M. D., Rabitz H., Reuven Y., Dryer F. L., Combustion Science and Technology 59: 295-319 (1983) [6] Herbinet O., Pitz W. J., Westbrook C. K., Combustion and Flame 154: 507-528 (2008) [7] Ranzi E., Frassoldati A., Granata S., Faravelli T., Industrial and Engineering Chemistry Research 44: 5170-5183 (2005) [8] Narayanaswamy K., Blanquart G., Pitsch H., Combustion and Flame 157: 1879-1898 (2010) [9] Richter H., Howard J. B., Physical Chemistry Chemical Physics 4: 2038-2055 (2002) [10] Marinov N. M., et al., Combustion and Flame 114: 192-213 (1998) [11] Buzzi-Ferraris G., BzzMath 6.0 Numerical Libraries, 2011 [12] Cuoci A., Frassoldati A., Faravelli T., Ranzi E., Combustion and Flame 156: 2010-2022 (2009) [13] Grana R., et al., Combustion Theory and Modelling In Press (2011) [14] OpenCFDLtd., OpenFOAM http://wwwopenfoamorg/ 10.4405/34proci2011.II23 6