study of forced and free convection in lid driven cavity...

10
MIT Study of Forced and Free convection in Lid driven cavity problem 18.086 Project report Divya Panchanathan 5-11-2014

Upload: others

Post on 24-Feb-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

MIT

Study of Forced and Free convection in Lid driven cavity problem 18.086 Project report

Divya Panchanathan 5-11-2014

Page 2: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Aim To solve the Navier-stokes momentum equations for a lid driven cavity problem and

incorporate the energy equation for the forced convection case and for free convection case.

To study the influence of key parameters like Reynolds number, Prandl number and Grashof

number for a number of test cases.

Independent of the above- To try flow over solid object (square) in the lid driven cavity

problem.

Motivation

Modelling fluid flow and energy transport in a system can help us design such applications cost-

effectively without the need for expensive experimental test cases. In this regard, Navier-stokes

momentum equations for fluid flow have not been solved analytically so far in a general fashion.

Although, a number of approximate solutions exist for various simple geometries and flows, it has been

difficult to obtain analytical solutions for specific cases. This is where numerical methods come to be

helpful for obtaining solution for flow field and temperature. The lid driven cavity problem is a standard

geometry that has been studied for both 2-D and 3-D cases in literature. Hence, this was chosen to help

compare our results to results in literature.

Page 3: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Approach

The equations solved were-

Momentum and Mass conservation Equations

Energy Conservation Equation for Forced convection

Energy Conservation Equation for Free convection

This involves a change only in the y- momentum equation (gravity assumed to be in the

vertical direction). With energy equation remaining the same.

In order to setup and solve the momentum equations, the reference code1 from MIT Math CSE

website was used. This code makes use of staggered grid cell approach for Pressure, U velocity and V

velocity calculations. Once the velocity solutions were obtained, they were used to solve the energy

equation.

For solving the energy equations, the following approach was used –

Energy equation in Forced convection

1. Prandtl number (Pr) was defined. This determines the rate of momentum diffusivity to energy

diffusivity.

2. Temperature variable was initialized- at the cell centers (where the pressure variable is present)

3. Boundary conditions were specified for temperature.

a. Constant Wall temperature

Temperature at the North, South, East and West Boundaries are specified. And these

are incorporated into the boundary variables tN,tS,tE and tW. These boundary variables

are on the cell edges and hence dirichlet boundary conditions of the second type (the

1 http://www-math.mit.edu/cse/codes/mit18086_navierstokes.m

Page 4: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

cell average of the edge cell and the ghost cell are assumed to be the boundary value)

are applied.

b. Constant Heat flux

Heat flux at the North, South, East and West Boundaries are specified. These are

incorporated into the boundary variables indirectly through tN,tS,tE and tW.

So the heat flux boundary condition is incorporated into the temperature boundary

condition indirectly by using Neumann B.C. and specifying the slope using the above

method.

c. Insulated Wall condition

This is a special case of Constant heat flux condition where the heat flux is equal to zero.

Hence just Neumann boundary condition is applied at these boundaries.

4. Laplacian for the temperature equation is defined in a similar manner to the other variables like

pressure, velocity etc incorporating the appropriate boundary conditions.

5. In the time loop temperature is solved after the U and V velocities are solved. It is solved in two

parts.

a. The diffusion is solved implicitly first

b. Then the advection part is solved explicitly

6. Visualisation is done using contour plot in another figure.

Energy equation in Free Convection

1. For free convection all the steps followed were similar to the above approach with an addition

of an extra step during velocity calculation.

2. Grashof number is defined in the beginning. This gives the ratio of the magnitude of buoyancy to

viscous forces.

3. In the momentum calculations, after the calculations of the U and V velocities in every time

step, the V velocity is adjusted for the temperature variation from the previous time step.

Page 5: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Results and Analysis

I have provided the sample test cases for each of the cases studied and compared to literature.

The code can be easily modified to incorporate other boundary conditions as well. These test cases were

taken from Cheng et.al (2010). The solutions approached the literature solution – if run for more time,

these would have reached steady state.

Case 1 Constant wall temperature, moving lid (cold plate bottom, hot plate top)

1. Pr=0.71, Unorth=1, Tnorth=1, Uother=0, Tsouth=0

Ri (Richardson number)=10, Re= 316, t=100

Re = 3e+02 Pr = 0.7 t = 1e+02

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Page 6: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

2. Pr=0.71, Unorth=1, Tnorth=1, Uother=0, Tsouth=0

