Engine Simulation with
Piston and Valve Action
in OpenFOAM
T. Lucchini
Department of Energetics, Politecnico di Milano, Italy
[email protected]
TOPICS
• MESH MOTION WITH TOPOLOGICAL CHANGES
• engineTopoChangerMesh
• CASE SETUP
Mesh generation;
Setting the motion boundary conditions;
Dictionaries;
Definition of the face zones;
Definition of the mesh modifiers;
Moving the mesh from -180 to 180 CAD;
• RUNNING THE CASE
Initial conditions;
Control parameters;
Dictionaries;
engineDyMFoam
• POSTPROCESSING THE CASE
MESH MOTION WITH TOPOLOGICAL CHANGES
• No pre-processing. Mesh motion integrated in the
solver, at any time step:
Grid points moved;
Mesh topology eventually changed;
• Multiple-region decomposition: in each region, mesh
motion is accommodated in different ways;
• Combined use of different topological changes;
• Polyhedral vertex based motion solver for mesh
deformation based on Finite Element Method (FEM);
engineTopoChangerMesh
• State of art: OpenFOAM can be used to simulate I.C. engines;
• Engine meshes are derived by the engineTopoChanger mesh
class:
NO PRE-PROCESSING
layerAR: compression-combustion (diesel or SI);
twoStroke: two stroke engines with scavenging ports;
verticalValves: four stroke engines with vertical valves;
PRE-PROCESSING + FIELD MAPPING (standard approach)
layeringDeformation: dynamic layering on the piston
surface, deformation around the valves with automatic
mesh motion. It can be used for any kind of I.C. engine;
STANDARD APPROACH
• List of target meshes (from 10 to 50 meshes for a full cycle
simulation);
• Each mesh is used for a certain crank angle interval (CA);
• After that fields are re-mapped (mapFields) on the new mesh
and a new case is run;
• Example: intake stroke in a four-stroke engine with canted
valves
ENGINE TUTORIAL CASE - MESH GENERATION
• Two-D engine with vertical valves generated with blockMesh;
• Mesh must be decomposed into multiple regions;
• Simulation of the intake stroke (mesh generated at TDC)
Port volume
Valve and cylinder
volumes should be
completely separated
Valve Cylinder even if they share
volume volume points. This is
achieved by
specifying twice the
same points in the
blockMeshDict file.
ENGINE TUTORIAL CASE – BOUNDARY (FIXED)
• cylinderHead
• liner
• valveWalls
• valveStem
• intakePort
ENGINE TUTORIAL CASE – BOUNDARY (MOVING)
• piston
• valveTopIn
• valveBottomIn
ENGINE TUTORIAL CASE – BOUNDARY (slidingInterface)
• valveCurtainCylIn
• valveCurtainPortIn
ENGINE TUTORIAL CASE – BOUNDARY (attachDetach)
empty boundaries
• valveDetachInPort
• valveCurtainPortIn
SETTING THE engineGeometry FILE
• constant/engineGeometry
• specify engine geometry data
conRodLength conRodLength [0 1 0 0 0 0 0] 0.180;
bore bore [0 1 0 0 0 0 0] 0.100;
stroke stroke [0 1 0 0 0 0 0] 0.092;
clearance clearance [0 1 0 0 0 0 0] 0.002;
rpm rpm [0 0 -1 0 0 0 0] 3000;
• specify the kind of engineTopoChangerMesh
engineTopoChangerMesh verticalValves;
SETTING THE engineGeometry FILE
• specify details about the piston
piston
{
patch piston;
coordinateSystem
{
type Cartesian;
origin (0 0 0);
axis (0 0 1);
direction (0 1 0);
}
minLayer 0.0005;
maxLayer 0.002;
delta 0.5e-3;
offSet 0.002;
SETTING THE engineGeometry FILE
• delta and offset are used to identify the faces for dynamic
layering:
• offset: distance from the
piston patch
• delta: tolerance within to
find the faces
• only ONE layer of faces has
to be identified!
• typical values:
delta
offset 2-6 mm
delta 0.1 – 2 mm
offset
SETTING THE engineGeometry FILE
• list of valves:
verticalValves
(
valve1
{
// subdictionary (let’s have a look....)
}
valve2
{
.....
}
.....
);
• for each valve it is necessary to specify associated patches,
geometry data, lift curves, control parameters.
SETTING THE engineGeometry FILE
• other parameters to be set:
// valveTopTol:
// when the valve lift is lower than 1e-3; the
poppet layering is disabled
valveTopTol 1e-3;
bottomValveTol 5e-5;
poppetValveTol 5e-5;
checkMesh on;
// switch from dynamic layering to deformation
deformAngle 38;
SETTING THE MOTION B.C. (motionU)
• motionU is used to deform the grid during deformation and to
deform the upper part of the valve when its lift is lower than
deformationLift:
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
// moving boundaries
// fixed boundaries
}
• piston: componentMixed;
• poppet and bottom of the valves: fixedValue;
• fixed boundaries except liner: fixedValue (0 0 0);
• liner: componentMixed;
• slidingInterface boundaries: componentMixed;
MOVING THE MESH
• Simulation of the intakeStroke;
• Mesh has to be moved from BDC to TDC;
• Set “0” as endTime in the controlDict;
• Set 0.25 as deltaT, then run moveEngineTopoMesh;
• Then run:
moveEngineTopoMesh . 2dTutorial
CASE SETUP
• 2dTutorialCase;
• Set startTime as 0 in the controlDict file;
• Copy the 0/polyMesh directory from the moving mesh case in
the 0/ directory of the 2dTutorial case;
• Copy the 0/motionU file from the moving mesh case in the 0/
directory;
• Set the correct initial conditions for:
• b, egr, epsilon, ft, k, p, St, Su, T, Tu, U, Xi;
• Set the thermophysicalProperties and combustionProperties
dictionaries;
• Set the fvSchemes, fvSolution and controlDict file;
engineDyMFoam
• Solver for internal combustion engines:
• Automatic Mesh motion;
• Topological changes;
• Minimum modifications to engineFoam:
• mesh.move() replaced by mesh.update();
• createEngineDynamicMesh.H is included instead of
createEngineMesh.H;
• Simulation of SI engines;
• Included in the 1.4.1 version together with dieselEngineDyMFoam;
RUNNING THE CASE
engineDyMFoam . 2dTutorialCase
ACKNOWLEDGMENTS
• Dr. Hrvoje Jasak
• Dr. Zjelko Tukovic
• Dr. Gianluca D’Errico
• Dr. Gianluca Montenegro
• Ing. Daniele Ettorre
• Valentina Contini and Paolo Ferrario