Project

Visualize 2D Flow Simulation Through A Backward Facing Step For 3 Distinct Mesh Grid Size Using Converge CFD & ParaView

Aim:- The work is focused on simulating fluid flow through a backward-facing step channel that would be subjected to a sudden increase in the cross-sectional area, this would result in flow separation & reattachment zones. The geometry will be designed using the various geometric editing tools available in Converge Studio. Air is considered as the working fluid. We will be also making use of boundary flagging techniques for assigning each side of the geometry to a particular boundary & these boundaries will later be assigned to a volumetric region. Next, we set up the simulation parameters using a steady-state solver. Once the setup is complete, we export these inputs files generated by Converge CFD & run it using CYGWIN to generate 3D post output files. These 3D output files are first converted into either Paraview vtk inline binary format or EnSite format for Paraview to read & generate the flow field simulation. Through this simulation, we will be able to observe flow separation at different locations of the channel, variations in mass flow rate, pressure, velocity & number of cells generated for 3 distinct mesh grid sizes. The 3 different base mesh sizes that we will be used are:

Case 1: dx = 2.0e-3m, dy = 2.0e-3m, dz = 2.0e-3m ;

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

Case 3: dx = 1.2e-3m, dy = 1.2e-3m, dz = 1.2e-3m.

Fig 1:- Backward Facing Step Geometry

Introduction

Flow-through a backward-facing step is one of the classical internal flow problems in fluid mechanics. Extensive numerical and experimental studies have been done on this issue. Due to the geometric simplicity and flow diagnostic technique, this phenomenon has become a practice for numeric validation for computational fluid dynamics (CFD). In this paper fluid flow through a backward-facing step has been studied numerically for a 2D channel. Commercial software package Converge CFD software has been used for the numeric simulation.

Objective

The purpose of the study was to investigate the flow behavior through the backward-facing step and to visualize flow separation and recirculation zone performed using CFD simulation for 3 distinct mesh grid size. Compare the results. Generate velocity & pressure contours for all 3-grid size mesh. Show mesh (i.e. surface with edges) for the 3 base mesh sizes. Plot graphs for velocity, pressure, mass flow rate at different sections of the geometry, and total cell count for all 3 base mesh sizes.

Theory

The discovery of boundary layer theory by Ludwig Prandtl in the early twentieth century was the beginning of the extensive research on separated flows. Flow separation is a common phenomenon in several engineering applications such as aircraft wings, turbine and compressor blades, diffusers, buildings, suddenly expanding pipes, combustors, etc. Two of the main applications include the automobile and aircraft industries, who are developing fuel-efficient designs to reduce consumption of the rapidly depleting non-renewable resource and minimize greenhouse gas emission. From an aerodynamic perspective, drag is considered one of the major reasons for inefficient fuel consumption. There are several types of drag, but in this thesis, the focus will be on the pressure drag created by the separated flows. The physics of separated flows, due to their instabilities, are very complex. The backward-facing step is considered by most as the ideal canonical separated flow geometry because of its single fixed separation point and the wake dynamics unperturbed by the downstream disturbances. An illustration of the wake characteristics behind a backward-facing step is shown in Figure 1.1.

Fig 1.1:- Backward-facing flow features

The wake of a backward-facing step has unique features mainly in two regions: the free shear layer and the low-velocity re-circulating bubble. Due to instabilities, the vortices in the shear layer roll-up and pair with the adjacent vortices to form a larger coherent structure. These vortices entrain fluid from the region below and trigger the recirculation. Due to the adverse pressure gradient in the wake of the step the free shear layer reattaches at the bottom wall.

Common Features of the Backward-Facing Step Flow

The flow behind the backward-facing step (BFS) is complex and involves various instability mechanisms. Some of the most common features behind the step recognized in the literature are illustrated in Figure 1.2, the flow wake can be distinguished into three main regions namely, the shear layer region, separation bubble or recirculation zone and the reattachment zone.

Fig 1.2:- Flow characteristics behind a BFS

Fig 1.3:- Experimental visualization of the recirculation zone & reattachment zone

