Two-Dimensional Unsteady Flow in a Lid Driven Cavity with Constant Density and Viscosity ME 412 Project 5

Similar documents
Parabolic Flow in Parallel Plate Channel ME 412 Project 4

Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions

Handout 8 MATLAB Code for the Projection Method and BC Details for the Lid-Driven Cavity Problem

FREE BOUNDARY PROBLEMS IN FLUID MECHANICS

The behaviour of high Reynolds flows in a driven cavity

SIMULATION OF THREE-DIMENSIONAL INCOMPRESSIBLE CAVITY FLOWS

NOVEL FINITE DIFFERENCE SCHEME FOR THE NUMERICAL SOLUTION OF TWO-DIMENSIONAL INCOMPRESSIBLE NAVIER-STOKES EQUATIONS

Due Tuesday, November 23 nd, 12:00 midnight

Fine Grid Numerical Solutions of Triangular Cavity Flow

Open boundary conditions in numerical simulations of unsteady incompressible flow

Computation of Incompressible Flows: SIMPLE and related Algorithms

FINITE ELEMENT ANALYSIS OF MIXED CONVECTION HEAT TRANSFER ENHANCEMENT OF A HEATED SQUARE HOLLOW CYLINDER IN A LID-DRIVEN RECTANGULAR ENCLOSURE

Fine grid numerical solutions of triangular cavity flow

LEAST-SQUARES FINITE ELEMENT MODELS

FEniCS Course. Lecture 6: Incompressible Navier Stokes. Contributors Anders Logg André Massing

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

Thomas Pierro, Donald Slinn, Kraig Winters

Lattice Boltzmann Method for Fluid Simulations

CHAPTER 7 NUMERICAL MODELLING OF A SPIRAL HEAT EXCHANGER USING CFD TECHNIQUE

Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

Study of Forced and Free convection in Lid driven cavity problem

Natural Convection in Parabolic Enclosure Heated from Below

fluid mechanics as a prominent discipline of application for numerical

Computational Fluid Dynamics-1(CFDI)

Validation 3. Laminar Flow Around a Circular Cylinder

Fluid Dynamics Exercises and questions for the course

Lattice Boltzmann Method Solver Documentation

Numerical solutions of 2-D incompressible driven cavity flow with wavy bottom surface

Analysis of the flow and heat transfer characteristics for MHD free convection in an enclosure with a heated obstacle

DIRECT NUMERICAL SIMULATION IN A LID-DRIVEN CAVITY AT HIGH REYNOLDS NUMBER

Development of a Parallel, 3D, Lattice Boltzmann Method CFD Solver for Simulation of Turbulent Reactor Flow

External and Internal Incompressible Viscous Flows Computation using Taylor Series Expansion and Least Square based Lattice Boltzmann Method

NumAn2014 Conference Proceedings

Enhancement of the momentum interpolation method on non-staggered grids

A Meshless Radial Basis Function Method for Fluid Flow with Heat Transfer

Lattice Boltzmann Method for Fluid Simulations

DUE: WEDS MARCH 26TH 2018

Homework 4 in 5C1212; Part A: Incompressible Navier- Stokes, Finite Volume Methods

Computational Fluid Dynamics (CFD, CHD)*

Numerical investigation of natural convection inside a wavy enclosure

Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom. Cranfield University, Cranfield, Bedfordshire, MK43 0AL, United Kingdom

METHOD OF LINES FOR THE INCOMPRESSIBLE NAVIER-STOKES EQUATIONS IN THE STREAM-FUNCTION FORMULATION

SIMULATION OF MIXED CONVECTIVE HEAT TRANSFER USING LATTICE BOLTZMANN METHOD

Entropic Evaluation of Dean Flow Micromixers

Simulation and improvement of the ventilation of a welding workshop using a Finite volume scheme code

Turbulent Boundary Layers & Turbulence Models. Lecture 09

Spatial discretization scheme for incompressible viscous flows

EULER AND SECOND-ORDER RUNGE-KUTTA METHODS FOR COMPUTATION OF FLOW AROUND A CYLINDER

Rotating-surface-driven non-newtonian flow in a cylindrical enclosure

Fluid Dynamics: Theory, Computation, and Numerical Simulation Second Edition

A STUDY ON NATURAL CONVECTION HEAT TRANSFER IN COMPLEX BOUNDARIES

Numerical Study of the Moving Boundary Problem During Melting Process in a Rectangular Cavity Heated from Below

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7

