Week 4.1: Project - Steady state simulation of flow over a throttle body
1] Aim :
* To perform steady state flow simulation over a throttle body
2] Objective :
* Setup a case for a steady state flow analysis over a throttle body.
* Show velocity and pressure contour plots.
* Show plots for mass flow rate,velocity ,pressure,and total cell count & discuss results.
3] Introduction And Theory :
A throttle body is a tube-shaped housing that contains a flat valve (butterfly) that rotates to vary the amount of air
entering an engine.It is the mechanism by which fluid flow is managed by constriction or obstruction.
On older carbureted engines, the throttle body is built into the carburetor. It is opened and closed through a cable and
linkage from the gas pedal and engine vacuum, more fuel is delivered as the valve opens.

On a fuel-injected engine the throttle body is normally located between the air filter and the intake manifold, and is
connected to the gas pedal mechanically with a cable, or electronically by wire. When the driver presses the pedal the
butterfly in the throttle body pivots to let more air flow into the manifold.
4] Solution Procedure :
To simulate steady state flow over a throttle body ,we will follow the below procedure :-
Geometry Creation --> Case Setup --> Solution --> Post Processing
4.1] Geometry Creation :
* Launch Converge and start a new project.
* Drag and drop the .stl model in converge.

* If we observe the geometry we can see that,it has thickness.But since this is not a conjugate heat transfer analysis,we
don't need it,as it would increase the number of mesh cells.To delete thickness follow below steps,
Enable Hot Keys => Select triangle selection tool and select by angle option => select outer pipe surface => press D.
Simillarly delete other components.Also patch the open edges.

* In converge ,geometries are represented as triangles.So we need to group these triangles to create boundaries.This is the
fundamental step in Converge.
Geometery => Boundary => Flag => click on add and add 3 boundaries => rename first boundary as inlet => using by angle triangle selection,select front face triangles => apply.
* Simillarly flag outlet,elbow wall and throttle.

* As our flow is internal,we want all the normals to point into the fluid domain.To do that,
click on normal toggle => transform => normal => click on triangle with outside pointing normal => apply
* Make sure that geometry is clean,
Diagnosis => find => no errors.
4.2] Case Setup :
* Click on Begin Case Setup => General Flow => Done.
* Our working fluid will be air .
* Materials => Predefined mixture => Air => uncheck reaction mechanism => check species => Apply & Done.
* Keep default global transport parameters.
* In species add oxygen and nitrogen.

* We will be running steady state simulation.To set this follow below steps,
* a] Run Parameters => Solver => select solver type steady state solver => simulation mode full hydrodynamic => Gas flow solver compressible.
b] In Misc => check steady state monitor => uncheck use shared memory.


* In converge it is mandatory in steady state simulation to define monitor points,so that solver know when to terminate the
simulation in order to save computation time.
Steady State Moniter => Add Config. => then add average velocity,total pressure , mass flow rate.

* We need to define the minimum number of cycles we want simulation to run before terminating, set it to 1000 cycles.
* Also we don't want the solver to moniter the points from the start of the simulation,as we know simulation will be
unsteady at the start of the simulation.Hence we will moniter the solution after 1000 cycles and our sample size will be 500.
* Simulation time parameters =>
Start Time - 0 cycles
End Time - 15000 cycles
Initial Time Step - 1e-9 sec.
Minimum Time Step - 1e-9 sec.
Maximum time step - 1 sec.
Maximum Convection CFL limit - 1.0.

* Solver Parameters =>
Navier-Stokes solver Scheme => PISO
Navier-Stokes solver Type => Density Based
Pressure Preconditioner - none
Maximum convection CFL limit(Final Stage) - 0.5



* Now before setting the boundaries,set initial region and set initial pressure and define air species.This region will be assigned to each boundary.

* Boundaries =>
Inlet -
Boundary Type - INFLOW
Pressure Boundary Condition - Specied value - 150000 Pa
Temperature Boundary Condition - Specied value - 300 K
Species Boundary Condition - select Air

Outlet -
Boundary Type - OUTFLOW
Pressure Boundary Condition - Specied value - 100000 Pa
Temperature Boundary Condition - Specied value - 300 K
Species Boundary Condition - select Air

Elbow_wall -
Boundary Type - Wall
Wall Motion - Stationary
Surface Movement - Fixed

Throttle -
Boundary Type - Wall
Wall Motion - Stationary
Surface Movement - Fixed

* For turbulence model select RNG k-epsilon.

* In converge mesh generation is a fully automatic process.Converge uses cut cell method to generate the mesh.This is a patented method developed by coverge.
Base Grid = dx= 0.001 ; dy = 0.001 ; dz = 0.001 => ok

* As we want to moniter how flow behaves around the valve,we need to refine the mesh near it.To do that we will do fixed embedding.
Boundary => Fixed Embedding => Add => Entitiy type boundary => Boundary ID throttle => Mode Permanent => Scale 3 => Embed Layers 2.

* In post variable selection,select the variables which needs to be post processed and set species mass fraction.
* We want our post processed graphes and animations to be smooth,so we want ample amount of ouput files.It is good practice to have at least 100 3D output files and same amount of text output files.

4.3] Solution :
* For running the simulation,first we need to export all the input files to the folder where we want to save our 3D 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 group file ,which will be used by paraview to post process our results.
4.4] Post-Processing :
Mesh(1 mm) Cross Sectional View

Velocity Contour

Pressure Contour

Plot of Variables




5] Animations :
Velocity => https://www.youtube.com/watch?v=XyWzGSDefAs
Pressure => https://www.youtube.com/watch?v=3U_RSv1whuM
6] Discussion :
* From the above contours and plots and cotours we can see that flow velocity is increasing towards the downstream which is validated by the decrease in pressure.
* Both inlet and outlet mass flow rates have converged to the same value,indicating conservation of mass.
* Maximum pressure was obtained at the front of the throttle plate because of sudden stagnation.Whereas minimum pressure was obtained between the throttle wall and the elbow wall,this happens because of reduction in the cross-sectional area of the flow.
*Average velocity is 186 m/s and total number of cells generated are 70860.
7] Conclusion :
* By observing the plots,we can conclude that our simulation has reached steady state.
* We can clearly observe the inverse relation between pressure and velocity,which proves that our results are physical.
* Hence steady state flow simulation has been successfully performed on the throttle body.