Week 8 - Simulation of a backward facing step in OpenFOAM
Aim:- Simulation of a backward-facing step in OpenFOAM
OBJECTIVE:-
n this challenge, you are going to simulate an incompressible-laminar-viscous flow through the backward-facing step geometry.
You should perform a transient simulation. The solver can be chosen based on the described physics of the flow.
You need to explain the entire simulation procedure (how you set up the case).
You should also provide explanations for every change you make inside the reference case files obtained from OpenFOAM tutorials.
You can choose the inlet velocity such that the flow is laminar.
After that, you will perform 2 case studies as described below and compare the results.
Case 1 - Simulate the flow without using any grading factor (i.e., GF = 1).
Case 2 - Simulate the flow with a grading factor of 0.2. The cells should be finer near the walls (including the step wall).
You can use the following mesh parameters but you can feel free to modify these values.
Mesh specification
1):-number of cells along the x direction (longer dimension) = 200
2):-Number of cells along the longer y direction = 20;
Boundary condition specification
The domain specifications are provided in the following figure.
Desired output
. Measure the velocity profile at 0.085 m from the inlet of the geometry for both case studies and compare.
. You can use the plot overline tool for this.
. Explain why the Grading/Growth factor is essential for meshing.
THEORY:-
. Incompressible-laminar-viscous flow.
. incompressible flow:-
. The flow in which there is no change in the density is called the incompressible flow.
. Mathematically, an incompressible flow can be expressed as
. Laminar flow: -
. A laminar flow is one where the fluid motion is regular and there is no mixing.
. It can be visualized by the pathlines that do not intersect each other.
.In fluid dynamics, laminar flow is characterized by fluid particles following smooth paths in layers, with each layer moving smoothly past the adjacent layers with little or no mixing.
.At low velocities, the fluid tends to flow without lateral mixing, and adjacent layers slide past one another like playing cards.
.There are no cross-currents perpendicular to the direction of flow, nor eddies or swirls of fluids.
.In laminar flow, the motion of the particles of the fluid is very orderly with particles close to a solid surface moving in straight lines parallel to that surface.
. Laminar flow is a flow regime characterized by high momentum diffusion and low momentum convection.
Reynolds number is the parameter to differentiate a flow as laminar or turbulent.
Whenever the Reynolds number is less than about 2,000, flow in a pipe is generally laminar, whereas, at values greater than 2,000, flow is usually turbulent.
Mathematically, the Reynolds number is the ratio of inertial force to the viscous force.
where,
- ρ is the density of the fluid (kg/m3)
- u is the flow speed (m/s)
- L is a characteristic linear dimension (m)
- μ is the dynamic viscosity of the fluid (Pa·s or N·s/m2 or kg/(m·s))
- ν is the kinematic viscosity of the fluid (m2/s)
Viscous flow.
`Type of fluid flow in which there is a continuous steady motion of the particles;
. The motion at a fixed point always remains constant.`
. Also called streamline flow; laminar flow; steady flow`
. The fluid flow in form of a layer.
. The layer which sticks with the wall has zero velocity which is called the no-slip condition and it develops the frictional effect at the wall.
. Frictional effects are also present between two layers of fluid and the slower layer tries to slow down the faster layer which can be measured by using viscosity.
. Effects of viscosity are maximum near the boundary so a laminar sublayer exists near the boundary that is shown in the below figure.
Mesh grading.
Mesh grading is a factor that is,
Grading factor=Size of the last /cell Size of the first .
PROCEDURE.
- First, we are creating the run folder in OpenFOAM in which we will be running our simulations.
- And then need to copy the cavity folder to the run folder so that we can make the changes in the blockMeshDict, control Dict, and pressure and velocity files to run our required simulations
- we copying the folder because we are not supposed to make any changes to the original folders in the OpenFOAM.
- Then will make the required changes in the blockMeshDict file that is naming the vertices for and then creating the blocks,
- in this case, there are 21 vertices and 5 blocks while creating blocks we also need to specify the number of mesh points needed along the x, y, and z-direction, and also the simple grading should be done along the boundaries
- then, we need to assign the boundary conditions here,
- we need to define all the faces in OpenFOAM refers to patches, and give the type that is the inlet and outlet will be the faces (type patch),
- for front and back type will be empty faces, for the top and bottom which are the boundary conditions.
- in this case, the type will be wall type, and setting up these will constitute a particular boundary, then will save these changes in the blockMeshDict.
- Then, in the velocity and pressure files, we have to give the value of the velocity at the inlet type will be a fixed value here we should assign some value as initial velocity and pressure will be zero gradients and at the outlet velocity type will be zero gradients and pressure will be type fixed value that value will be uniform 0.
- Then at the front and back velocity type empty and pressure, as well as type empty at the no-slip boundaries that is top and bottom velocity, will be typed nonslip and pressure type empty.
- And in the transport properties, we can change the nu value in order to obtain the lower courant number.
- And in the control dict file, the simulation time and the time step need to be assigned in the way that the courant number should be less than 0.5.
- and then creating the block mesh and then run the simulation using the respective solver after the completion of the simulation open the paraview in the paraFoam and plot the velocity profile for the given value.






OUTPUT:-


The plot for the velocity at 0.005 without applying the grading factor.

Grading Factor 0.2








OUTPUT:-


CONCLUSION.
By changing the simple grading factor from the value of 0.2 to 1 the mesh becomes finer and the solution becomes very accurate.
Overall the change in the size of the simple grading factor (mesh size) the results remain the same as approximately.
The execution time is lower for a lower meshing grading factor.