EFFECT OF THE INLET OPENING ON MIXED CONVECTION INSIDE A 3-D VENTILATED CAVITY

Numerical Investigation of Laminar Flow over a Rotating Circular Cylinder

LATTICE BOLTZMANN SIMULATION OF FLUID FLOW IN A LID DRIVEN CAVITY

FINITE-DIFFERENCE IMPLEMENTATION OF LATTICE BOLTZMANN METHOD FOR USE WITH NON-UNIFORM GRIDS

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Ali J. Chamkha* Ahmed Ali Shaker

CFD STUDY OF MASS TRANSFER IN SPACER FILLED MEMBRANE MODULE

ANALYSIS OF LAMINAR FORCED CONVECTION INSIDE A SQUARE VENTILATED CAVITY USING THE OPENFOAM

Study on Non-Uniqueness of Taylor Vortex Flow Changing Inner Cylinder Acceleration Time

Statistical Analysis of the Effect of Small Fluctuations on Final Modes Found in Flows between Rotating Cylinders

Single Curved Fiber Sedimentation Under Gravity. Xiaoying Rong, Dewei Qi Western Michigan University

SENSITIVITY ANALYSIS OF THE FACTORS AFFECTING FORCE GENERATION BY WING FLAPPING MOTION

Chapter 9: Differential Analysis

V (r,t) = i ˆ u( x, y,z,t) + ˆ j v( x, y,z,t) + k ˆ w( x, y, z,t)

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

NATURAL CONVECTION HEAT TRANSFER IN PARTIALLY OPEN ENCLOSURES CONTAINING AN INTERNAL LOCAL HEAT SOURCE

Numerical Study of Free Convection Heat Transfer in a Square Cavity with a Fin Attached to Its Cold Wall

Scientific Computing I

Flow Structure Investigations in a "Tornado" Combustor

CFD Modeling of Reciprocating Flow around a Bend in Pulse Tube Cryocoolers

COMPUTATIONAL ANALYSIS OF LAMINAR FORCED CONVECTION IN RECTANGULAR ENCLOSURES OF DIFFERENT ASPECT RATIOS

Application of Chimera Grids in Rotational Flow

Space-time Discontinuous Galerkin Methods for Compressible Flows

The investigation on SIMPLE and SIMPLER algorithm through lid driven cavity

A finite-volume algorithm for all speed flows

Soft Bodies. Good approximation for hard ones. approximation breaks when objects break, or deform. Generalization: soft (deformable) bodies

NATURAL CONVECTION OF AIR IN TILTED SQUARE CAVITIES WITH DIFFERENTIALLY HEATED OPPOSITE WALLS

Chapter 9: Differential Analysis of Fluid Flow

A STRONG COUPLING SCHEME FOR FLUID-STRUCTURE INTERACTION PROBLEMS IN VISCOUS INCOMPRESSIBLE FLOWS

Computation of Unsteady Flows With Moving Grids

Numerical study of the steady state uniform flow past a rotating cylinder

The JHU Turbulence Databases (JHTDB)

SELF-SUSTAINED OSCILLATIONS AND BIFURCATIONS OF MIXED CONVECTION IN A MULTIPLE VENTILATED ENCLOSURE

JMBC Computational Fluid Dynamics I Exercises by A.E.P. Veldman

A Cartesian-Grid Discretisation Scheme Based on Local Integrated RBFNs for Two-Dimensional Elliptic Problems

1. Introduction, tensors, kinematics

Application of Viscous Vortex Domains Method for Solving Flow-Structure Problems

Numerical study of 2D heat transfer in a scraped surface heat exchanger

Research Article Direct Simulation of Low-Re Flow around a Square Cylinder by Numerical Manifold Method for Navier-Stokes Equations

Available online at ScienceDirect. Procedia Engineering 90 (2014 )

DNS of the Taylor-Green vortex at Re=1600

Active Flux for Advection Diffusion

Numerical Investigation of Combined Buoyancy and Surface Tension Driven Convection in an Axi-Symmetric Cylindrical Annulus

Finite Volume Method

UNSTEADY MIXED CONVECTION IN A POROUS MEDIA FILLED LID-DRIVEN CAVITY HEATED BY A SEMI-CIRCULAR HEATERS

Alternative and Explicit Derivation of the Lattice Boltzmann Equation for the Unsteady Incompressible Navier-Stokes Equation

Investigation of reattachment length for a turbulent flow over a backward facing step for different step angle

Transcription:

