Week 1: Channel flow simulation using CONVERGE CFD
Aim: To carry out a simulation of air flow in a channel using Converge 3.0 CFD program and then post-process the results on Paraview.
Introduction: We need to observe the parameters of Air as a medium flowing inside a Channel of specific sizes. The parameters to be observed are change in the velocity, pressure, mass flow rate across the channel.
We used three different Base grid sizes for the channel, which are as below:
- Case 1: Base Grid (in m): dx = 2e-4 ; dy = 2e-4 ; dz = 2e-4
- Case 2: Base Grid (in m): dx = 1.5e-4 ; dy = 1.5e-4 ; dz = 1.5e-4
- Case 2: Base Grid (in m): dx = 1.2e-4 ; dy = 1.2e-4 ; dz = 1.2e-4
In all the cases the mesh sizes along the Y & Z were kept constant and varied across X only.
Creating Geometry:
- In the Converge Studio first we create the geometry of a ‘Box’ in order to prepare a channel.
- Then we carry out a ‘Diagnosis’ on the shape created to check for any errors. If there is no error then the geometry is correct.
- Then check for the vector ‘Normal’, initially the normal point out of the shape which are then transformed to point inward. Since the flow is inside the channel, so the correct position for the normal is pointing inward.
- Now the correct geometry is created, so we move to case set up.
Case Set up Procedure:
- Application Type: Time-based
- Material: Predefined Mixture = Air
- Select Gas Simulation & Species.
- Species: Gas Species O2 & N2 are selected.
- Simulation Parameters:
- Run Parameter: Steady State Solver used. Steady State Monitor is Turned On.
- Steady State Monitor: monitor variables added such as Avg. Velocity, Total Pressure and mass flow rate. These variables are observed at the ‘outlet’ of the channel flow.
- Simulation Time Parameter:
- End Time = 15000 cycles.
- Maximum Time Step = 1 second
- Maximum Convection CFL limit = 1
- Solver Parameters:
- Navier-Stokes Solver Type = ‘Density based’ selected.
- Equations Tab: Pressure Pre-conditioner set to ‘None’.
- Steady State Solver control: Maximum Convection CFL limit (final stage) = 0.5.
- Boundary Conditions:
- Inflow: Inlet Pressure = 100001 Pa
- Outflow: Outlet Pressure = 100000 Pa
- Top / Bottom Walls = Walls with No-slip condition.
- Front / Back Walls = set to 2D.
- Initial Conditions & Events:
- Regions: Initial Pressure = set to 100001 Pa.
- Species Mass Fraction: O2 = 0.77 ; N2 = 0.23 (Percentages of O2 & N2 present in the Air are reversed)
- Physical Models: Turbulence Modelling Un-checked.
- Grid Control:
Base Grid:
(A) Case 1: Base Grid (in m): dx = 2e-4 ; dy = 2e-4 ; dz = 2e-4
(B) Case 2: Base Grid (in m): dx = 1.5e-4 ; dy = 1.5e-4 ; dz = 1.5e-4
(C) Case 2: Base Grid (in m): dx = 1.2e-4 ; dy = 1.2e-4 ; dz = 1.2e-4
- Post Processing:
- Post variables Selection:
- Typical Variables/Geometry: Select desired variables such as Density, Velocity, pressure, temperature.
- Species/Passive: Add Mass Fraction for O2 & N2.
- Output Files:
- Time Interval for writing 3D output data files = 100 cycles
- Time interval for writing restarting output = 100 cycles
- Maximum number of restart files saved = 3.
Case setup is complete with this.
- Export case setup: The case setup files are then ‘Exported’ to the destination folders (channel_test_1 / channel_test_2 / channel_test_3) to save the details.
- The destination folders should consist of following files in order to run the simulation and then post process the result on paraview. The files are:
(i) converge.exe (name changed for the ease of run command on cygwin)
(ii) mpiexec.exe (name changed for the ease of run command on cygwin)
(iii) post_convert.exe (under output folder)
- Open Cygwin: Now the simulation is run using Cygwin. We navigate to the desired folder where the setup files were exported.
- Command to Run Simulation: The command to run Cygwin for Converge Studio 3.0 version is as below:
“ mpiexec.exe –n 2 converge.exe restricted “
- Now the simulation starts running due to which output files are generated under a separate output folder.
- These output files are then post processed to convert the data in a format suitable for Paraview.
- Post Convert in Converge Studio: To post process, we use file type as ‘Paraview VTK in-line binary format’. Now the files are post processed with a case name ‘test’.
- This generates ‘test.vtm’ group files which are generally used in Paraview to observe the results.
- Inline Plot: In the Converge Studio we use Inline Plotting option to the curves during simulation run. We can observe the change in the plots and see the simulation reach the steady state condition in the end of the plot.
- Paraview: Open Paraview to check for the results.
(A) Observations for Case 1:
Geometry:

Base Grid (in m): dx = 2e-4 ; dy = 2e-4 ; dz = 2e-4

Velocity Contour:

Pressure Contour:

Velocity Profile in Paraview:

Mass Flow Rate Plot:

Velocity Plot:

Total Pressure Plot:

Total Cell Count:

Velocity Animation:
Pressure Animation:
(B) Observations for Case 2:
Geometry:

- Base Grid (in m): dx = 1.5e-4 ; dy = 1.5e-4 ; dz = 1.5e-4

Velocity Contour:

Pressure Contour:

Velocity Profile in Paraview:

Mass Flow Rate Plot:

Velocity Plot:

Total Pressure Plot:

Total Cell Count:

Velocity Animation:
Pressure Animation:
(C) Observation for Case 3:
Geometry:

- Base Grid (in m): dx = 1.2e-4 ; dy = 1.2e-4 ; dz = 1.2e-4

Velocity Contour:

Pressure Contour:

Velocity Profile in Paraview:

Mass Flow Rate Plot:

Velocity Plot:

Total Pressure Plot:

Total Cell Count Plot:

Velocity Animation:
Pressure Animation:
Results:
- Based on three different Base Mesh Sizes i.e. 2e-4m, 1.5e-4m & 1.2 e-4m, one can observe that with the finer mesh mesh sizes the results become more clear and accurate.
- The flow through the channel is taking place due to difference in pressure at inlet and outlet.
- The change in the velocity can be observed with finer details due to refinement of mesh sizes.
- The improvement in the accuracy of the parameters is due to increase in the Total Cell Count i.e. 25000, 22708 & 35108 for three different mesh sizes.
- Here one thing to be noted for case 2 & 3 is that, the length of the channel is changed to [dx= 0.05m] against the Case 1 [dx = 0.1m]. Still, the Total cell count is proportionately more than Case 1 even with the decreasing mesh sizes. Thus accuracy in the results is maintained.
- The mass flow rate at the inlet and outlet for all three cases is conserved through-out the flow.
Conclusion:
We can conclude from Channel Flow simulation using Converge CFD program, that with finer mesh sizes the results obtained are accurate. The change in the parameters for a flow inside the channel can be observed from the various animations, plots, contours and profiles and understand how the results becomes smooth.