SlideShare a Scribd company logo
1 of 24
Download to read offline
MAE 561 : COMPUTATIONAL FLUID DYNAMICS
Final Project
Lid Driven Cavity
Neel Patel
1206392079
2
Index
Sr.No Title Pg.No.
1. Abstract 3
2. Introduction to the Scheme 4
3. Task 1 ANSYS- FLUENT compared to
Ghia et al
6
4. Task 2 User compared to Ghia et al 10
5. Bonus 15
6. References 18
7. Appendix - Code
Note: The code i.e. one with variable time step has been attached in the end after the report.
3
1. Abstract
To solve the 2-D incompressible Navier-Stokes equation we need a method/
algorithm that will include a pressure correction along with the fractional step
method on a staggered grid. The aim of the first phase of the project is to compare
the results obtained from ANSYS Fluent against the results reported by Ghia.
In the second phase we compare Ghia’s results against the results obtained from
the user’s algorithm. The aim of this phase is to compare the results of Ghia with
the user’s results.
4
2. Introduction to the Scheme
The FTCS method was used for solving the problem is as follows:
The equations given are non-linear in nature and hence these
Equation 4a and 4b cannot be used in this case. We will use the following set of
equations for this case (fractional method on a staggered Grid)
c
a
b
5
In our case the i+1/2,j serves as i,j and i-1/2,j servers as i-1,j. Similarly, for i,j+1/2
and i,j-1/2. The attached sheet of formulas for Task 3 contains the rest of the
formulations.
Now there are a few checks that should be kept in mind while solving these
equations. But first we need to derive the above equations.
d
6
Task 1 ANSYS- FLUENT compared to Ghia et al
The following steps were followed for calculating the solution in ANSYS –
FLUENT:
1.1. A surface was created in the Design Modeler using a sketch of a square (1x1).
The units were kept as meters. This can be in any other unit system but care should
be taken while performing any conversions.
1.2. A quadrilateral mesh was generated of size 128 x128, because the Ghia et al
have used a mesh similar to this mesh. Please provide appropriate names to the
boundaries.
1.3. This mesh was transferred into FLUENT.
1.3.1 Checked the mesh for quality and the boundary names.
1.3.2 All the models were kept as default; make sure that the flow is laminar.
1.3.3 In the materials tab add a new fluid with density=1 kg/m3
and
viscosity = 0.01Kg/m-s.
1.3.4 The cell zone conditions were set to the fluid (the fluid that we have
introduced in the materials tab).
1.3.5 Now set the boundary conditions such that the top wall is a moving
wall with a velocity of 1m/s.
1.3.6 The solution methods to be given are Simple with spatial discretization
options set as follows:
1.3.6.1 Gradient – Least Squares cell Based
1.3.6.2 Pressure – Standard
1.3.6.3 Momentum – Second Order Upwind
1.3.7 In the monitors edit the values for the convergence of the x-velocity, y-
velocity and continuity to 10-10.
This value of residual was set to a lower
value as a lower value indicates that values at the new time step have
increased by a very small value as compared to the previous time step.
7
1.3.8 Initialize the hybrid solution.
1.3.9 Run calculations for 5000 iterations.
1.4. Results
1.4.1 The velocity Comparison
Now create a new iso-surface at the centre of the mesh for both X and Y
direction. This surface was created to plot the velocities at the center of the
grid. Concurrently the values of Ghia for U and V separately with the results
obtained from the FLUENT Analysis were plotted.
Fig. 1. Comparison of the Ghia values to the FLUENT values for the u-velocity
along a vertical line through the geometric center of the cavity
8
Fig. 2 : Comparison of the Ghia values to the FLUENT values for the v-velocity
along a horizontal line through the geometric center of the cavity
Note: The red dots are the Ghia velocities and the black dots are the
velocities obtained from the FLUENT solution.
1.4.2 The vorticity plot
Now introduce vorticity levels at the different values according to the Ghia
values. Since some of the values plotted by Ghia are negative, these values
will not be plotted by FLUENT. Also, the 0 value will not be plotted by
Fluent because the minimum value of vorticity is of 0.0003. The following
plot was obtained for vorticity.
9
Fig 3. Vorticity at the Ghia values.
Note: This plot is missing the plot for 0 on the bottom corners and at the
middle as all the values of FLUENT are greater than 0.
1.4.3. Streamline Plot
The streamline plot was plotted for the specific contour levels of Ghia by
creating iso-stream surfaces for the values provided in table 3 of the paper.
In order to obtain the contours at the two lower corners we offset the values
of Ghia by a specific value.
Fig 4. The Stream function Values for the FLUENT results.
10
Task 2 User compared to Ghia et al
In this section we have used fractional step defined on a staggered grid to get our
solution. The mesh used for this scheme was a 128 x 128 grid. This grid was
chosen as it closely resembles the Ghia grid. The Numerical Scheme used was
FTCS (Forward in Time Central in Space) for calculation of the Predictor step on
the staggered grid (Equations for this grid have been written in Task 2). Then we
have considered a Poisson pressure equation to calculate the pressure and in the
corrector step we have used the pressure equation and velocities calculated in the
predictor step to calculate the final velocities after every time step.
The residuals were calculated for the pressure Poisson and the velocities after the
iterative solution had been performed on these solutions. Also, residual was
calculated on the stream function.
The Convergence criteria used was 10-6
for the residuals. The reason was that for a
low value of residual was that the change in the quantities with time step after a
certain point of time does not change significantly. This provides a stable solution
for the given boundary conditions. However the best method to check for stability
is to determine that the solution has reached the asymptotic region of convergence.
We can use GCI (Grid Convergence Index) to determine e the steady state solution
but in our case since the time step is varying and we don’t have a stable time step
value we cannot use GCI to determine the steady state of the solution. MMS
(Method of Manufactured Solutions) can be used to determine the stable solution.
Fig 5. Staggered Grid for our considerations
11
2.1 The Vorticity Plot
The plot for vorticity was obtained by solving the eq.11 in task 3. The levels that
were used in the plot were obtained from Ghia paper.
Fig 6. Comparison of Ghia Vorticity to results obtained by the code.
The figure above shows a good match between the plots shown obtained by Ghia
and by the code. The circles in the users figure represent the Ghia values.
12
2.2. The U-Velocity along the vertical line.
Fig 7. Comparison of the Ghia values to the user values for the u-velocity along a
vertical line through the geometric center of the cavity
The plot of the U-Velocity shows a good match between the Ghia and the user’s
values. Some Values however seem to be off by a small value is due the fact that
the Ghia values are not completely accurate. This may be due to the computing
limitation about 30 years ago. Also, compiler errors were also a big issue back then
so it is difficult to determine the specific reason or to pin point the reason.
13
2.3. The V-Velocity Plot along the horizontal line
Fig 8. Comparison of the Ghia values to the user values for the the v-velocity along
a horizontal line through the geometric center of the cavity
The plot of the V-Velocity shows a good match between the Ghia and the user’s
values. Some Values however seem to be off by a small value is due the fact that
the Ghia values are not completely accurate. The user’s values are accurate as we
have used a fractional step along with pressure correction to calculate the solution.
This may be due to the computing limitation about 30 years ago. Also, compiler
errors were also a big issue back then so it is difficult to determine the specific
reason or to pin point the reason.
14
2.4 The Stream Function Plot
The stream function was plotted by adding an extra equation for the calculation of
the psi values on the grid.
Fig. 9 : Comparison of the Ghia values to the user values for the stream function
along a horizontal line through the geometric center of the cavity
This Figure and comparison indicates that there is a good comparison between the
user results and the Ghia Results.
15
Bonus
Re =1000
5.1 The Vorticity Plot
The plot for vorticity was obtained by solving the eq.11 in task 3. The levels
that were used in the plot were obtained from Ghia paper.
Fig 10. Comparison of Ghia Vorticity to results obtained by the code.
The figure above shows a good match between the plots shown obtained by
Ghia and by the code. The circles in the users figure represent the Ghia
values.
16
5.2. The U-Velocity along the vertical line.
Fig 11. Comparison of the Ghia values to the user values for the u-velocity along a
vertical line through the geometric center of the cavity
The plot of the U-Velocity shows a good match between the Ghia and the user’s
values. Some Values however seem to be off by a small value is due the fact that
the Ghia values are not completely accurate. This may be due to the computing
limitation about 30 years ago. Also, compiler errors were also a big issue back then
so it is difficult to determine the specific reason or to pin point the reason.
17
5.3. The V-Velocity Plot along the horizontal line
Fig 12. Comparison of the Ghia values to the user values for the v-velocity along a
horizontal line through the geometric center of the cavity
The plot of the V-Velocity shows a good match between the Ghia and the user’s
values. Some Values however seem to be off by a small value is due the fact that
the Ghia values are not completely accurate. The user’s values are accurate as we
have used a fractional step along with pressure correction to calculate the solution.
18
This may be due to the computing limitation about 30 years ago. Also, compiler
errors were also a big issue back then so it is difficult to determine the specific
reason or to pin point the reason.
5.4 The Stream Function Plot
The stream function was plotted by adding an extra equation for the calculation of
the psi values on the grid.
Fig. 13: Comparison of the Ghia values to the user values for the stream function
along a horizontal line through the geometric center of the cavity
This Figure and comparison indicates that there is not a good comparison between
the user results and the Ghia Results. The primary reason is that the grid is half the
size of the grid used in Ghia.
References
1. Ghia, Urmila, Kirti N. Ghia, and C. T. Shin. "High-Re solutions for
incompressible flow using the Navier-Stokes equations and a multigrid method."
Journal of computational physics 48, no. 3 (1982): 387-411.
2. Bruneau, Charles-Henri, and Mazen Saad. "The 2D lid-driven cavity problem
revisited." Computers & Fluids 35, no. 3 (2006): 326-348.
3. Dr. Marcus Hermann MAE 561: Computational Fluid Dynamics Notes.
Final Report
Final Report
Final Report
Final Report
Final Report
Final Report