Two-Dimensional Unsteady Flow in a Lid Driven Cavity with Constant Density and Viscosity ME 412 Project 5 Jingwei Zhu May 14, 2014 Instructor: Surya Pratap Vanka 1 Project Description The objective of this project is to develop and apply a computer program to solve the twodimensional unsteady Navier-Stokes equations for an elliptic flow in a square cavity with top wall sliding at a given velocity. We assume that the fluid is incompressible and has constant viscosity. The two-dimensional unsteady Navier-Stokes equations for flow with constant density and viscosity are listed as follows: u x + v y = 0 (1) ρ( u t + u u x + v u y ) = P x + µ( 2 u x 2 + 2 u y 2 ) (2) ρ( v t + u v x + v v y ) = P y + µ( 2 v x 2 + 2 v y 2 ) (3) where u and v are the two Cartesian velocities, x and y are spatial coordinates, t is the time, ρ is the density, P is the static pressure, and µ is the dynamic viscosity. The side length of the square cavity is set to 1 meter and a 42 42 grid is used in the numerical computation. The grid layout is shown in Figure 1. There are ghost nodes located outside the domain of interest. The boundary conditions are that v velocity at all the domain boundaries is zero, while u velocity of the flow near the top wall equals the top wall velocity and it remains zero at other boundaries. Numerical results for different Reynolds numbers of 50, 100 and 200 will be shown. The Reynolds number is based on the side length of the square cavity, top wall velocity and the kinematic viscosity 1

Figure 1: Grid layout of the fluid, as is shown in Equation 4: Re = ρ V L µ (4) where V is the top wall velocity and L is the side length. The time step size t yields to the following stability limit: 1 t u x + v y + (5) 2ν + 2ν x 2 y 2 In our project, a time step of 0.002s is used in all cases which always yields above stability limit given that flow density ρ = 1kg/m 3, dynamic viscosity µ = 0.001kg/m s, x = y = 0.025m. A collocated scheme is used for velocity discretizations and pressure-poisson equations are formulated to avoid checker-board splitting. 2 Differencing Scheme 2.1 Discretization First order time and second order space discretizations are used in this project. An explicit time discretization scheme has been used for both convection and diffusion, and pressure-poisson equations are formulated for determining the pressure field at the new time step. Relevant discretizations are shown as follows: ( u x )n un i+1/2,j un i 1/2,j x (6) 2

( v y )n vn i,j+1/2 un i,j 1/2 y ( u t )n un+1 i,j u n i,j t ( v t )n vn+1 i,j vi,j n t (u u x )n u n u n i+1,j un i 1,j i,j 2 x (v u y )n vi,j n u n i,j+1 un i,j 1 2 y (u v x )n u n vi+1,j n vn i 1,j i,j 2 x (v v y )n vi,j n vi,j+1 n vn i,j 1 2 y ( P x )n P i+1,j n P i 1,j n 2 x ( P y )n P i,j+1 n P i,j 1 n 2 y (7) (8) (9) (10) (11) (12) (13) (14) (15) 2.2 Collocated Fractional Step Algorithm ( 2 u x 2 )n = un i+1,j 2un i,j + un i 1,j x 2 (16) ( 2 u y 2 )n = un i,j+1 2un i,j + un i,j 1 y 2 (17) ( 2 v x 2 )n = vn i+1,j 2vn i,j + vn i 1,j x 2 (18) ( 2 v y 2 )n = vn i,j+1 2vn i,j + vn i,j 1 y 2 (19) A collocated fractional step algorithm is used in the simulation. Main procedures of this algorithm can be shown as follows: Prescribe domain size Prescribe solution and flow parameters 3

