CHANNEL FLOW SIMULATION USING CONVERGE CFD
Objective:
The objective of this project is to setup a channel flow case in coverge studio and to run the simulation and finally post process the results. Here the simulation is ran for three different cases with different base mesh sizes as shown below
case 1: dx = 2e-3m, dy = 2e-3m, dz = 2e-3m
case 2: dx = 1.5e-3m, dy = 1.5e-3m, dz = 1.5e-3m
case 3: dx = 1.0e-3m, dy = 1.0e-3m, dz = 1.0e-3m
to begin with first let us take a look on workflow of converge studio.
WORKFLOW FOR A CONVERGE CFD SIMULATION:
The workflow in CONVERGE consists of three steps:
- Pre-processing (preparing the surface geometry and configuring the input and data files)
- Running the simulation
- Post-processing (analyzing the *.out ASCII files in the Case Directory and using a visualization program to view the information in the post*.out binary files saved in the
outputsubdirectory).
1. Pre-processing:
Pre-processing involves three sub-steps
a. Preparing the surface geometry:
The geometry dock provides us the option to create our desired geometry. In this case, it is the 2d channel.
in the geometry dock click on create>shape>Box and enter the dimensions of the box along x,y and z directions in dx,dy and dz options respectively. It is to be noted that in converge all the dimensions entered are in meters.
on clicking 'create' the converge creates a geometry as shown below:
- Following figure shows the geometry that was modelled in converge software with sizes dx = 0.1m, dy = 0.01m, dz = 0.01m.
- After modelling, the geometry was diagnosed for any errors like intersections, Non-manifold edges, open edges etc.
- Normals at the surfaces were pointing outwards, they were corrected using Normal option under Transform option under Geometry.
Converge studio creates the geometry as a combination of triangles. These triangles must be assigned to the respective boundaries and regions.
After creating the geometry the case setup is done.
Setting up the case:
Converge provides us with a handy wizard like feauture for setting up the case as sbown below:
case set-up:
- It is a general flow case.
- Oxygen (O2) and Nitrogen (N2) are the two main species.
- Solver: Pressure based steady solver.
- Simulation time parameters:
- Number of cycles: 15000
- Initial and minimum time step: 1e-9
- Maximum time step: 1
- Boundary Conditions:
1. At inlet: Pressure=100001 Pa; Temperature=300 K.
2. At outlet: Pressure=100000 Pa; Temperature=300 K.
3. No slip condition present at top and bottom walls.
4. Front and Back walls were made 2-D.
-
Regions and initialization: Species O2 =77%; N2=23%; Temperature= 300 K; Pressure= 101325 Pa.
- Regions and Initializations: Rename the fluid flow volume as volumetric flow region.
-
Base Grid: Three cases were simulated in total that had different base mesh grid(all dimensions in m):
- CASE 1: dx = 2e-3, dy=2e-3, dz=2e-3.
- CASE 2: dx= 1.5e-3, dy=1.5e-3, dz=1.5e-3.
- CASE 3: dx= 1.0e-3, dy=1.0e-3, dz=1.0e-3.
- Select the required output variables like pressure, density, temperature etc. whose results need to be analyzed.
After setting up the case, the input files are exported in a directory.
The final geometry after applying the boundary conditions is shown below
2. Running the simulation:
After exporting all the required input files the simulation is ran by using cygwin.
Cygwin is a POSIX-compatible environment that runs natively on Microsoft Windows. Its goal is to allow programs of Unix-like systems to be recompiled and run natively on Windows with minimal source code modifications by providing them with the same underlying POSIX API they would expect in those systems.
The executable file provided by the convergent science is executed using cygwin with the help of Microsoft Message Passing Interface (MSMPI).
Microsoft Message Passing Interface is an implementation of the MPI-2 specification by Microsoft for use in Windows to interconnect and communicate between High performance computing nodes.
The output files are generated in the same folder where the input files are executed using the executable.
3. Post-processing:
A. Base mesh size and Cell Count.
Case 1: dx = 2e-3, dy=2e-3, dz=2e-3
Case 2: dx= 1.5e-4, dy=1.5e-4, dz=1.5e-4
Case 3: dx= 1.0e-3, dy=1.0e-3, dz=1.0e-3
Observations:
1. As the mesh size decreases the no. of cells increases.
2. Computational time increases with the increase in the number of cells.
3. Finer the mesh, Finer is the plots.
4. Coarse grid sizes results in more accurate results.
5. Number of cells and the computational time taken for each case is as follows:
Case 1:
Number of cells: 30600
Computational time: 81.321601 seconds.
Summary of total time for:
load balance = 0.07 seconds ( 0.09%)
solving transport equations = 28.35 seconds (34.86%)
move surface and update grid = 22.51 seconds (27.68%)
update boundary conditions = 2.51 seconds ( 3.08%)
combustion = 0.00 seconds ( 0.00%)
spray = 0.01 seconds ( 0.01%)
writing output files = 18.76 seconds (23.06%)
Case 2:
Number of cells: 54400
Program used 86.460661 seconds.
Summary of total time for:
load balance = 0.04 seconds ( 0.04%)
solving transport equations = 34.87 seconds (40.34%)
move surface and update grid = 20.68 seconds (23.92%)
update boundary conditions = 2.93 seconds ( 3.39%)
combustion = 0.00 seconds ( 0.00%)
spray = 0.01 seconds ( 0.01%)
writing output files = 18.47 seconds (21.36%)
case 3:
Number of cells: 111100
Program used 1661.300225 seconds.
Summary of total time for:
load balance = 0.40 seconds ( 0.02%)
solving transport equations = 874.82 seconds (52.66%)
move surface and update grid = 68.67 seconds ( 4.13%)
update boundary conditions = 69.06 seconds ( 4.16%)
combustion = 0.00 seconds ( 0.00%)
spray = 0.02 seconds ( 0.00%)
writing output files = 464.22 seconds (27.94%)
spray = 0.02 seconds ( 0.00%)
writing output files = 432.75 seconds (26.03%)
B. Plots and contours:
Case 1:Velocity Contour and Plots
Case 2:Velocity Contour and Plots
Case 3:Velocity Contour and Plots:
Observations:
The observations From the above contours and plots following observations are as follows
- the velocity at both inlet and outlet at initial cycles are found to be maximum.
- the velocity of the air near walls take a dip due to the shear and surface tension of the walls.
- the velocity of the air at the middle of the channel is found to be maximum.
- Exit velocity is higher because of the pressure difference between inlet and outlet.
Case 1: Pressure contour and plots
Case 2: Pressure contour and plots
Case 3: Pressure contour and plots
Observations:
The observations From the above contours and plots following observations are as follows
- It can be seen that the pressure difference between the inlet and outlet is very low thus making the flow to be laminar
- At inlet the air enters the channel from the atmosphere thus the pressure at inlet is high due to change in area.
- At outlet the pressure reduces because of the sudden expansion of air into the atmosphere.
Comparison of mass flow rates:
case 1:
case 2:
Case 3:
Observations:
The observations From the above contours and plots following observations are as follows
- mass flow rate mainly depends on density, velocity and area.
- Due to the high density and velocity at the inlet, Mass flow rate initially takes a peak.
- Also the the concentration of air species inside the channel initially is different than the concentration of air entering thus leading to an initial turbulence in mass flow rate.
- Mass flow rate through inlet and outlet attains a constant difference after initial turbulence.