Project

Simulation for 2D Channel FLow

OBJECTIVE

The objective of this study is to set up flow simulation within a 2D channel and understand the dependency of grid size on simulation time and results. The project encompasses the key results for three simulations setups based on the three different grid sizes given below in the table

Case

Grid Size, dx (m)

Grid Size, dy (m)

Grid Size, dz (m)

Case 1:

dx = 2.0e-4 m;

dy = 2.0e-4 m;

dz = 2.0e-4 m

Case 2:

dx = 1.5e-4 m;

dy = 1.5e-4 m;

dz = 1.5e-4 m

Case 3:

dx = 1.0e-4 m;

dy = 1.0e-4 m;

dz = 1.0e-4 m

The simulation process includes three major steps:

1. Preprocessing

1.1. Geometry Creation

1.2. Diagnosis

1.3. Boundary Flagging

1.4. Case Setup

2. Solving

3. Post Processing

3.1. Mesh

3.2. Plots (Mass Flow, Pressure, Velocity, Iteration Error)

3.2. Contours (Velocity, Pressure)

4. Conclusion

PROCEDURE:

The procedure followed for setting up the simulation is provided below

1. Preprocessing

1.1. Geometry Creation

Steps:

a. Geometry > Create> Shape > Box >

b. Provided the Center Value (0.05, 0.0, 0.0) and Size Value (0.1, 0.01, 0.01)

c. Click on Create

1.2. Diagnosis: The diagnosis tool helps in identifying the different problems in the geometry.

The Diagnosis tool looks for the following geometric issues

a. Intersection: Highlights number of triangles with piercing inbetween adjacent two triangles

b. Nonmanifold Vertices: Checks for number vertex which are being shared between two triangles

c. Open Edge: This highlights the number of edges of a triangle which not shared by any other triangle

d. Normal Orientation: This highlights the number of traingles whose normal vector is not pointing towards the interior of fluid domain

e. Isolated Triangles: This checks for the number of triangle surrounded by any neighbouring triangles that have different boundary ID number

Goto Diagnostics Dock>Find>

Since all the problem traingles are green ticked it means there are no issues in the geometry

1.3. Boundary Flagging:

a. Goto Boundary>Flag>Create a New Boundary>Create Multiple Boundary>Enter 5 in "Number of Multiple Boundaries"

b. Selected the triangles at different faces and assign to respective boundaries as per the provide below

1.4. Case Setup:

a. Clicked on "Begin case Setup" and entered the value provided below

Settings Values to be Entered
Application General Flow
Material Select Air (predefined mixture) and Tick onto Species
Gas simulation>No Change
Global Transport Paramters>No Change
Species>Add N2 and O2
Simulation Parameters Run Paramters> Pressure-based steady solver
Simulation Time Parameter>
Start Time: 0
End time: 15000 cycles
Initial time step: 1.0e-9 s
Minimum time step: 1.0e-9 s
Maximum time step: 1.0 s
Solver Parameters> No Change
Boundary Conditions Inlet> INFLOW>Pressure Boundary Condition-100001 Pa> Species Boundary Condition> Air
Outlet>OUTFLOW>Pressure Boundary Condition-100000 Pa>Species Backflow>Air
Top-Bottom-Walls>WALL>No-slip>Specified Value>300k
Front2D>TWO_D
Back2D>TWO_D
Initial Conditions & Events Regions and Initialization
Add region>"Volumteric_Region_UD"
Enter Pressure value:101325Pa
Enter Temperature: 300K
Species: Add Air>Reverse the Value of N2 and O2 to 23% and 77% whose actual value is 77% and 23% respectively. This is done to observe the sweeping off/wash away of the initial boundary conditions
Physical Models Untick the Turbulence modeling if selected
Grid Controls Enter the grid values for (dx, dy, dz) as per the case 1

dx = 2.0e-4 m, dy = 2.0e-4 m, dz = 2.0e-4 m

similarly for Case 2 & 3 the following values were used sequentially

Case 2: dx = 1.5e-4 m; dy = 1.5e-4 m; dz = 1.5e-4 m

Case 3: dx = 1.0e-4 m; dy = 1.0e-4 m; dz = 1.0e-4 m

Output/Post Processing Post Variable Selection>Species/Passive>tick Mass Fraction>Add N2 & O2
No other change
Output Files Time Interval for writing 3D output data files: 100 cyc
Time Interval for writing text output: 1.0 cyc
Time Interval for restarting output: 1000 cyc

After this all the input files was imported to a seperate folder. Converge creates .txt files which contains all the values entered while setting up the case for respective settings done above. These input files will be processed by converge using Message Passing Interface (MPI) standard

2. Solving:

For running the simulation, Cygwin tool was used instead of converge studio interface. Cygwin is a POSIX-compatible API which is based on command prompt to run the simulation

Steps:

a. Navigated to the folder location containing the input files

b. Enter the command> mpiexec.exe -n 2 converge.exe </dev/null> logfile &

c. Enter the command> taif -f logfile

d. After the simulation is over. Went back to converge studio>Post-Processing 3D

e. Enter Case Name>"Test", Change the File Type to Paraview VTK in-line binary format

d. Enter the address for the output files>Select all files>Select all Cell Variables>click on Convert

e. After the conversion of the post files to the binary output, open the Test.vtm (group file) file in Paraview

3. Post-Processing:

3.1. Meshing:

Fig: Case 1: Mesh View

Fig: Case 2: Mesh View

Fig: Case 3: Mesh View

3.2 Contours:

Fig: Velocity Contour Case 1 (Output at 24)

Fig: Pressure Contour Case 1 (Output at 25)

Note: Similar contours were achieved for case 2 and case 3, but with greater resolutions

3.3. Plots

Iteration Error Plots

Case 1:

Case 2:

Case 3:

Inference: The above graphs depict the error values in the calculation of Momentum, Energy and Pressure. The smoothening of the graph towards the end of cycle time represent that the solutions are converged

Mass Flow Rate Plots

Case 1:

Case 2:

Case 3:

Inference: From the above the graphs it can be said that the mass is conserved. The slight gap between inlet and outlet mass flow rates is due to the computational errors generated when the equations are solved

Velocity Plots

Case 1:

Case 2:

Case 3:

Inference: The graphs above represent the velocities at inlet and outlet, towards the end of the cycle the fluctuations reduces as the solution gets converged

Pressure Plots

Case 1:

Case 2:

Case 3:

Inference: The pressure fluctuations are dominant upto 4000 cycles, as the initial conditions are washed away. Towards to the end of the cycle, the pressure fluctuations reduce significantly as the flow gets converged

Animation Link:

Conclusion

1.With the decrease in grid size the total cell increases

2. Disturbances are observed due to initial conditions which are assigned to the volumetric region. However, after certain cycles the fluctuations reduces

3. For lower grid sizes, the simulation takes more time to gets converged and the computational time also increases as more number of equations are to be solved

4. Significant improvement in simulation time was also observed when the case was run on single processor core vs the same done on 2 processors

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.