Ri (Richardson number)=1, Re= 1000, t=100

3. Pr=0.71, Unorth=1, Tnorth=1, Uother=0, Tsouth=0

Ri (Richardson number)=1, Re= 1000, t=100

Re = 1e+03 Pr = 0.7 t = 1e+02

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Re = 3e+03 Pr = 0.7 t = 1e+02

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Page 7: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Case 2 Constant wall temperature, moving lid (hot plate bottom, cold plate top)

1. Pr=0.71, Unorth=1, Tnorth=1, Uother=0, Tsouth=0

Ri (Richardson number)=10, Re= 316, t=30

Case 3 Constant heat flux

Here, there is no steady state solution. Hence a transient solution is shown for the following case.

(There is no comparison to literature for this).

1. Pr=0.1, Tnorth=0, Tsouth=0, Uother=0 , Unorth=0, Gr=0

Re= 100, t=0.5

2. Pr=0.1, Tnorth=0, Tsouth=0, Uother=0 , Unorth=0, Gr=0

Re= 100, t=1

3. Pr=0.1, Tnorth=0, Tsouth=0, Uother=0 , Unorth=0, Gr=0

Re= 100, t=4

Re = 3e+02 Pr = 0.7 t = 50

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Re = 1e+02 Pr = 0.1 t = 0.5

0.2 0.4 0.6 0.8

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

5

10

15

20

25

30

35

40

Re = 1e+02 Pr = 0.1 t = 1

0.2 0.4 0.6 0.8

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

5

10

15

20

25

30

35

40

45

50Re = 1e+02 Pr = 0.1 t = 4

0.2 0.4 0.6 0.8

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

10

20

30

40

50

60

Page 8: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Case 4 Raleigh Bernard Convection Cells

This case is an interesting case as when Boundary conditions (Hot plate at the bottom and cold plate at

the top) are applied, periodic convection cells are set up due to gravity force. There is no forced

convection here.

Re=100, Pr=0.1, Ri=10, t=20

Temperature Isotherm

Velocity Stream lines

Re = 1e+02 Pr = 0.1 t = 20

0.5 1 1.5 2 2.5

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Re = 1e+02 t = 20

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

0

0.01

0.02

0.03

0.04

0.05

0.06

Page 9: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Internal Flow and Flow over solid object I wanted to extend the problem to internal flow in a channel or flow over solid object in a

channel. However, due to error in the code, I couldn’t do so. However I have explained my approach for

the two cases below. And I have attached the respective codes too.

Internal Flow

I modified the boundary conditions of the cell to the following –

Uwest= 1 (Uniform flow at inlet)

Ux=0 (change in velocity with respect to x is zero at the exit)

Pxx =0 (The second derivative of the pressure is zero at the exit)

Neumann conditions for pressure on other sides.

However the solution becomes unstable with high pressure at the exit when the code is executed. This

maybe probably due to the fact that the boundary conditions are valid in the steady state but not in the

initial stages of the problem.

Flow over solid object in lid driven cavity

I modified the code to incorporate the following changes.

I modified the mesh domain by eliminating the grid cells corresponding to the obstacle.

Laplacian was redefined to account for the changed grid. No slip conditions were applied at the

interior walls similar to the exterior walls.

Neumann pressure boundary conditions were applied at the interior walls too.

LU decomposition was used to solve the equations as the matrices are non-symmetric.

However, the solution became unstable and the corners of the obstacle had flow patterns in the

wrong direction. This may be due to the fact that when ghost cells are used for boundary conditions on

the obstacles, the corner internal cells for velocity overlap for the perpendicular boundaries. Their

values are defined in different ways and hence discrepancy arises as values are over written.

Page 10: Study of Forced and Free convection in Lid driven cavity ...math.mit.edu/classes/18.086/2014/reports/Panchanathan_Project.pdfincorporate the energy equation for the forced convection

Conclusion Hence a general solver for the energy equation in the lid driven cavity problem was set up.

Various test cases for constant wall temperature and constant heat flux were tried and compared to

literature. An attempt was made for internal flow in a channel and flow over solid object.

References 1. T. S. Cheng and W.-H. Liu, “Effect of temperature gradient orientation on the

characteristics of mixed convection flow in a lid-driven square cavity,” Comput. Fluids, vol. 39, no. 6, pp. 965–978, Jun. 2010.

2. http://www-math.mit.edu/cse/codes/mit18086_navierstokes.m