Professional Documents
Culture Documents
Model
Introduction
Exhaust gas recirculation (EGR) is, among other things, a NOx emissions reduction tech-
nique used in most gasoline and diesel engines. EGR works by recirculating a portion of
the exhaust gas of an engine back to the engine cylinders. Intermixing the incoming air
with recirculated exhaust gas dilutes the mix with inert gas. It lowers the adiabatic flame
temperature and (in diesel engines) reduces the amount of excess oxygen. The exhaust gas
also increases the specific heat capacity of the mix lowering the peak combustion temper-
ature. NOx formation progresses much faster at high temperatures. Hence EGR serves to
limit the generation of NOx. NOx is primarily formed when a mix of nitrogen and oxygen
is subjected to high temperatures.
The tutorial demonstrates the following:
• Setting up an CIC case involving only compression and power stroke with only a
sector of mesh.
Prerequisites
This tutorial is written with the assumption that you have completed Tutorial 1 from the
ANSYS FLUENT 13.0 Tutorial Guide, and that you are familiar with the ANSYS FLUENT
navigation pane and menu structure. Some steps in the setup and solution procedure will
not be shown explicitly.
Problem Description
A 30 degree periodic slice of the piston-cylinder combination is considered in this problem.
This simulation starts at intake valve close (IVC) and ends at exhaust valve open (EVO).
So, there are no valves involved, and only the compression and power stroke is simulated.
A pure layering approach is used on a 3D sector mesh. The schematic shows the geometry
and the problem domain used. Methane is used as the fuel and that enters through the
inlet. The flow rate of methane is specified in the UDF.
c ANSYS, Inc. January 3, 2011 1
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
2
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Preparation
1. Copy the files, egr tut.msh.gz, initialize.c, and injection ch4.c to your work-
ing folder.
4. Click the Environment tab and make sure that Setup Compilation Environment for UDF
is enabled.
The path to the .bat file which is required to compile the UDF will be displayed as
soon as you enable Setup Compilation Environment for UDF.
If the Environment tab does not appear in the FLUENT Launcher dialog box by default,
click the Show More Options button to view the additional settings.
Note: The Display Options are enabled by default. Therefore, after you read in the
mesh, it will be displayed in the embedded graphics window.
Step 1: Mesh
Note: There is only 30 degrees of the mesh, which is corresponding to one fuel injector hole.
The piston is at the top dead center (TDC), the recommended location of meshing for
internal combustion (IC) simulations. This is because the squish volume is minimum
at this piston position. If mesh is built correctly in this position, it is easy to make
sure that the mesh motion will succeed for the whole engine cycle. Later, the mesh
will be moved to IVC position, the starting point of simulation. In convention of
ANSYS FLUENT, TDC after compression stroke is 0. Crank angle (CA) and TDC
after exhaust stroke is 360 CA.
c ANSYS, Inc. January 3, 2011 3
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
4
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
c ANSYS, Inc. January 3, 2011 5
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
6. Create periodic boundary out of face zone period inner1 and period inner2. Use
the text command as shown.
/mesh/modify-zones>make-periodic
Periodic zone[()] period_inner1
Shawdow zone[()] period_inner2
Rotational periodic? (if no, translational)[yes] yes
Create periodic zones? [yes] yes
zone 11 deleted
created periodic zones.
7. Similarly create another periodic boundary using the face zones period outer1 and
period outer2.
Step 3: Models
6
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
c ANSYS, Inc. January 3, 2011 7
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Step 4: Materials
Materials
You can find that a pdf-mixture species is defined under Materials.
Retain the default material properties.
Step 5: Cell Zone Conditions
8
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Boundary Conditions
(a) Select Mass Flux from the Mass Flow Specification Method drop-down list in the
Momentum tab.
(b) Select udf fuel flux::libudf from the Mass Flux drop-down list.
(c) Select Normal to Boundary from the the Direction Specification Method.
(d) Select Intensity and Length Scale from the Specification Method drop-down list in
the Turbulence group box.
(e) Retain 10% for Turbulence Intensity
(f) Enter 2 mm for Turbulent Length Scale.
(g) Click Thermal tab and make sure Total Temperature is set to 300 K.
(h) In the Species tab, specify a Mean Mixture Fraction of 1 and retain the Mixture
Fraction Variance of 0.
(i) Click OK to close the Mass-Flow Inlet dialog box.
c ANSYS, Inc. January 3, 2011 9
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
2. Make sure that the period inner1 and the period outer1 zone type is rotational.
(a) Make sure that period inner1 zone type is set to rotational.
Boundary Conditions −→ period inner1 −→ Edit...
(b) Similarly check that period outer1 is set to rotational.
Boundary Conditions −→ period outer1 −→ Edit...
3. Click Create and close the Create/Edit Mesh Interfaces dialog box.
General −→ Check
In the mesh check report, the angle of periodic boundaries is reported as 30 degrees.
10
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Dynamic Mesh
2. Disable Smoothing and enable Layering option in the Mesh Methods group box.
ANSYS FLUENT will automatically flag the existing mesh zones for use of the different
dynamic mesh methods where applicable
c ANSYS, Inc. January 3, 2011 11
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
12
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
c ANSYS, Inc. January 3, 2011 13
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
(a) Make sure that bowl is selected from the Zone Names.
(b) Make sure that the Type selected is Rigid Body.
(c) In Motion Attributes tab, make sure that **piston-full** is selected as the Motion
UDF/Profile.
(d) Enter 0 for X axis and 1 for Z axis in the Valve/Piston Axis group box.
(e) In the Meshing Options tab make sure that Cell Height is set to 0.
(f) Click Create.
(g) Similarly for bowl:17 zone retain the other options and enter 1 mm for Cell Height
in Meshing Options tab.
(h) Click Create.
(i) Select fluid-outer in Zone Names and click Create.
(j) For wall top outer, select Type as Stationary and in Meshing Options tab, enter
1.2 mm for Cell Height and click Create.
(k) Close the Dynamic Mesh Zones dialog box.
Note: The whole fluid zone and piston will move up and down using a profile (**piston-
full**), generated automatically by ANSYS FLUENT using crank radius and con-
necting rod length. The cylinder head (wall top outer) is stationary. Relative
motion is detected at the cylinder head and hence layers are added and deleted
at this zone. Similarly, layers are added and deleted at the zone, bowl:017.
Preview the zone motion to check the correctness of the motions specified by clicking
the Display Zone Motion... button.
Preview the mesh motion to check the correctness of dynamic mesh set up by clicking
the Display Mesh Motion... button. Save the case file before previewing the mesh
motion.
14
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Step 9: Solution
(a) Select PISO from the Scheme drop-down list in the Pressure-Velocity Coupling
group box.
(b) Set 0 for Skewness Correction.
(c) Retain 1 for Neighbor Correction.
(d) Make sure that Skewness-Neighbor Coupling is enabled.
(e) Select Second Order Upwind from Momentum drop-down list in Spatial Discretiza-
tion group box.
c ANSYS, Inc. January 3, 2011 15
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
16
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
c ANSYS, Inc. January 3, 2011 17
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
P1 = 101325Pa
T1 = 300K
gamma = 1.365
Compression ratio(CR) = 11.42
(V2/V1) at CA 700 = 8.689 (using geometry analysis)
P1V1gamma = P2V2gamma
P2 = 1898675Pa
T1V1(gamma−1) = T2V2(gamma−1)
T2 = 690K
18
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
9. Create an iso-surface.
Before specifying the commands to save the solution images at regular intervals, we
need to define a postprocessing surface and a postprocessing view.
Surface −→Iso-Surface...
(a) Select Mesh... and Angular Coordinate from Surface of Constant drop-down lists.
(b) Enter 75 degrees for Iso-Values.
(c) Enter theta=75 for New Surface Name.
(d) Click Compute and then Create.
(e) Close the Iso-Surface dialog box.
c ANSYS, Inc. January 3, 2011 19
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
20
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
12. Specify the commands to save the solution images at regular intervals.
Calculation Activities (Execute Commands)−→ Create/Edit...
Name Command
command-1 /dis/sw 5 /dis/view/rv plot-view /dis/set/cont/sur
(theta=75) /dis/cont ch4 0 1
command-2 dis/save-p ch4-%t.tif y
command-3 /dis/sw 4 /dis/view/rv plot-view /dis/set/cont/sur
(theta=75) /dis/cont temp 600 2500
command-4 /dis/save-p temp-%t.tif y
13. Save the case and data file. (natural gas EGR pdf-CA700.cas.gz).
File −→ Write −→Case & Data...
c ANSYS, Inc. January 3, 2011 21
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
22
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
c ANSYS, Inc. January 3, 2011 23
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
24
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Appendix A
This section provides some explanation on some values used in the calculation. The user
needs to know the composition of EGR species and the mass percentage of EGR. The EGR
composition, if not known, can be estimated from a pilot simulation without EGR. The
composition in this tutorial is estimated using such a process.
The total amount of fuel injected.
4. Get the initial mass of fluid in the cylinder. This can be calculated from ANSYS
FLUENT through
Reports −→ Volume Integrals
as Volume Integral of density over all volumes. Do this calculation after initializing
the case.
1. Calculate the mass fractions of each species in the EGR from the composition of EGR.
3. Mass fraction of a species when EGR and air is mixed is calculated as:
(mf species A)EGR−air−mixture = (mf species A)EGR * EGR% + (mf species A)air
* (1- EGR%)
Find the mass fraction of each species and enter these values as the boundary species
composition in ANSYS FLUENT.
c ANSYS, Inc. January 3, 2011 25
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Appendix B
UDF: injection ch4.c
Variables used:
fuel injected - total fuel injected calculated as explained in Appendix A.
• CAP - Crank angle duration for which the injection mass flow rate increases from zero
to maximum value (or decreases from maximum to zero).
• inlet area - The inlet area for injection. This can be calculated from ANSYS FLUENT
through
Report −→ Area
as area of inlet surface.
The mass flux curve of fuel injections will be as shown in Figure 10.
UDF: initialize.c
The UDF is used to initialize the flow field with the specified swirl ratio. You have to
provide the zone IDs of cell zones corresponding to the cylinder. In the tutorial example
you can find that the zone ids are defined as
Zone ID[] = 3, 4, -1;
Here the values 3 and 4 are obtained from the Cell Zone Conditions pane, corresponding to
fluid-outer and fluid-inner. -1 is kept as a flag to end of Zone ID array.
26
c ANSYS, Inc. January 3, 2011
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Appendix C
Comparison of inert approach and pdf approach for EGR modeling in ANSYS
FLUENT
Two sets of test cases were carried out using inert approach and pdf approach.
Test 1 : Comparison
c ANSYS, Inc. January 3, 2011 27
Tutorial: Modeling In-Cylinder EGR Combustion Using PDF Model
Test 2 : Comparison
Summary
• The inert assumption showed very little impact on the solution with residual gas mass
fraction at 12%
• With residual gas mass fraction of 25%, the inert assumption starts to show impact
on the solution.
• The tests were done with slightly lean (equivalence ratio of 0.9) condition. The inert
assumption is expected to be less accurate for richer conditions and more accurate for
leaner conditions.
28
c ANSYS, Inc. January 3, 2011