Please copy and paste this embed script to where you want to embed

AML 811 Lecture 16 Case Study: Lid Driven Cavity Flow

Minor 2 Proposed date : Mar 27 (Fri) – Mar 30 (Mon). Please let me know now (latest by Friday) if this conflicts with any other Minors etc

Pattern : A few programs will be put up and you will be asked to make corrections, inferences, modifications etc Will also be split into basic, intermediate and advanced problems

Final Project

a) b)

Default Project : Systematical computational analysis of boundary layer over a flat plate Due on Apr 28, last day of class Auditors Those auditing the course officially need to either do a simple coding project or a literature review and answer a series of questions (your choice) Those auditing unofficially (just sitting in the class) obviously don’t need to do anything ☺ People taking the course for credit : Please stay back and Make a project group today and communicate it to me today Choose on a project topic after discussing it with me today

Lid Driven Cavity flow First step of (all) incompressible NS based computational projects : An incompressible NS solver for Lid Driven Cavity flow

Staggered grid : x-momentum equation

The circled convective terms have to be found by interpolation as they don’t lie on the known grid points This staggered grid formulation is also known as the Marker and Cell (MAC) formulation

Staggered grid : y-momentum equation

The circled convective terms have to be found by interpolation as they don’t lie on the known grid points This staggered grid formulation is also known as the Marker and Cell (MAC) formulation Now, we need to use the pressure Poisson equation to update the pressure

Discretizing the Pressure equation

Discretizing the Pressure equation

We need to use u, v at time level n for the RHS.

Discretization of the Pressure Poisson equation

The LHS is the usual 5-point finite difference for Poisson equation Leads to somewhat inaccurate transients because D is never really exactly zero. But, this method can be used for steady flows.

MAC algorithm for steady incompressible flows using the Pressure Poisson equation Step 1 : Initialize u,v Step 2 : At each time step n: Solve the Pressure Poisson equation to calculate pressure at level n Use the momentum equations, u, v and p at n to update the velocities See if steady state criterion is reached to desired tolerance. If not, repeat Step 2.

A method for unsteady incompressible flows The algorithm only satisfies the discretized continuity equation approximately There are also several other methods for steady incompressible flows. We’ll be discussing those when we deal with the finite volume method For an unsteady problem, we would like to ensure that the continuity equation is satisfied exactly (to machine precision) at each time step. There are several ways to do this. Let us try a small variation of the steady MAC method

MAC method for unsteady flow

Let us try to satisfy the continuity equation for each (i,j) at all time steps.

MAC method for unsteady flow

Momentum equations

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

MAC method for unsteady flow

Momentum equations

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

The way to do this is to retain the above discretizations but change the pressure discretizations to time level n+1

MAC method for unsteady flow

Momentum equations

u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

2

(

(

)

)

The way to do this is to retain the above discretizations but change the pressure discretizations to time level n+1

MAC for unsteady, incompressible flow Initialize solution for velocity. This may or may not satisfy the discrete continuity equation At each time step 1.

Solve the pressure equation pin−+11, j − 2 pin, +j 1 + pin++11, j ∆x

2

+

pin, +j −11 − 2 pin, +j 1 + pin, +j +11 ∆y 2

RHSV 1 − RHSV 1 ⎤ ⎡ RHSU 1 − RHSU 1 i+ , j i− , j i , j+ i, j− 1 ⎢ 2 2 2 2 ⎥ = + ⎥ ∆t ⎢ ∆x ∆y ⎥⎦ ⎢⎣

MAC for unsteady, incompressible flow (contd.) At each time step 1.

Solve the discrete Poisson equation p in−+11, j − 2 p in, +j 1 + p in++11, j ∆x

2

⎡ R HSU 1 ⎢ = ∆t ⎢ ⎣⎢

2.

i+

1 , j 2

+

p in, +j −1 1 − 2 p in, +j 1 + p in, +j +1 1 ∆y

− R HSU ∆x

i−

1 , j 2

2

R HS V +

i , j+

1 2

− R HS V ∆y

i, j−

1 2

⎤ ⎥ ⎥ ⎦⎥

Update the velocities using u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

2

(

(

)

)

MAC for unsteady, incompressible flow (contd.) At each time step 1.

Solve the pressure equation p in−+11, j − 2 p in, +j 1 + p in++11, j ∆x

2

⎡ R HSU 1 ⎢ = ∆t ⎢ ⎣⎢

2.

i+

1 , j 2

+

