engine simulation with piston and valve action in openfoam

21
Engine Simulation with Engine Simulation with Piston and Valve Action Piston and Valve Action in in OpenFOAM OpenFOAM T. Lucchini T. Lucchini Department of Department of Energetics Energetics , Politecnico di Milano, Italy , Politecnico di Milano, Italy [email protected] [email protected]

Upload: others

Post on 12-Feb-2022

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Engine Simulation with Piston and Valve Action in OpenFOAM

Engine Simulation with Engine Simulation with

Piston and Valve Action Piston and Valve Action

in in OpenFOAMOpenFOAM

T. LucchiniT. LucchiniDepartment of Department of EnergeticsEnergetics, Politecnico di Milano, Italy, Politecnico di Milano, Italy

[email protected]@polimi.it

Page 2: Engine Simulation with Piston and Valve Action in OpenFOAM

TOPICSTOPICS

•• MESH MOTION WITH TOPOLOGICAL CHANGESMESH MOTION WITH TOPOLOGICAL CHANGES

•• engineTopoChangerMeshengineTopoChangerMesh

•• CASE SETUPCASE SETUP

�� Mesh generation;Mesh generation;

�� Setting the motion boundary conditions;Setting the motion boundary conditions;

�� Dictionaries;Dictionaries;

�� Definition of the face zones;Definition of the face zones;

�� Definition of the mesh modifiers;Definition of the mesh modifiers;

�� Moving the mesh from Moving the mesh from --180 to 180 CAD;180 to 180 CAD;

•• RUNNING THE CASERUNNING THE CASE

�� Initial conditions;Initial conditions;

�� Control parameters;Control parameters;

�� Dictionaries;Dictionaries;

�� engineDyMFoamengineDyMFoam

•• POSTPROCESSING THE CASEPOSTPROCESSING THE CASE

Page 3: Engine Simulation with Piston and Valve Action in OpenFOAM

MESH MOTION WITH TOPOLOGICAL CHANGESMESH MOTION WITH TOPOLOGICAL CHANGES

•• No preNo pre--processing. Mesh motion integrated in the processing. Mesh motion integrated in the

solver, at any time step:solver, at any time step:

�� Grid points moved;Grid points moved;

�� Mesh topology eventually changed;Mesh topology eventually changed;

•• MultipleMultiple--region decomposition: in each region, mesh region decomposition: in each region, mesh

motion is accommodated in different ways;motion is accommodated in different ways;

•• Combined use of different topological changes;Combined use of different topological changes;

•• Polyhedral vertex based motion solver for mesh Polyhedral vertex based motion solver for mesh

deformation based on Finite Element Method (FEM);deformation based on Finite Element Method (FEM);

Page 4: Engine Simulation with Piston and Valve Action in OpenFOAM

engineTopoChangerMeshengineTopoChangerMesh

•• State of art: State of art: OpenFOAMOpenFOAM can be used to simulate I.C. engines;can be used to simulate I.C. engines;

•• Engine meshes are derived by the Engine meshes are derived by the engineTopoChangerengineTopoChanger mesh mesh

class:class:

�� NO PRENO PRE--PROCESSINGPROCESSING

�� layerARlayerAR: compression: compression--combustion (diesel or SI);combustion (diesel or SI);

�� twoStroketwoStroke: two stroke engines with scavenging ports;: two stroke engines with scavenging ports;

�� verticalValvesverticalValves: four stroke engines with vertical valves;: four stroke engines with vertical valves;

�� PREPRE--PROCESSING + FIELD MAPPING (standard approach)PROCESSING + FIELD MAPPING (standard approach)

�� layeringDeformationlayeringDeformation: dynamic layering on the piston : dynamic layering on the piston

surface, deformation around the valves with automatic surface, deformation around the valves with automatic

mesh motion. It can be used for any kind of I.C. engine;mesh motion. It can be used for any kind of I.C. engine;

Page 5: Engine Simulation with Piston and Valve Action in OpenFOAM

STANDARD APPROACHSTANDARD APPROACH

•• List of target meshes (from 10 to 50 meshes for a full cycle List of target meshes (from 10 to 50 meshes for a full cycle

simulation);simulation);

•• Each mesh is used for a certain crank angle interval (CA);Each mesh is used for a certain crank angle interval (CA);

•• After that fields are reAfter that fields are re--mapped (mapped (mapFieldsmapFields) on the new mesh ) on the new mesh

