3.3 The ‘Not state determined’ library
3.3.5 ICE in-cylinder combustion process
3.3.5.1 Combustion reaction and chemical equilibrium
CHAPTER THREE
116
(a) (b)
Fig. 3.60. Simulink® model of the pump (a) and block dialog mask (b).
ALIBRARY OF MODELS FOR THE DYNAMIC SIMULATION OF ENERGY SYSTEMS
117
α
stϕ = α
(3.119)A great number of product species n can be considered for combustion processes (The CEC code developed by NASA can consider up to 400 species [42]) however, to keep the system complexity to a reasonable degree, the only dissociation reactions reported below are considered:
CO2↔CO+½O2
H2O↔H2+½O2
OH↔½O2+½H2
HO↔½O2+½N2
½O2↔O
½N2↔N
½H2↔H
This leads to considering that the following 11 as products of the combustion reaction:
Carbon Dioxide: CO2;
Carbon Monoxide: CO;
Water: H2O;
Molecular Hydrogen: H2;
Molecular Oxygen: O2;
Molecular Nitrogen: N2;
Hydroxide: OH;
Nitric oxide: NO;
Atomic Hydrogen: H;
Atomic Oxygen: O;
Atomic Nitrogen: N;
It has also been assumed that the system is closed (neither heat nor mass transfer occurs) and that the combustion reaction is complete, meaning that all the fuel reacts with the oxidizer to form products.
The chemical equilibrium is invoked by applying the second law of thermodynamics, thus maximizing the entropy of the products mixture, or equivalently minimizing the Gibbs free energy G, defined as [43]:
G=H-TS (3.120)
For a generic reactant system:
aA+bB+…↔eE+fF+… (3.121)
the chemical equilibrium is given by the following equation:
CHAPTER THREE
118
0 0 0
0 0
...
...
T
u
f e e f
G R
a b
a b
p p
p p
e
p p
p p
−∆
=
(3.122)
where pi is the partial pressure of the ith specie and the standard-state Gibbs function change ∆GT0 is defined as following:
( )
0 0 0 0 0
, , ... , , ...
T f E f F f A f B T
G eg fg ag bg
∆ = + + − − − (3.123)
The standard state is defined, according to IUPAC standards, by a pressure p0=100kPa [44]. The reference temperature Tref=298K has been chosen according to the CHEMKIN database [45], which was used as reference for all the thermodynamic state variables of interest.
The equilibrium composition of the mixture at a given temperature and pressure, according to the assumptions made, is determined by the following 12 unknowns:
2, , 2 , 2, 2, 2, , , , , , N
CO CO H O H O N OH NO O N H prod
X X X X X X X X X X X (3.124)
where Xi is the molar fraction of the ith specie, and Nprod is the total number of moles.
These 12 unknowns are determined solving the following non-linear system of 12 equations:
ALIBRARY OF MODELS FOR THE DYNAMIC SIMULATION OF ENERGY SYSTEMS
119
0 0
2 2
2
0 2
2 2
2
0
2 2
0
2 2
2
1 2
1 1
2 2
1 1 1
2 2 2
1 1 1
2 2 2
1 2
fCO fCO
fH O
fOH
f NO
g g
CO O RT
CO atm
g H O RT
H O atm
g H O RT
OH atm
g N O RT
NO atm
O
at O
X X p
X p e
X X p
X p e
X X p
X p e
X X p
X p e
X p
X p
−
−
−
−
−
⋅
⋅ =
⋅
⋅ =
⋅
⋅ =
⋅
⋅ =
⋅
0
0
2
0
2
2
2 2 2
2 2
2 1 2
1 2 1
2
1 2 1
2
2 2
2 2
2 2
fO
f N
fH g RT
m
g N RT
atm N
g H RT
atm H
C
CO CO
prod
O
CO CO H O O OH NO O
prod
H
H O H OH H
prod
N
N NO N
pro
e
X p
p e X
X p
p e X X X n
N
X X X X X X X n
N
X X X X n
N
X X X n
N
−
−
−
=
⋅ =
⋅ =
+ =
+ + + + + + =
+ + + =
+ + =
2 2 2 2 2 1
d
CO CO H O H O N OH NO O N H
X X X X X X X X X X X
+ + + + + + + + + + =
(3.125)
where the first 7 equations represent the chemical equilibrium of the considered dissociation reactions, while the last 5 equations represent respectively: the conservation of the total number of carbon atoms;
the conservation of the total number of oxygen atoms; the conservation of the total number of hydrogen atoms; the conservation of the total number of nitrogen atoms and the conservation of mass.
From Dalton’s law that for the ith specie of a mixture it can be also written:
i i
X p
= p (3.126)
where p is the total pressure of the mixture.
The analytic solution of non-linear systems of algebraic equations is generally impossible, thus a numerical approximate solution is necessary.
CHAPTER THREE
120
Scope of the analysis, besides determining the actual gas composition during the combustion process, is also to determine the in-cylinder thermodynamic state.
The whole combustion phase of the engine can be split in a series of discrete constant volume combustions, where the volume at each step is determined by the crank-piston correlation.
The adiabatic flame temperature is determined by applying the first law of thermodynamics, that, for an isolated constant-volume system can be written in the following form:
Ureact(Ti,V)=Uprod(Tad,V) (3.127)
Under the assumption that every product of combustion can be considered as an ideal gas, Eq. (3.127) can be rewritten for Tad as:
( ) ( )
0 0
i f ,i p ,i i ref j f , j p , j ref react 0 i
react prod
ad
j p , j prod 0 prod
N h c T T N h c T N R T
T N c N R
+ − − + − −
= −
∑ ∑
∑
(3.128)The constant pressure specific heat has been considered a function of the sole temperature; a mean value has been used, determined at a mean temperature between the initial and the adiabatic flame temperature:
i ad
T T
T 2
= + (3.129)
The error made considering the specific heat as a constant value in Eq.(3.128) is very small, while the equation itself is notably simplified, resulting in a greater simplicity of the program and a lower computational load.
It can be noted however from Eq.(3.128) that the adiabatic flame temperature depends on the chemical composition of the system. However, from (3.125), it can be observed that in turn the equilibrium chemical composition depends on the adiabatic flame temperature, since the molar Gibbs function of the ith specie g0fi( )T is a function of the temperature. An iterative procedure is then required, starting from a given initial guess value for the adiabatic flame temperature. Moreover, the numerical solution of the non-linear system of equations (3.125) requires itself another initial guess value of the equilibrium composition of the products. Therefore the program uses two iterative procedures, which make the real-time on-line running of the program not feasible, even if computational load and the running real-time were as low as possible. The program for the solution of the combustion process therefore could not have been employed directly into the in-cylinder combustion block due to high computational time but will be employed in a pre-processing operation to derive characteristic maps that cover wide operational conditions that will be in turn introduced into the model, reliving it from the two combined iterative solution procedures.
Starting from the initial guess of the adiabatic flame temperature, the equilibrium composition of the system is determined by solving the non-linear system of equations (3.125); using this composition,
ALIBRARY OF MODELS FOR THE DYNAMIC SIMULATION OF ENERGY SYSTEMS
121 Eq.(3.128) is applied and a new final temperature is calculated. This calculated temperature is then compared with the previous one used for the determining the equilibrium composition; the process is then repeated until the difference between these two values is equal or less than a user-set value (default is 1K). The initial and final volume (in case of constant pressure combustion) or pressure (in case of constant volume combustion) of the system is determined using the equation of state of ideal gases.
pV =NR T0 (3.130)
The numerical solution was obtained utilizing the fsolve function embedded in the Optimization Toolbox contained in the Matlab® environment. fsolve transforms the solving of a non-linear system of equations into a least-squares optimization problem, using the Gauss-Newton [46] and Levenberg-Marquardt [47] algorithms.
The default solving algorithm is the Gauss-Newton one: however this algorithm is implemented into fsolve so that automatically switches to the Levenberg-Marquardt algorithm when either the step length goes below a threshold value (15) or when the condition number of the Jacobian matrix is below 1e-10. The condition number is a ratio of the largest singular value to the smallest. The difference between the two algorithms is the strategy used for the determination of the next point of function evaluation;
while the Gauss-Newton method uses a line search strategy, the Levenberg Marquardt algorithm uses a trust-region method.
The main problem when using approximate numerical solutions lies in the need for initial values of the unknowns, which must be not too different from the real solution if a good convergence is to be achieved.
The Gauss-Newton method implemented into fsolve has proven to be able to solve the non-liner system of equations in a wide range of temperature values: however, it has been found that it is very difficult to find a solution of the system for temperatures of less than 750K for which there is very little if no dissociation at all. In this temperature range, to avoid numerical problems due to the bad conditioning of the problem, only two dissociation reactions were considered, eliminating those reactions that did not yield almost any product. The considered reactions were:
CO2↔CO+½O2
H2O↔H2+½O2
The non-linear system of equations describing the chemical equilibrium condition is then reduced to:
CHAPTER THREE
122
0 0
2 2
2
0 2
2 2
2
2
2 2 2
2 2
2
2 2 2 2 2
1 2
1 1
2 2
2 2
2 2
2
1
fCO fCO
fH O
g g
CO O RT
CO atm
g H O RT
H O atm
C
CO CO
prod
O
CO CO H O O
prod
H
H O H
prod
N N
prod
CO CO H O H O N
X X p
X p e
X X p
X p e
X X n N
X X X X n
N
X X n
N X n
N
X X X X X X
−
−
−
⋅
⋅ =
⋅
⋅ =
+ =
+ + + =
+ =
=
+ + + + + =
(3.131)
The results obtained from the program were validated by comparing them with the data obtained with the TPEQUIL software [43], which is based on the algorithms developed by Olikara and Borman [48], and considers the same 11 species considered here (3.124).
Fig. 3.61 and Fig. 3.62 show the comparison between the developed program results and the TPEQUIL data. As can be noted, the data corresponds perfectly, and the realized Matlab® program is capable of finding the correct solution even for extremely lean mixtures (φ≤0.2), for which the adiabatic flame temperature is lowest. The only major difference is found for the molar fraction of the monoatomic hydrogen H, which, when present, is higher than the one obtained with the TPEQUIL program.
Fig. 3.61. Validation of the code (lines) by comparison with data obtained with TPEQUIL (dots): major species molar fractions at different values of the equivalence ratio. The chart data refers to constant volume
Methane (CH4) combustion; starting temperature Ti is 298 K and starting pressure pi is 101325 Pa.
ALIBRARY OF MODELS FOR THE DYNAMIC SIMULATION OF ENERGY SYSTEMS
123 Fig. 3.62. Validation of the realized code (lines) by comparison with data obtained with TPEQUIL (dots):
minor species molar fractions at different values of the equivalence ratio. The chart data refers to constant volume Methane (CH4) combustion; starting temperature Ti is 298 K and starting pressure pi is 101325 Pa.