Week 1: Channel flow simulation using CONVERGE CFD
1] Aim :
Simulating channel flow using Converge CFD
2] Objective :
*Setup channel flow case in Converge and run simulation for 3 different mesh sizes[2e-4,1.5e-4,1e-4],also compare the results.
*Show velocity,pressure contours and mesh for all 3 mesh sizes.
*Show plots for velocity,pressure,mass flow rate and total cell count for all 3 mesh sizes.
*Explain plots,write detailed report and upload animation on youtube.
3] Introduction :
Channel flow is one of the benchmarking simulations in the field of CFD to test and validate the numerical methods.In this
study our objective is to set up the case using commercial CFD tool,Converge and simulate for different mesh sizes.
Here we will create a channel,which will carry the desired fluid at some initial inlet pressure and we will monitor how
fluid pressure and velocity along the length of the channel.Will use Paraview for post processing the results.
Our simulation will be 2D,but the geometry is in 3D.So we are going to pretend that this geometry along the z-axis has infinite length,i.e. we don't have to simulate the flow entirely on the 3D geometry,we can take any 2D slice and flow pattern is going to repeat itself.But inorder to identify that slice,we need to select the front and back of the geometry,and this is
the direction we are trying to ignore.
4] Solution Procedure :
To simulate channel flow ,we will follow the below procedure :-
Geometry Creation --> Case Setup --> Solution --> Post Processing
4.1] Geometry Creation :
* Launch Converge and start a new project.
*To create channel follow bellow steps,
Geometry => create => shape => box => enter dx = 0.1(keep everything else default) => create.

*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 5 boundaries => rename first boundary as inlet => using by angle triangle selection,select front face triangles => apply.
*Simillarly flag outlet,top and bottom, front2D and back2D boundaries.
*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 :
*We will setup channel flow simulation for laminar flow.
*Click on Begin Case Setup => General Flow => Done.
*Our working fluid will be air .
*Materials => Predefined mixture => Air => uncheck reation mechanis => 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 500 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 200 cycles and our sample size will be 100.
*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 - 100001 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

topAndbottom -
Boundary Type - Wall(no slip)
Temperature Boundary Condition -Specied value - 300 K

Front2D -
Boundary Type - TWO_D

Back2D -
Boundary Type - TWO_D

*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.0002 ; dy = 0.0002 ; dz = 0.0002 => ok

*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 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 willl 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 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 bw used by paraview to post process our results.
4.4] Post Processing :
Case 1 => 2e-4 Mesh

Fig = Mesh at 2e-4 Grid Spacing

Fig = Pressure Contour at 2e-4 Grid Spacing

Fig = Velocity Contour at 2e-4 Grid Spacing
Case 2 => 1.5e-4 Mesh

Fig = Mesh at 1.5e-4 Grid Spacing

Fig = Pressure Contour at 1.5e-4 Grid Spacing

Fig = Velocity Contour at 1.5e-4 Grid Spacing
Case 3 => 1e-4 Mesh

Fig = Mesh at 1e-4 Grid Spacing

Fig = Pressure Contour at 1e-4 Grid Spacing

Fig = Velocity Contour at 1e-4 Grid Spacing
5 ] Animations -
Case 1 - 2e-4 Mesh
Pressure Animation
https://www.youtube.com/watch?v=4MSPUjGYxtY
Velocity Animation
https://www.youtube.com/watch?v=Gm4Cv3SbkJ0
Case2 -1.5e-4 Mesh
Pressure Animation
https://www.youtube.com/watch?v=WseaAtsc6v8
Velocity Animation
https://www.youtube.com/watch?v=fID83qyYQ9U
Case 3 - 1e-4 Mesh
Pressure Animation
https://www.youtube.com/watch?v=QO1eVN7gWcs
Velocity Animation
https://www.youtube.com/watch?v=GlF10MVCBgA
*From the above animations it is clear ,that when the fluid is in motion ,shear stresses are developed due to the particle in the fluid moving relative to each other.For a fluid moving in a channel,the velocity will be zero at the wall and it will increase while moving towards the center of the pipe.Shear force is present due to the movement of adjacent fluid layers at different velocities.Also we can observe that as the velocity increases pressure decreases.
6] Variable Plots For Different Mesh Sizes -





* The mass flows from inlet to outlet and it can be seen that mass doesn't get reduced or increased anywhere i.e.,mass is conserved.Also the first case shows mass less than 0.01 kg/s and rest 2 shows value higher than 0.01 kg/s.
*Total pressure at outlet is not going higher than initial inlet pressure.
*From the cell count we can see,that the cell count stays the same i.e. software neither created nor destroyed the mesh cells.
| Mesh Size | 0.0002 | 0.00015 | 0.0001 |
| Number of Cells | 25000 | 45420 | 100000 |
7] Conclusion :
*The mesh size 0.1mm shows the intermediate values of velocity,pressure and mass flow rate.
*As the cell count increases,the simulation time increases.
*The channel flow problem is simulated and it gave a basic idea of simulating steady flow simulation using CONVERGE CFD.