More Related Content

What's hot

Fluid Mechanics Chapter 5. Dimensional Analysis and Similitude
Fluid Mechanics Chapter 5. Dimensional Analysis and SimilitudeFluid Mechanics Chapter 5. Dimensional Analysis and Similitude
Fluid Mechanics Chapter 5. Dimensional Analysis and SimilitudeAddisu Dagne Zegeye
 
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)Rajibul Alam
 
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSNUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSnaveen kumar
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMFumiya Nozaki
 
Turbulent flows and equations
Turbulent flows and equationsTurbulent flows and equations
Turbulent flows and equationsOm Prakash Singh
 
Grid generation and adaptive refinement
Grid generation and adaptive refinementGrid generation and adaptive refinement
Grid generation and adaptive refinementGoran Rakic
 
Lecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLeonides De Ocampo
 
Modern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI SystemsModern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI SystemsAmr E. Mohamed
 
Free Ebooks Download
Free Ebooks Download Free Ebooks Download
Free Ebooks Download Edhole.com
 
functions-of-several-variables.ppt
functions-of-several-variables.pptfunctions-of-several-variables.ppt
functions-of-several-variables.pptDavidbham
 
Pratik Vadher - Fluid Mechanics
Pratik Vadher - Fluid MechanicsPratik Vadher - Fluid Mechanics
Pratik Vadher - Fluid MechanicsPratik Vadher
 
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)Niraj Solanki
 