GOVERNING EQUATIONS

The solution for a CFD simulation is obtained by solving the Navier-Stokes (NS) equations. The NS equations comprise of 5 equations, namely the continuity, momentum (3 equations), and energy equations. The continuity and momentum equations are solved for all flow problems with the energy equation being optional and can be used only when heat transfer is taking place to save computation time. For our purpose, we will be assuming that there is no heat transfer and that the temperature is constant, leaving us with 4 equations now, the continuity, and 3 momentum equations, one for each axis direction.

An important property of Converge is that any geometry created or exported is assumed to be made of triangles. In boundary flagging, we group these triangles to a particular ‘Boundary’ & assign these boundaries to a ‘Volumetric region’. Defining these boundary conditions is a fundamental step in any CFD simulation as this helps solve the NS equations. Converge creates and exports ‘input’ file of these complex governing equations which are then solved by CYGWIN for running the simulation.

1. Creating the Geometry

We start by creating a 3D geometric figure of the backward-facing by using the geometric tools available from geometry dock. We start by creating the front 2D face by using ‘vertex’ as shown in Fig 2.1. Vertex (1) starts from the origin i.e. (x=0,y=0,z=0), Vertex (2) will be just above vertex (1), which is done by increasing the Y-axis value i.e. (x=0,y=0.0199757,z=0). For Vertex (3) we keep the value of the Y-axis similar while changing the value at X-axis i.e. (X=0.272009, Y=0.0199757, Z=0). We continue this process until we completely close the channel & return to the origin. Once, the channel is created we create an offset of the 2D geometry & use the ‘loft’ technique to join these two 2D figures to create a 3D geometry of the Backward Facing step.

Fig 2.1:- Defining the geometry using the ‘vertex’ method

Fig 2.2:- Dimensions of Back Facing Step

Having built the geometry, a diagnostic test is conducted to check for any anomaly like intersection errors, nonmanifold problems, open edges, etc within the geometry contour (Fig-2.3). If no errors, which is denoted by “green checks”, then we proceed to check the “Normal’s”.

Fig 2.3:- Diagnosis Check

Every geometry will have a normal vector which is perpendicular to the geometry, for this problem we use the “Normal Toggle” option to check for the direction of the normal. If normals are pointing outside of the geometry, then it's essential to transform the normal’s to point inside the geometry, where the fluid flow will occur as shown in Fig 2.4.1 & Fig 2.4.2.

Fig 2.4.1:- Normals pointing in the opposite direction of fluid flow

Fig 2.4.1:- Transforming Normal’s to point inside the geometry

In Converge, all the surface information is stored in the form of 3 entities vertices, edges & triangles. Therefore, any geometry created or exported from other CAD software into converge are converted into triangles & that is the fundamental entity in converge, where every part of the geometry is assumed to be a triangle. The process of grouping these triangles into boundaries is known as boundary flagging. Each boundary is assigned with a distinct ID as shown in (Fig 2.5). For our geometry, we have 5 distinct surfaces Inlet, Outlet, Top&Bottom, Front2D, Back2D.

Fig 2.5:- Geometry Flagging

2. Case Setup

Having created the geometry, the next stage of the process is to set up the simulation parameters. This step involves specifying certain properties to capture the physics of the problem perfectly, such as materials used, simulation time parameters, solver parameters, initial & boundary conditions to solve the Navier Stokes equation which are PDE’s, defining body forces, type of fluid flow, species involved & grid size of the mesh.

We start setting up the time-based general flow simulation by first defining the Materials involved in the simulation. Since we are simulation fluid (air) flow inside a channel we choose ‘gas simulation’ and our choice of fluid for this project is ‘air’, hence we choose that as our pre-defined mixture. For gas simulation parameters we will be using the Redlich-Kwong equation of state with a critical temperature of 133K & critical pressure of 3770000pa. For global transport parameters, we use the default values of ‘turbulent Prandtl number’ and ‘Schmidt number’ which is 0.90 & 0.78 respectively. Since the fluid flow is air our ‘species’ will be a mixture of Oxygen (O2) & Nitrogen (N2) with a chemical composition of 23% & 77% respectively.

