Challenge

Project simulation of flow over a throttle body

AIM:

The aim of this project is to simulate the flow through an elbow in both steady and unsteady cases in Converge Studio.

OBJECTIVES OF THE PROJECT:

  • Post-process the results and generate the pressure and velocity contours.
  • Observe the mesh (i.e., surface with edges)
  • Plot pressure, velocity, mass flow rate and total cell count.
  • Create an animation in which the throttle movement should be visible.
  • The throttle movement is as follows

: From 0 to 2 ms the valve should rotate by 25 degrees.

: From 2 to 4ms it should stay at 25 degrees.

: After which by 8ms the valve should get back to its original position.

PROCEDURE:

SETTING UP THE CASE

Cleaning the geometry

We start with creating geometry in Solidworks. In this case, the geometry was already created.

  • As we open a new project, we import the geometry by dragging it from the file explorer and dropping it on the converge screen or by importing it from the file menu.
  • Once the geometry appears, we need to check the geometry units. We can do this by going to the Left-side geometry panel > Options > check the boundary box.
  • If the boundary size is in the range of 100meters we can scale it by geometry panel > Transform > Scale > give a scaling factor of 0.001. And the geometry will come to a range of 0.1 m
  • Once the Geometry is created, we select the boundaries. Go to geometry tab > Boundary > Find/clean > Find. This will find the triangle orientation and identifies the boundaries.
  • Once that is done. On inspection we can find that the elbow has a thickness i.e., It has an inner layer and the outer layer. We will not be needing the outer layer, so we delete the outer layer by selecting the triangles pick option in the top toolbar, and we select the type to “by angles”. And once we click on the Outer elbow, the entire outer portion gets selected, now we can delete the outer boundary.
  • Also, the side portion near the area of cross-sections is not required hence we remove them using the same method. Now we can see that converge has identified the openings, it circled the openings with yellow. We can patch these openings using the patch tool in the repair section in the geometry tab.
  • We select the line pick option and set the type to “by open edge” in the top toolbar. And select the two openings and “Apply”. This will patch the two openings.
  • In the “Boundary” options select flag and press “+” select 4 boundaries and press ok. We keep the geometry in standard orientation.
  • 4 boundaries will be shown, we rename them as

Boundary 1 > “Throttle” (Select the throttle, we can do this by selecting the elbow and hiding it, this shows the inlet, Outlet, and throttle. For throttle select the triangle pick option and select the type to by surface option and select the entire throttle.)

Boundary 2 > “Elbow” (select the elbow)

Boundary 3 > “Inlet” (select one patched opening)

Boundary 4 > “Outlet” (select the other patched opening)

  • Now left-click on a boundary name and select the triangles on the geometry to assign those triangles to the boundary. Repeat this process for all 4 boundaries created.
  • We can make sure that all the boundaries are assigned by checking the Not Assigned (Boundary ID 0), If the triangles in this boundary are none then all the triangles are assigned to the created boundaries.

Since the geometry in converge is made of triangles, the above steps will assign triangles to boundaries.

  • On the left side of the geometry tab, there are some icons. Click on the icon with a blue triangle with a yellow normal pointing outward. This will show the normal of each boundary on the geometry created. If these normal are facing outward they must point inward.
  • To do so on the tool on the left there is another tab called Transform > Normal.
  • In this tab make sure the propagate change from a single triangle is checked and click on any triangle on the geometry and click Apply. This will change the normal direction to inward.

The normal in geometry should point towards the fluid domain. The above steps will invert the normal towards the inside where the fluid is flowing.

  • On the right side of the GUI, there is another toolbox. At the bottom of this toolbox, there are three tabs. Go to the diagnosis tab and with the default options click on find. This will generate a report if all the boxes shown above are checked green select clear.
  • Go to the case setup tab and click Begin Case Setup.
  • A new window will pop up (If it does not, click on application type) select Time based and click on apply and then done.
  • Now on the right side, we can see many sections which is where we can set up the simulation.
  • Click on the Materials tab and select the predefined mixture as Air, Uncheck the reaction mechanism and check the species option and press ok.
  • A new message will pop up asking Do you really want to overwrite gas.dat, mech.dat and therm.dat by loading predefined mixture as air? Click on yes.

We selected the type of fluid flowing inside the geometry to air in the above steps

  • In the Gas simulation option with the default settings click apply and done
  • Same for the global transport parameters with the default settings click on apply and done.
  • On the species mechanism click on add and type O2 and N2 and add them from the suggestions/manual entry.
  • In the run parameters in the solver: select the steady-state solver and make sure the simulation mode is set to full hydrodynamic Gas flow solver: Compressible.
  • In the miscellaneous tab uncheck the use shared memory option and check the steady-state monitor option. And click on ok.

The type of solver will be set to transient in the transient condition and steady-state monitor is not necessary for the transient case.

