Modeling internal combustion engines using the OpenFOAM® library
Transcript of Modeling internal combustion engines using the OpenFOAM® library
Modeling internal combustion engines using the OpenFOAM® library
T. Lucchini, A. Onorati, G. D’Errico, M. Fiocco G. Montenegro, A. Della Torre, L. Nocivelli
Politecnico di Milano, Department of Energy
GROUPPOLITECNICO DI MILANO
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
Background
Internal combustion engines development will never stop
Efficiency increase Pollutant control
Heat
recovery
Downsizing After-
treatment
Alternative
fuels
Direct
injection
Combustion
systems
2
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
3
Background
Internal combustion engines are complex
Advanced tools are necessary • Experiments – optical measurements
• Models – computational fluid dynamics
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
4
Requirements
1) Support for complex geometries and automatic mesh generation
2) Fast and reliable for engine development
3) Accurate and advanced for diagnostic purposes
4) Customizable to include new features
Which CFD code for IC engines?
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
• Ready to use CFD code
Applications and model state of the art available for CFD
heat transfer, aerodynamics, compressible/incompressible flows, multi-phase…
Automatic polyhedral mesh generation
• Open-source
Research in collaborative environment
Code customization
• Object-oriented C++
Generic programming
Easy development of new models (classes) and applications (solvers)
5
Which CFD code for IC engines? OpenFOAM®
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
• Ready to use CFD code
Applications and model state of the art available for CFD
heat transfer, aerodynamics, compressible/incompressible flows, multi-phase…
Automatic polyhedral mesh generation
• Open-source
Research in collaborative environment
Code customization
• Object-oriented C++
Generic programming
Easy development of new models (classes) and applications (solvers)
void kEpsilon::correct()
{
solve
(
fvm::ddt(k)
+ fvm::div(phi, k)
- fvm::laplacian(nu() + nut, k)
==
nut*magSqr(symm(fvc::grad(U)))
- fvm::Sp(epsilon/k, k)
);
}
class kEpsilon
:
public turbulencModel
{
volScalarField k_;
void correct();
kk
kkt
k T
tt
0
0
2
2
1
uuu
class turbulenceModel
{
volScalarField mut_;
virtual void correct() = 0;
6
Which CFD code for IC engines? OpenFOAM®
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
Pre-Processing In cylinder flows & combustion After-treatment
Automatic mesh generation Gas exchange, fuel air mixing SI, CI, PCCI, HCCI combustion
After-treatment modeling SCR, DPF TWC, DOC
OpenFOAM at Polimi (Lib-ICE)
7
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
8
MESH 1
XXX CA YYY CA
MESH 2
YYY CA ZZZ CA
02 u
toldnew uxx
FV motion solver and/or topological changes
Mesh management for engine simulations
pistonLayer
{
type layerAdditionRemoval;
faceZoneName pistonLayerFaces;
minLayerThickness 0.0001;
maxLayerThickness 0.0012;
thicknessFromVolume 1;
oldLayerThickness 0.00102205;
active true;
}
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
9
1) Generation of multiple meshes2) Definition of a template case
3) engineCaseSetUp utilitycase
constant
init
system
case0300
case0320
……
case0720
case1440
……
dataOutput
4) runMultiCycleCasesolverName simpleColdSpeciesEngineDyMFoam;
startTimes
(/* list of startTime for each mesh */);
endTimes
(/* list of endTimes for each mesh */);
writeInterval
(/* list of writeInterval for each mesh */);
parallelRun on;
Bottleneck is mesh generation 1) CAD-based grid generators
• High amount of user time and experience, possibility to introduce errors
2) Automatic mesh generators: what is the best strategy?
• Fit to geometry boundary, oriented to main flow features
Solution: dedicated algorithms for automatic mesh generation of IC engines
Engine simulation workflow
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
10
Automatic mesh generation
Combustion chambers for Diesel Engines
Input data: • Piston bowl points • Injection angle
A pyhton program automatically recognizes the points on the STL and does the morphing of a template blockMesh to the geometry
Fully-hexaedral spray-oriented mesh
Spray-combustion simulations in a spray-oriented grid
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
11
Automatic mesh generation
snappyHexMesh Geometry-oriented BlockMesh STL + data
Full-cycle for Direct-injection engines
• A python program automatically recognizes the direction of ducts, cylinder and valves and writes the blockMeshDict
• snappyHexMesh is then run using the geometry-oriented background mesh
• The user provides combustion chamber geometry and data (bore, stroke, valve lifts)
0
2.5
5
7.5
10
0 180 360 540 720
Lift
[mm
]
Crank Angle [deg]
Exhaust
Intake
Bore 80 mm
Stroke 60 mm
Conrod 160 mm
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
12
Automatic mesh generation
Automatic generation of a geometry-oriented blockMesh
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
13
In-cylinder flows: TCC Engine
Computed flow field during the intake stroke
Acknowledgments: ECN, Prof. D. Reuss and Prof. V. Sick (University of Michigan)
0
50
100
150
200
250
360 420 480 540 600 660 720
Spe
cifi
c ki
ne
tic
en
erg
y [k
J/kg
]
Crank Angle [°]
Experimental
Coarse mesh
Fine mesh (1st ord.)
Fine mesh (2nd ord.)
0
10
20
30
40
50
60
70
80
90
100
360 420 480 540 600 660 720
RM
S o
f k
ine
tic
en
erg
y [k
J/k
g]
Crank Angle [°]
Experimental
Coarse mesh
Fine mesh (1st ord.)
Fine mesh (2nd ord.)
(a)
(b)
Flow at 450 CAD Exp. Calc.
Mesh details Validation
420 CAD
460 CAD
490 CAD
510 CAD
540 CAD
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
14
In-cylinder flows: GDI engine
Acknowledgments: Dr. Vaglieco, Ing. Sementa (CNR-IM)
180 CAD BTDC
65 CAD BTDC
13 CAD BTDC
Velocity CO2 (range: 0-0.03)
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
15
In-cylinder flows: GDI engine
460 CAD 500 CAD 540 CAD 580 CAD 600 CAD 640 CAD
Flow
Residual CO2 (EGR)
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
16
Spray modeling
Fuel-air mixing simulation in direct-injection engines
New sub-models for multi-hole nozzles
• Injection: Huh, Reitz-Bracco, Nurick • Atomization : Huh-Gosman, Bianchi • Breakup: KHRT • Wall-interaction: Bai and Gosman,
Stanton and Rutland • Evaporation: based on Spalding mass
number
We > 2600・La-0.18We > 5.0We < 5.0
Wall-film model (finite-area)
• Mass, momentum and energy equations for the liquid film solved on mesh boundary.
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
17
Spray modeling: validation
Evaporating spray in constant-volume vessel ECN Spray-A, non-reacting conditions. Fuel: n-dodecane
ramb = 22.8 kg/m3; Tamb = 900 K; pinj = 150 MPa
Acknowledgments: Sandia Engine Combustion Nework (ECN) 2d axy symmetric mesh
20 25 30 35 40 45 50
Mixture fraction
0 0.2
Exp.
Distance from injector [mm]
Calc.
10
5
0
-5
-10
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
18
Spray modeling: validation
GDI spray from multi-hole nozzle
0
20
40
60
80
100
0 0.2 0.4 0.6 0.8 1 1.2
Pe
ne
trat
ion
[m
m]
Time ASOI [ms]
Exp. 100 bar Calc. 100 bar
Exp. 150 bar Calc. 150 bar
Exp. 200 bar Calc. 200 bar
0
20
40
60
80
100
120
140
160
0 50 100 150 200 250
SMD
[mm
]
Injection pressure [bar]
Data Set 1, Min
Data Set 1, Max
Data Set 2
Computed
pinj [bar]
mfuel [mg/shot]
tinj [ms]
100 48.1 3.70
150 50.5 3.00
200 50.4 2.66 Acknowledgments: Dr. Allocca, Ing. Montanaro (CNR-IM)
Calc.
Exp. t = 0.3 ms t = 0.5 ms t = 0.7 ms
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
19
GDI engine simulations Full-cycle simulation of GDI engines: spray and wall film evolution
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
20
GDI engine simulations
• Spray targeting optimization • Identification of sources of soot formation
(rich mixture pockets or wall-film)
Acknowledgments: Ing. Di Gioia, Dr. Bonandrini, Ing. Venturoli (Magneti Marelli)
0.6
0.65
0.7
0.75
0.8
0.85
0.9
0.95
1
450 495 540 585 630 675 720
Ho
mo
gen
eit
y in
dex H
. I.
Crank angle
Injector 1
Injector 2
Operating point 1, 1500 rpm
0.0
0.1
0.2
0.3
0.4
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2
Den
sit
y f
un
cti
on
Relative air/fuel ratio l
Injector 1
Injector 2
This work was sponsored and carried out in collaboration with
Full-cycle simulation of GDI engines
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
Spark-ignition combustion
Comprehensive combustion model
Understanding the complex interplay between ignition-system, local flow, turbulence, air/fuel ratio…
Design and development of more efficient combustion systems
21
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
22
Spark-ignition combustion
Lagrangian particles for the spark-channel
Flame kernel equations
dt
dp
pdt
dT
TA
VSS
dt
dr k
kk
kplasmat
k
uk 11
r
r
dt
dp
ccm
QTT
m
m
dt
dT
pbpp
effspk
bp
p
pp
r
1
Rp Rs
Lp LsSpark
gap
ri
Ti (>10000 K) Tu (300-600 K)
Qel
Comprehensive combustion model Electrical circuit model
Initial thermal transient
cell
N
i
ii
spkV
Sf
1
Flame surface density
k
it
t
ii
i PDPxScScxx
u
t
mmrr
Coherent flamelet model (CFM) for combustion
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
23
Spark-ignition combustion
0
0.4
0.8
1.2
1.6
2
0 0.2 0.4 0.6 0.8 1
En
fla
mm
ed
vo
lum
e [
cm
3]
Time after spark [ms]
Calc., 1000 rpm, l = 1.0
Calc., 1000 rpm, l = 1.0
Exp., 1000 rpm, l = 1.0
Exp., 1000 rpm, l = 1.0
l
l
l
l
Peripheral
Central
Validation: Herweg and Maly engine
0
0.4
0.8
1.2
1.6
2
0 0.2 0.4 0.6 0.8 1
En
fla
mm
ed
vo
lum
e [
cm
3]
Time after spark [ms]
Calc., 1000 rpm, l = 1.0
Calc., 300 rpm, l = 1.0
Calc., 1250 rpm, l = 1.0
Exp., 1000 rpm, l = 1.0
Exp., 300 rpm, l = 1.0
Exp., 1250 rpm, l = 1.0
l
l
l
l
l
l
Flow field, flame propagation and plasma temperature details
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
24
Diesel combustion
Objectives
• Provide a complete library of combustion models for Diesel engines using OpenFOAM technology:
Simplified models with reduced chemistry for engine design
Detailed models for advanced combustion modes and diagnostic purposes
Reduced chemistry Detailed chemistry
Characteristic-Time scale (CTC) Well stirred reactor model
Multiple Representative Interactive Flamelet Eulerian Transported PDF
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
25
Diesel combustion: CTC
Characteristic time-scale model
• Shell model (auto-ignition) + Eddy Dissipation Concept (mixing-controlled combustion). Emission sub-models: soot and NOx.
Bore 85 mm
Stroke 88 mm
CR ~15
0.5
0.6
0.7
0.8
0.9
1
0 1 3 5 7 9
No
n d
ime
nsi
on
al s
oo
t
Mass of fuel in the post-injection [mg/stroke]
Effect of post injection on soot-emissions Measured
Computed
Full-load conditions: soot emissions control
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
26
Diesel combustion: CTC
Characteristic time-scale model
• Shell model (auto-ignition) + Eddy Dissipation Concept (mixing-controlled combustion). Emission sub-models: soot and NOx.
Part-load conditions: improving soot-NOx trade-off
0
0.2
0.4
0.6
0.8
1
3.5 19.5 23.5 33.5 (std.)
33.5 (adv.)
No
n-d
ime
nsi
on
al s
oo
t
Measured
Computed
0
100
200
300
400
500
600
700
3.5 19.5 23.5 33.5 (std.)
33.5 (adv.)
NO
x[p
pm
] Measured
Computed
External EGR [%] External EGR [%]
EGR = 0% EGR = 30%
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
27
Diesel combustion: detailed kinetics
Well-mixed model
Each cell is a homogeneous reactor: assumed d-pdf for temperature and composition
mRIF model
Eulerian-Field PDF
Chemistry acceleration • TDAC: combination of on-line tabulation and
mechanism reduction algorithms • Multi-Zone CCM: on-line tabulation based on
specified parameters (T, Z, …)
xH~
pjst ,~,
xT~ xYhxH ii
~~CFD
domain
xZxZ 2'',
~
Flamelets tZY ij ,
~,
dpYMYZ
ij
N
j
ji
f
1
0
,
1
~~
jM
Diesel spray combustion can be represented by a set of unsteady diffusion flames
1
2
3
Nf
……
……
……
Y11, Y2
1,…, YM1, T1
Y12, Y2
2,…, YM2, T2
Y1N, Y2
N, …,YMN, TN
Y13, Y2
3,…, YM3, T3
p(Yi)
……
……
……
Acknowledgments: Dr. Contino (VUB Bruxelles), Dr. Jangi (Lund University of Technology)
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
28
Diesel combustion: detailed kinetics
1 2 3 Model comparison on constant-volume diesel combustion experiments:
1) Well-stirred reactor
2) Eulerian-Field PDF
3) Multiple Representative Interactive Flamelets
Identification of the best approach for the combustion problem to be studied
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
Diesel combustion: well-mixed
PCCI combustion
347 mm, exp 12 mm, exp 18 mm, exp
7 mm, calc 12 mm, calc 18 mm, calc
Air-fuel mixing model validation
HCCI combustion
Heavy-duty optical engine (SANDIA) operating with PRF30 fuel.
Medium-duty engine operating at low-load with iso-octane fuel.
29 Acknowledgments: Dr. Contino (VUB Bruxelles)
5 CAD 8 CAD
11 CAD 13 CAD
Fuel-air mixing and PCCI flame propagation process
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
30
Diesel combustion: mRIF
0
1
500 2300
bm
ep
/bm
ep
ma
x
Engine speed [rpm]
O.P. 1
O.P. 2
O.P. 3
Cyl. 6
B x S 128 x 144 mm
CR 16.5
SR 1.4
Max pinj 1600 bar
Heavy-duty Diesel engine (collaboration with )
-20 0 20 40
Crank Angle [ ]
-20 0 20 40
Crank Angle [ ]
0
30
60
90
120
150
180
210
-50 -25 0 25 50
Cyl.
Pre
ssu
re [
bar]
Crank Angle [ ]
#1, Exp.
#1, Calc.
#2, Exp.
#2, Calc.
#3, Exp.
#3, Calc.
0
100
200
300
400
-20 0 20 40
Heat
rele
ase r
ate
[J/
]
Crank Angle [ ]
• Validation on three relevant points including pilot injections.
• 30 flamelets for the main injection event.
• N-dodecane kinetics used to represent diesel fuel.
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
31
After-treatment
Contributions
1) Full-scale simulation of after-treatment devices 2) Modeling of surface chemistry in washcoats 3) Spray, wall-film and wall cooling for SCR systems
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
32
SCR modeling: injection of AdBlue
*T
K
Thermal
Breakup
Deposition Splash
Rebound
• Multicomponent liquid mixture customized properties for Urea along with multi component liquid film
• Temperature dependence of the spray-wall interaction and wall cooling effect
Cold wall
Hot wall
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
33
Reacting flows in porous media
From micro-scale to full scale simulation of after-treatment systems
Reconstruction of micro-scale geometry
Fluid-structure simulation of the microporous structure and generation of look-up tables
From micro-scale to macro-scale approach
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
34
After-treatment: DPF
EX80-
100/17 EX80-
200/14
DPF steady-state simulation DPF thermal transient
t = 1.5 s
t = 10 s
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
35
After-treatment: surface chemistry 773 K
573 K
473 K
Figure 11: Foam-type reactor, sample E: CO field inside the channel for an inlet CO mass fraction YCO = 4.6% and a feed flow rate Q =
3000Ncc/ min.
101
Q 105 ·m3/ s
10− 1
100
k m[m
/s]
foam A (YCO 3 %) - CFD
foam A (YCO 3 %) - measured
foam A (YCO 1 %) - CFD
foam A (YCO 1 %) - measured
foam D - CFD
foam D - measured
foam E - CFD
foam E - measured
Figure 10: Foam-type reactor: mass-transfer coefficients for different
foam samples.
surface, which are responsible for its mass transfer to-
wards the reaction region. It can be seen in Figures 12
and 13 that CFD simulations give a reasonable predic-
tion of the light-off curve, describing thetransition from
akinetic-controlled to a diffusion-controlled process.
The CO conversion at high temperature is correctly
predicted while an overestimation of the light-off tem-
perature with respect to the measurements can be ob-
served, in particular for the lower CO concentration.
Thiscan beexplained considering theassumption, made
in the simulations, of uniform temperature distribution
on the foam catalyst surface. Actually, this assumption
doesnot describeaccurately theexperimental condition
under which measurements were performed. As a mat-
ter of fact, on thecontrary of theplate-type reactor con-
400 500 600 700 800T [K]
0
20
40
60
80
100
CO
conver
sion
[%]
CFD (YCO 3 %)
measured (YCO 3 %)
CFD (YCO 5 %)
measured (YCO 5 %)
Figure 12: Foam-type reactor, sample E: CO conversion for an inlet
feed flow rate Q = 3000Ncc/ min.
figuration, the foam-typeonedoesnot allow an efficient
removal of the heat from the catalytic surface. There-
fore, the temperature of the catalyst is expected to be
higher than the temperature measured in the front of
the foam, where the thermocouple is located. For this
reason, the computed light-off curve is shift towards a
higher temperature, if compared to the measured one.
Moreover, it can be seen that, at the light-off tem-
perature, when the conversion is reaching its maxi-
mum value, the curve exhibits a smooth transition from
kinetic- to diffusion-controlled CO conversion. As a
matter of fact, the present model does not include a
pore-diffusion sub-model, therefore a sharp transition
should beexpected in this region. However, in this case
the explanation for the smoothness of the curve can be
8
• Mass transfer limit regimes allows to validate the model and extract information for design purposes
GAS
WASHCOAT
SUBSTRATE
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
36
Waste heat recovery
• Fully integrated real gas thermodynamics: Helmoholtz theory ad multi region CHT
• Customized classes to handle single and multi region mesh motion for volumetric machines
Simulation of volumetric machines
Volumetric expander Stirling engine
Scroll compressor
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
37
Conclusions
• OpenFOAM is the ideal platform for simulation of IC engines:
Implementation of detailed models to simulate thermal and fluid dynamic processes in all the relevant engine components (cylinder, intake, exhaust)
Development of CFD methodologies to be successfully applied for engine design and optimization.
• Continuous development of OpenFOAM technology (and Polimi libraries…) offers solutions which can support design of cleaner and more efficient Internal Combustion Engines.
www.engines.polimi.it
GROUPPOLITECNICO DI MILANO
2day meeting announcement
The ICEG of Politecnico di Milano is pleased to announce the Second Two‐day Meeting on Internal Combustion Engine Simulations Using OpenFOAM® Technology will be held in Milan November 2015.More information on: http://www.engines.polimi.it/2day/index.php