Hydrogen Combustion Engine Project Theory and Usage
Hydrogen Combustion Engine Project Theory and Usage
volumetric
=
M
actual
M
MaxTheoretical
(2.1)
4
CHAPTER 2. GOVERNING EQUATIONS 5
Figure 2.1: Energy Block Overview
m =
o
C
f
A
v
c
o
_
2
1
_
_
P
v
P
o
_
2/
_
P
v
P
o
_
(+1)/
__
1/2
(2.2)
m =
o
C
f
A
v
c
o
_
2
1
_
(+1)/2(1)
(2.3)
c
o
= (RT
o
)
1/2
(2.4)
A
valve
= d
valve
l
V alveLift
(2.5)
2.3 Energy Release model
According to Heywood and Blair, the gas burn can be approximated as a weibe
function [2]. The fuel is initially slow burning before reaching an approximate
steady state, then tapers o as the ame front reaches the walls. The weibe
function is shown in equation 2.6. The values of a and n are determined by
curve tting real world values. A good approximation for these values have been
tted to a weibe function with a = 5 and n = 3 [2].
x
b
() = 1 exp
_
a
_
s
d
_
n
_
(2.6)
is the crank angle and
s
is when burn is initiated.
d
is the duration in
radians that it takes to reach unity. This function will output a value from 0
to 1 indicating the percentage of the mass fraction burned which is assumed to
be equivalent to percentage of energy released. This function allows the model
CHAPTER 2. GOVERNING EQUATIONS 6
to multiply the output by the expected energy to be release giving an energy
addition over the piston movement.
The weibe function before
s
and after
s
+
d
are not 0 and 1 respectively.
Therefore a switch employed to output 0 before the desired combustion start and
1 after combustion completes. It will cycle every 4 radians for each combustion
phase so that at each cycle the system will reset.
2.3.1 Burn Duration
The model includes a burn duration solver which is based on equation 2.7 by
Hires et al. [7]. It is currenly setup with a reference laminar ame speed of
1 and a current input of 1. According to Heywood, the laminar ame speed
should only change when gas composition changes from the ideal sticohometric
air to fuel ratio[2]. For gasoline engines this change of ame speed will not likely
occur because port injection gasoline engines operate near stoichoimetric. For
hydrogen, the air to fuel ratio, , may be adjusted to burn lean rather than
reducing the amount of air in the cylinder to reduce power but this model has
not incorporated this.
ref
=
_
N
N
ref
_1
3
_
U
b,ref
U
b
_2
3
(2.7)
2.4 Heat Transfer Model
The heat transfer model species an internal wall temperature for the heat
transfer and is held constant. The heat transfer is governed by a convection
model and a radiation model based on gas temp and the prescribed wall temp
shown in equation 2.8.
Q = h(T
gas
T
wall
) +C(T
gas
4
T
wall
4
) (2.8)
Using this heat transfer model the coecients for h and C need to be speci-
ed. The radiation coecient for heat transfer, C, is given as a constant depend-
ing on the type fuel delivery [9]. While the convective coecient is calculated
from equation 2.9 [9]. For a port injected engine the constants are A = 0.2,
B = 0.8, C = 4.29E-9 where k is the conductivity coecient for the uid
inside. This gives the heat transfer rate per unit area. The suface area of the
walls are calculated at each timestep to determine the heat transfer. Heat trans-
fer throught the piston and the head is neglected as these are not signicantly
cooled compared to the water jacket for a modern engine.
hD
cyl
k
= ARe
B
(2.9)
The Reynolds number is calculated based on the mean piston velocity. This
is approximated to be the crank oset multiplied by the rotational velocity be-
cause the ideal piston movement case follows approximately a sinusoid pattern.
CHAPTER 2. GOVERNING EQUATIONS 7
However, this introduces slight error to the model but when measured against
actual mean piston velocity, this error is small.
2.5 Fluid Energy Changes
As uid expands or contracts it heats up or cools down based on the work done
on the uid. This means that the uid in the cylinder is always either absorbing
or delivering energy from the crankshaft. The expected method of calculation is
cylinder pressure multiplied by volume change. The nature of the reciprocating
engine is that power is more easily calculated by shaft work as torque multiplied
by in radians/second. This can then be integrated to give total energy on the
uid.
Simple testing conrms that within the model that PV work is identical to
the integral of T .
2.6 Flow Energy
As mass ows into the cylinder it brings energy from the reference environment
and as it leaves it takes energy away from the system based on the thermody-
namic conditions inside cylinder. The power equations for this phenomenon is
shown in equation 2.10 and 2.11. Power is then intergrated to give energy.
P
in
= m
in
u
o
(2.10)
P
out
= m
out
u
cylinder
(2.11)
2.7 Friction
The frictional model is a very complicated set of estimations to nd the frictional
mean eective pressure. This is calculated over the entire cycle which is two
rotations of the crank shaft. This can then be converted to a torque through
equation 2.12. The detailed frictional calculations are found in Appendix A.
FMEP V
swept
4
= T
friction
(2.12)
Chapter 3
Ancillary Governing
Equations
3.1 Crank Position
Based on equation 3.1, input torque is equal to the mass moment of inertia
multiplied by angular acceleration. This is then integrated with an initial value
set by an external constant for initial rotation speed. This is integrated again
with an internal initial value of 0 with a reset at 4 based on a comparator
and a reset input to the integrator. The integrator is reset so that there is an
absolute position for the two revolutions required for a four stroke engine. Note
that at top dead center starting from the intake stroke = 0.
T = I
G
(3.1)
3.2 Piston Position
The piston position block is made up of several smaller blocks that develop
solutions for the vector from the crank center to the piston, the angle of the
connecting rod compared to vertical, as well as piston force resolved to crank
torque. The piston position block also performs some volume calculations.
The vector S is described as the vertical vector from the center of the crank
to the position of the piston directly above. This vector is used to calculate the
current volume[2] and is based on geometry. It is derived from equation 3.2 by
Heywood. The inputs are crank angel along with geometry crank arm length
A and connecting rod length L.
S = Acos + (L
2
A
2
sin
2
)
1
2
(3.2)
The angle between the connecting rod and the vertical is need to calculate
torque. This angle is calculated through equation 3.3.
8
CHAPTER 3. ANCILLARY GOVERNING EQUATIONS 9
= arcsin
A sin
L
(3.3)
The clearance solver in the model determines the swept volume and clearance
volume based on the stroke, piston area, and compression ratio (r) and by using
the following equations:
V
swept
= 2 L
halfstroke
A
piston
(3.4)
V
clearance
=
V
swept
r 1
(3.5)
The maximum position of the piston is when the piston is at top dead center
which corresponds to minimum volume. Therefore, the cylinder volume at an
instant of time can be calculated with equation 3.6.
V = (L +AS) A
piston
+V
clearance
(3.6)
3.3 Piston Force
Piston pressure is resolved to a force by multiplying the pressure by the pis-
ton area. This area is calculated based on the piston diameter but the actual
pressure on the piston is absolute. Therefore the crank case pressure must be
subtracted before being multiplied to give the true piston force.
The torque resolver is a complex block that uses connecting rod angle and
crank angle along with engine geometry to determine the amount of torque
on the crank. It is based on the following equations:
= 90 (3.7)
F
cr
=
F
p
cos
(3.8)
F
T
= F
CR
cos (3.9)
3.4 Internal Energy
Internal energy is the amount of energy a mass has at a prescribed temperature
regardless of pressure. When pressure is considered, it is called enthalpy. Uti-
lizing the National Aeronautics and Space Agency table generator for several
gases, the internal energy for dierent compositions of gas could be found from
the temperature. This project required to do the reverse process of the calcula-
tion mentioned and uses a Newton Rahpson approach for converting the energy
into a temperature.
CHAPTER 3. ANCILLARY GOVERNING EQUATIONS 10
Two major blocks are setup in the simulink model. One is for gasoline and
the other is for hydrogen. Within this major block is a sub block to solve for the
gas composition before combustion and after combustion. This feeds into two
more blocks that take the internal energy and later converted to temperature
based on the gas composition. The function which provides the amount of fuel
burnt is used to blend these results with linear interpolation.
The embedded Matlab code for these blocks is attached in Appendix B
3.5 Pressure
The easiest gas model to work with is the ideal gas model. Since the model
is attempting to manage all energies such as heat transfer and work into the
model it allows a direct calculation to pressure from the ideal gas law relating
pressure and volume to mass and temperature. Unfortunately this causes error
in the pressure calculation because the compressibility of gases diers from one
composition to the next. Comparison to engine pressure data suggests that this
model is acceptable for the projects purpose.
Chapter 4
Existing Models
The project initially focuses on the most basic thermodynamic model of en-
gine operation which is the Otto cycle. Blair suggests the sequence of modeling
geometry, then gas ow, thermodynamics of combustion, gas scavenging, and
nally friction[6]. This approach was slightly modied for the purpose of this
project, with an initial focus on geometry then thermodynamics. The conserva-
tion of momentum of uid near the top of the exhaust stroke causes more uid
to be sucked out of the cylinder and overlapped opening of the intake valve
sucking air and fuel in. This process is called gas scavenging. Gas scavenging
is not included in this model.
4.1 Otto Cycle
The Otto Cycle is the most basic model of a spark ignited combustion process[1].
It ignores the intake and exhaust stroke and concentrates on the compression
and power strokes. There are several major assumptions for this model.
Isentropic process; no heat transfer
Instantaneous heat addition at top dead center
No intake or exhaust loses
Working uid is air even after combustion
State 1 in gure 4.1 is set at atmospheric pressure and the intial volume of
the cylinder. The air is isentropically compresses to state 2 at top dead center
where the V=V
clearance
. Heat is instantaneously added which increases pressure
and temperature to state 3. As the piston moves down, the gas isentropically
expands to state 4 at a higher pressure and temperature. This energy is assumed
to be lost instantly returning to state 1. The area enclosed within the curves
is the net work done. The area below state 1 to 2 is the work input, and area
below state 3 to 4 is work extracted.
11
CHAPTER 4. EXISTING MODELS 12
Figure 4.1: Otto Cycle Pressure Volume Graph
Movement from state 1 to state 5 and back is considered to be the exhaust
and intake state at atmospheric pressure and included only for reference as it
relates to the rst pressure model developed.
4.2 Phased Burn Model
The instantaneous release of energy of the Otto Cycle that causes a sudden
increase of pressure is highly inaccuate. By adjusting the release to happen
over time the pressure more accurately reects the operation in a combustion
engine. This release happens over time using a wiebe function or similar and
produces a pressure versus crank angle graph similar to that shown in gure
4.2.
4.3 More Complex Models
More complex models are available in the form of engine simulators. Lotus En-
gineering Software has created an engine simulator which incorporates various
individual models. These models include mass ow, combustion energy calcu-
lation, energy release, gas composition, heat transfer, scavenging, and frictional
CHAPTER 4. EXISTING MODELS 13
Figure 4.2: Phase Burn Pressure versus Crank angle
models as well as some simple nite element methods for pipes. A single cylin-
der variation of this software with limitations is available for free and a screen
shot is shown in gure 4.3. The high level of development of this model makes
it a reliable source for comparison which will be conducted later.
CHAPTER 4. EXISTING MODELS 14
Figure 4.3: Free Lotus Engine Simulator
Chapter 5
Assumptions and
limitations
The model is based on many assumptions in order to function properly.
Complete burn and energy release
Only reaction fuel oxidization
Gas composition reset at end of cycle
No scavenging eects based on momentum
Constant internal wall temperature
Constant drag set for valves
Constant set for air for valves
Air and fuel completely mixed in cylinder
These assumptions have caused certain limitations. The energy per unit of
mass is set to a constant for air at approximately 300k and as a result the model
cannot be used with increased intake pressure which would result from turbo
charging or supercharging.
In order for the model to reach a steady state of mass ow, an initial mass
and energy is prescribed. The mass ow setup takes care of this aspect but
the energy needs to be reset. As a result the hydrogen model may try to
solve for negative internal energies and cause the simulator to crash. This is a
limitation that normally only occurs with highly constrictive valve designs or
high rotational velocities.
This model utilizes the ideal gas law which is not a very good model when
the gas is not monotonic or a simple mixture.
15
Part II
Hydrogen Combustion
Engine Model
16
Chapter 6
Early Testing
The model was tested throughout the development process to ensure each in-
dividual block works as predicted, as well as working correctly when combined
together. Each block is tested for individual function but when connected to
other blocks there may be unforeseen issues resulting in unpredictable results.
This creates a need for higher level tests to ensure that the model is working
correctly.
6.1 Steady State Operation
The rst step in testing the geometry as a large block is to ensure that at
a constant speed with no torque the mechanism calculates the appropriate live
values such as volume and crank position repeatedly. Since provisions for setting
an initial are incorporated, values for torque and pressure can be disconnected
to give the position graph shown in gure 6.1. The was set to 1 rad/s and
resets after 4 radians. According to the volume graph shown in gure 6.2
with the same time on the x-axis it is seen that the piston cycles from top dead
center to bottom dead center twice before the position resets. This indicates a
working volume calculator.
6.2 Oscillation Test
Testing the dynamics of the model can be facilitated through determining if the
piston will oscillate. Setting the initial to 0 and applying a constant force to
the piston with an initial equal to some value between 0 and should cause
the piston to rotate to the identical position at the upstroke and then fall back
down repeatedly. This does occur and is shown in gure 6.3 meaning that the
component accurately models the mass parts and that the torque resolver is
working correctly. For this test an initial value was set to 0.1 in the integrator
with a resolved pressure of 100kpa on the piston.
17
CHAPTER 6. EARLY TESTING 18
Figure 6.1: steady state position
Figure 6.2: steady state volume
CHAPTER 6. EARLY TESTING 19
Figure 6.3: Oscilation Test
6.3 Running Mark I
At the completion of the Mark I model the results need to fall within the ex-
pected operation since it is well documented and easy to predict. While the
specic energy input is based on example calculations[1], they appear close
to expected values upon comparison to real engines in both Heywoods[2] and
Blairs[6] books respectively.
Shown in gure 6.4 is the crank speed in radians/second and coincides with
the expected results. During the intake stroke, until =, the speed is constant
because crank pressure and atmospheric pressure are both 100kpa resulting in
no net force on the piston. When = the compression process is started and
pressure increase causing the speed to slow down. When =2 there is a jump
in pressure and this causes increased torque speeding up the rotation. During
the exhaust stroke starting when =3 the force is again 0 and there is no speed
change since crank case pressure and atmospheric pressure are the same.
CHAPTER 6. EARLY TESTING 20
Figure 6.4: Model Results
Chapter 7
Complex Testing
Due to the complexity of the model the tests become more generalized in terms of
measuring power outputs, torques, eciencies while adjusting single properties
such as valve size, valve lift, compression ratio, and other geometric valves.
7.1 Pressure Volume Diagrams
The single cylinder model is setup to create pressure versus volume diagrams
along with a pressure versus crank angle diagram. Normal operation at low
to medium speeds (3000RPM) shows a diagram similar to the ones based on
the work of Heywood and Blair and is shown in gure 7.1. The intake and
exhaust curves are visible using a log
10
of the pressure shown in gure 7.2. At
maximum volume the graph trends upward as it compresses and then there is
a pressure spike occurring slightly after top dead center. The pressure trends
downward logarithmically until it reaches a minimum volume. At this point the
valve is set to open sinusoidally. Piston velocity relates to the geometry and
increases at the middle of the exhaust stroke which slightly increases pressure
seen in gure 7.2. Once the system reaches minimum volume again the pressure
decrease below atmospheric. This causes a pressure dierential which holds the
ow of air and fuel relatively steady. After this the cycle repeats in a steady
state. This graph is as expected for a well developed thermodynamic model on
the mass and energy ow combined with energy release.
7.2 Spark Advance
The burn duration increases as the engine speeds up and as a result the spark
needs to be advanced to get the maximum amount of power from the engine.
Several power curves were generated with a constant spark advance for each.
Figure 7.3 shows the overall curves for spark advance with an increment of 3
degrees of advance from 17 to 29 degrees before top dead center.
21
CHAPTER 7. COMPLEX TESTING 22
Figure 7.1: Pressure Volume Diagram
CHAPTER 7. COMPLEX TESTING 23
Figure 7.2: Log Pressure Volume Diagram
CHAPTER 7. COMPLEX TESTING 24
Figure 7.3: Spark Advance Overall
At the lowest RPM in gure 7.4 shows that the power decreases as the spark
is advanced. This results from to much fuel being burnt before top dead center.
It should be noted that the seperation of power increases as spark advance
increase. This indicates that there could be small improvements decreasing the
advance further but it would be fractional compared to the dierence from 20
to 17 degrees advance.
Peak power appears to be achieve somewhere between 23 and 26 degrees of
advance shown in gure 7.5. Beyond this point frictional forces increase and
valving reduces fuel and air intake decreasing power.
At high RPM shown in gure 7.6 the reverse trend compared to the low RPM
is seen. The maximum power is at 29 degrees of advance and minimum is at 17
degrees advance. Again the trending shows that the gains fall o logarithmically
as the advance approaches the ideal spark advance.
7.3 Valve
Some initial testing showed the correct trend for the power curve but it fell o
rather sharply. This could not be attributed to the frictional model but was
found that the energy being released was signicantly lower at higher RPM.
This lead to mass measurements which found that less air and fuel were getting
into the engine at high RPM. This relates to normal operation of an engine.
High eciency engines use 4 valves. This model was setup with two. The valve
diameter was adjusted and measurements were taken at a high RPM. The graph
constructed in gure 7.7 shows the increase of ow area allows more air and fuel
to enter the engine which signicantly increases power ouput. The engine bore
was set to 83mm and while two 50mm valves are almost impossible to t into
this design it is theorized that a hydraulic diameter could be found to equate
CHAPTER 7. COMPLEX TESTING 25
Figure 7.4: Spark Advance Low RPM
Figure 7.5: Spark Advance Peak
CHAPTER 7. COMPLEX TESTING 26
Figure 7.6: Spark Advance High RPM
multiple valves. In a later simulation multiple valves were setup for the Formula
One style engine.
7.4 Compression Ratio
The eciency of an engine should increase as the compression ratio increases [4].
In this test the only aspect that was changed was the compression ratio while
the model was run at a constant speed. From gure 7.8 it can be seen that
power increases steadily as the compression ratio is increased. When measured
against the energy input versus output, an eciency graph was created shown
in gure 7.9. The amount of fuel and air only adjusted minimally while ecieny
trended upward very quickly. A limiting factor of this is that air temperature
can be too high as the air is compressed causing pre ignition which reduces
power since the fuel detonates signicantly before intended. This acts like a
very large spark advance as shown previously and can cause loss of power very
easily.
7.5 HCE Project Versus Lotus
A 500 cubic centimeter engine with similar bore and stroke was setup in both
the HCE project simulator and the freely available single cylinder Lotus en-
CHAPTER 7. COMPLEX TESTING 27
Figure 7.7: Valve Power Curve
Figure 7.8: Compression Ratio Power Curve
CHAPTER 7. COMPLEX TESTING 28
Figure 7.9: Compression Ratio Eciency Curve
gine simulator. Both had 10:1 compression ratios, 20mm valves with 10mm
lift, and simple intake and exhaust. Figure 7.10 shows the torque curves from
1000 to 7000 RPM. The HCE simulator predicts higher torque which is to be
expected due to inaccuracies in the comparison. However the general trends
and dierences are very constant over the RPM range.
There are possible reasons to explain the dierence in results. The Lotus
engine simulator is setup with several defaults such as a drag curve for the valves.
The HCE project uses a constant coecient of drag. The Lotus engine simulator
also has a dierent valve lift model which is more accurate to a production
engine.
7.6 Gasoline Versus H
2
Figure 7.11 shows a comparison of a 500 cubic centimeter single cylinder engine
on gasoline versus and hydrogen with a constant spark advance. The expectation
is that there is less energy to release and less air in the cylinder so power output
should be decreased. This is true until higher engine speeds are reached where
the higher speed of burn of the hydrogen shows a slight performance gain leading
to increased eciency. Spark advance for gasoline could gain back most of this.
As expected, the results show that hydrogen has eciency advantages in average
engines at higher RPM due to its generally faster burn velocities.
CHAPTER 7. COMPLEX TESTING 29
Figure 7.10: HCE Project and Lotus Engine Torque Curves
Figure 7.11: Hydrogen Gasoline Torque Comparison
CHAPTER 7. COMPLEX TESTING 30
Figure 7.12: Formula One style engine
7.7 Formula One V8
A proof of concept model was created by adding two valves to the model and
duplicating eight engine components and adjusting the constants for the friction
estimator. It is generally speculated that a 2.4 liter V8 Formula One engine is
approximately 700hp or 520 kW. In this setup the maximum bore and minimum
stroke was chosen along with the biggest possible valves. Formula one engines
use complicated swirl patterns to increase burn speed. Since no reference data
is available it was chosen to increase compression ratio to a very high value of
15:1. Under gasoline operation the power leveled o at approximately 17000
RPM to 500kW and holds steady. Under hydrogen operation this is lowered
and the decreased torque is unable to hold power level past 15000RPM but is
still in the 400kW range. This indicates a 20 percent dierence in peak power
but could mean that with a little tweaking hydrogen combustion engines could
provide a alternative to non-renewable fuels for motor sports.
Chapter 8
Running The Model
The model is very simple to operate. The main model opens an window shown
in gure 8.1 which prescribes a cylinder, a friction model, a block for geometry
and a crank position block. The initial rotational speed in radians/second needs
to be set rst. Also, the spark advance will need to be set for the cylinder block
as well as the crank inertia depending on chosen operation.
The next step is to open the geometry block which will bring up a list of
constants shown in gure 8.2. These are the constants that dene the physical
geometry of the engine and should be fairly straight forwards to input.
If the model is desired to ramp up in speed it should be left as is, but if the
model is to be run at a constant speed opening the crank position block will
reveal gure 8.3. To run at a constant speed delete the connection from the
torque input into the division block as circled. This will stop the crank from
accelerating.
When the torque line is disconnected the reading will stabilize after a few
cycles and that will be the maximum power output of the engine at that RPM.
If data is needed a simulink block called To Workspace can be connected to
average torque output and cycle time to develop an averaged torque curve. This
operation is not recommended compared to manually getting data points in the
torque disconnected method because the high level of accuracy needed for the
ODE solver at high RPM will slow down the simulation.
31
CHAPTER 8. RUNNING THE MODEL 32
Figure 8.1: Main
CHAPTER 8. RUNNING THE MODEL 33
Figure 8.2: Geometry
CHAPTER 8. RUNNING THE MODEL 34
Figure 8.3: Torque Connection
Chapter 9
Further Development
The bulk of the major work targeted was completed however several aspects
could be improved.
9.1 Gas Compressibility
A better gas compressibility model should be incorporated to give more accurate
pressures that are more closely based on the gases. This becomes especially
important when comparing fuels as the compressibility of the mixture will lead
to dierent pressures and therefore dierent power outputs. This can easily lead
to over or under prediction of performance.
9.2 Combustion
A simple linear interpolation is used between the products and reactants tem-
perature. A better approach would be to assume a constant mixture and solve
for gas composition throughout the process and use this as the basis for the
calculations. This is dicult to implement as it would require a much more
detailed understanding of combustion and intermediate forms of reactions.
More reactions could be included to produce NOx emissions estimations as
well as reduce power output. It would add minimal accuracy to the model
but would provide valuable emissions information which is having increasing
importance in future engine development.
35
Appendix A
Frictional Model Equations
36
Friction Estimator Tool - Patton Nitscke and Heywood Model
The Patton, Nitschke and Heywood engine friction model is based on equations from Patton et al [1]
made up of four main sections. These are Rotating, Reciprocating, Valvetrain and Auxiliary Friction. The
total engine friction is calculated by summing these four friction values.
Rotating friction is made up of three main sub-sections - main bearing seal friction, main bearing
hydrodynamic lubrication friction and turbulent dissipation to pump fluids. These are again summed to
reach a total rotating friction value.
Main bearing seal friction considers the front and rear main bearing seal friction and is calculated using
the following formula:
SEAL
c
b
Sn B
D
E FMEP
2
* 5 22 . 1 + =
Where: Db = Main Bearing Diameter
B = Bore
S = Stroke
nc = Number of Cylinders
To calculate Main Bearing Hydrodynamic Lubrication friction:
LUBE
c
b b b
Sn B
n L D RPM
LoadFactor E FMEP
2
3
) * * * (
* * 4 03 . 3 =
Where: RPM = Engine speed (rpm)
Lb = Length of main bearing
nb = Number of main bearings
Load Factor is an additional factor added to increase accuracy. It is calculated using the following
formula:
b b b
c
n L D
n B
LoadFactor
* *
) * (
* 65 . 0
2
=
Turbulent dissipation to pump fluid accounts for the losses due to the transport of oil through the
bearings and calculated as follows:
TURB
c
b b
n
n N D
E FMEP
2 2
* 10 35 . 1 =
Therefore: Total Rotating Friction = (SEAL FMEP + LUBE FMEP+ TURB FMEP)
Reciprocating Friction contains three sub-sections. These are Piston, Piston Ring and Connecting Rod
friction.
Piston friction is calculated using the following formula:
PISTON
B
S
E FMEP
p
* 2 94 . 2 + =
Where: Sp = Mean Piston Speed
B = Bore
Piston Ring Friction is divided into two sub-sections (Friction without gas loading and Additional friction
due to gas loading).
Friction without gas loading can be calculated using the below formula:
RING-NO GAS LOAD
2
1
*
1000
1 * 4 06 . 4
B
N
E FMEP |
.
|
\
|
+ + =
Where: N = Engine RPM
In order to calculate the friction due to gas loading, the following formula is used:
RING-DUE TO GAS
[ ]
) 33 . 1 (
182 . 0 088 . 0 * 89 . 6
p
KS
c c
r r
Pa
Pi
FMEP
+ =
Where: Pi = Intake pressure
Pa = Ambient Pressure
Rc = Compression Ratio
Therefore, total piston ring friction is given by:
TOTAL RING
) ( ) ( GAS TO RINGDUE LOAD RINGNOGAS FMEP + =
Con Rod Bearing friction is modelled assuming the majority of the lubrication is hydrodynamic and is
calculated as shown below:
CON ROD
c
b b b
Sn B
n L ND
E FMEP
2
* 4 03 . 3 =
Where: Db = Big end bearing diameter
Lb = Big end bearing length
Nb = Number of big end bearings
B = Bore
S = Stroke
nc = Number of cylinders
Total Reciprocating Friction is the sum of: PISTON + TOTAL RING + CON ROD frictions.
Valve Train Friction is calculated from three sub-sections. These are Camshaft bearing friction, Cam
and Follower friction and Oscillatory valvetrain friction. The FMEP values obtained from each of these
sections are then summed to generate a total valve train friction FMEP value.
Camshaft bearing friction is calculated using a Lotus-modified Patton, Nitschke and Heywood formula.
This is shown below:
CAMSHAFT
) * * (
) * ( * * * (
* * 4 03 . 3
2
3
c
cs mb cb cb
n S B
n n L D RPM
LF E FMEP =
Where: Dcb = Camshaft Bearing Diameter
Lcb = Camshaft Bearing Length
nmb = Number of Main Bearings
ncs = Number of Crankshafts
Cam and follower friction is calculated by either of two methods depending on whether the valve train
uses flat followers or roller followers.
These two models are combined into one formula and constants are used to activate the required part of
the formula. This is shown below:
CAM FOLLOWER
|
|
.
|
\
|
|
|
.
|
\
|
+
|
|
.
|
\
|
|
.
|
\
|
+ =
c
v
n S
n RPM
Const
RPM
Const FMEP
*
*
2
1000
1 * 1
Where: Const 1 = 600 or 0 (Depending on type of follower chosen)
Const 2 = 0.0227 or 0 (Depending on type of follower chosen)
nv = Number of valves.
Valve train oscillatory friction is calculated in two parts. These are oscillating hydrodynamic friction
and oscillating fixed lubrication friction. These two parts are combined into one formula as follows:
OSCILLATING FMEP = oscillating hydrodynamic friction + oscillating mixed lubrication friction
OSCILLATING
( ) ( )
(
(
(
(
|
.
|
\
|
+
+
(
(
=
c
v X
c
v X
n S
n L
RPM
CONST
n S B
n RPM L CONST
FMEP
*
* *
1000
1 * 2
* *
* * * 1
5 . 0 5 . 1
Where: CONST1 = Oscillating hydrodynamic constant determined by valvetrain type.
CONST2 = Oscillating mixed lubrication constant determined by valvetrain type.
LX = Valve lift
B = Bore
S = Stroke
nc = Number of Cylinders
Therefore, Total Valvetrain Friction = Camshaft bearing friction + Cam and follower friction + Valve
train oscillatory friction.
Auxiliary friction is the final friction section and is calculated using a Lotus modified version of the
Patton, Nitschke and Heywood. The modified equation introduces a swept volume term into the equation
and is as follows:
AUX
( ) ( ) [ ]
2
* 7 0 . 1 * 3 0 . 3 * 1 RPM E RPM E ACONST CON FMEP + =
Where: CON1 = Lotus Constant (Acquired through experience)
ACONST
( ) 3 0 . 1 *
0 . 15
+
=
E V
s
(Vs = Swept Volume)
If ACONST is calculated to be less than 0.5 then it is taken as 0.5.
Total Engine Friction from the Patton, Nitschke and Heywood model is calculated by summing the
friction elements as follows:
TOTAL FMEP = Rotating FMEP + Reciprocating FMEP + Valvetrain FMEP + Auxiliary FMEP
References:
1. Patton.K.J, Nitschke.R.G and Heywood.J.B. Development and Evaluation of a Friction Model for Spark
Ignition Engines. SAE Paper no. 890836, 1989. International Congress and Exposition, Detroit, Michigan,
Feb 27 Mar 03, 1989.
Appendix B
Internal Energy Matlab
Codes
37
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / . . . / Embedded MATLAB ( React i on Bal ance) 1 of 2
f unct i on [ Xch, Xo2, Xn2r , CHm, O2m, N2m, Xco2, Xh2o, Xn2p, CO2m, H2Om] = f cn
% a*C8H18 + b*( O2 + 3. 76*N2) - - > c*CO2 + d*H2O + e*N2
%Car bon ( C)
%8*a - c = 0
%
%Hydr ogen ( H)
%18*a - 2*d = 0
%
%Oxygen ( O)
%2*b - 2*c - d = 0
%
%Ni t r ogen ( N)
%3. 76*2*b - e = 0
%
%Auxi l i ar y equat i on
%a = 1
C = 8;
H = 18;
Cm=12. 0107;
Hm=1. 00794;
O2m=2*15. 9994;
N2m=2*14. 0067;
CO2m= Cm+O2m;
H2Om= Hm*2+O2m/ 2;
CHm= Cm*C + Hm*H;
A=[ C 0 - 1 0 0
H 0 0 - 2 0
0 2 - 2 - 1 0
0 7. 52 0 0 - 2
1 0 0 0 0] ;
b=[ 0
0
0
0
1] ;
x = A\ b;
CH=x( 1) ;
O2=x( 2) ;
CO2=x( 3) ;
H2O=x( 4) ;
N2=x( 5) ;
Nr t ot = CH + O2*( 1+3. 76) ;
Xch = CH/ Nr t ot ;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / . . . / Embedded MATLAB ( React i on Bal ance) 2 of 2
Xo2 = O2/ Nr t ot ;
Xn2r = O2*( 3. 76) / Nr t ot ;
MWr = Xch*CHm+ Xo2*O2m+ Xn2r *N2m;
Npt ot = CO2 + H2O + N2;
Xco2 = CO2/ Npt ot ;
Xh2o = H2O/ Npt ot ;
Xn2p = N2/ Npt ot ;
%MWp = Xco2*CO2m+ Xh2o*H2Om+ Xn2p*N2m;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 1 of 3
f unct i on Tr = f cn( U, R, Xch, Xo2, Xn2r , CHm, O2m, N2m)
n=50;
Ea=1e- 6; %Er r or ( %)
Ti n = 300;
%Ent hal py at K=0 ( kJ / kmol )
Ho2 = 8680. 104;
Hn2 = 8670. 104;
Hc8h18 = 32170. 000;
whi l e n > 1
i f Ti n <= 1000
%O2 ( 200 - 1000)
a1o2 = - 3. 425563420E+04;
a2o2 = 4. 847000970E+02;
a3o2 = 1. 119010961E+00;
a4o2 = 4. 293889240E- 03;
a5o2 = - 6. 836300520E- 07;
a6o2 = - 2. 023372700E- 09;
a7o2 = 1. 039040018E- 12;
b1o2 = - 3. 391454870E+03;
%N2 ( 200 - 1000)
a1n2 = 2. 210371497E+04;
a2n2 = - 3. 818461820E+02;
a3n2 = 6. 082738360E+00;
a4n2 = - 8. 530914410E- 03;
a5n2 = 1. 384646189E- 05;
a6n2 = - 9. 625793620E- 09;
a7n2 = 2. 519705809E- 12;
b1n2 = 7. 108460860E+02;
%C8H18 ( 200 - 1000)
a1ch = - 1. 688758565E+05;
a2ch = 3. 126903227E+03;
a3ch = - 2. 123502828E+01;
a4ch = 1. 489151508E- 01;
a5ch = - 1. 151180135E- 04;
a6ch = 4. 473216170E- 08;
a7ch = - 5. 554882070E- 12;
b1ch = - 4. 468060620E+04;
el se
%O2 ( 1000 - 6000)
a1o2 = - 1. 037939022E+06;
a2o2 = 2. 344830282E+03;
a3o2 = 1. 819732036E+00;
a4o2 = 1. 267847582E- 03;
a5o2 = - 2. 188067988E- 07;
a6o2 = 2. 053719572E- 11;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 2 of 3
a7o2 = - 8. 193467050E- 16;
b1o2 = - 1. 689010929E+04;
%N2 ( 1000 - 6000)
a1n2 = 5. 877124060E+05;
a2n2 = - 2. 239249073E+03;
a3n2 = 6. 066949220E+00;
a4n2 = - 6. 139685500E- 04;
a5n2 = 1. 491806679E- 07;
a6n2 = - 1. 923105485E- 11;
a7n2 = 1. 061954386E- 15;
b1n2 = 1. 283210415E+04;
%C8H18 ( 1000 - 6000)
a1ch = 1. 352765032E+07;
a2ch = - 4. 663370340E+04;
a3ch = 7. 795313180E+01;
a4ch = 1. 423729984E- 02;
a5ch = - 5. 073593910E- 06;
a6ch = 7. 248232970E- 10;
a7ch = - 3. 819190110E- 14;
b1ch = 2. 541178017E+05;
end
hch = ( - ( a1ch) / Ti n + ( a2ch) *l og( Ti n) + ( a3ch) *Ti n + ( a4ch) *Ti n^2/ 2 + ( a5ch) *Ti n^3/ 3 +
( a6ch) *Ti n^4/ 4 + ( a7ch) *Ti n^5/ 5 + ( b1ch) ) *R;
ho2 = ( - ( a1o2) / Ti n + ( a2o2) *l og( Ti n) + ( a3o2) *Ti n + ( a4o2) *Ti n^2/ 2 + ( a5o2) *Ti n^3/ 3 +
( a6o2) *Ti n^4/ 4 + ( a7o2) *Ti n^5/ 5 + ( b1o2) ) *R;
hn2 = ( - ( a1n2) / Ti n + ( a2n2) *l og( Ti n) + ( a3n2) *Ti n + ( a4n2) *Ti n^2/ 2 + ( a5n2) *Ti n^3/ 3 +
( a6n2) *Ti n^4/ 4 + ( a7n2) *Ti n^5/ 5 + ( b1n2) ) *R;
uch = ( hch - ( - 224010. 0) + Hc8h18 - R*Ti n) / CHm;
uo2 = ( ho2 + Ho2 - R*Ti n) / O2m;
un2 = ( hn2 + Hn2 - R*Ti n) / N2m;
Ut ot = ( Xch*uch + Xo2*uo2 + Xn2r *un2) *1000;
Dch = - ( R- R*( ( a1ch) / Ti n^2 + ( a2ch) / Ti n + ( a3ch) + ( a4ch) *Ti n + ( a5ch) *Ti n^2 + ( a6ch)
*Ti n^3 + ( a7ch) *Ti n^4) ) / CHm;
Do2 = - ( R- R*( ( a1o2) / Ti n^2 + ( a2o2) / Ti n + ( a3o2) + ( a4o2) *Ti n + ( a5o2) *Ti n^2 + ( a6o2)
*Ti n^3 + ( a7o2) *Ti n^4) ) / O2m;
Dn2 = - ( R- R*( ( a1n2) / Ti n^2 + ( a2n2) / Ti n + ( a3n2) + ( a4n2) *Ti n + ( a5n2) *Ti n^2 + ( a6n2)
*Ti n^3 + ( a7n2) *Ti n^4) ) / N2m;
Dt ot = ( Xch*Dch + Xo2*Do2 + Xn2r *Dn2) *1000;
To = Ti n - ( ( Ut ot - U) / Dt ot ) ;
E = sqr t ( ( ( To - Ti n) / To) ^2) ;
i f E < Ea
n = 0;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 3 of 3
end
Ti n=To;
n=n- 1;
end
Tr = Ti n;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Sub. . . / Embedded MATLAB Post Combust i on 1 of 3
f unct i on Tp = f cn( U, R, N2m, Xco2, Xh2o, Xn2p, CO2m, H2Om)
n=50;
Ea=1e- 8; %Er r or ( %)
Ti n = 300;
%Ent hal py at K=0 ( kJ / kmol )
Hco2 = 9365. 469;
Hn2 = 8670. 104;
Hh2o = 9904. 092;
whi l e n > 1
i f Ti n <= 1000
%CO2 ( 200 - 1000)
a1co2 = 4. 943650540E+04;
a2co2 = - 6. 264116010E+02;
a3co2 = 5. 301725240E+00;
a4co2 = 2. 503813816E- 03;
a5co2 = - 2. 127308728E- 07;
a6co2 = - 7. 689988780E- 10;
a7co2 = 2. 849677801E- 13;
b1co2 = - 4. 528198460E+04;
%N2 ( 200 - 1000)
a1n2 = 2. 210371497E+04;
a2n2 = - 3. 818461820E+02;
a3n2 = 6. 082738360E+00;
a4n2 = - 8. 530914410E- 03;
a5n2 = 1. 384646189E- 05;
a6n2 = - 9. 625793620E- 09;
a7n2 = 2. 519705809E- 12;
b1n2 = 7. 108460860E+02;
%H2O ( 200 - 1000)
a1h2o = - 3. 947960830E+04;
a2h2o = 5. 755731020E+02;
a3h2o = 9. 317826530E- 01;
a4h2o = 7. 222712860E- 03;
a5h2o = - 7. 342557370E- 06;
a6h2o = 4. 955043490E- 09;
a7h2o = - 1. 336933246E- 12;
b1h2o = - 3. 303974310E+04;
el se
%CO2 ( 1000 - 6000)
a1co2 = 1. 176962419E+05;
a2co2 = - 1. 788791477E+03;
a3co2 = 8. 291523190E+00;
a4co2 = - 9. 223156780E- 05;
a5co2 = 4. 863676880E- 09;
a6co2 = - 1. 891053312E- 12;
a7co2 = 6. 330036590E- 16;
b1co2 = - 3. 908350590E+04;
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Sub. . . / Embedded MATLAB Post Combust i on 2 of 3
%N2 ( 1000 - 6000)
a1n2 = 5. 877124060E+05;
a2n2 = - 2. 239249073E+03;
a3n2 = 6. 066949220E+00;
a4n2 = - 6. 139685500E- 04;
a5n2 = 1. 491806679E- 07;
a6n2 = - 1. 923105485E- 11;
a7n2 = 1. 061954386E- 15;
b1n2 = 1. 283210415E+04;
%H2O ( 1000 - 6000)
a1h2o = 1. 034972096E+06;
a2h2o = - 2. 412698562E+03;
a3h2o = 4. 646110780E+00;
a4h2o = 2. 291998307E- 03;
a5h2o = - 6. 836830480E- 07;
a6h2o = 9. 426468930E- 11;
a7h2o = - 4. 822380530E- 15;
b1h2o = - 1. 384286509E+04;
end
hco2 = ( - ( a1co2) / Ti n + ( a2co2) *l og( Ti n) + ( a3co2) *Ti n + ( a4co2) *Ti n^2/ 2 + ( a5co2)
*Ti n^3/ 3 + ( a6co2) *Ti n^4/ 4 + ( a7co2) *Ti n^5/ 5 + ( b1co2) ) *R;
hh2o = ( - ( a1h2o) / Ti n + ( a2h2o) *l og( Ti n) + ( a3h2o) *Ti n + ( a4h2o) *Ti n^2/ 2 + ( a5h2o)
*Ti n^3/ 3 + ( a6h2o) *Ti n^4/ 4 + ( a7h2o) *Ti n^5/ 5 + ( b1h2o) ) *R;
hn2 = ( - ( a1n2) / Ti n + ( a2n2) *l og( Ti n) + ( a3n2) *Ti n + ( a4n2) *Ti n^2/ 2 + ( a5n2) *Ti n^3/ 3 +
( a6n2) *Ti n^4/ 4 + ( a7n2) *Ti n^5/ 5 + ( b1n2) ) *R;
uco2 = ( hco2 - ( - 393510. 0) + Hco2 - R*Ti n) / CO2m;
uh2o = ( hh2o - ( - 241826. 0) + Hh2o - R*Ti n) / H2Om;
un2 = ( hn2 + Hn2 - R*Ti n) / N2m;
Ut ot = ( Xco2*uco2 + Xh2o*uh2o + Xn2p*un2) *1000;
Dco2 = - ( R- R*( ( a1co2) / Ti n^2 + ( a2co2) / Ti n + ( a3co2) + ( a4co2) *Ti n + ( a5co2) *Ti n^2 +
( a6co2) *Ti n^3 + ( a7co2) *Ti n^4) ) / CO2m;
Dh2o = - ( R- R*( ( a1h2o) / Ti n^2 + ( a2h2o) / Ti n + ( a3h2o) + ( a4h2o) *Ti n + ( a5h2o) *Ti n^2 +
( a6h2o) *Ti n^3 + ( a7h2o) *Ti n^4) ) / H2Om;
Dn2 = - ( R- R*( ( a1n2) / Ti n^2 + ( a2n2) / Ti n + ( a3n2) + ( a4n2) *Ti n + ( a5n2) *Ti n^2 + ( a6n2)
*Ti n^3 + ( a7n2) *Ti n^4) ) / N2m;
Dt ot = ( Xco2*Dco2 + Xh2o*Dh2o + Xn2p*Dn2) *1000;
To = Ti n - ( ( Ut ot - U) / Dt ot ) ;
E = sqr t ( ( ( To - Ti n) / To) ^2) ;
i f E < Ea
n = 0;
end
4/ 5/ 09 9: 58 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Sub. . . / Embedded MATLAB Post Combust i on 3 of 3
Ti n=To;
n=n- 1;
end
Tp = Ti n;
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / . . . / Embedded MATLAB ( React i on Bal ance) 1 of 2
f unct i on [ Xh2, Xo2, Xn2r , H2m, O2m, N2m, Xh2o, Xn2p, H2Om] = f cn ( )
% a*H2 + Ai r *b*( O2 + 3. 76*N2) - - > c*H2O + d*O2 + e*N2
%Hydr ogen ( H)
%2*a - 2*c = 0
%
%Oxygen ( O)
%2*Ai r *b - c = 0
%
%Ni t r ogen ( N)
%3. 76*2*Ai r *b - e = 0
%
%Auxi l i ar y equat i on
%a = 1
H2m=2*1. 00794;
O2m=2*15. 9994;
N2m=2*14. 0067;
H2Om= H2m+ O2m/ 2;
A=[ 2 0 - 2 0
0 2 - 1 0
0 7. 52 0 - 2
1 0 0 0 ] ;
b=[ 0
0
0
1] ;
x = A\ b;
H2=x( 1) ;
O2=x( 2) ;
H2O=x( 3) ;
N2=x( 4) ;
%%Adj ust f or %Ai r
%O2r = O2*Ai r ;
%O2p = ( O2r *2- H2O) / 2;
%N2p = N2*Ai r ;
Nr t ot = H2 + O2*( 1+3. 76) ;
Xh2 = H2/ Nr t ot ;
Xo2 = O2/ Nr t ot ;
Xn2r = O2*( 3. 76) / Nr t ot ;
Npt ot = H2O + N2;
Xh2o = H2O/ Npt ot ;
Xn2p = N2/ Npt ot ;
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / . . . / Embedded MATLAB ( React i on Bal ance) 2 of 2
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 1 of 3
f unct i on Tr = f cn( U, R, Xh2, Xo2, Xn2r , H2m, O2m, N2m)
n=50;
Ea=1e- 6; %Er r or ( %)
Ti n = 30;
%Ent hal py at K=298. 15 ( kJ / kmol )
Hh2 = 8468. 102;
Ho2 = 8680. 104;
Hn2 = 8670. 104;
whi l e n > 1
i f Ti n <= 1000
%O2 ( 200 - 1000)
a1o2 = - 3. 425563420E+04;
a2o2 = 4. 847000970E+02;
a3o2 = 1. 119010961E+00;
a4o2 = 4. 293889240E- 03;
a5o2 = - 6. 836300520E- 07;
a6o2 = - 2. 023372700E- 09;
a7o2 = 1. 039040018E- 12;
b1o2 = - 3. 391454870E+03;
%N2 ( 200 - 1000)
a1n2 = 2. 210371497E+04;
a2n2 = - 3. 818461820E+02;
a3n2 = 6. 082738360E+00;
a4n2 = - 8. 530914410E- 03;
a5n2 = 1. 384646189E- 05;
a6n2 = - 9. 625793620E- 09;
a7n2 = 2. 519705809E- 12;
b1n2 = 7. 108460860E+02;
%H2 ( 200 - 1000)
a1h2 = 4. 078323210E+04;
a2h2 = - 8. 009186040E+02;
a3h2 = 8. 214702010E+00;
a4h2 = - 1. 269714457E- 02;
a5h2 = 1. 753605076E- 05;
a6h2 = - 1. 202860270E- 08;
a7h2 = 3. 368093490E- 12;
b1h2 = 2. 682484665E+03;
el se
%O2 ( 1000 - 6000)
a1o2 = - 1. 037939022E+06;
a2o2 = 2. 344830282E+03;
a3o2 = 1. 819732036E+00;
a4o2 = 1. 267847582E- 03;
a5o2 = - 2. 188067988E- 07;
a6o2 = 2. 053719572E- 11;
a7o2 = - 8. 193467050E- 16;
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 2 of 3
b1o2 = - 1. 689010929E+04;
%N2 ( 1000 - 6000)
a1n2 = 5. 877124060E+05;
a2n2 = - 2. 239249073E+03;
a3n2 = 6. 066949220E+00;
a4n2 = - 6. 139685500E- 04;
a5n2 = 1. 491806679E- 07;
a6n2 = - 1. 923105485E- 11;
a7n2 = 1. 061954386E- 15;
b1n2 = 1. 283210415E+04;
%H2 ( 1000 - 6000)
a1h2 = 5. 608128010E+05;
a2h2 = - 8. 371504740E+02;
a3h2 = 2. 975364532E+00;
a4h2 = 1. 252249124E- 03;
a5h2 = - 3. 740716190E- 07;
a6h2 = 5. 936625200E- 11;
a7h2 = - 3. 606994100E- 15;
b1h2 = 5. 339824410E+03;
end
hh2 = ( - ( a1h2) / Ti n + ( a2h2) *l og( Ti n) + ( a3h2) *Ti n + ( a4h2) *Ti n^2/ 2 + ( a5h2) *Ti n^3/ 3 +
( a6h2) *Ti n^4/ 4 + ( a7h2) *Ti n^5/ 5 + ( b1h2) ) *R;
ho2 = ( - ( a1o2) / Ti n + ( a2o2) *l og( Ti n) + ( a3o2) *Ti n + ( a4o2) *Ti n^2/ 2 + ( a5o2) *Ti n^3/ 3 +
( a6o2) *Ti n^4/ 4 + ( a7o2) *Ti n^5/ 5 + ( b1o2) ) *R;
hn2 = ( - ( a1n2) / Ti n + ( a2n2) *l og( Ti n) + ( a3n2) *Ti n + ( a4n2) *Ti n^2/ 2 + ( a5n2) *Ti n^3/ 3 +
( a6n2) *Ti n^4/ 4 + ( a7n2) *Ti n^5/ 5 + ( b1n2) ) *R;
uh2 = ( hh2 + Hh2 - R*Ti n) / H2m;
uo2 = ( ho2 + Ho2 - R*Ti n) / O2m;
un2 = ( hn2 + Hn2 - R*Ti n) / N2m;
Ut ot = ( Xh2*uh2 + Xo2*uo2 + Xn2r *un2) *1000;
% Dh2 = ( ( - ( a1h2) / Ti n^2 + ( a2h2) / Ti n + ( a3h2) + ( a4h2) *Ti n + ( a5h2) *Ti n^2 + ( a6h2)
*Ti n^3 + ( a7h2) *Ti n^4) - 1) *R/ H2m;
% Do2 = ( ( - ( a1o2) / Ti n^2 + ( a2o2) / Ti n + ( a3o2) + ( a4o2) *Ti n + ( a5o2) *Ti n^2 + ( a6o2)
*Ti n^3 + ( a7o2) *Ti n^4) - 1) *R/ O2m;
% Dn2 = ( ( - ( a1n2) / Ti n^2 + ( a2n2) / Ti n + ( a3n2) + ( a4n2) *Ti n + ( a5n2) *Ti n^2 + ( a6n2)
*Ti n^3 + ( a7n2) *Ti n^4) - 1) *R/ N2m;
Dh2 = - ( R- R*( ( a1h2) / Ti n^2 + ( a2h2) / Ti n + ( a3h2) + ( a4h2) *Ti n + ( a5h2) *Ti n^2 + ( a6h2)
*Ti n^3 + ( a7h2) *Ti n^4) ) / H2m;
Do2 = - ( R- R*( ( a1o2) / Ti n^2 + ( a2o2) / Ti n + ( a3o2) + ( a4o2) *Ti n + ( a5o2) *Ti n^2 + ( a6o2)
*Ti n^3 + ( a7o2) *Ti n^4) ) / O2m;
Dn2 = - ( R- R*( ( a1n2) / Ti n^2 + ( a2n2) / Ti n + ( a3n2) + ( a4n2) *Ti n + ( a5n2) *Ti n^2 + ( a6n2)
*Ti n^3 + ( a7n2) *Ti n^4) ) / N2m;
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Subs. . . / Embedded MATLAB Pr e Combust i on 3 of 3
Dt ot = ( Xh2*Dh2 + Xo2*Do2 + Xn2r *Dn2) *1000;
To = Ti n - ( ( Ut ot - U) / Dt ot ) ;
E = sqr t ( ( ( To - Ti n) / To) ^2) ;
i f E < Ea
n = 0;
end
Ti n = To;
%i f Ut ot >U
% n=0;
%end
% Ti n=Ti n +1;
n=n- 1;
end
Tr = Ti n;
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Sub. . . / Embedded MATLAB Post Combust i on 1 of 2
f unct i on Tp = f cn( U, R, N2m, Xh2o, Xn2p, H2Om)
n=50;
Ea=1e- 8; %Er r or ( %)
Ti n = 300;
%Ent hal py K ( 298. 15) ( kJ / kmol )
Hn2 = 8670. 104;
Hh2o = 9904. 092;
whi l e n > 1
i f Ti n <= 1000
%N2 ( 200 - 1000)
a1n2 = 2. 210371497E+04;
a2n2 = - 3. 818461820E+02;
a3n2 = 6. 082738360E+00;
a4n2 = - 8. 530914410E- 03;
a5n2 = 1. 384646189E- 05;
a6n2 = - 9. 625793620E- 09;
a7n2 = 2. 519705809E- 12;
b1n2 = 7. 108460860E+02;
%H2O ( 200 - 1000)
a1h2o = - 3. 947960830E+04;
a2h2o = 5. 755731020E+02;
a3h2o = 9. 317826530E- 01;
a4h2o = 7. 222712860E- 03;
a5h2o = - 7. 342557370E- 06;
a6h2o = 4. 955043490E- 09;
a7h2o = - 1. 336933246E- 12;
b1h2o = - 3. 303974310E+04;
el se
%N2 ( 1000 - 6000)
a1n2 = 5. 877124060E+05;
a2n2 = - 2. 239249073E+03;
a3n2 = 6. 066949220E+00;
a4n2 = - 6. 139685500E- 04;
a5n2 = 1. 491806679E- 07;
a6n2 = - 1. 923105485E- 11;
a7n2 = 1. 061954386E- 15;
b1n2 = 1. 283210415E+04;
%H2O ( 1000 - 6000)
a1h2o = 1. 034972096E+06;
a2h2o = - 2. 412698562E+03;
a3h2o = 4. 646110780E+00;
a4h2o = 2. 291998307E- 03;
a5h2o = - 6. 836830480E- 07;
a6h2o = 9. 426468930E- 11;
a7h2o = - 4. 822380530E- 15;
b1h2o = - 1. 384286509E+04;
end
4/ 5/ 09 9: 59 PM Bl ock: Mar kI VRevJ t / Cyl i nder / Sub. . . / Embedded MATLAB Post Combust i on 2 of 2
hh2o = ( - ( a1h2o) / Ti n + ( a2h2o) *l og( Ti n) + ( a3h2o) *Ti n + ( a4h2o) *Ti n^2/ 2 + ( a5h2o)
*Ti n^3/ 3 + ( a6h2o) *Ti n^4/ 4 + ( a7h2o) *Ti n^5/ 5 + ( b1h2o) ) *R;
hn2 = ( - ( a1n2) / Ti n + ( a2n2) *l og( Ti n) + ( a3n2) *Ti n + ( a4n2) *Ti n^2/ 2 + ( a5n2) *Ti n^3/ 3 +
( a6n2) *Ti n^4/ 4 + ( a7n2) *Ti n^5/ 5 + ( b1n2) ) *R;
uh2o = ( hh2o - ( - 241826. 0) + Hh2o - R*Ti n) / H2Om;
un2 = ( hn2 + Hn2 - R*Ti n) / N2m;
Ut ot = ( Xh2o*uh2o + Xn2p*un2) *1000;
Dh2o = - ( R- R*( ( a1h2o) / Ti n^2 + ( a2h2o) / Ti n + ( a3h2o) + ( a4h2o) *Ti n + ( a5h2o) *Ti n^2 +
( a6h2o) *Ti n^3 + ( a7h2o) *Ti n^4) ) / H2Om;
% Do2 = - ( R- R*( ( a1o2) / Ti n^2 + ( a2o2) / Ti n + ( a3o2) + ( a4o2) *Ti n + ( a5o2) *Ti n^2 +
( a6o2) *Ti n^3 + ( a7o2) *Ti n^4) ) / O2m;
Dn2 = - ( R- R*( ( a1n2) / Ti n^2 + ( a2n2) / Ti n + ( a3n2) + ( a4n2) *Ti n + ( a5n2) *Ti n^2 + ( a6n2)
*Ti n^3 + ( a7n2) *Ti n^4) ) / N2m;
Dt ot = ( Xh2o*Dh2o + Xn2p*Dn2) *1000;
To = Ti n - ( ( Ut ot - U) / Dt ot ) ;
E = sqr t ( ( ( To - Ti n) / To) ^2) ;
i f E < Ea
n = 0;
end
Ti n=To;
n=n- 1;
end
Tp = Ti n;
Bibliography
[1] Moran, Michael J. and Shapiro, Howard N., Fundamentals of Engineering
Thermodynamics, John Wiley and Sons, Inc, Hoboken/New Jersey-U.S.A.,
5th edition, 2004
[2] Heywood, John B., Internal Combustion Engine Fundamentals, McGraw-
Hill Book Company, New York-U.S.A., 1988
[3] Annamalai, Kalyan and Puri, Ishwar K., Advanced Thermodynamics Engi-
neering, CRC Press LLC, Boca Raton/Florida-U.S.A., 2002
[4] Ferguson, Colin R. and Kirkpatrick, Allan T., Intermal Combustion Engines
Applied Thermosciences, John Wiley and Sons, Inc, New York/New York-
U.S.A., 2nd edition, 2000
[5] Mcmurry, John and Fay, Robert Chemistry, Prentice Hall, New York/New
York-U.S.A., 4th edition, 2000, Check this
[6] Blair, Gordon P. Design and Simulation of Four-Stroke Engines, Society of
Automotive Engineers, Inc., Warrendale/Pennsylvania-U.S.A., 2001
[7] Hires, S. D. and Tabaczynski, R. J. and Novac, J. M. The Predictions
of Ignition Delay and Combustion Intervals for a Homogeneous Charge,
Spark Ignition Engine, Society of Automotive Engineers, Inc., Paper 780232,
Warrendale/Pennsylvania-U.S.A., 1978
[8] Dubba Rao, K and Ganesan, V. and Murthy, B. S. Modelling Of Combus-
tion Process In A Spark Ignited Hydrogen Engine, International Journal of
Hydrogen Energy, Vol. 8, No 11/12, Pages 931-933, 1983
[9] Annand, W.J.D Heat Transfer in the Cylinder of Reciprocating Internal
Combustion Engines, Proc.I.Mech.E 177.973, 1963
[10] Patton, K.J. and Heywood, J.B and Nitschke, R.G. Development and Eval-
uation of a Friction Model for Spark Ignition Engines, Society of Automotive
Engineers 89083, 1989
38