Workshop "HPC enabling of OpenFOAM for CFD applications"
In-cylinder flow and combustion
modeling using the OpenFOAM
technology
T. Lucchini, G. Montenegro, G. DErrico, A. Onorati, L. Cornolti
Department of Energy, Politecnico di Milano
http://www.engines.polimi.it
https://twitter.com/ICEPoliMi/
Background
Target for next IC engines generation: contemporary
reduction of fuel consumption and pollutant emissions.
Development and design focused on fuel-air mixing and
combustion:
GDI engines (premixed or stratified)
Diesel engines (complex injection strategies)
New combustion modes (HCCI, PCCI)
CFD widely used for IC engines design:
Development of a platform that can be used both for
model implementation and engine design.
http://www.engines.polimi.it
Topics
Development of new combustion models for IC engines
using the OpenFOAM technology.
Lib-ICE, model development for in-cylinder flow
simulations:
Mesh management
Fuel-air mixing
Combustion
Examples of application on real engine cases
http://www.engines.polimi.it
Model implementation: Lib-ICE
Libraries and solvers for IC engine simulations based on
OpenFOAM technology
Mesh motion for engine geometries
Combustion (spark-ignition, diesel)
Lagrangian sprays + liquid film
Unsteady flows in intake and exhaust systems:
Plenums, silencers, 1D-3D coupling
Reacting flows in after-treatment devices
DPF, SCR, catalyst
http://www.engines.polimi.it
Lib-ICE code structure
OpenFOAM-2.0.x
Lib-ICE
src
Spray
Thermo-physical models
Combustion models
Liquid film
Engine mesh management
Boundary conditions
1D-3D coupling
solvers
Cold-flow
Diesel
Spark-ignition
Combustion
Spray
utilities
Pre-processing
Parallel-processing
Post-processing
Mesh-management
http://www.engines.polimi.it
MESH MANAGEMENT
http://www.engines.polimi.it
Full-cycle simulation
MESH 1
XXX CA
YYY CA
1) Multiple meshes cover the
entire cycle simulation.
2) Each mesh is valid in a userspecified interval.
3) During each time-step:
Grid points are moved using
automatic mesh motion
and/or pre-defined points
motion.
Mesh topology can be
eventually changed
YYY CA
ZZZ CA
MESH 2
4) Mesh-to-mesh interpolation.
http://www.engines.polimi.it
Full-cycle simulation
Automatic mesh motion
Grid points motion computed by an
automatic mesh motion solver, based on
the Laplace equation.
2 u 0
x new xold u t
Layout for deforming mesh simulations
http://www.engines.polimi.it
Full-cycle simulation
Topological changes
Reduction of the overall number of meshes.
Mesh is modified according to user-defined parameters, no need to
specify exactly when a specific event should take place.
Dynamic mesh layering
Sliding interface
http://www.engines.polimi.it
Full-cycle simulation
Topological changes: Adaptive Local Mesh Refinement
Grid resolution increased to properly describe the most important
physical and chemical processes and reduce grid dependency:
Fuel-air mixing
Combustion
http://www.engines.polimi.it
Mesh management
engine library in Lib-ICE
engine
engineTopoChangerMesh
fvMotionEngineMesh
pistonLayerAREngineMesh
twoStrokeEngineMesh
pistonRefineEngineMesh
multiCycleEngineTime
Deforming grid for full-cycle
simulations in four-stroke engines
Compression-expansion with
dynamic mesh layering
Full-cycle simulation in four-stroke
engines
Compression-expansion with
adaptive local mesh refinement
http://www.engines.polimi.it
Full-cycle simulation
Specific utilities for case set-up
1) Generation of multiple meshes
2) Definition of a template case
3) engineCaseSetUp utility
case
case0300
constant
case0320
init
dataOutput
case0720
system
5) Post-processing
case1440
4) runMultiCycleCase
solverName simpleColdSpeciesEngineDyMFoam;
startTimes
(/* list of startTime for each mesh */);
endTimes
(/* list of endTimes for each mesh */);
writeInterval
(/* list of writeInterval for each mesh */);
parallelRun on;
http://www.engines.polimi.it
Full-cycle simulation
Generation of engine meshes
Grid imported from
different tools
(Gambit, ICEMCFD, Pointwise,
STAR-CD)
Fully automatic
hexahedral mesh
generation from stl
file
http://www.engines.polimi.it
Full-cycle simulation
Mesh generation: new approach based on Blender
Blender + snappyHexMesh: engine mesh generation exclusively
based on open-source tools
http://www.engines.polimi.it
Full-cycle simulation
SANDIA Hydrogen Engine (data from ECN)
Displaced volume
560 cm3
Compression ratio
11
Intake pressure/temperature
1 bar / 36 C
Engine speed
1500 rpm
Hydrogen
injector
Motored conditions. Experimental
pressure and temperature profiles
imposed at intake and exhaust
ports.
Fixed zones
Mesh validity: 15 deg each.
Average cell size ranging from
300 to 600 thousand.
Intake
Cylinder
head
Exhaust
Grid size:
Cylinder: 2.5 mm
Valve region: 0.75 mm
Ducts: 2.5 5 mm
Tumble
plate
Laser
532/266 nm
Optical
liner
Piston
Engine
block
Turbulence model: standard
k-e
Deforming zones
http://www.engines.polimi.it
Full-cycle simulation
SANDIA Engine: velocity field comparison
-140 CA
(IVC: -140)
Exp.
Calc.
The main flow features at BDC are almost preserved at this
time, when the intake valve is closing.
http://www.engines.polimi.it
Full-cycle simulation
SANDIA Engine: velocity field comparison
-70 CA
(IVC: -140)
Exp.
Calc.
Gas pressure now higher than ambient pressure.
Still rather good agreement between computed and
experimental data.
http://www.engines.polimi.it
Full-cycle simulation
Post-processing
Specific utilities to estimate relevant quantities: charge motions (tumble,
swirl ratio, turbulence intensity); air-fuel mixing: homogeneity index.
Cylinder pressure
In-cylinder charge motions
0.4
0.3
IVC
0.2
0.1
4
0
SOI
EOI
3
-0.1
Tumble ratio
Turb. Kin. energy
-0.2
-0.3
-0.4
435
465
495
525
555
585
615
645
675
705
735
Crank Angle [deg]
http://www.engines.polimi.it
SPRAY AND WALL FILM
http://www.engines.polimi.it
Spray model
Comprehensive spray model for Diesel and GDI sprays
Turbulence
induced
breakup
Wave +
Catastrophic
breakup
Breakup transition: Weber number.
http://www.engines.polimi.it
Spray model
Comprehensive spray model for Diesel and GDI sprays
Extending the capabilities of the standard OpenFOAM spray
library, by introducing new models for:
High pressure injection
Liquid fuel atomization
Droplet-wall interaction
Liquid evaporation
Reducing the grid-dependency and CPU time of spray
simulations:
Easy development of new models.
Fast tuning of existing models.
http://www.engines.polimi.it
Mesh management
dieselSpray library in Lib-ICE
dieselSpray
Partially re-implemented
spray
parcel
Fully re-implemented
spraySubModels
injectorModel
Huh model with and without cavitation
atomizationModel
Huh-Gosman model
wallModel
Bai-Gosman model
breakupModel
Bug fixes
http://www.engines.polimi.it
Liquid film model
Approach proposed by Bai and
Gosman (SAE-960626).
Mass, momentum and energy
equations solved for a thin film using
the Finite Area Method accounting for
both interaction with liquid (impact)
and gas phase (evaporation).
Liquid film
http://www.engines.polimi.it
Spray model
Non-evaporating diesel spray
Experimental data courtesy of Dr. Montanaro
and Dr. Allocca (CNR-Istituto Motori)
http://www.engines.polimi.it
Spray model
Evaporating diesel spray (ECN data)
Fuel: n-dodecane (Spray-A)
Effects of ambient conditions (temperature,
density) on liquid and vapor penetration.
Exp data from ECN: www.ca.sandia.gov/ecn
http://www.engines.polimi.it
Spray model
Evaporating diesel spray (ECN data)
Fuel: n-heptane (Spray-H)
Air/fuel mixing and velocity comparison
(a)
(b)
(c)
Calc.
Exp.
Distance [mm]
20
30
40
50
Comprehensive spray model validation absolutely necessary for a
correct prediction of the combustion process.
Exp data from ECN: www.ca.sandia.gov/ecn
http://www.engines.polimi.it
Spray model
Impinging gasoline spray
Liquid film formation on the plate
(a) t = 400 s
(b) t = 2300 s
Experimental data courtesy of Dr. Montanaro
and Dr. Allocca (CNR-Istituto Motori)
http://www.engines.polimi.it
COMBUSTION MODELS
http://www.engines.polimi.it
Background
Combustion models for IC engines. Requirements:
Flexibility
multiple-injections
stratified charge combustion
different combustion regimes
Detailed chemistry
pollutant formation (soot)
auto-ignition
multi-component fuels
Interacting processes
Energy transfer during spark-ignition
Turbulence-chemistry interaction
http://www.engines.polimi.it
Background
Implementation of combustion models in Lib-ICE
Design-oriented tools:
Fast, robust and suitable for industrial simulations
Reduced chemistry
Diagnostic-oriented tools:
Allowing a detailed analysis of the flame structure
and study of new combustion modes
Detailed kinetics
http://www.engines.polimi.it
COMBUSTION MODELS
Spark-ignition
http://www.engines.polimi.it
Combustion models for SI Engines
Combustion phases: spark-ignition and turbulent
combustion.
State of the art: different combustion models available
(G-Equation, Weller, ECFM) and extensively validated.
However, initial flame development plays a big role and
modeling efforts are still required to describe such
phase. Influence of local flow, turbulence conditions and
energy transfer from the electrical circuit to be
accounted for.
Proposed approach: Lagrangian ignition model +
turbulent combustion model (Eulerian)
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
1) The spark channel is
represented by a set of
Lagrangian particles, convected
by the mean flow.
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
2) Flame kernels are launched at
the particle locations satisfying
the ignition criterion (Karlovitz). Ka Ka
For each particle mass and
energy equations are solved.
p
4rp u st
s plasma
dt
u
dm p
mp
Q spk
Tp Tb
dt
m p
m p c p, p
dTp
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
3) Flame surface density
distribution reconstructed
from particle distribution and
their size.
spk
Nf
i Si
i 1
Vcell
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
a [m2/s]
Qel
cp [kJ/jkgK]
4) Initial thermal transient of the plasma channel
correctly described by solving the heat conduction
equation on it.
ri
Temperature [K]
Ti (>10000 K)
Tu (300-600 K)
Temperature [K]
Q el
V t it
a Tpl
a 2Tpl
t
c pV pl
c pV pl
Tpl
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
5) Simplified model for the secondary circuit to
estimate the amount of energy transferred to the
gas phase
dEs
2
i
t
Vs t is t
s s
R
R
p
Lp
Ls
Spark
gap
dt
2 Es
is t
Ls
Vs t Vac Vgc lspk
Qspk V t i t
http://www.engines.polimi.it
Combustion models for SI Engines
Lagrangian ignition model
6) Ignition source term included in the flame surface
density transport equation:
ui t
t
xi
xi Sc Sct
P D Pk
xi
Possibility to choose different expressions for P and
D depending on the selected FSD approach.
http://www.engines.polimi.it
Combustion models for SI Engines
sparkIgnition library in Lib-ICE
flameKernelIgnition
flameKernel
Cloud<flameKernel>
particle
electricalCircuit
plasmaChannelModel
sparkIgnitionSubModels
flameSurfaceDensityModels
regionModel
ignition, restrike, wall, dispersion, efficiency
CFM, ECFM, CFM-2, Chang-Huh, ..
Solver: lagrangianPlasmaFlameKernelEngineFoam
http://www.engines.polimi.it
Combustion models for SI Engines
Experimental validation: optical pre-chamber engine
Pre-chamber with optical access.
Fuel: propane; laminar flame speed:
Gulder
Tested operating conditions:
1) Effect of engine speed
2) Effect of air/fuel ratio
3) Effect of spark-plug position
Grid generation: snappyHexMesh
Engine geometry details, operating conditions and complete set of
experimental data available in SAE Paper 922243.
http://www.engines.polimi.it
Combustion models for SI Engines
Experimental validation: optical pre-chamber engine
Non-combusting conditions
Ignition locations
non-dimensional ratio
16
Calc.
Exp.
12
8
Umean/up
u'/up
0
310
320
330
340
350
360
velocity
Turbulence intensity
Crank Angle [deg]
Correct prediction of turbulence intensity and velocity very
important for realistic simulation of the combustion process
http://www.engines.polimi.it
Combustion models for SI Engines
Experimental validation: optical pre-chamber engine
Computed vs experimental burned volume
Effect of air/fuel ratio at 1000 rpm
Effect of engine speed
http://www.engines.polimi.it
COMBUSTION MODELS
Diesel
http://www.engines.polimi.it
Diesel combustion
Complex process involving:
Detailed fuel chemistry (auto-ignition, pollutant
formation)
Spray evolution
Multi-component fuels
Turbulence-chemistry interaction
Implemented approaches:
CTC (reduced chemistry)
Well-mixed model (detailed chemistry)
Flamelet-combustion models (detailed chemistry)
http://www.engines.polimi.it
Diesel combustion: CTC model
Characteristic time-scale combustion model
11 chemical species (fuel, O2, N2, CO, CO2, H2O, O, OH, NO, H,
H2)
Auto-ignition computed by the Shell auto-ignition model;
turbulent combustion simulated accounting for both laminar
and turbulent time scales:
Yi a Yi ,Shell 1 a Yi ,CTC
Temperature threshold to switch between auto-ignition (a=1)
and turbulent combustion (a=0).
http://www.engines.polimi.it
Diesel combustion: CTC model
Validation: passenger-car, common-rail engine
Bore
85 mm
Stroke
88 mm
Compression ratio
~15
Operating conditions:
Full load with post-injection to reduce soot
Medium high load with:
Variable EGR rate
Three injection events (pre, main, post)
Models:
Modified Huh-Gosman for atomization. Diesel fuel approximated as C12H26
CTC+Shell for combustion. C12H26 Shell-model constants proposed by Reitz.
http://www.engines.polimi.it
Diesel combustion: CTC model
Cylinder pressure validation at full load
Full load,
single
injection,
No EGR
100%
0%
EGR
Qpil Qmain Qpost
http://www.engines.polimi.it
Diesel combustion: CTC model
Soot emissions, full load
Post-injection
on soot
Effect of effect
post injection
onemissions
soot-emissions
Non dimensional soot
Measured
Computed
0.9
0.8
0.7
0.6
0.5
0
Mass of fuel in the post-injection [mg/stroke]
http://www.engines.polimi.it
Diesel combustion: CTC model
Cylinder pressure validation at mid-load
Mediumhigh load,
0% EGR
3 injections
2300 rpm
imep = 10.5 bar
100%
0%
EGR
Qpil
Qmain Qpost
http://www.engines.polimi.it
Diesel combustion: CTC model
Cylinder pressure validation at mid-load
Mediumhigh load,
34% EGR
3 injections
2300 rpm
imep = 10.5 bar
100%
0%
EGR
Qpil
Qmain Qpost
http://www.engines.polimi.it
Diesel combustion: CTC model
Soot emissions, medium-high load
1
0.8
0.6
Measured
NOx [ppm]
Non-dimensional soot
Injection strategy and external EGR effects on soot and NOx
emissions
Computed
0.4
0.2
0
3.5
19.5
23.5
33.5
(std.)
External EGR [%]
33.5
(adv.)
700
600
500
400
300
200
100
0
Measured
Computed
3.5
19.5
23.5
33.5
(std.)
33.5
(adv.)
External EGR [%]
http://www.engines.polimi.it
Diesel combustion: well-mixed model
Direct integration of complex
chemistry in each computational
cell. Each cell is an homogeneous
reactor and species reaction rates
are computed by means of an ODE
stiff solver:
Yi t t Yi t
*
t t
Wi
Yi t t Yi t
Yi
t
*
dt '
Detailed approach but very time-consuming, mainly when a
realistic mechanism (>50 species) is employed.
http://www.engines.polimi.it
Diesel combustion: TDAC
TDAC: Tabulation of Dynamic Adaptive Chemistry
Combination of mechanism reduction and tabulation techniques
Work developed in collaboration with Dr. F. Contino (Vrije
Universiteit Brussel) and Prof. H. Jeanmart (Univ. of Louvain)
CPU time speed-up compared to
direct-integration is of the order of
n x m (n: number of species, m:
number of reactions) .
Very general approach, flexible with
respect to the mechanism and fuel
composition.
Up to 300 species and 1000
reactions can be used in a
reasonable amount of time.
http://www.engines.polimi.it
Combustion models for SI Engines
chemistryModelPolimi library in Lib-ICE
Developed in
collaboration with
Dr. F. Contino and
Prof. H. Jeanmart.
chemistryModelPolimi
chemistryModel
chemistrySolversTDAC
mechanismReduction
tabulation
DAC, DRG, DRGEP, ..
ISAT
Solvers: dieselFoamAutoRefine, dieselEngineDyMFoam
http://www.engines.polimi.it
Diesel combustion: well-mixed model
Auto-ignition and flame lift-off in SANDIA ECN Spray-A Diesel flame
103 species, 370 reactions mechanism for C12H26 (Sarathi et al.)
Effects of oxygen concentration and ambient temperature: IGN. DELAY
http://www.engines.polimi.it
Diesel combustion: well-mixed model
Auto-ignition and flame lift-off in SANDIA ECN Spray-A Diesel flame
103 species, 370 reactions mechanism for C12H26 (Sarathi et al.)
Effects of oxygen concentration and ambient temperature: LIFT-OFF
http://www.engines.polimi.it
Diesel combustion: well-mixed model
Flame structure in the SANDIA ECN Spray-A Diesel flame
Temperature
OH
Acetylene
BIN1-A
300 species, 8900 reactions mechanism for C12H26 (Ranzi et al.)
http://www.engines.polimi.it
Diesel combustion: well-mixed model
PCCI combustion in an optical engine
PRF30 fueled engine:
ALMR employed to better predict both the
fuel-air mixing process and flame propagation.
Detailed mechanism for PRF fuels oxidation
Air-fuel mixing model validation
7 mm, exp
12 mm, exp
18 mm, exp
7 mm, calc
12 mm, calc
18 mm, calc
Combustion model validation
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Detailed chemistry and turbulence-chemistry interaction
Multiple unsteady flamelets: a set of unsteady diffusion
flames represents Diesel combustion.
First model towards the definition of a generic model for
partially-premixed combustion
CFD
Code
~
T x
~
~
H x hi Yi x
~
H x
1
~
Z x , Z ''2 x
~
~
Yi x , t f z ; x , t Yi , t d
0
~
Yi Z , t
~st , p
Flamelet
Code
Flamelet Equations
Yi Z 2Yi
Y
2
t
2 Z
hs Z 2 hs
qchem
2
t
2 Z
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Detailed chemistry and turbulence-chemistry interaction
CFD domain: transport equations are solved for mixture fraction Z
and variance Z2 , momentum, mass, enthalpy h.
Flamelet domain takes the average scalar dissipation rate
conditioned on the stoichiometric mixture fraction (st) and use it
in the flamelet equations for mass and energy in the mixture
fraction space.
Possibility to use multiple flamelets, with two possible criteria for
division: mass or scalar dissipation rate.
N
f 1
Chemical composition in CFD cells: Yi x I f x Yi , f Z pZ dZ
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Implementation of a flamelet combustion model
Use of any pre-implemented capability to exploit the entire
potentialities that are offered by the OpenFOAM technology:
Chemistry model + in-house developments (ISAT, DAC, )
Thermodynamics
Parallelization using existing domain decomposition
techniques.
Pre-implemented functions (average, integration, matrix
algebra) to solve flamelet equations and to exchange data
between the phase space and the physical domain.
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Implementation of a flamelet combustion model
regionModel approach for flamelet combustion models:
Flamelet mesh, representing the Z space
Flamelet equations (species and enthalpy) solved on the
flamelet mesh, relying on native OpenFOAM matrix algebra
and ODE solvers.
PDF averaging:
Standard OpenFOAM functions (integration, averaging)
applied on the flamelet mesh, that requires accurate
grading at the Z = 0 and Z = 1 boundaries.
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
flameletCombustionModels library in Lib-ICE
flameletCombustionModels
flameletCombustionModel
Abstract class
Implementation of Representative
Interactive Flamelet Model
RIF
scalarDissipationRate
scalarDissipationRate
Peters
Operations to compute scalar
dissipation rate (st, (Z))
pdfFunctions
Solver: RIFdieselFoam
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
Flamelet mesh
The grid is refined at the boundaries (Z=0, Z=1), to correctly integrate the PDF
function in presence of high mixture fraction variances, as suggested by Liu et al.
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
Flamelet
mesh
Initial conditions in the
flamelet domain:
Temperature in Z-domain
Species in the Z-domain
Temperature in
Z-domain
Species
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
Flamelet
mesh
Temperature in
Cool flame Z-domain
Scalar
dissipation
rate
Species
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
Flamelet
mesh
Scalar
dissipation
rate
Main ignition
Temperature in
Z-domain
Species
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
t = 0.9 ms
Flame
structure in
CFD domain
computed at
steady state
conditions
Mixture fraction
Stoichiometric scalar
dissipation rate
Mixture fraction variance
Temperature
http://www.engines.polimi.it
Diesel combustion: unsteady flamelets
Simulation: SANDIA ECN Spray H flame (n-heptane)
2
1.2
1.5
Exp.
amb= 14.8 kg/m3
1
0.5
amb= 30 kg/m3
Ignition delay [ms]
Ignition delay [ms]
Calc.
0.9
Calc.
Exp.
0.6
0.3
0
12
16
20
24
Oxygen concentration [%]
800
1000
1200
1400
Ambient temperature T [K]
http://www.engines.polimi.it
Acknowledgments
Ing. Rita Di Gioia, Ing. Giovanni Bonandrini, Ing. Mario
Picerno, Ing. Luca Venturoli, Magneti Marelli, Bologna.
Dr. Francesco Contino, Vrije Universiteit Brussel.
Ing. Marco Fiocco, Politecnico di Milano.
Paolo Colombi, MSc. Student, Politecnico di Milano
Dr. Luigi Allocca, Dr. Alessandro Montanaro, CNRIstituto Motori
http://www.engines.polimi.it
Thanks for your
attention!
http://www.engines.polimi.it
https://twitter.com/ICEPoliMi/
http://www.engines.polimi.it