CFD Mini Project

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Lid Driven Cavity-Flow

Computational Fluid Dynamics and Heat Transfer (MEL7400)

Project Report
Submitted by

Gandi Venkata Sujay Prabhat (B20ME029)


Noudu Sharmila (B20ME052)
Aashish Waghmare (B20ME001)

Course Instructor
Dr. Sudipto Mukhopadhyay

Department of Mechanical Engineering


Indian Institute of Technology Jodhpur
Introduction:
Computational Fluid Dynamics (CFD) simulation for the lid-driven square cavity using
the OpenFOAM software. We use Computational Fluid Dynamics (CFD) to simulate 2D
cavity flow because it helps us understand how fluids move in confined spaces more
efficiently.CFD is like a virtual lab where we can try out different designs, like changing
the shape of the cavity, and see how it affects the flow without actually building
anything. By using CFD, we can figure out the best designs without spending much time
and money on physical experiments.

Input Documentation:

General Information

Problem Description: Lid-driven square cavity simulation.

Code: OpenFOAM - solver: icoFoam.

Computing Platform: openFOAM

Geometry and Boundary Conditions

Region of Interest: 2D square cavity.

Schematic Diagram:

Figure 1. Geometry of the lid driven


cavity
Boundary Conditions: The top wall moves in the x-direction at a speed of 1 m/s
while the other 3 are stationary.

Initial Condition:

The flow will be assumed laminar and solved on a uniform mesh using the icoFoam
solver for laminar, isothermal, incompressible flow.

Fluid Properties:

The kinematic viscosity (ν) is a fluid property that characterizes the fluid's resistance to
deformation under shear stress. The Reynolds number (Re) is defined as the ratio of
inertial forces to viscous forces and is given by the formula:
𝑑|𝑈|
𝑅𝑒 = ν
Laminar flow is characterized by smooth and orderly fluid motion, with well-defined
layers moving parallel to each other. This assumption simplifies the mathematical
modeling and solution process.

The simulation assumes isothermal (constant temperature) and incompressible


(constant density) conditions. These assumptions are often valid for many fluid flow
problems, and they simplify the governing equations,

starting with the laminar flow on a uniform mesh using the icoFoam solver provides a
well-controlled baseline case. Increasing the Reynolds number and transitioning to the
pisoFoam solver allows for the exploration of turbulent flow behavior and its impact on
the system

Modeling option selections:

1.Grid Design:

We run the command block mesh to build the mesh. And run the command ParaFoam
to view it in ParaView. It is good practice to view the mesh before running to check for
any errors.
Figure 2. Mesh of the model
2.Solution Algorithm:

fvScheme & fvSolution:


The file fvScheme contains the definition of numerical schemes used in the simulation.
It specifies discretization schemes for different variables, such as pressure, velocity, and
turbulence parameters.

Figure 3. Snippet of fvScheme

Time Discretization (ddtSchemes): The Euler scheme is a first-order explicit time


discretization scheme. In the context of a steady-state lid-driven cavity flow, where time
accuracy may not be as critical as in transient flows, the Euler scheme is a
computationally efficient choice.
Gradient Schemes (gradSchemes): The Gauss linear gradient scheme is commonly
used and provides accurate results for smooth flow fields. Suitable for capturing the
velocity and pressure gradients within the cavity accurately.

Laplacian Schemes (laplacianSchemes): The Gauss linear orthogonal scheme is


selected as the default for Laplacian operations. In 2D cavity flow, this scheme provides
accurate results for Laplacian terms, contributing to the overall accuracy of the
simulation.

Interpolation Schemes (interpolationSchemes): The linear interpolation


scheme is chosen as the default. In the context of 2D cavity flow, where gradients and
variations are generally smooth, linear interpolation provides a good balance between
accuracy and computational cost.

Surface Normal Gradient Schemes (snGradSchemes): The orthogonal scheme


is chosen as the default for computing the gradient of surface normals. This scheme
maintains orthogonality with respect to surfaces, ensuring an accurate representation of
gradients along boundaries.

Figure 4. Snippet of fvSolution


Solvers: It is a sub-dictionary containing the equation solvers, tolerances, and
algorithms.
The fvSolution file contains several sub-dictionaries that pertain to different solvers and
other settings. The sub-dictionaries encompass the following:
PISO: Governs the variables for the Pressure-Implicit with the Splitting of Operators
(PISO) algorithm.
PIMPLE: Manages the settings for the Coupled Semi-Implicit Multiphase Flow
(PIMPLE) algorithm.
PRECISE: Governs the settings of the Semi-Implicit Method for Pressure-Linked
Equations (SIMPLE) algorithm.
The other relaxation factors are the parameters that specify the relaxation factors for
different equations and solution variables.

The controlDict and fvSchemes dictionaries enable the modification of certain


parameters while the simulation is running. This allows for flexible modifications based
on the developing solution.

The pressure (p) solution in this example employs the Preconditioned Conjugate
Gradient (PCG) technique with a Diagonal Incomplete Cholesky (DIC) preconditioner.
This combination enables the pressure equation to converge efficiently and stably.

The solver utilizes both absolute and relative tolerance variables to ascertain
convergence for the pressure solution. The following are the specified tolerances:
The absolute tolerance is set at 1e-06.
Zero relative tolerance.

The specified values provide the permissible range of error for the pressure solution to
be deemed as converged.

The term "pFinal" denotes the ultimate pressure adjustment implemented during the
resolution procedure. This correction employs a relative tolerance of 0, suggesting a
more stringent convergence criterion in comparison to the initial pressure solution.

Implementing a more stringent tolerance for the final pressure correction guarantees a
higher level of precision in the final pressure field. It is typically preferable, as the
ultimate pres
sure values are vital for future computations and analysis.
3.Grid Convergence:
When the grid is changed from 20x20 to 40x40, the total number of nodes to be
calculated increases, as a result, more iterations are to be made, which in turn increase
the convergence rates. The shown fig.() shows the finer tuning after increasing the grid
values.

Figure 5. 20x20 vs. 40x40 mesh grid

Result Interpretation and Reporting :

1. Output Visualizations

Figure 5. Velocity Magnitude Field


Figure 6. Velocity vector plot

Figure 7. Streamlines and particle paths


Figure 7. Contour plots of a flow variable

● Validation

Results obtained from our cfd model where Re=10


Plot of Y-location[m] vs U-velocity[m/s] Plot of V-velocity[m/s] vs X-location[m]

These results need to be compared with the experimental results in order to validate our model.

This is an example from a reference where the model is


compared with experimental results in order to validate
it.

References:

https://www.femto.eu/stories/lid-driven-cavity-flow/
https://www.openfoam.com/documentation/tutorial-guide/2-incomp
ressible-flow/2.1-lid-driven-cavity-flow

http://www.wolfdynamics.com/wiki/tut_cavity.pdf

You might also like