The next parameter for our case setup is the Simulation Parameters, which include the ‘run parameters’, ‘simulation time parameters’ & the ‘solver parameters’. For the backward-facing step flow problem, we will be running compressible gas flow using Steady-state solver at full hydrodynamics simulation mode, since our geometry is simple & has no moving part & we also require to solve the NS equations. In addition to this, we will be using ‘density-based’ PISO Navier strokes solver. As for simulation time parameters, we will be running the simulation for 15000 cycles with an initial & minimum time step as (1e-06)

As earlier, after designing the geometry, we grouped the triangles and assigned them to a particular boundary ID. Similarly, in Boundary Condition, we group the 5 boundaries & assign each of them to a volumetric region. To do so we add a volumetric region from Initial Conditions & Events & assign the volumetric region (Region 0) to each of the boundaries. These volumetric regions are required to set up the initial conditions for solving PDE. Initial conditions are assigned at the volume whereas boundary conditions are given at boundaries. The Inlet & Outlet boundaries are inflow & outflow boundaries respectively, Front 2D & Back 2D are a 2D boundary, Top & Bottom boundaries are stationary walls with no-slip conditions. At the inlet boundary of the geometry, we defined a total pressure of 110325 Pa & a temperature of 300K. At the outlet boundary of the geometry, we defined a total pressure of 1101325 pa & temperature of 300K.

For Turbulent modeling under Physical Model we use Reynolds Average Navier-Stokes or RANS model would be deemed sufficient enough to approximate the behavior of the fluid for this particular setup. There are several classifications under RANS turbulent modeling but for our case, we will be using K-epsilon with Von Karman's constant as 0.42 & law of wall to be 5.5.

The final parameter that we need to setup is defining the Mesh that is the Base grid size. We will also be creating a fixed embedding along the walls of the geometry as this helps in refining particular areas in the domain. For this particular challenge we will be comparing 3 distinct mesh grid sizes dx = 2.0e-3m, dy = 2.0e-3m, dz = 2.0e-3m ; dx = 1.5e-3m, dy = 1.5e-3m, dz = 1.5e-3m; dx=1.0e-3m, dy = 1.0e-3m, dz =1.0e-3m.

3. Post Processing

The function of the Converge studio is to set up the simulation & then create several input files that are then exported to a particular folder. To run these input files we use CYGWIN, a command-line interface that reads these inputs files & solves the complex PDEs of governing equation to generate several output files. These output files are then post-converted into 3D output files which are readable files for ParaView.

4. Results

Case 1:- Mesh Grid Size of dx = 2.0e-3m, dy = 2.0e-3m, dz = 2.0e-3m or 0.002

A. Mesh

B. Total Cell Count

C. Velocity Contour

D. Pressure Contour

E. Plot over Line for velocity (at the inlet, after flow separation, at the outlet)

F. Plot Over Line for Pressure

G. Static & Total Pressure

H. Mass Flow Rate at Inlet & Outlet

I. Flow Tracer

J. Velocity Vector Plot

Conclusion

For case1, with a mesh grid size of 0.002m, the total number of cells formed for the entire geometry is nearly 2000, which would be the lowest number of cells formed when compared to the 3 cases as the mesh size is largest. The smaller the mesh grid size the larger number of cells would be generated. At the boundary of the geometry, we observe a much finer mesh than compared to the entire surface, this is because we used ‘fixed embedding’ to refine the particular areas in the domain. The velocity contour & plot over the line of velocity shows the that the velocity profile is maximum at the inlet section of the geometry, however, it drops suddenly at the flow separation region where the cross-section of the geometry increased & a region of recirculation was created which can be observed in the Glyph velocity vector plot. Pressure contour of the channel indicates that the pressure at inlet & outlet is maximum but minimum at the flow separation region where the static pressure decreases due to sudden variation of the geometric dimension i.e. air enters the channel at high velocity & pressure but takes a sudden drop as it encounters the flow separation region where the flow is recirculating creating a turbulent flow. After the flow separation, we can observe that velocity & pressure gains stability & flows steadily at the outlet. Since, in this case, the flow is turbulent we observe a sharp pressure drop & increase in the plots. The mass-flow-rate plot at inlet & outlet appears to have converged following the mass conservation equation i.e. the discharge rate at inlet equals the discharge rate at the outlet.