Control of non linear system using backstepping
Control of non linear system using backsteppingControl of non linear system using backstepping
Control of non linear system using backsteppingeSAT Journals
 

What's hot (20)

Fluid Mechanics Chapter 5. Dimensional Analysis and Similitude
Fluid Mechanics Chapter 5. Dimensional Analysis and SimilitudeFluid Mechanics Chapter 5. Dimensional Analysis and Similitude
Fluid Mechanics Chapter 5. Dimensional Analysis and Similitude
 
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)
A STUDY ON VISCOUS FLOW (With A Special Focus On Boundary Layer And Its Effects)
 
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONSNUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
NUMERICAL METHODS MULTIPLE CHOICE QUESTIONS
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAM
 
Turbulent flows and equations
Turbulent flows and equationsTurbulent flows and equations
Turbulent flows and equations
 
Grid generation and adaptive refinement
Grid generation and adaptive refinementGrid generation and adaptive refinement
Grid generation and adaptive refinement
 
finite volume method
finite volume methodfinite volume method
finite volume method
 
Secant method
Secant method Secant method
Secant method
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
Lecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical Modeling
 
Ball and beam system
Ball and beam systemBall and beam system
Ball and beam system
 
Modern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI SystemsModern Control - Lec07 - State Space Modeling of LTI Systems
Modern Control - Lec07 - State Space Modeling of LTI Systems
 
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
 
