AML 811
Lecture 16
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
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
a) Make a project group today and communicate it to me today b) 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
Discretizing the Pressure equation
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
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
( ) ( ) 2 1 , 1 , 1 1 , 1 2 1 , , 2 1 1 , 1 , 1 1 , 2 1 + + + + + + + + + + + + + − ∆ ∆ − = + − ∆ ∆ − = j i n j i n j i n j i j i n j i n j i n j i RHSV p p y t v RHSU p p x t u
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
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ∆ − + ∆ − ∆ = ∆ + − + ∆ + − − + − + + + + + − + + + + − y V HS R V HS R x HSU R HSU R t y p p p x p p p j i j i j i j i n j i n j i n j i n j i n j i n j i 2 1 , 2 1 , , 2 1 , 2 1 2 1 1 , 1 , 1 1 , 2 1 , 1 1 , 1 , 1 1 2 2
MAC for unsteady, incompressible flow
(contd.)
At each time step
1. Solve the discrete Poisson equation
2. Update the velocities using
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ∆ − + ∆ − ∆ = ∆ + − + ∆ + − − + − + + + + + − + + + + − y V HS R V HS R x HSU R HSU R t y p p p x p p p j i j i j i j i n j i n j i n j i n j i n j i n j i 2 1 , 2 1 , , 2 1 , 2 1 2 1 1 , 1 , 1 1 , 2 1 , 1 1 , 1 , 1 1 2 2 ( ) ( ) 2 1 , 1 , 1 1 , 1 2 1 , , 2 1 1 , 1 , 1 1 , 2 1 + + + + + + + + + + + + + − ∆ ∆ − = + − ∆ ∆ − = j i n j i n j i n j i j i n j i n j i n j i RHSV p p y t v RHSU p p x t u
MAC for unsteady, incompressible flow
(contd.)
At each time step
1. Solve the pressure equation
2. Update the velocities using
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ ∆ − + ∆ − ∆ = ∆ + − + ∆ + − − + − + + + + + − + + + + − y V HS R V HS R x HSU R HSU R t y p p p x p p p j i j i j i j i n j i n j i n j i n j i n j i n j i 2 1 , 2 1 , , 2 1 , 2 1 2 1 1 , 1 , 1 1 , 2 1 , 1 1 , 1 , 1 1 2 2 ( ) ( ) 2 1 , 1 , 1 1 , 1 2 1 , , 2 1 1 , 1 , 1 1 , 2 1 + + + + + + + + + + + + + − ∆ ∆ − = + − ∆ ∆ − = j i n j i n j i n j i j i n j i n j i n j i RHSV p p y t v RHSU p p x t u
Note that using this method ensures that the discrete continuity eqn is satisfied exactly at each step
0 1 2 1 , 1 2 1 , 1 , 2 1 1 , 2 1 = ∆ − + ∆ − + − + + + − + + y v v x u u n j i n j i n j i n j i
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
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
a) Make a project group today and communicate it to me today b) 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