Week 9: Project 1 - Surface preparation and Boundary Flagging (PFI)
AIM :
To perform surface preparation and boundary flagging on a PFI engine and setting up NO HYDRO simulation.
OBJECTIVE :
* To perform surface preparation and flag the boundaries on a given PFI IC engine case.
* Setting up NO HYDRO simulation.
* To show mesh on different slices at different time steps.
* To show the animation of how all the valves and pistons move according to crank angles.
DESCRIPTION :
In a PFI IC engine, fuel is injected prior to the valves and cylinder. The intake port will have a fuel injection system that sprays fuel into the air coming into the engine. From there spark plug ignite the pressurised slurry of air and fuel ,pushing the cylinder head down and spinning the crankshaft.
SOLUTION PROCEDURE :
To perform this simulation ,we will follow the below procedure :-
Geometry cleanup --> Case Setup --> Solution --> Post Processing
GEOMETRY CLEANUP :
* Import the given .stl file into converge studio and run diagnosis on it.
* From diagnosis we can see a list of multiple errors which, we need to resolve. But before cleaning up the geometry, we will first flag all the required boundaries, this will help us in geometry cleanup.
BOUNDARY FLAGGING :
* To flag boundaries go to,
Geometry => Boundary => Flag. Below is the list of all the flagged boundaries.
Piston :
Below are the steps to flag this boundary -
* Go to Boundary => Fence => By selected edges => using by arc, select edge as shown in picture => Mark fence
* Geometry => Boundary => Flag => using by boundary fence, select piston => name boundary as piston => Apply.
Liner :
* Go to Boundary => Fence => By selected edges => using by arc, select edge as shown in picture => Mark fence
* Geometry => Boundary => Flag => using by boundary fence, select cylinder => name boundary as liner => Apply.
Inflow :
* Geometry => Boundary => Flag => using by angle triangle, select inlet => name boundary as inflow => Apply.
cylinder head :
* Go to Boundry => Fence => By selected edges => using by arc,select edge as shown in picture => Mark fence
* Geometry => Boundary => Flag => using by boundary fence, select cylinder head => name boundary as cylinder head => Apply.
exhaust port :
* Geometry => Boundary => Flag => using by angle triangle, select port => name boundary as exhaust port => Apply.
* Also we want ring triangles to be a part of exhaust port.
* Go to Boundary => Fence => By selected edges => using by arc, select edge as shown in picture => Mark fence
* Geometry => Boundary => Flag => using by boundary fence, select ring triangles and add them to exhaust port.
outflow :
* Geometry => Boundary => Flag => using by angle triangle, select inlet => name boundary as outflow => Apply.
exhaust valve top, exhaust valve bottom, exhaust valve angle :
* Using above steps create 3 fences as shown in below picture.
* Geometry => Boundary => Flag => using by boundary fence, create 3 boundaries named as exhaust valve top, exhaust valve bottom, exhaust valve angle
intake port 1 and intake port 2:
* Create the fence using between two vertices and divide the intake port into 2 parts as shown. Also click on reconstruct fences from existing boundaries.
* Now flag the part which is close to the combustion chamber as intake port 1 and other one as intake port 2.
intake valve top, intake valve bottom, intake valve angle :
* Using above steps create 3 fences as shown in below picture.
* Geometry => Boundary => Flag => using by boundary fence, create 3 boundaries named as intake valve top, intake valve bottom, intake valve angle.
spark plug :
* Click on reconstruct fences from existing boundaries.
*Geometry => Boundary => Flag => using by boundary fence, select spark plug.
spark plug terminal :
* Geometry => Boundary => Flag => using by angle triangle, select terminal => name boundary as spark plug terminal => Apply.
Errors In Geometry :
After diagnosis we can see multiple geometric defects,lets discuss them.
Intersection errors -
Intersection errors occur when more than teo triangles intersect with each other. Here they are occurring because of intake valves being lifted up too much. We can see from the below picture that intake valves are protruding into the intake port.
To resolve this we need to move the valves down. To do this follow the below steps,
* Go to Transform => Translate => Selected boundaries => select intake valve top, intake valve bottom, intake valve angle => enter translation amount of 0.002 => apply.
Nonmanifold errors -
It occurs when more than 2 triangles shares same edges. To resolve this delete the overlapping triangles and create new ones.
Open Edges -
These occur due to incomplete triangles formation on the surface. To resolve them just go to repair and select patch ,select free edge loop and using by open edge patch the errored surface.
Overlapping Tris and Normal Orientation :
Overlapping triangles are the triangles that are overlapped on each other. Usually these are fixed by deleting the overlapped triangles and patching them back together. Here normal orientation is clubbed with the overlapping tris. This can be fixed by checking the direction of normals. If the normals are pointing outwards, then just transform them inside.
This concludes geometry cleanup.
NO HYDRO Setup -
*In application type select Crank angle based IC engine.
*Input proper values for cylinder bore, stroke and crank speed.
*In materials select reaction mechanism.
*Add given therm.dat file in the gas simulation.
*Keep default global transport parameters*
*In reaction mechanism add given mech.dat file.
*In run parameters select transient solver and no hydro dynamic solver as simulation mode.
* Give proper simulation time parameters
*Keep default solver parameters.
*Boundary Conditions -
* Piston
* Liner
* Inflow
* Cylinder head
* exhaust port
* Outflow
* Exhaust valve top, Exhaust valve angle, Exhaust valve bottom
* Intake port 1
* Intake valve bottom, Intake valve angle, Intake valve top
* Spark plug
* Spark plug terminal
* Intake port 2
* Regions and Initialization
* Events
* Turbulence modelling
* Base Grid
* Fixed Embedding
* Output variables
* SOLUTION :
*For running the simulation, first we need to export all the input files to the folder where we want to save our output files,
File => Export => Export Input Files => select the desired folder => Export.
*Now we will use CYGWIN command prompt to run our simulation. But before running the simulation first we need executables
which will solve the simulation, for that paste mpiexec.exe and converge.exe into the folder where we have exported all our input files.
*Now using CYGWIN command prompt, navigate to the folder where all the input files are exported and type the below command,
mpiexec.exe -n 4 converge.exe restricted </dev/null> logfile &
*In the above command ,mpiexec.exe will help us to run our simulation in parallel,-n 4 are the number of cores on which we
want to run our simulation. As we are using the version of converge which has limit on the size of the file it can solve hence the command restricted. And the last part of the command dump all the data that is being generated into the logfile, which we can access during simulation procedure to see where our simulation has reached.
*The above command will create a folder named output containing all the generated 3D output data. As we will be using paraview as the postprocessing tool. Hence we need to convert these output files into the format that paraview can read. For this we will use converge post convert tool.
Go to converge post processing 3D =>give case name => select the file type => navigate to the output folder and select it
=> select all files => select all variables => convert.
This will create a group file, which will be used by Paraview to post-process our results.
CONCLUSION -
Hence the boundary flagging and geometry cleanup has been done successfully. Also No-Hydero case was setup and animations of valve movement and mesh generation is shown.