This selects the type of solver to be used for our case.

  • In the Simulation time parameters enter the following values.

Steady-state

Start time: 0

End time: 15000 cycles

Initial time step: 1e-9

Minimum time step: 1e-9

Maximum time step: 1

Maximum convective CFL: 0.8 click on ok.

Transient

Start time: 0 s

End time: 0.01 s

Initial time step: 1e-9

Minimum time step: 1e-9

Maximum time step: 1s

Maximum convective CFL: 0.8 click on ok.

  • In the solver parameters section select the Pressure based option for steady-state and Density-based option for Transient. On the left side click pressure and on the right side select the preconditioner to none (For transient this will automatically set to none). In the steady-state solver, control tab select the Mach number to 0.8 and click OK.
  • Now before we go into the boundaries option click on regions and initialisation. Click on add new region. Right-click on region 0 and rename it to volumetric region (user-defined). On the left side near the species click on +Air and click ok.
  • Now in the boundaries tab assign the following to each boundary.

Inlet > inflow

Outlet > Outflow

Throttle > wall

Elbow > wall

  • In the inlet, boundary select the pressure to “specified value” 150000 pa. Select the temperature to a specified value of 300 K and click on +Air in the species boundary condition.
  • In the Outlet boundary select the pressure to “specified value” 100000 pa. and select the temperature backflow to the specified value of 300K and click on +Air in the Species Backflow.
  • In the Throttle, boundary select the Temperature Boundary condition to Law of wall of 300 K. And the option next to UDF in velocity boundary condition as Law of wall. The Turbulent Kinetic energy (tke) boundary condition as Zero normal gradient. Also, the Turbulent dissipation (eps) boundary condition to wall model. Make the same for the elbow.

For the transient case, the throttle should be rotating so we go to the throttle boundary condition and select the wall motion type: Rotating; Surface movement: Moving. The rotate centre and the rotate axis can be found out by using the measure tool, Hiding all the parts except the throttle. And measure the centre of the cylinder and using the three-point arc. We can get the rotation axis from the triangle normal. As to the rotation rate we set the rotation rate using the use file option. Set the initial time 0s: initial angle 0; for time 0.002s set angle 25; for time 0.004s set the angle 25; for time 0.008s set the angle 0. Give the file name something appropriate like throttle_rotation.in and press ok.

  • Now set the regions in the left panel next to boundaries as Volumetric region User-defined.

The above steps are to be followed to set the boundary conditions.

  • Now we go to Steady-state Monitor and Add config > Minimum number of cycles to be executed for steady-state solver: 5000, Monitor Units: cycles Monitor start delay, cycles: 200, Sample size: 100, In the left window double click the Monitor variables and select AVG_VELOCITY, Target type double click and select Boundary, Target as Outlet.
  • Add two more variables and select TOTAL_PRESSURE, MASSFLOWRATE select the target type Boundary, Target as Outlet. Press OK.

The above steps are only for the steady-state simulation.

  • In the physical models > Turbulence modelling select the RANS option and select RNG-kƐ and press ok.

We select the type of flow (laminar/turbulent in the above steps)

These steps will tell converge to observe the given values, changes in them and note them for post-processing.

  • In the Grid control select the fixed embedding option and press ok. A new option appears in grid control “Fixed Embedding”
  • In the Grid Control > Base Grid > set the x, y, z sizes to 2e-4m and click ok.
  • In the fixed embedding option select add. On the left side of the same window > Entity type: Boundary, Boundary ID: Throttle, Mode: permanent, Scale: 3, Embed layers: 2, press ok.

Selecting the grid size

  • In the Output/Post-processing section,> post variable selection > In the species tab check the mass fraction tab and add N2, O2 and press ok.
  • In the Output/Post-processing section > Output files > writing time intervals tab > set the time interval for writing 3d output files to 100cycles this will make sure that the files are written for every 100 cycles thereby we have more data and more clear curves.
  • For the transient state, the inputs are as follows: set the time interval for writing 3d output files to 0.0001s this will make sure that the files are written for every (0.01/0.0001) = 100 s thereby we have more data and more clear curves. Set the time interval for writing the text output to 1e-6s. This way output will be printed on the terminal very frequent, and we can observe every calculation.
  • The time interval for writing the restarting output file. The restart file can be used to restart the simulation from a particular moment without having to start the simulation from the starting in case of any unexpected events like power loss, Out of memory etc. But writing it every time step takes time and energy so for our convenience, we write it every 0.008s. Press ok.

Save the case setup, upon pressing ctrl+S we save the case setup file which has a .cvg extension.

EXPORTING THE FILES

Now since the case is set, we need to run the simulation. Save this case file on the local computer and then go to the “taskbar on the top left” > file > export > export input files. We should see a total of 12files. The usual location is set to the same directory where the case file is saved. Set the location and export the files.