and a new case is run;and a new case is run;

•• Example: intake stroke in a fourExample: intake stroke in a four--stroke engine with canted stroke engine with canted

valvesvalves

Page 6: Engine Simulation with Piston and Valve Action in OpenFOAM

ENGINE TUTORIAL CASE ENGINE TUTORIAL CASE -- MESH GENERATIONMESH GENERATION

•• TwoTwo--D engine with vertical valves generated with D engine with vertical valves generated with blockMeshblockMesh;;

•• Mesh must be decomposed into multiple regions;Mesh must be decomposed into multiple regions;

•• Simulation of the intake stroke (mesh generated at TDC)Simulation of the intake stroke (mesh generated at TDC)

Valve Valve

volumevolumeCylinder Cylinder

volumevolume

Port volumePort volume

Valve and cylinder volumes should be

completely separated even if they share points. This is achieved by

specifying twice the same points in the blockMeshDict file.

Page 7: Engine Simulation with Piston and Valve Action in OpenFOAM

ENGINE TUTORIAL CASE ENGINE TUTORIAL CASE –– BOUNDARY (FIXED)BOUNDARY (FIXED)

•• cylinderHeadcylinderHead

•• linerliner

•• valveWallsvalveWalls

•• valveStemvalveStem

•• intakePortintakePort

Page 8: Engine Simulation with Piston and Valve Action in OpenFOAM

ENGINE TUTORIAL CASE ENGINE TUTORIAL CASE –– BOUNDARY (MOVING)BOUNDARY (MOVING)

•• pistonpiston

•• valveTopInvalveTopIn

•• valveBottomInvalveBottomIn

Page 9: Engine Simulation with Piston and Valve Action in OpenFOAM

ENGINE TUTORIAL CASE ENGINE TUTORIAL CASE –– BOUNDARY (BOUNDARY (slidingInterfaceslidingInterface))

•• valveCurtainCylInvalveCurtainCylIn

•• valveCurtainPortInvalveCurtainPortIn

Page 10: Engine Simulation with Piston and Valve Action in OpenFOAM

ENGINE TUTORIAL CASE ENGINE TUTORIAL CASE –– BOUNDARY (BOUNDARY (attachDetachattachDetach))

empty boundariesempty boundaries

•• valveDetachInPortvalveDetachInPort

•• valveCurtainPortInvalveCurtainPortIn

Page 11: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE SETTING THE engineGeometryengineGeometry FILEFILE

•• constant/constant/engineGeometryengineGeometry

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 engine geometry dataspecify engine geometry data

•• specify the kind of specify the kind of engineTopoChangerMeshengineTopoChangerMesh

engineTopoChangerMesh verticalValves;

Page 12: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE SETTING THE engineGeometryengineGeometry FILEFILE

•• specify details about the specify details about the pistonpiston

pistonpiston

{{

patchpatch pistonpiston;;

coordinateSystemcoordinateSystem

{{

typetype CartesianCartesian;;

originorigin (0 0 0);(0 0 0);

axisaxis (0 0 1);(0 0 1);

direction (0 1 0);direction (0 1 0);

}}

minLayerminLayer 0.0005;0.0005;

maxLayermaxLayer 0.002;0.002;

}}

delta 0.5edelta 0.5e--3;3;

offSet 0.002;offSet 0.002;

Page 13: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE SETTING THE engineGeometryengineGeometry FILEFILE

•• delta and offset are used to identify the faces for dynamic delta and offset are used to identify the faces for dynamic

layering:layering:

•• offsetoffset: distance from the : distance from the

piston patchpiston patch

•• deltadelta: tolerance within to : tolerance within to

find the facesfind the faces

•• only only ONEONE layer of faces has layer of faces has

to be identified!to be identified!

•• typical values:typical values:

�� offset 2offset 2--6 mm6 mm

�� delta 0.1 delta 0.1 –– 2 mm2 mm

offsetoffset

deltadelta

Page 14: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE SETTING THE engineGeometryengineGeometry FILEFILE

verticalValvesverticalValves

((

valve1valve1

{{

// // subdictionarysubdictionary (let(let’’s have a look....)s have a look....)

}}

valve2valve2

{{

..........

}}

..........

););

•• list of valves:list of valves:

•• for each valve it is necessary to specify associated patches, for each valve it is necessary to specify associated patches,

geometry data, lift curves, control parameters.geometry data, lift curves, control parameters.

Page 15: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE SETTING THE engineGeometryengineGeometry FILEFILE