Initialize flow variables Start time loop The following steps will be executed inside each time loop: Solve for û, ˆv at each node (i, j) inside the domain ρûi,j u n i,j t = C n x + D n x = = ρ un i,j 2 x (un i+1,j u n i 1,j) ρ vn i,j 2 y (un i,j+1 u n i,j 1) + µ x 2 (un i+1,j 2u n i,j + u n i 1,j) + µ y 2 (un i,j+1 2u n i,j + u n i,j 1) (20) ρ ˆv i,j v n i,j t = C n y + D n y = Evaluate û, ˆv at midpoints = ρ un i,j 2 x (vn i+1,j v n i 1,j) ρ vn i,j 2 y (vn i,j+1 v n i,j 1) + µ x 2 (vn i+1,j 2v n i,j + v n i 1,j) + µ y 2 (vn i,j+1 2v n i,j + v n i,j 1) (21) û i+1/2,j 1 2 (û i,j + û i+1,j ) (22) û i 1/2,j 1 2 (û i,j + û i 1,j ) (23) ˆv i,j+1/2 1 2 (ˆv i,j + û i,j+1 ) (24) ˆv i,j 1/2 1 2 (ˆv i,j + û i,j 1 ) (25) Discrete Pressure-Poisson Equations ρ t U = ρ û i 1/2,j t (ûi+1/2,j x + ˆv i,j+1/2 ˆv i,j 1/2 ) y = ( P i+1,j n+1 n+1 2Pi,j + Pi 1,j n+1 x 2 ) + ( P i,j+1 n+1 n+1 2Pi,j + Pi,j 1 n+1 y 2 ) (26) Note that on the domain boundary since u 1.5,j and u nx+1/2,j are fixed for all j, v i,1.5 and u i,ny+1/2 are fixed for all i, small adjustment needs to be made to the original pressure- 4

Poisson equation. For example at (nx, j): {u nx+1/2,j [û nx 1/2,j t n+1 nx,j (P P n+1 ρ x nx 1,j )]}/ x +[ˆv nx,j+1/2 ˆv nx,j 1/2 t n+1 (P ρ nx,j+1 P nx,j n+1 y ) + t n+1 (P ρ nx,j P n+1 y nx,j 1 )]/ y = 0 (27) The discrete pressure-poisson equations will be solved by SOR or other iterative solvers. Correct grid node velocities u n+1 i,j, v n+1 i,j with û i,j, ˆv i,j and P n+1 i 1,j, P n+1 i+1,j, P n+1 i,j+1, P n+1 i,j 1 : u n+1 i,j v n+1 i,j = û i,j t ρ = ˆv i,j t ρ n+1 i+1,j (P P i 1,j n+1 2 x n+1 i,j+1 (P P i,j 1 n+1 2 y ) (28) ) (29) Modify the velocities at the ghost nodes outside the domain so that they can be used at the beginning of next time loop. (End of the time loop) In this project, we use SOR with an over-relaxation factor of 1.4 to solve the pressure-poisson equations. Convergence is assumed to be reached when error residual is less than 0.001. Error residual is defined as: E = D (LHS RHS)2 nx ny where LHS and RHS are the left-hand side and the right-hand side of the pressure-poisson equation at each node and D denotes the sum of all the square of difference between LHS and RHS at each node within the domain. nx ny is the number of nodes within the domain. Similarly, we assume that steady state is reached when convergence residuals for both u and v velocities are less than 1e-6. Convergence residual is defined as: C = D (OLD NEW )2 nx ny where OLD and NEW are respectively the old value from last loop and the new value calculated in current loop and D denotes the sum of all the square of difference between OLD and NEW at each node within the domain. nx ny is the number of nodes within the domain. 5

3 Results and Discussion Figure 2 shows the contours of u velocity for Re=50 at 4 time intervals (time steps = 500, 1000, 2000, and 5000; time step size equals 0.002s). Figure 3 shows the contours of v velocity for Re=50 at 4 time intervals (time steps = 500, 1000, 2000, and 5000; time step size equals 0.002s). Figure 4 shows the streamlines of velocity vector for Re=50 at 4 time intervals (time steps = 500, 1000, 2000, and 5000; time step size equals 0.002s). It can be clearly observed that there is a vortex formed inside the square cavity and its center moves downward until the flow field becomes steady. The rotational direction of the vortex is clockwise, which is in accord with the moving direction of the top wall. (a) t=1s Figure 2: (a)(b)(c)(d): Contours of u velocity for Re=50 at 4 time intervals 6

(a) t=1s Figure 3: (a)(b)(c)(d): Contours of v velocity for Re=50 at 4 time intervals (a) t=1s Figure 4: (a)(b)(c)(d): Streamlines of velocity vector for Re=50 at 4 time intervals 7

Figure 5, 6 and 7 show respectively the contours of u velocity, contours of v velocity and streamlines of velocity vector for Re=100 at 4 time intervals (time steps = 500, 1000, 2000, and 5000; time step size equals 0.002s). (a) t=1s Figure 5: (a)(b)(c)(d): Contours of u velocity for Re=100 at 4 time intervals 8

(a) t=1s Figure 6: (a)(b)(c)(d): Contours of v velocity for Re=100 at 4 time intervals (a) t=1s Figure 7: (a)(b)(c)(d): Streamlines of velocity vector for Re=100 at 4 time intervals 9