Applications of hybrid systems
Applications of hybrid systemsApplications of hybrid systems
Applications of hybrid systems
 
Free Ebooks Download
Free Ebooks Download Free Ebooks Download
Free Ebooks Download
 
Maths digital text
Maths digital textMaths digital text
Maths digital text
 
functions-of-several-variables.ppt
functions-of-several-variables.pptfunctions-of-several-variables.ppt
functions-of-several-variables.ppt
 
Pratik Vadher - Fluid Mechanics
Pratik Vadher - Fluid MechanicsPratik Vadher - Fluid Mechanics
Pratik Vadher - Fluid Mechanics
 
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
 
Control of non linear system using backstepping
Control of non linear system using backsteppingControl of non linear system using backstepping
Control of non linear system using backstepping
 

Similar to Final Report

UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...
UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...
UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...Stephane Meteodyn
 
Integration of the natural cross ventilation in the CFD software UrbaWind
Integration of the natural cross ventilation in the CFD software UrbaWindIntegration of the natural cross ventilation in the CFD software UrbaWind
Integration of the natural cross ventilation in the CFD software UrbaWindStephane Meteodyn
 
Towards Self healing networks in distribution networks operation
Towards Self healing networks in distribution networks operationTowards Self healing networks in distribution networks operation
Towards Self healing networks in distribution networks operationVatsalMaheshwari12
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGIRJET Journal
 
Robert_Tanner_Temperature_Distribution
Robert_Tanner_Temperature_DistributionRobert_Tanner_Temperature_Distribution
Robert_Tanner_Temperature_DistributionRobert Tanner
 
Steady state CFD analysis of C-D nozzle
Steady state CFD analysis of C-D nozzle Steady state CFD analysis of C-D nozzle
Steady state CFD analysis of C-D nozzle Vishnu R
 
Development of stereo matching algorithm based on sum of absolute RGB color d...
Development of stereo matching algorithm based on sum of absolute RGB color d...Development of stereo matching algorithm based on sum of absolute RGB color d...
Development of stereo matching algorithm based on sum of absolute RGB color d...IJECEIAES
 
cis98010
cis98010cis98010
cis98010perfj
 
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS Workbench
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS WorkbenchLinear Dynamics and Non-Linear Finite Element Analysis using ANSYS Workbench
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS WorkbenchRavishankar Venkatasubramanian
 
Incremental Page Rank Computation on Evolving Graphs
Incremental Page Rank Computation on Evolving GraphsIncremental Page Rank Computation on Evolving Graphs
Incremental Page Rank Computation on Evolving GraphsSubhajit Sahu
 
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docxPHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docxmattjtoni51554
 
Aristotle boyd martin-peci_poster_2017
Aristotle boyd martin-peci_poster_2017Aristotle boyd martin-peci_poster_2017
Aristotle boyd martin-peci_poster_2017Aristotle Boyd-Martin
 
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentation
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentationScript for Comparison vertical flow models BHR Cannes June 14 2013 presentation
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentationPablo Adames
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTESSubhajit Sahu
 
A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...Scilab
 
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...cscpconf
 
Multiple region of interest tracking of non rigid objects using demon's algor...
Multiple region of interest tracking of non rigid objects using demon's algor...Multiple region of interest tracking of non rigid objects using demon's algor...
Multiple region of interest tracking of non rigid objects using demon's algor...csandit
 

Similar to Final Report (20)

UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...
UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...
UrbaWind, a Computational Fluid Dynamics tool to predict wind resource in urb...
 
Integration of the natural cross ventilation in the CFD software UrbaWind
Integration of the natural cross ventilation in the CFD software UrbaWindIntegration of the natural cross ventilation in the CFD software UrbaWind
Integration of the natural cross ventilation in the CFD software UrbaWind
 