p in, +j −1 1 − 2 p in, +j 1 + p in, +j +1 1

− R HSU ∆x

∆y i−

1 , j 2

2

R HS V +

i , j+

1 2

− R HS V

i, j−

1 2

∆y

Update the velocities using u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

2

(

(

Note that using this method ensures that the discrete continuity eqn is satisfied exactly at each step

)

)

⎤ ⎥ ⎥ ⎦⎥

u

n +1 1 , j 2

i+

− u ∆x

n +1 1 , j 2

i−

v n +1 1 − v n +1 1 +

i, j+

i, j−

2

∆y

2

= 0

Summary of Lecture 15 MAC scheme for steady flows Explicit artificial compressibility method Pressure Poisson equation based method

MAC scheme for unsteady flows Derive a Poisson equation after discretizing the flow equations This ensures that the discrete continuity equation is satisfied exactly

Plan for the remaining 12 lectures FDM for non-Cartesian domains : 1.5 lectures Finite Volume method : 5.5 lectures Spectral methods : 1 lecture Multigrid methods : 1 lecture Turbulence modeling : 1 lecture Hyperbolic conservation laws : 1 lecture LES and DNS : 1 lecture

Minor 2 Proposed date : Mar 27 (Fri) – Mar 30 (Mon). Please let me know now (latest by Friday) if this conflicts with any other Minors etc

Pattern : A few programs will be put up and you will be asked to make corrections, inferences, modifications etc Will also be split into basic, intermediate and advanced problems

Final Project

a) b)

Default Project : Systematical computational analysis of boundary layer over a flat plate Due on Apr 28, last day of class Auditors Those auditing the course officially need to either do a simple coding project or a literature review and answer a series of questions (your choice) Those auditing unofficially (just sitting in the class) obviously don’t need to do anything ☺ People taking the course for credit : Please stay back and Make a project group today and communicate it to me today Choose on a project topic after discussing it with me today

Lid Driven Cavity flow First step of (all) incompressible NS based computational projects : An incompressible NS solver for Lid Driven Cavity flow

View more...
Minor 2 Proposed date : Mar 27 (Fri) – Mar 30 (Mon). Please let me know now (latest by Friday) if this conflicts with any other Minors etc

Pattern : A few programs will be put up and you will be asked to make corrections, inferences, modifications etc Will also be split into basic, intermediate and advanced problems

Final Project

a) b)

Default Project : Systematical computational analysis of boundary layer over a flat plate Due on Apr 28, last day of class Auditors Those auditing the course officially need to either do a simple coding project or a literature review and answer a series of questions (your choice) Those auditing unofficially (just sitting in the class) obviously don’t need to do anything ☺ People taking the course for credit : Please stay back and Make a project group today and communicate it to me today Choose on a project topic after discussing it with me today

Lid Driven Cavity flow First step of (all) incompressible NS based computational projects : An incompressible NS solver for Lid Driven Cavity flow

Staggered grid : x-momentum equation

The circled convective terms have to be found by interpolation as they don’t lie on the known grid points This staggered grid formulation is also known as the Marker and Cell (MAC) formulation

Staggered grid : y-momentum equation

The circled convective terms have to be found by interpolation as they don’t lie on the known grid points This staggered grid formulation is also known as the Marker and Cell (MAC) formulation Now, we need to use the pressure Poisson equation to update the pressure

Discretizing the Pressure equation

Discretizing the Pressure equation

We need to use u, v at time level n for the RHS.

Discretization of the Pressure Poisson equation

The LHS is the usual 5-point finite difference for Poisson equation Leads to somewhat inaccurate transients because D is never really exactly zero. But, this method can be used for steady flows.

MAC algorithm for steady incompressible flows using the Pressure Poisson equation Step 1 : Initialize u,v Step 2 : At each time step n: Solve the Pressure Poisson equation to calculate pressure at level n Use the momentum equations, u, v and p at n to update the velocities See if steady state criterion is reached to desired tolerance. If not, repeat Step 2.

A method for unsteady incompressible flows The algorithm only satisfies the discretized continuity equation approximately There are also several other methods for steady incompressible flows. We’ll be discussing those when we deal with the finite volume method For an unsteady problem, we would like to ensure that the continuity equation is satisfied exactly (to machine precision) at each time step. There are several ways to do this. Let us try a small variation of the steady MAC method

MAC method for unsteady flow

Let us try to satisfy the continuity equation for each (i,j) at all time steps.