RUNNING THE SIMULATION

Open the Cygwin terminal as administrator and navigate to the location where the case files are stored using the cd command. Then we execute the following command.

mpiexec.exe -n 4 converge.exe restricted

mpiexec.exe is the message passing interface executive file.

-n 4 represents the number of cores to be used for running the simulation.

converge.exe is the converge file that runs the simulation.

restricted limits the total number of cells to 5,00,000

Now we can see many lines being printed on the Cygwin terminal. We can stop this process by pressing Ctrl + C in the Cygwin terminal. We go to the “inputs” file in the case directory, In the outputs control > log level > 0. Now run the above command again in the terminal. This should reduce the amount of output being printed in the Cygwin terminal.

This is done to know the control on level of output being printed on the Cygwin terminal. Once the simulation is finished, we need to post-process the files.

POST-PROCESSING

We open converge > on the bottom left there are some options like postprocessing, lines etc. We select the post-processing and that will take us to a new window. Here we select the location of the output file which is created in the same directory in which we stored the input files. Once the output file is selected a list appears in the window below the file location option > click on select all and the below the cell variables will be listed > click on select all. Above the file location option, there is space for naming the post-processed file we give a proper name (preferably without spaces/special characters). And then select the output format as “Para-view vtk inline binary”. Once we do this the click convert. And the files will be post-processed.

Once the post-processing is done open Para-view > open file select the output file location > select the converted file _..vtm – group file. This will load the results in Para-view. Click on apply to view the case we setup.

In the top panel select the surface with edges to view the mesh and we might see that with the mesh there are some diagonal lines visible on the mesh. This is because the triangle converge created. So, we create a slice of this geometry. This slice will have the normal in the Z direction. For this in the top panel in the bottom-most line of the top panel there is an option called slice we select that and then click on Z-normal and apply. This will create a slice of the geometry. In the top toolbar, there is an option called surface with edges select it. This will show the mesh

The mesh on the slice would look like this

We can see the embedding and for the transient case as the throttle moves the mesh and the embedding moves.

Now for the slice to the left of the surface option, there is another option which might be something like vtkblockcolors or idreg or solid-colour. Here, select the velocity option this will show the velocity contour at each time. Click the play button on the top. Upon selecting the pressure, we can see the pressure contour. If we delete the slice option in the left panel, we can see the same contours in 3d.

Velocity

Steady-state

Transient

Pressure

Steady-state

Transient

On the top toolbar, there is an option called Glyph. This plots the vectors in the given domain. So, we set the orientation vector to velocity since it is the only vector in our case. Reduce the scale of the arrows to get a much clear picture. If the arrows do not seem to point the right direction of velocity, then change the variable to pressure or some other parameter and get back to velocity then the glyph would point the right direction.

Velocity

Steady-state

Transient

In this case, we are interested in observing the velocity streamlines so we can use the stream tracer option which is located just to the right side of the glyph option. In the stream tracer, we can set the source from line to sphere and place the sphere in the input using the mouse, Observe the placement in all three axes to make sure the streamlines are covering the geometry. And press apply (For better viewing set the background to black in the top menu). If the time simulation is in the initial phase we would not see much. So, change the simulation to the end time to see the streamlines. To reduce the load on the GPU, reduce the sample size and uncheck the show sphere option. Also, to see the elbow press the eye option next to the case option.

Velocity streamlines

Steady-state

Transient

The animation of all the time steps can be saved using the save animation option the below consists of the default y-axis view and the side view of velocity streamlines with throttle movement. Also, the left side view has more samples compared to the side view.

We can also use some of the converge features to compare results. In converge on the bottom left beside the post-processing, there is another tab called line plotting. Upon clicking this it will take us into another window. Here we select the same location where we saved the case setup file. This is because the converge takes the .out files as the input upon selecting the file location some variables are displayed in the window below. We select the file as massflowrate.out. The x-axis will be cycles and on the y axis, we can select mass flowrate, Total pressure, Average velocity, and all the variables we selected in the steady-state monitor.

These are the graphs we generated using the converge line plotting module.

Pressure

Steady-state

Transient

Velocity

Steady-state

Transient

Mass Flow rate

Steady-state

Transient

Total cell count

Steady-state

Transient

CONCLUSION:

From the above graphs, it is observed that

  • The profiles of pressure, velocity and mass flowrate stay pretty much the same except when the throttle position changed.
  • The cell count changed when the position of the throttle changed.
  • The flow at the gap between the elbow and throttle is more like the flow in a nozzle. The flow before the throttle got clogged and the velocity decreased and at the throttle tip the velocity increased and after the throttle, it again decreases. This is more observed in the transient case when the angle of the throttle increased.
  • More number of samples in the stream tracer means more rendering time.
  • The results at the throttle seem to differ with the number of samples taken. For less number of samples, the velocity streamlines are approximated at some points.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.