Towards Self healing networks in distribution networks operation
Towards Self healing networks in distribution networks operationTowards Self healing networks in distribution networks operation
Towards Self healing networks in distribution networks operation
 
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKINGA PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
A PROJECT REPORT ON REMOVAL OF UNNECESSARY OBJECTS FROM PHOTOS USING MASKING
 
robio-2014-falquez
robio-2014-falquezrobio-2014-falquez
robio-2014-falquez
 
Robert_Tanner_Temperature_Distribution
Robert_Tanner_Temperature_DistributionRobert_Tanner_Temperature_Distribution
Robert_Tanner_Temperature_Distribution
 
Steady state CFD analysis of C-D nozzle
Steady state CFD analysis of C-D nozzle Steady state CFD analysis of C-D nozzle
Steady state CFD analysis of C-D nozzle
 
Development of stereo matching algorithm based on sum of absolute RGB color d...
Development of stereo matching algorithm based on sum of absolute RGB color d...Development of stereo matching algorithm based on sum of absolute RGB color d...
Development of stereo matching algorithm based on sum of absolute RGB color d...
 
cis98010
cis98010cis98010
cis98010
 
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS Workbench
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS WorkbenchLinear Dynamics and Non-Linear Finite Element Analysis using ANSYS Workbench
Linear Dynamics and Non-Linear Finite Element Analysis using ANSYS Workbench
 
paper123
paper123paper123
paper123
 
Incremental Page Rank Computation on Evolving Graphs
Incremental Page Rank Computation on Evolving GraphsIncremental Page Rank Computation on Evolving Graphs
Incremental Page Rank Computation on Evolving Graphs
 
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docxPHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
 
Aristotle boyd martin-peci_poster_2017
Aristotle boyd martin-peci_poster_2017Aristotle boyd martin-peci_poster_2017
Aristotle boyd martin-peci_poster_2017
 
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentation
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentationScript for Comparison vertical flow models BHR Cannes June 14 2013 presentation
Script for Comparison vertical flow models BHR Cannes June 14 2013 presentation
 
1406
14061406
1406
 
Community Detection on the GPU : NOTES
Community Detection on the GPU : NOTESCommunity Detection on the GPU : NOTES
Community Detection on the GPU : NOTES
 
A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...
 
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...
MULTIPLE REGION OF INTEREST TRACKING OF NON-RIGID OBJECTS USING DEMON'S ALGOR...
 
Multiple region of interest tracking of non rigid objects using demon's algor...
Multiple region of interest tracking of non rigid objects using demon's algor...Multiple region of interest tracking of non rigid objects using demon's algor...
Multiple region of interest tracking of non rigid objects using demon's algor...
 