•• other parameters to be set: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;

Page 16: Engine Simulation with Piston and Valve Action in OpenFOAM

SETTING THE MOTION B.C. (SETTING THE MOTION B.C. (motionUmotionU))

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField

{

// moving boundaries

// fixed boundaries

}

•• piston: piston: componentMixedcomponentMixed;;

•• poppet and bottom of the valves: poppet and bottom of the valves: fixedValuefixedValue;;

•• fixed boundaries except liner: fixed boundaries except liner: fixedValuefixedValue (0 0 0);(0 0 0);

•• liner: liner: componentMixedcomponentMixed;;

•• slidingInterfaceslidingInterface boundaries: boundaries: componentMixedcomponentMixed;;

•• motionUmotionU is used to deform the grid during deformation and to is used to deform the grid during deformation and to

deform the upper part of the valve when its lift is lower than deform the upper part of the valve when its lift is lower than

deformationLiftdeformationLift::

Page 17: Engine Simulation with Piston and Valve Action in OpenFOAM

MOVING THE MESHMOVING THE MESH

•• Simulation of the Simulation of the intakeStrokeintakeStroke;;

•• Mesh has to be moved from BDC to TDC;Mesh has to be moved from BDC to TDC;

•• Set Set ““00”” as as endTimeendTime in the in the controlDictcontrolDict;;

•• Set 0.25 as Set 0.25 as deltaTdeltaT, then run , then run moveEngineTopoMeshmoveEngineTopoMesh;;

•• Then run:Then run:

moveEngineTopoMeshmoveEngineTopoMesh . 2dTutorial. 2dTutorial

Page 18: Engine Simulation with Piston and Valve Action in OpenFOAM

CASE SETUPCASE SETUP

•• 2dTutorialCase;2dTutorialCase;

•• Set Set startTimestartTime as 0 in the as 0 in the controlDictcontrolDict file;file;

•• Copy the 0/polyMesh directory from the moving mesh case in Copy the 0/polyMesh directory from the moving mesh case in

the 0/ directory of the 2dTutorial case;the 0/ directory of the 2dTutorial case;

•• Copy the 0/motionU file from the moving mesh case in the 0/ Copy the 0/motionU file from the moving mesh case in the 0/

directory;directory;

•• Set the correct initial conditions for:Set the correct initial conditions for:

•• b, b, egregr, epsilon, ft, k, p, St, Su, T, , epsilon, ft, k, p, St, Su, T, TuTu, U, Xi;, U, Xi;

•• Set the Set the thermophysicalPropertiesthermophysicalProperties and and combustionPropertiescombustionProperties

dictionaries;dictionaries;

•• Set the Set the fvSchemesfvSchemes, , fvSolutionfvSolution and and controlDictcontrolDict file;file;

Page 19: Engine Simulation with Piston and Valve Action in OpenFOAM

engineDyMFoamengineDyMFoam

•• Solver for internal combustion engines:Solver for internal combustion engines:

•• Automatic Mesh motion; Automatic Mesh motion;

•• Topological changes;Topological changes;

•• Minimum modifications to Minimum modifications to engineFoamengineFoam::

•• mesh.movemesh.move()() replaced by replaced by mesh.updatemesh.update()();;

•• createEngineDynamicMesh.HcreateEngineDynamicMesh.H is included instead of is included instead of

createEngineMesh.HcreateEngineMesh.H;;

•• Simulation of SI engines;Simulation of SI engines;

•• Included in the 1.4.1 version together with Included in the 1.4.1 version together with dieselEngineDyMFoamdieselEngineDyMFoam; ;

Page 20: Engine Simulation with Piston and Valve Action in OpenFOAM

RUNNING THE CASERUNNING THE CASE

engineDyMFoamengineDyMFoam . 2dTutorialCase. 2dTutorialCase

Page 21: Engine Simulation with Piston and Valve Action in OpenFOAM

ACKNOWLEDGMENTSACKNOWLEDGMENTS

•• Dr. Dr. HrvojeHrvoje JasakJasak

•• Dr. Dr. ZjelkoZjelko TukovicTukovic

•• Dr. Dr. GianlucaGianluca DD’’ErricoErrico

•• Dr. Dr. GianlucaGianluca MontenegroMontenegro

•• IngIng. . DanieleDaniele EttorreEttorre

•• ValentinaValentina ContiniContini and Paolo and Paolo FerrarioFerrario