MAC method for unsteady flow

Momentum equations

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

MAC method for unsteady flow

Momentum equations

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

The way to do this is to retain the above discretizations but change the pressure discretizations to time level n+1

MAC method for unsteady flow

Momentum equations

u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

At each time step we can update the velocities using the momentum equations. However, we need to do this in a way which will satisfy continuity as well

2

(

(

)

)

The way to do this is to retain the above discretizations but change the pressure discretizations to time level n+1

MAC for unsteady, incompressible flow Initialize solution for velocity. This may or may not satisfy the discrete continuity equation At each time step 1.

Solve the pressure equation pin−+11, j − 2 pin, +j 1 + pin++11, j ∆x

2

+

pin, +j −11 − 2 pin, +j 1 + pin, +j +11 ∆y 2

RHSV 1 − RHSV 1 ⎤ ⎡ RHSU 1 − RHSU 1 i+ , j i− , j i , j+ i, j− 1 ⎢ 2 2 2 2 ⎥ = + ⎥ ∆t ⎢ ∆x ∆y ⎥⎦ ⎢⎣

MAC for unsteady, incompressible flow (contd.) At each time step 1.

Solve the discrete Poisson equation p in−+11, j − 2 p in, +j 1 + p in++11, j ∆x

2

⎡ R HSU 1 ⎢ = ∆t ⎢ ⎣⎢

2.

i+

1 , j 2

+

p in, +j −1 1 − 2 p in, +j 1 + p in, +j +1 1 ∆y

− R HSU ∆x

i−

1 , j 2

2

R HS V +

i , j+

1 2

− R HS V ∆y

i, j−

1 2

⎤ ⎥ ⎥ ⎦⎥

Update the velocities using u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

2

(

(

)

)

MAC for unsteady, incompressible flow (contd.) At each time step 1.

Solve the pressure equation p in−+11, j − 2 p in, +j 1 + p in++11, j ∆x

2

⎡ R HSU 1 ⎢ = ∆t ⎢ ⎣⎢

2.

i+

1 , j 2

+

p in, +j −1 1 − 2 p in, +j 1 + p in, +j +1 1

− R HSU ∆x

∆y i−

1 , j 2

2

R HS V +

i , j+

1 2

− R HS V

i, j−

1 2

∆y

Update the velocities using u n +11 = −

∆t n +1 pi +1, j − pin, +j 1 + RHSU 1 i+ , j ∆x 2

v n +1 1 = −

∆t n +1 pi , j +1 − pin, +j 1 + RHSV 1 i, j+ ∆y 2

i+ , j 2

i, j+

2

(

(

Note that using this method ensures that the discrete continuity eqn is satisfied exactly at each step

)

)

⎤ ⎥ ⎥ ⎦⎥

u

n +1 1 , j 2

i+

− u ∆x

n +1 1 , j 2

i−

v n +1 1 − v n +1 1 +

i, j+

i, j−

2

∆y

2

= 0

Summary of Lecture 15 MAC scheme for steady flows Explicit artificial compressibility method Pressure Poisson equation based method

MAC scheme for unsteady flows Derive a Poisson equation after discretizing the flow equations This ensures that the discrete continuity equation is satisfied exactly

Plan for the remaining 12 lectures FDM for non-Cartesian domains : 1.5 lectures Finite Volume method : 5.5 lectures Spectral methods : 1 lecture Multigrid methods : 1 lecture Turbulence modeling : 1 lecture Hyperbolic conservation laws : 1 lecture LES and DNS : 1 lecture

Minor 2 Proposed date : Mar 27 (Fri) – Mar 30 (Mon). Please let me know now (latest by Friday) if this conflicts with any other Minors etc

Pattern : A few programs will be put up and you will be asked to make corrections, inferences, modifications etc Will also be split into basic, intermediate and advanced problems

Final Project

a) b)

Default Project : Systematical computational analysis of boundary layer over a flat plate Due on Apr 28, last day of class Auditors Those auditing the course officially need to either do a simple coding project or a literature review and answer a series of questions (your choice) Those auditing unofficially (just sitting in the class) obviously don’t need to do anything ☺ People taking the course for credit : Please stay back and Make a project group today and communicate it to me today Choose on a project topic after discussing it with me today

Lid Driven Cavity flow First step of (all) incompressible NS based computational projects : An incompressible NS solver for Lid Driven Cavity flow

Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.

To keep our site running, we need your help to cover our server cost (about $400/m), a small donation will help us a lot.