Figure 8, 9 and 10 show respectively the contours of u velocity, contours of v velocity and streamlines of velocity vector for Re=200 at 4 time intervals (time steps = 500, 1000, 2000, and 5000; time step size equals 0.002s). (a) t=1s Figure 8: (a)(b)(c)(d): Contours of u velocity for Re=200 at 4 time intervals 10

(a) t=1s Figure 9: (a)(b)(c)(d): Contours of v velocity for Re=200 at 4 time intervals (a) t=1s Figure 10: (a)(b)(c)(d): Streamlines of velocity vector for Re=200 at 4 time intervals 11

Numbers of iterations it takes to reach steady state for different Reynolds numbers and the corresponding time costed are shown in Table 1. Reynolds Number Iterations Time (s) Residual of u velocity Residual of v velocity 50 2632 5.264 9.9995e-7 6.1809e-7 100 5160 10.32 9.9989e-7 7.9401e-7 200 12431 24.862 9.9992e-7 8.6143e-7 Table 1: Important parameters when steady state is reached for different Reynolds numbers As can be observed from Table 1, for Re=50 and 100, at t=10s (5000 time steps) the flow inside the cavity is already or very close to steady. But for Re=200, it takes as long as 24.9s (12431 time steps) to reach steady state. Figure 11 displays a comparison of contours of u and v velocity at steady state for different Reynolds numbers. Figure 12 shows the u velocity profiles at the vertical centerline and v velocity profiles at the horizontal centerline at steady state for different Reynolds numbers. Figure 13 displays the streamlines of velocity vector at steady state for different Reynolds numbers. When Re=200, at steady state one major vortex whose rotational direction is clockwise is at the middle of the cavity. Two vortices whose rotational direction is counterclockwise are observed at two bottom corners of the cavity (Figure 13 (c1)(c2)). No obvious vortices can be observed at the corners for lower Reynolds numbers, even at steady state. In Figure 14 the profiles of u velocity at the vertical centerline and v velocity at the horizontal centerline we generated for Re=100 at steady state are compared with those generated by Omari[2]. They are in good agreement with each other. In Figure 15 the streamlines of velocity vector we generated for Re=200 at steady state are compared with those generated by Baloch et al.[3]. Good agreement can be clearly observed. 12

(a1) Re=50, u velocity (a2) Re=50, v velocity (b1) Re=100, u velocity (b2) Re=100, v velocity (c1) Re=200, u velocity (c2) Re=200, v velocity Figure 11: (a)(b)(c): Contours of u and v velocity at steady state for different Reynolds numbers 13

(a1) Re=50, vertical centerline u velocity (a2) Re=50, horizontal centerline v velocity (b1) Re=100, vertical centerline u velocity (b2) Re=100, horizontal centerline v velocity (c1) Re=200, vertical centerline u velocity (c2) Re=200, horizontal centerline v velocity Figure 12: (a)(b)(c): Profiles of u and v velocity at the centerline at steady state for different Reynolds numbers 14

(a) Re=50 (b) Re=100 (c1) Re=200 (c2) Re=200, detail of left bottom corner Figure 13: (a)(b)(c): Streamlines of velocity vector at steady state for different Reynolds numbers 15

(a1) Our u velocity profile (a2) Omari[2] (b1) Our v velocity profile (b2) Omari[2] Figure 14: (a)(b): Comparison of profiles of u velocity at the vertical centerline and v velocity at the horizontal centerline generated by our codes and by Omari[2] for Re=100 at steady state (a) Our result (b) Baloch et al.[3] Figure 15: (a)(b): Comparison of streamlines of velocity vector generated by our codes and by Baloch et al.[3] for Re=200 at steady state 16

4 Summary In this project, we successfully developed a program to solve the two-dimensional unsteady Navier- Stokes equations for an elliptic flow in a square cavity with top wall sliding at a given velocity. Numerical results for flow of different Reynolds numbers at different time intervals and steady state have been shown. Satisfactory agreement with results from other literatures has been achieved. References [1] Joel H. Ferziger and Milovan Peric, Computational Methods for Fluid Dynamics, 3rd edition. [2] Omari R., CFD Simulations of Lid Driven Cavity Flow at Moderate Reynolds Number, European Scientific Journal, 2013, 9(15). [3] Baloch Z. A. K., Baloch M. E., Shaikh H., Computer Simulation of Lid Driven shallow Cavity Flows: Effects of Fluid Inertia and Aspect Ratios. 17