Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Implementation of an Alternate ChemistryLibrary into OpenFOAMTM
Bernhard F.W. Gschaider1 Markus Rehm2 Peter Seifert2
Bernd Meyer2
1ICE StromungsforschungLeoben, Austria
2Institute of Energy Process Enineering and Chemical Engineering,TU Bergakademie Freiberg, Germany
Open Source CFD International Conference4th/5th December
bgschaid, mrehm alternateChemistryLibrary 1/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Outline1 Introduction/Motivation
Current statusCanteraDesired behaviour
2 ImplementationAlternate Chemistry LibraryTransient SolverSteady SolverOther topics
3 Results Plug Flow ReactorTransient PFRSteady-state PFR
4 Results Sydney Bluff-Body Flame (HM1)Results HM1Discussion HM1
5 ConclusionSummaryAvailibilityOutlook/Future WorkAcknowledgements
bgschaid, mrehm alternateChemistryLibrary 2/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Current statusCanteraDesired behaviour
The chemistryModel-class
• Part of the OpenFOAMTM-distribution• Solves a set of chemical reactions and returns a reaction-rate• Used in the solvers dieselFoam and reactingFoam
• Chemical reactions can be specified in two formats:• A generic OpenFOAMTM-format (allows the inclusion of
non-standard reaction rates)• The ChemkinTM-format which is very “Fortran”
• Both formats are converted to the same internalrepresentation
• ... and are solved using a number of different solvers
bgschaid, mrehm alternateChemistryLibrary 3/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Current statusCanteraDesired behaviour
Cantera
Cantera [1] is a open-source chemical kinetics package
• Very flexible and easy to handle
• Important functions for chemical species, (heterogeneous)kinetics, equilibrium, transport, diffusion, heat conduction areavailable and efficiently implemented
• Kernel written in C++; accessible via Python, Matlab,Fortran and of course C/C++
• Good ChemkinTM-Lexer
• A set of ideal reactors is available
• Uses the CVODE-Solver of the Sundials Suite [2] forintegration of the ODEs.
bgschaid, mrehm alternateChemistryLibrary 4/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Current statusCanteraDesired behaviour
Goals of this work
As mentioned in the Milan presentation [3], Cantera would bebenefitial for the development of solvers for reacting flows:
• Flexible exchange of chemistry engines without the necessityto change the solver
• Easy access to thermochemical functions
• Better stability (JANAF-error)
• Stationary chemistry solver
bgschaid, mrehm alternateChemistryLibrary 5/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
The Alternate Chemistry Library
• A Library that provides a framework for adding furtherchemistry solvers
• Should require only minimal changes to existing solvers• Solvers should be implementation-agnostic (by using the
RunTime-selection mechanism)
• This is achieved by replacing the chemistryModel object(usually called chemistry) in the solvers with aautoPtr<alternateChemistryModel>
• Direct subclassing of chemistryModel is not possible becausenecessary properties are private
• Usually every call chemistry.xxxx() is replaced by achemistry().xxxx()
bgschaid, mrehm alternateChemistryLibrary 6/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
Interface
• Only a small part of the original chemistryModel-interfaceis needed by the solvers:
solve Solve the reaction systemRR Access the reaction ratestc Access the chemical time-scale
• Only these have to be implemented by a new chemical solverclass
• In addition to these the methods
calcDQ for the calculation of dQtf Access the flow time-scale (described later)
were added to the interface
bgschaid, mrehm alternateChemistryLibrary 7/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
chemistryModelProxy
• Provides access to the functionality of the originalchemistryModel-class
• Has a private chemistryModel-object
• Calls are passed through to the chemistryModel-object• solve() and tc()• calcDQ() implemented after example from original solvers
• With this chemistry model implementation the solver isequivalent to the original reactingFoam
bgschaid, mrehm alternateChemistryLibrary 8/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
The Cantera-model
• Implements interface to the Cantera-package• Requires the thermoType to be ahMixtureThermo<CanteraMixture>
• Instead of the usual hMixtureThermo<reactingMixture>• Currently required to have consistent calculations of the
mixture and the chemistry• Calculation of thermophysical properties is done inCanteraThermo a wrapper to the Cantera-classIdealGasMix
• Reactions are read from a cti-file (Cantera Input)• Also the thermophysical data of the species. Thus the
requirement on the thermoType• Calculations in solve() are done via theReactor/ReactorNet-classes of Cantera
• Solution of the ODEs is done via CVODE
bgschaid, mrehm alternateChemistryLibrary 9/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
Class overwiew
bgschaid, mrehm alternateChemistryLibrary 10/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
alternateReactingFoam
Solver almost unchanged. Basis: reactingFoam. Remember theChalmers PaSR-Model for turbulent combustion:
κ =dT + tc
dT + tc + tk(1)
Where tc is the chemical time scale and tk is the turbulenttime scale.
• Implementation of tc()-method for the Cantera calculationnecessary.
• For the Cantera solver no ODE solver from OF necessary(choice of the ODE solver in chemistryProperties doesn’thave any effect).
bgschaid, mrehm alternateChemistryLibrary 11/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
alternateSteadyReactingFoam
Steady solvers are a must when simulating large-scale chemicalreactors or burners.Necessary changes from the transient case:
• Usage of the SIMPLE-algorithm for p-U-coupling
• Coupling of chemistry to the flow-time
• Stabilization of the solution by reduction of κ if|Y old
i − Y newi | is too large (only at start-up!)
bgschaid, mrehm alternateChemistryLibrary 12/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
Flow time scale
In unsteady calculations Co< 1 and integration time equals dT .For steady-state solvers Co>>1. So we limit the integration timeby the residence time in the cell i :
tfi =Di
Ui(2)
and hence we substitute dT in (1) by df :
κ =tf + tc
tf + tc + tk(3)
We define the flow time scale tf .
bgschaid, mrehm alternateChemistryLibrary 13/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Alternate Chemistry LibraryTransient SolverSteady SolverOther topics
CVODE
An OF library that makes use of the CVODE-Solver of theSundials Suite [2] was written.
bgschaid, mrehm alternateChemistryLibrary 14/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
Plug flow reactor (PFR) test case
Simple test case, which is easily comparable to ideal PFR modelsas available in CHEMKINTM or Cantera:
• Ignitable premixed composition at inlet: YH2 = 0.009,YO2 = 0.026, YAr = 0.965, T = 1600 K, p = 1 bar
• Tube idealized as 2D-domain xmax = 1 m, ymax = 0.1 m,10x100 cells, inlet left patch, outlet right patch, upper andlower patch symmetry
• H2 − O2 mechanism with 9 species and 27 reactions
bgschaid, mrehm alternateChemistryLibrary 15/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateReactingFoam
For the transient simulations we were interested in
• Behaviour of the Cantera chemistry library
• Choice of ODE solvers and their performance
All plots were done along the x direction. The ideal Solution wasobtained by calculating the time into a position with U and ρ.
bgschaid, mrehm alternateChemistryLibrary 16/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateReactingFoam ODE-solvers (T)
ODESIBS: ODE SIBS; EI: Euler Implicit; CV: CVODE
1600
1700
1800
1900
2000
2100
2200
0 0.2 0.4 0.6 0.8 1
T [K
]
x [m]
CANTERA ideal PFROF_UPFR_ODESIBSOF_UPFR_EIOF_UPFR_CV_Co=0.5CAN_UPFR
bgschaid, mrehm alternateChemistryLibrary 17/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateReactingFoam ODE CPUTime
0
20000
40000
60000
80000
100000
0 0.1 0.2 0.3 0.4 0.5 0.6
CP
U ti
me
[s]
Simulation time [s]
OF_UPFR_ODESIBSOF_UPFR_EIOF_UPFR_CVOF_UPFR_CVJ_Co=0.5CAN_UPFR
bgschaid, mrehm alternateChemistryLibrary 18/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateReactingFoam Summary
Transient PFR results:
• With implementation of Cantera chemistry and tc() resultsfor both chemistry engines give identical results for PFR.
• ODE SIBS results deviate sligtly from the others (EI, CV)(due to semi-impliciteness?)
• CVODE more stable than SIBS, EI but sometimes slower
• CVODE benefits from larger integration steps (internaltime-stepping). → So use higher Co, if results aren’t affected.
• Compared to ideal reactor solvers are ’faster’ and there is atemperature difference of 5 K. Possibly induced bydiscretisation errors or idealisation.
bgschaid, mrehm alternateChemistryLibrary 19/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam
The following aspects for the runs of the steady-statesimulations are of particular interest:
A Performance and stability of the steady-state implementationin relation to transient case and the ideal case.
B Influence of the implementation of κ
C Influence of Cmix
Plots are similar to the transient ones but scaling was changed.
bgschaid, mrehm alternateChemistryLibrary 20/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (T)
A Transient vs. steady
1600
1700
1800
1900
2000
2100
2200
0 0.05 0.1 0.15 0.2
T [K
]
x [m]
CHEMKIN ideal PFROF_UPFRT_CV
CAN_UPFRTCAN_UPFR_refine
CAN_SPFRTOF_SPFRT_CV
CAN_SPFRT_refine
bgschaid, mrehm alternateChemistryLibrary 21/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (H2)
A Transient vs. steady
0.005
0.0055
0.006
0.0065
0.007
0.0075
0.008
0.0085
0.009
0.0095
0.01
0 0.05 0.1 0.15 0.2
yH2
[kg/
kg]
x [m]
CHEMKIN ideal PFROF_UPFRT_CV
CAN_UPFRTCAN_UPFR_refine
CAN_SPFRTOF_SPFRT_CV
CAN_SPFRT_refine
bgschaid, mrehm alternateChemistryLibrary 22/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (T)
B Influence of κ
1600
1700
1800
1900
2000
2100
2200
0 0.05 0.1 0.15 0.2
T [K
]
x [m]
CHEMKIN ideal PFRCAN_UPFR_refine
CAN_SPFRT_kappa1_refineCAN_SPFRT_kappa2_refine
bgschaid, mrehm alternateChemistryLibrary 23/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (H2)
B Influence of κ
0.005
0.0055
0.006
0.0065
0.007
0.0075
0.008
0.0085
0.009
0.0095
0.01
0 0.05 0.1 0.15 0.2
yH2
[kg/
kg]
x [m]
CHEMKIN ideal PFRCAN_UPFR_refine
CAN_SPFRT_refineCAN_SPFR_kappaNeu_refine
bgschaid, mrehm alternateChemistryLibrary 24/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (T)
C Influence of Cmix
1600
1700
1800
1900
2000
2100
2200
0 0.05 0.1 0.15 0.2
T [K
]
x [m]
CHEMKIN ideal PFRCAN_UPFR_refineCAN_UPFR_refine_Cmix1CAN_SPFR_kappa1_refineCAN_SPFR_kappa1_refine_Cmix=1CAN_SPFR_kappa2_refineCAN_SPFR_kappa2_refine_Cmix=1
bgschaid, mrehm alternateChemistryLibrary 25/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (H2)
C Influence of Cmix
0.005
0.0055
0.006
0.0065
0.007
0.0075
0.008
0.0085
0.009
0.0095
0.01
0 0.05 0.1 0.15 0.2
yH2
[kg/
gk]
x [m]
CHEMKIN ideal PFRCAN_UPFR_refineCAN_UPFR_refine_Cmix1CAN_SPFR_kappa1_refineCAN_SPFR_kappa1_refine_Cmix=1CAN_SPFR_kappa2_refineCAN_SPFR_kappa2_refine_Cmix=1
bgschaid, mrehm alternateChemistryLibrary 26/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR alternateSteadyReactingFoam (OH)
C Influence of Cmix
0
0.0001
0.0002
0.0003
0.0004
0.0005
0.0006
0.0007
0.0008
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
yH2
[kg/
gk]
x [m]
CHEMKIN ideal PFRCAN_UPFR_refineCAN_UPFR_refine_Cmix1CAN_SPFR_kappa1_refineCAN_SPFR_kappa1_refine_Cmix=1CAN_SPFR_kappa2_refineCAN_SPFR_kappa2_refine_Cmix=1
bgschaid, mrehm alternateChemistryLibrary 27/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Transient PFRSteady-state PFR
PFR Steady Summary
A:
• Transient/Steady solutions do not agree totally butrefinement reduces deviation
B+C:
• Definition of new κ according to (3) brings no changes forsmall values of Cmix. But for Cmix=1 the solution seemscloser to ideal solution.
• However, no clear conclusion could be drawn.
bgschaid, mrehm alternateChemistryLibrary 28/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
Sydney Bluff-body Flame (HM1)
Data from Sandia bluff-body flame HM1 conducted at Sydney university [4].
bgschaid, mrehm alternateChemistryLibrary 29/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 case set-up
Wall (slip)
Air Inlet
Fuel Inlet
Pressure outlet
Bluff-body walls
Symmetry axis
bgschaid, mrehm alternateChemistryLibrary 30/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 set-up
Boundary Conditions:
• Diameters: Djet = 3.6mm; Dchannel = 150mm (300mm),Dbluffbody = 50mm
• Turbulence:8.5 % (2.5%) turbulence intensity , 0.135 mm(5.625 mm) mixing length for jet (co-flow)
• Mesh: from blockMesh with 1095
Inlet conditions:
• HM1: Ujet = 118m/s Ucoflow = 40m/s
Other models:
• k − ε turbulence model, ATRMech (reduced GRI 3.0)
• OF used KRR4 ODE solver for chemistry
bgschaid, mrehm alternateChemistryLibrary 31/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 Plots & Points of Measurement
• Plots of radius against measurement values (Exp HM1) atdifferent x-positions are shown together with simulationresults.
• EDC referes to the EDCSimpleFoam solver [3].
• CAN and OF mark Cantera- and OpenFOAMTM-solution
• K1 and K2 stands for κ1 and κ2
bgschaid, mrehm alternateChemistryLibrary 32/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 Plots & Points of Measurement
bgschaid, mrehm alternateChemistryLibrary 33/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results T
200 400 600 800
1000 1200 1400 1600 1800 2000
0 0.2 0.4 0.6 0.8 1 1.2
T [K
]
r/R_b
x/D_b=0.26 (13mm)
200 400 600 800
1000 1200 1400 1600 1800 2000
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
200 400 600 800
1000 1200 1400 1600 1800 2000
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
200 400 600 800
1000 1200 1400 1600 1800 2000
0 0.2 0.4 0.6 0.8 1 1.2
T [K
]
r/R_b
x/D_b=1.3 (65mm)
200 400 600 800
1000 1200 1400 1600 1800 2000
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 34/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results H2
0
0.02
0.04
0.06
0.08
0.1
0.12
0 0.2 0.4 0.6 0.8 1 1.2
Y_H
2 [k
g/kg
]
r/R_b
x/D_b=0.26 (13mm)
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.1
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0 0.2 0.4 0.6 0.8 1 1.2
Y_H
2 [k
g/kg
]
r/R_b
x/D_b=1.3 (65mm)
0 0.005
0.01 0.015
0.02 0.025
0.03 0.035
0.04 0.045
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 35/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results H2O
0 0.02 0.04 0.06 0.08
0.1 0.12 0.14 0.16
0 0.2 0.4 0.6 0.8 1 1.2
Y_H
2O [k
g/kg
]
r/R_b
x/D_b=0.26 (13mm)
0 0.02 0.04 0.06 0.08
0.1 0.12 0.14 0.16
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
0 0.02 0.04 0.06 0.08
0.1 0.12 0.14 0.16
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0 0.2 0.4 0.6 0.8 1 1.2
Y_H
2O [k
g/kg
]
r/R_b
x/D_b=1.3 (65mm)
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 36/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results CO
0
0.01
0.02
0.03
0.04
0.05
0.06
0 0.2 0.4 0.6 0.8 1 1.2
Y_C
O [k
g/kg
]
r/R_b
x/D_b=0.26 (13mm)
0
0.01
0.02
0.03
0.04
0.05
0.06
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
0 0.005
0.01 0.015
0.02 0.025
0.03 0.035
0.04 0.045
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
0 0.005
0.01 0.015
0.02 0.025
0.03 0.035
0.04
0 0.2 0.4 0.6 0.8 1 1.2
Y_C
O [k
g/kg
]
r/R_b
x/D_b=1.3 (65mm)
0 0.005
0.01 0.015
0.02 0.025
0.03 0.035
0.04
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 37/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results CO2
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
0 0.2 0.4 0.6 0.8 1 1.2
Y_C
O2
[kg/
kg]
r/R_b
x/D_b=0.26 (13mm)
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0 0.2 0.4 0.6 0.8 1 1.2
Y_C
O2
[kg/
kg]
r/R_b
x/D_b=1.3 (65mm)
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 38/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 results OH
0 0.0005
0.001 0.0015
0.002 0.0025
0.003 0.0035
0.004 0.0045
0 0.2 0.4 0.6 0.8 1 1.2
Y_O
H [k
g/kg
]
r/R_b
x/D_b=0.26 (13mm)
0 0.0005
0.001 0.0015
0.002 0.0025
0.003 0.0035
0.004 0.0045
0.005
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.6 (30mm)
0 0.0005
0.001 0.0015
0.002 0.0025
0.003 0.0035
0.004
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=0.9 (45mm)
0
0.0005
0.001
0.0015
0.002
0.0025
0.003
0.0035
0 0.2 0.4 0.6 0.8 1 1.2
Y_O
H [k
g/kg
]
r/R_b
x/D_b=1.3 (65mm)
0 0.0005
0.001 0.0015
0.002 0.0025
0.003 0.0035
0.004
0 0.2 0.4 0.6 0.8 1 1.2
r/R_b
x/D_b=2.4 (120mm)
Legend1) Exp HM12) EDC3) CAN K14) CAN K25) OF K2
bgschaid, mrehm alternateChemistryLibrary 39/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
Discussion HM1
Why are all the resuls so similar? (No influence ofκ-implementation or Cmix (not shown))
• In case Cmix=0.005 no difference in κ notable - too fastmixing as in PFR case.
• Furthermore, in the domain close to the inlets κ ≈ 1 inevery case and influence of Cmix can only be seen furtherdownstream where no measurements are available.
• Comparison with transient simulation of HM1 indicates thatκ2 seems more appropriate (see next slide)
• Still, further testing is needed
bgschaid, mrehm alternateChemistryLibrary 40/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
HM1 comparison κ1, κ2 for Cmix=1
bgschaid, mrehm alternateChemistryLibrary 41/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Results HM1Discussion HM1
Conclusion HM1
• Flame was rendered with acceptable quality by the newsolvers
• Steady solvers are very robust if the right ODE solvers areused (CVODE for Cantera, KRR4 for OF)
• Checking of dYi provides further stability and and preventscomposition from being driven to unphysical states.
• Solutions for a finer grid (20000 cells) are still not available -flame blows off very easily.
bgschaid, mrehm alternateChemistryLibrary 42/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
SummaryAvailibilityOutlook/Future WorkAcknowledgements
Summary
The implementation of the Cantera chemistry intoOpenFOAMTMcan be considered successful and provides:
• A flexible interface to access a wide range of thermophysicaldata,and chemistry functions
• Robust solvers for transient and steady-state calculations
• Valuable test-cases for validation and further investigation
• Collaborators are welcome to test the code and contributeown developments.
bgschaid, mrehm alternateChemistryLibrary 43/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
SummaryAvailibilityOutlook/Future WorkAcknowledgements
How to get the library
• The libraries and solvers presented here will be made availableon the openfoam-extend-SVN on sourceforge.net
Libraries Two independent libraries:
alternateChemistryModel The generalframework an theOpenFOAMTM-interface
canteraChemistryModel The interface toCantera
Solvers The steady and the transient solver with thetest-cases PFR and HM1
• URL will be given on the Wiki
• Interfaces to other chemistry libraries, more solvers,critique, and improvements are encouraged
bgschaid, mrehm alternateChemistryLibrary 44/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
SummaryAvailibilityOutlook/Future WorkAcknowledgements
Future Work
There is always room for improvement:
• Both chemistry solvers read the same input files• Converter between Cantera and OpenFOAMTM-format
• Make the canteraChemistryModel indepentent ofcanteraMixture
• Implementation of reduction/tabulation techniques for moretime-efficient solution.
• More combustion models.
bgschaid, mrehm alternateChemistryLibrary 45/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
SummaryAvailibilityOutlook/Future WorkAcknowledgements
Acknowledgements
A part of the development and implementation work was done bythe IEC in the context of the research project “Grosstechnischbertragbare Untersuchungen zur Weiterentwicklung derIGCC-Kohlekraftwerkstechnik mit CO2-Abtrennung -COORAMENT”. This project is supported by the GermanFederal Ministry of Economics and Technology (Project ID0327113B).Furthermore we thank N. Nordin for a valuable posting regardingthe tc()- implementation, all developers who contributed toOpenFOAMTM, and people who inspired that work.
bgschaid, mrehm alternateChemistryLibrary 46/47
Introduction/MotivationImplementation
Results Plug Flow ReactorResults Sydney Bluff-Body Flame (HM1)
ConclusionReferences
Bibliography
[1] DG Goodwin. Cantera: Object-oriented software for reacting flows.Technical report, California Institute of Technology, 2002.
[2] A.C. Hindmarsh, P.N. Brown, K.E. Grant, S.L. Lee, R. Serban, D.E.Shumaker, and C.S. Woodward. SUNDIALS: Suite of nonlinear anddifferential/algebraic equation solvers. ACM Transactions onMathematical Software (TOMS), 31(3):363–396, 2005.
[3] M. Rehm, P. Seifert, and B. Meyer. Towards a CFD Model forIndustrial Scale Gasification Processes. In OpenFOAM Workshop2008, Milan, 2008.
[4] BB Dally, AR Masri, RS Barlow, and GJ Fiechtner. Instantaneous andMean Compositional Structure of Bluff-Body Stabilized NonpremixedFlames. Combustion and Flame, 114(1-2):119–148, 1998.
bgschaid, mrehm alternateChemistryLibrary 47/47