Week 4.2: Project Transient simulation of flow over a throttle body
AIM:
Transient simulation of flow over a throttle body
Objectives:
- Post process the results and show pressure and velocity contours.
- Show the mesh (i.e surface with edges)
- Show the plots for pressure, velocity, mass flow rate and total cell count.
- Create an animation in which it throttle movement should be visible.
theory:
In a traditional spark ignition gasoline engine, the throttle body is the part of the air intake system that controls the amount of air that flows into an engine's combustion chamber. It consists of a housing unit that contains a throttle plate (butterfly valve) that rotates on a shaft. When the accelerator (gas pedal) is pushed down, the throttle plate opens and allows air into the engine. When the gas pedal is released, the butterfly closes and effectively chokes off (throttles) air flow into the combustion chamber. This process effectively controls the speed of the engine and ultimately, the speed of the vehicle.

Geometry:
the below figure is the throttle body with throttle plate.

now check the normals of all the faces are facing inside or not by using normal toggle tool and then buid case setup.then i have used boundary tool in the geometry. here i have named the boundaries to the box. i have named the pipe wall as elbow, throotle plate as throttle, inlet and outlet. in the above figure, the top right side face is inlet and the bottem left side face is outlet.

in the above figure, sum represents the number of triangles selected at the each boundary. now use normal toggle tool. in the converge,the normals are aloways directed to outside of the box faces as a default. but here the fluid is inward flow. so eliminate them, click on transform in geometry and slect of triangle and click apply. to check whethere the geometry is correct or not(ie open edges errors, overlap errors), click on the diagnosis which is shown at the bottem left of the display and click findings. mow buid the case setup.
case setup:
application type: time beased
materials: air
click on gas simulation as the air is gaseous state and click on species to calcuate how the mass fraction of N2 and O2 are changing along the flow.

species-

simulation parameters:
run parameters-
i am running the somulation using transient state solver because here the throttle has to rotate with time. the primitive variables gets changes with time. so to capture them i have used transient state solver. full hydrodynamic simulation mode is used for simple geometries.

we have click on steady state monitor only for the steady state problems only.
simulation time parameters-
the maximum convection cfl number should always be less than or equal to 1. so that solution would converge otherwise solution gets blown up.to calculate the end time, i have used the following procedure.
to calcumate the time we need velocity flow and length of the elbow. here the charecterstic length of the geometry is 0.2m. the inlet velocity fluid i have taken from steady state simulation, that is 180m/s. so we can say that time taken by the fluid to move out of the elbow is 0.0011 s. here even in the trancient simulations, the solution needed to be converged. so for that we have to increase the time, so have taken the end time as 0.01 s.

solver parameters-
density based solver is used here

initial conditions and events:
regions and initialization-
here i have named the entire box region as volumetric region.

boundary conditions:
boundary-
- inlet- the inlet pressure(total pressure) i have taken is 150000 pascals.

- outlet- the outlet pressure(static pressure) i have taken is 100000 pascals

- elbow wall - for the turbulent flows, we have to take law of wall.

- throttle-
here throttle has to move with time, so that i have taken the rotating wall motion type with moing surface movement. to calculate the rotation cetre and rotation about, open geometry in converge. now select the surfaces of the throttle by choosing by angle option and hide them. now we are going to see onle the shaft about which throttle rotates. now click on measure and then click on direction and then choose arc normal option. now select any three vertices of the triangles as shown below and then click apply. now in the message box we can see arc centre, arc diameter and arc normal. rotation centre denotes the point at which centre of shaft is located and arc normal re[resents the vector normal to the diamater surface of the shaft.

copy the arc centre and paste it in the rotation centre and copy the arc normal and paste it in the rotation about. 
for the rotation rate, open the file and then selecte the angle at which the shaft should rotate after some time. here initially at zero seconds the shaft is rotating zero degrees and after 0.002 seconds, the shaft gets rotated 25 degrees.

physical models:
turbulence modelling-

grid control:
base grid-

fixed embedding- i have enabled fixed embedding because to scale the cells at walls of the geometry. it means to to capture the turbulence in the turbulence boundary layer region, we have to provide cells with small size at the walls of the boundary. embedded layers represents the number of layers of cells we are going to take.

output/post-processing:
post variable selection-

output-
time interval for writing the 3d output data files is 0.001 seconds. it means , the output values of the proble gets stored for every 0.001 seconds . for every 0.001 seconds, we can see the values of primitive variables in the paraview.

solution:
now export all the input files in a folder. so from this we can see that converge is used to create the input files for the simulation. now insert the two application files from the converge folder to the folder where i have exported all the input files.

for the simulation i have used cygwin64 terminal. in cygwin termpinal open the folder where you have pasted all the input and application files.
now for the simulation write mpiexec.exe -n 4 converge.exe restricted and click enter. here 4 represents the number of processors used at a time.
post processing of results:

for this copy post convert application from converge folder to output folder which is generated in the input files folder. we are doing this because we are goingto convert all the output files into a vtk file which can be easily read by paraview software. toconvert the files we have to use post conver application as shown in the figure. there we can see the results that are obtained. now in cygwin open the output folder and write mpiexec.exe -n 4 post_convert.exe and click enter. now the below figure will appear

after naming the case and choosing 10, hit enter. now click yes for boundary output surface. now all the output files will appear and then write 'all' to convert all the output files. now select 'all' at cell variable selection menu. now all the files gets converted into paraview vtk files.
now open paraview. in paraview, open file and select case name .. vtm file which is present in the output files. finally we see the geometry in the paraview. now choose slice tool to select the axis along which all the primitive variables are same. as we know that, along z axis the primitive varibles are equal. so select axis and click apply.
grid-
the size of the cell along x . y, z axis are taken a 0.002m.

velocity contour-

pressure contour-

velocity plot at inlet-

velocity plot at outlet-

static pressure plot at inlet-

total pressure plot at outlet-

mass flow rate plot at inlet-

mass flow rate plot at outlet-

total cell count-

animation for above simulation-
conclusion:
- here we can claerly see that the mass flow rate at outlet us decreases with increase in angle of throttle from 0 to 25 degrees.
- the cell count changes with respect to time because here we have given the command the throttle has to move 25 degrees from its initial position with in 0.002 seconds. there fore the cell count keeps on changed here.
- with decrease in mass flow rate, the velocity gets decreased at outlet. so we have clearly seen that the pressure gets increased with change in throttlw position from 0 to 25 degress.