Case 2:- Mesh Grid Size of dx = 1.5e-3m, dy = 1.5e-3m, dz = 1.5e-3m or 0.0015m

A. Mesh

B. Total Cells Count

C. Velocity Contour

D. Pressure Contour

E. Plot over Line for Velocity (at the inlet, after flow separation, at the outlet)

F. Plot over Line for Pressure

G. Static & Total Pressure

H. Mass Flow Rate at Inlet & Outlet

I. Flow Tracker

J. Velocity Vector Plot

Conclusion

For case2, with a mesh grid size of 0.0015m, the total number of cells formed for the entire geometry is 3000, which indicates that the number of mesh cells generated in the geometry for case2 is larger than case1. The smaller the mesh grid size the larger number of cells would be generated. At the boundary of the geometry, we observe a much finer mesh than compared to the entire surface, this is because we used ‘fixed embedding’ to refine the particular areas in the domain. The velocity contour & plot over the line of velocity shows the that the velocity profile is maximum at the inlet section of the geometry, however, it drops suddenly at the flow separation region where the cross-section of the geometry increased & a region of recirculation was created which can be observed in the Glyph velocity vector plot. Pressure contour of the channel indicates that the pressure at inlet & outlet is maximum but minimum at the flow separation region where the static pressure decreases due to sudden variation of the geometric dimension i.e. air enters & exits the channel at high velocity & pressure but takes a sudden drop as it encounters the flow separation region where the flow is recirculating creating a turbulent flow. After the flow separation, we can observe that velocity & pressure gains stability & flows steadily at the outlet. Since, in this case, the flow is turbulent we observe a sharp pressure drop & increase in the plots. The mass-flow-rate plot at inlet & outlet appears to have converged following the mass conservation equation i.e. the discharge rate at inlet equals the discharge rate at the outlet.

Case 3:- Mesh Grid Size of dx=1.0e-3m, dy = 1.0e-3m, dz =1.0e-3m or 0.001

A. Mesh

B. Total Cell Count

C. Velocity Contour

D. Pressure Contour

E. Plot Over Line for Velocity (at the Inlet, after flow separation, at the Outlet)

F. Plot over Line for Pressure

G. Static & Total Pressure

H. Mass Flow Rate

I. Flow Tracker

J. Velocity Vector Plots

Conclusion

For case3, with a mesh grid size of 0.001m, the total number of cells formed for the entire geometry is 5500, which indicates that the number of mesh cells generated in the geometry is the highest as the grid cell size is lowest. The smaller the mesh grid size the larger number of cells would be generated. At the boundary of the geometry, we observe a much finer mesh than compared to the entire surface, this is because we used ‘fixed embedding’ to refine the particular areas in the domain. The velocity contour & plot over the line of velocity shows the that the velocity profile is maximum at the inlet section of the geometry, however, it drops suddenly at the flow separation region where the cross-section of the geometry increased & a region of recirculation was created which can be observed in the Glyph velocity vector plot. Pressure contour of the channel indicates that the pressure at inlet & outlet is maximum but minimum at the flow separation region where the static pressure decreases due to sudden variation of the geometric dimension i.e. air enters & exits the channel at high velocity & pressure but takes a sudden drop as it encounters the flow separation region where the flow is recirculating creating a turbulent flow. After the flow separation, we can observe that velocity & pressure gains stability & flows steadily at the outlet. Since, in this case, the flow is turbulent we observe a sharp pressure drop & increase in the plots. The mass-flow-rate plot at inlet & outlet appears to have converged following the mass conservation equation i.e. the discharge rate at inlet equals the discharge rate at the outlet.

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.