Final Report

  • 1. MAE 561 : COMPUTATIONAL FLUID DYNAMICS Final Project Lid Driven Cavity Neel Patel 1206392079
  • 2. 2 Index Sr.No Title Pg.No. 1. Abstract 3 2. Introduction to the Scheme 4 3. Task 1 ANSYS- FLUENT compared to Ghia et al 6 4. Task 2 User compared to Ghia et al 10 5. Bonus 15 6. References 18 7. Appendix - Code Note: The code i.e. one with variable time step has been attached in the end after the report.
  • 3. 3 1. Abstract To solve the 2-D incompressible Navier-Stokes equation we need a method/ algorithm that will include a pressure correction along with the fractional step method on a staggered grid. The aim of the first phase of the project is to compare the results obtained from ANSYS Fluent against the results reported by Ghia. In the second phase we compare Ghia’s results against the results obtained from the user’s algorithm. The aim of this phase is to compare the results of Ghia with the user’s results.
  • 4. 4 2. Introduction to the Scheme The FTCS method was used for solving the problem is as follows: The equations given are non-linear in nature and hence these Equation 4a and 4b cannot be used in this case. We will use the following set of equations for this case (fractional method on a staggered Grid) c a b
  • 5. 5 In our case the i+1/2,j serves as i,j and i-1/2,j servers as i-1,j. Similarly, for i,j+1/2 and i,j-1/2. The attached sheet of formulas for Task 3 contains the rest of the formulations. Now there are a few checks that should be kept in mind while solving these equations. But first we need to derive the above equations. d
  • 6. 6 Task 1 ANSYS- FLUENT compared to Ghia et al The following steps were followed for calculating the solution in ANSYS – FLUENT: 1.1. A surface was created in the Design Modeler using a sketch of a square (1x1). The units were kept as meters. This can be in any other unit system but care should be taken while performing any conversions. 1.2. A quadrilateral mesh was generated of size 128 x128, because the Ghia et al have used a mesh similar to this mesh. Please provide appropriate names to the boundaries. 1.3. This mesh was transferred into FLUENT. 1.3.1 Checked the mesh for quality and the boundary names. 1.3.2 All the models were kept as default; make sure that the flow is laminar. 1.3.3 In the materials tab add a new fluid with density=1 kg/m3 and viscosity = 0.01Kg/m-s. 1.3.4 The cell zone conditions were set to the fluid (the fluid that we have introduced in the materials tab). 1.3.5 Now set the boundary conditions such that the top wall is a moving wall with a velocity of 1m/s. 1.3.6 The solution methods to be given are Simple with spatial discretization options set as follows: 1.3.6.1 Gradient – Least Squares cell Based 1.3.6.2 Pressure – Standard 1.3.6.3 Momentum – Second Order Upwind 1.3.7 In the monitors edit the values for the convergence of the x-velocity, y- velocity and continuity to 10-10. This value of residual was set to a lower value as a lower value indicates that values at the new time step have increased by a very small value as compared to the previous time step.
  • 7. 7 1.3.8 Initialize the hybrid solution. 1.3.9 Run calculations for 5000 iterations. 1.4. Results 1.4.1 The velocity Comparison Now create a new iso-surface at the centre of the mesh for both X and Y direction. This surface was created to plot the velocities at the center of the grid. Concurrently the values of Ghia for U and V separately with the results obtained from the FLUENT Analysis were plotted. Fig. 1. Comparison of the Ghia values to the FLUENT values for the u-velocity along a vertical line through the geometric center of the cavity
  • 8. 8 Fig. 2 : Comparison of the Ghia values to the FLUENT values for the v-velocity along a horizontal line through the geometric center of the cavity Note: The red dots are the Ghia velocities and the black dots are the velocities obtained from the FLUENT solution. 1.4.2 The vorticity plot Now introduce vorticity levels at the different values according to the Ghia values. Since some of the values plotted by Ghia are negative, these values will not be plotted by FLUENT. Also, the 0 value will not be plotted by Fluent because the minimum value of vorticity is of 0.0003. The following plot was obtained for vorticity.
  • 9. 9 Fig 3. Vorticity at the Ghia values. Note: This plot is missing the plot for 0 on the bottom corners and at the middle as all the values of FLUENT are greater than 0. 1.4.3. Streamline Plot The streamline plot was plotted for the specific contour levels of Ghia by creating iso-stream surfaces for the values provided in table 3 of the paper. In order to obtain the contours at the two lower corners we offset the values of Ghia by a specific value. Fig 4. The Stream function Values for the FLUENT results.
  • 10. 10 Task 2 User compared to Ghia et al In this section we have used fractional step defined on a staggered grid to get our solution. The mesh used for this scheme was a 128 x 128 grid. This grid was chosen as it closely resembles the Ghia grid. The Numerical Scheme used was FTCS (Forward in Time Central in Space) for calculation of the Predictor step on the staggered grid (Equations for this grid have been written in Task 2). Then we have considered a Poisson pressure equation to calculate the pressure and in the corrector step we have used the pressure equation and velocities calculated in the predictor step to calculate the final velocities after every time step. The residuals were calculated for the pressure Poisson and the velocities after the iterative solution had been performed on these solutions. Also, residual was calculated on the stream function. The Convergence criteria used was 10-6 for the residuals. The reason was that for a low value of residual was that the change in the quantities with time step after a certain point of time does not change significantly. This provides a stable solution for the given boundary conditions. However the best method to check for stability is to determine that the solution has reached the asymptotic region of convergence. We can use GCI (Grid Convergence Index) to determine e the steady state solution but in our case since the time step is varying and we don’t have a stable time step value we cannot use GCI to determine the steady state of the solution. MMS (Method of Manufactured Solutions) can be used to determine the stable solution. Fig 5. Staggered Grid for our considerations
  • 11. 11 2.1 The Vorticity Plot The plot for vorticity was obtained by solving the eq.11 in task 3. The levels that were used in the plot were obtained from Ghia paper. Fig 6. Comparison of Ghia Vorticity to results obtained by the code. The figure above shows a good match between the plots shown obtained by Ghia and by the code. The circles in the users figure represent the Ghia values.
  • 12. 12 2.2. The U-Velocity along the vertical line. Fig 7. Comparison of the Ghia values to the user values for the u-velocity along a vertical line through the geometric center of the cavity The plot of the U-Velocity shows a good match between the Ghia and the user’s values. Some Values however seem to be off by a small value is due the fact that the Ghia values are not completely accurate. This may be due to the computing limitation about 30 years ago. Also, compiler errors were also a big issue back then so it is difficult to determine the specific reason or to pin point the reason.
  • 13. 13 2.3. The V-Velocity Plot along the horizontal line Fig 8. Comparison of the Ghia values to the user values for the the v-velocity along a horizontal line through the geometric center of the cavity The plot of the V-Velocity shows a good match between the Ghia and the user’s values. Some Values however seem to be off by a small value is due the fact that the Ghia values are not completely accurate. The user’s values are accurate as we have used a fractional step along with pressure correction to calculate the solution. This may be due to the computing limitation about 30 years ago. Also, compiler errors were also a big issue back then so it is difficult to determine the specific reason or to pin point the reason.
  • 14. 14 2.4 The Stream Function Plot The stream function was plotted by adding an extra equation for the calculation of the psi values on the grid. Fig. 9 : Comparison of the Ghia values to the user values for the stream function along a horizontal line through the geometric center of the cavity This Figure and comparison indicates that there is a good comparison between the user results and the Ghia Results.
  • 15. 15 Bonus Re =1000 5.1 The Vorticity Plot The plot for vorticity was obtained by solving the eq.11 in task 3. The levels that were used in the plot were obtained from Ghia paper. Fig 10. Comparison of Ghia Vorticity to results obtained by the code. The figure above shows a good match between the plots shown obtained by Ghia and by the code. The circles in the users figure represent the Ghia values.
  • 16. 16 5.2. The U-Velocity along the vertical line. Fig 11. Comparison of the Ghia values to the user values for the u-velocity along a vertical line through the geometric center of the cavity The plot of the U-Velocity shows a good match between the Ghia and the user’s values. Some Values however seem to be off by a small value is due the fact that the Ghia values are not completely accurate. This may be due to the computing limitation about 30 years ago. Also, compiler errors were also a big issue back then so it is difficult to determine the specific reason or to pin point the reason.
  • 17. 17 5.3. The V-Velocity Plot along the horizontal line Fig 12. Comparison of the Ghia values to the user values for the v-velocity along a horizontal line through the geometric center of the cavity The plot of the V-Velocity shows a good match between the Ghia and the user’s values. Some Values however seem to be off by a small value is due the fact that the Ghia values are not completely accurate. The user’s values are accurate as we have used a fractional step along with pressure correction to calculate the solution.
  • 18. 18 This may be due to the computing limitation about 30 years ago. Also, compiler errors were also a big issue back then so it is difficult to determine the specific reason or to pin point the reason. 5.4 The Stream Function Plot The stream function was plotted by adding an extra equation for the calculation of the psi values on the grid. Fig. 13: Comparison of the Ghia values to the user values for the stream function along a horizontal line through the geometric center of the cavity This Figure and comparison indicates that there is not a good comparison between the user results and the Ghia Results. The primary reason is that the grid is half the size of the grid used in Ghia. References 1. Ghia, Urmila, Kirti N. Ghia, and C. T. Shin. "High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method." Journal of computational physics 48, no. 3 (1982): 387-411. 2. Bruneau, Charles-Henri, and Mazen Saad. "The 2D lid-driven cavity problem revisited." Computers & Fluids 35, no. 3 (2006): 326-348. 3. Dr. Marcus Hermann MAE 561: Computational Fluid Dynamics Notes.